blob: 697f575d46a1256171e911b0648961ca612ec4aa [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00002# From configure.in Revision: 1.456 .
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
Jack Jansen6b08a402004-06-03 12:41:45 +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 CONFIGURE_MACOSX_DEPLOYMENT_TARGET 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'
Skip Montanaro6dead952003-09-25 14:50:04 +0000313ac_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
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000870 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000871 --with(out)-pymalloc disable/enable specialized mallocs
872 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with-fpectl enable SIGFPE catching
874 --with-libm=STRING math library
875 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000876
877Some influential environment variables:
878 CC C compiler command
879 CFLAGS C compiler flags
880 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
881 nonstandard directory <lib dir>
882 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
883 headers in a nonstandard directory <include dir>
884 CPP C preprocessor
885
886Use these variables to override the choices made by `configure' or to help
887it to find libraries and programs with nonstandard names/locations.
888
889_ACEOF
890fi
891
892if test "$ac_init_help" = "recursive"; then
893 # If there are subdirs, report their specific --help.
894 ac_popdir=`pwd`
895 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
896 test -d $ac_dir || continue
897 ac_builddir=.
898
899if test "$ac_dir" != .; then
900 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
901 # A "../" for each directory in $ac_dir_suffix.
902 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
903else
904 ac_dir_suffix= ac_top_builddir=
905fi
906
907case $srcdir in
908 .) # No --srcdir option. We are building in place.
909 ac_srcdir=.
910 if test -z "$ac_top_builddir"; then
911 ac_top_srcdir=.
912 else
913 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
914 fi ;;
915 [\\/]* | ?:[\\/]* ) # Absolute path.
916 ac_srcdir=$srcdir$ac_dir_suffix;
917 ac_top_srcdir=$srcdir ;;
918 *) # Relative path.
919 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
920 ac_top_srcdir=$ac_top_builddir$srcdir ;;
921esac
922# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
923# absolute.
924ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000925ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000926ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
927ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
928
929 cd $ac_dir
930 # Check for guested configure; otherwise get Cygnus style configure.
931 if test -f $ac_srcdir/configure.gnu; then
932 echo
933 $SHELL $ac_srcdir/configure.gnu --help=recursive
934 elif test -f $ac_srcdir/configure; then
935 echo
936 $SHELL $ac_srcdir/configure --help=recursive
937 elif test -f $ac_srcdir/configure.ac ||
938 test -f $ac_srcdir/configure.in; then
939 echo
940 $ac_configure --help
941 else
942 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
943 fi
944 cd $ac_popdir
945 done
946fi
947
948test -n "$ac_init_help" && exit 0
949if $ac_init_version; then
950 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000951python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000952generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000953
954Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
955Free Software Foundation, Inc.
956This configure script is free software; the Free Software Foundation
957gives unlimited permission to copy, distribute and modify it.
958_ACEOF
959 exit 0
960fi
961exec 5>config.log
962cat >&5 <<_ACEOF
963This file contains any messages produced by compilers while
964running configure, to aid debugging if configure makes a mistake.
965
Fred Drake9bd44622003-07-30 17:39:48 +0000966It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000967generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000968
969 $ $0 $@
970
971_ACEOF
972{
973cat <<_ASUNAME
974## --------- ##
975## Platform. ##
976## --------- ##
977
978hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
979uname -m = `(uname -m) 2>/dev/null || echo unknown`
980uname -r = `(uname -r) 2>/dev/null || echo unknown`
981uname -s = `(uname -s) 2>/dev/null || echo unknown`
982uname -v = `(uname -v) 2>/dev/null || echo unknown`
983
984/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
985/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
986
987/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
988/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
989/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
990hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
991/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
992/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
993/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
994
995_ASUNAME
996
997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
998for as_dir in $PATH
999do
1000 IFS=$as_save_IFS
1001 test -z "$as_dir" && as_dir=.
1002 echo "PATH: $as_dir"
1003done
1004
1005} >&5
1006
1007cat >&5 <<_ACEOF
1008
1009
1010## ----------- ##
1011## Core tests. ##
1012## ----------- ##
1013
1014_ACEOF
1015
1016
1017# Keep a trace of the command line.
1018# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001019# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001020# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001021# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001022ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001023ac_configure_args0=
1024ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001025ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001026ac_must_keep_next=false
1027for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001028do
Skip Montanaro6dead952003-09-25 14:50:04 +00001029 for ac_arg
1030 do
1031 case $ac_arg in
1032 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1033 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1034 | -silent | --silent | --silen | --sile | --sil)
1035 continue ;;
1036 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1037 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1038 esac
1039 case $ac_pass in
1040 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1041 2)
1042 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1043 if test $ac_must_keep_next = true; then
1044 ac_must_keep_next=false # Got value, back to normal.
1045 else
1046 case $ac_arg in
1047 *=* | --config-cache | -C | -disable-* | --disable-* \
1048 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1049 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1050 | -with-* | --with-* | -without-* | --without-* | --x)
1051 case "$ac_configure_args0 " in
1052 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1053 esac
1054 ;;
1055 -* ) ac_must_keep_next=true ;;
1056 esac
1057 fi
1058 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1059 # Get rid of the leading space.
1060 ac_sep=" "
1061 ;;
1062 esac
1063 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001064done
Skip Montanaro6dead952003-09-25 14:50:04 +00001065$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1066$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 +00001067
1068# When interrupted or exit'd, cleanup temporary files, and complete
1069# config.log. We remove comments because anyway the quotes in there
1070# would cause problems or look ugly.
1071# WARNING: Be sure not to use single quotes in there, as some shells,
1072# such as our DU 5.0 friend, will then `close' the trap.
1073trap 'exit_status=$?
1074 # Save into config.log some information that might help in debugging.
1075 {
1076 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001077
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 cat <<\_ASBOX
1079## ---------------- ##
1080## Cache variables. ##
1081## ---------------- ##
1082_ASBOX
1083 echo
1084 # The following way of writing the cache mishandles newlines in values,
1085{
1086 (set) 2>&1 |
1087 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1088 *ac_space=\ *)
1089 sed -n \
1090 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1091 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1092 ;;
1093 *)
1094 sed -n \
1095 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1096 ;;
1097 esac;
1098}
1099 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001100
1101 cat <<\_ASBOX
1102## ----------------- ##
1103## Output variables. ##
1104## ----------------- ##
1105_ASBOX
1106 echo
1107 for ac_var in $ac_subst_vars
1108 do
1109 eval ac_val=$`echo $ac_var`
1110 echo "$ac_var='"'"'$ac_val'"'"'"
1111 done | sort
1112 echo
1113
1114 if test -n "$ac_subst_files"; then
1115 cat <<\_ASBOX
1116## ------------- ##
1117## Output files. ##
1118## ------------- ##
1119_ASBOX
1120 echo
1121 for ac_var in $ac_subst_files
1122 do
1123 eval ac_val=$`echo $ac_var`
1124 echo "$ac_var='"'"'$ac_val'"'"'"
1125 done | sort
1126 echo
1127 fi
1128
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 if test -s confdefs.h; then
1130 cat <<\_ASBOX
1131## ----------- ##
1132## confdefs.h. ##
1133## ----------- ##
1134_ASBOX
1135 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001136 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 echo
1138 fi
1139 test "$ac_signal" != 0 &&
1140 echo "$as_me: caught signal $ac_signal"
1141 echo "$as_me: exit $exit_status"
1142 } >&5
1143 rm -f core core.* *.core &&
1144 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1145 exit $exit_status
1146 ' 0
1147for ac_signal in 1 2 13 15; do
1148 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1149done
1150ac_signal=0
1151
1152# confdefs.h avoids OS command line length limits that DEFS can exceed.
1153rm -rf conftest* confdefs.h
1154# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1155echo >confdefs.h
1156
1157# Predefined preprocessor variables.
1158
1159cat >>confdefs.h <<_ACEOF
1160#define PACKAGE_NAME "$PACKAGE_NAME"
1161_ACEOF
1162
1163
1164cat >>confdefs.h <<_ACEOF
1165#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1166_ACEOF
1167
1168
1169cat >>confdefs.h <<_ACEOF
1170#define PACKAGE_VERSION "$PACKAGE_VERSION"
1171_ACEOF
1172
1173
1174cat >>confdefs.h <<_ACEOF
1175#define PACKAGE_STRING "$PACKAGE_STRING"
1176_ACEOF
1177
1178
1179cat >>confdefs.h <<_ACEOF
1180#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1181_ACEOF
1182
1183
1184# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185# Prefer explicitly selected file to automatically selected ones.
1186if test -z "$CONFIG_SITE"; then
1187 if test "x$prefix" != xNONE; then
1188 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1189 else
1190 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1191 fi
1192fi
1193for ac_site_file in $CONFIG_SITE; do
1194 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1196echo "$as_me: loading site script $ac_site_file" >&6;}
1197 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 . "$ac_site_file"
1199 fi
1200done
1201
1202if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 # Some versions of bash will fail to source /dev/null (special
1204 # files actually), so we avoid doing that.
1205 if test -f "$cache_file"; then
1206 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1207echo "$as_me: loading cache $cache_file" >&6;}
1208 case $cache_file in
1209 [\\/]* | ?:[\\/]* ) . $cache_file;;
1210 *) . ./$cache_file;;
1211 esac
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1215echo "$as_me: creating cache $cache_file" >&6;}
1216 >$cache_file
1217fi
1218
1219# Check that the precious variables saved in the cache have kept the same
1220# value.
1221ac_cache_corrupted=false
1222for ac_var in `(set) 2>&1 |
1223 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1224 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1225 eval ac_new_set=\$ac_env_${ac_var}_set
1226 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1227 eval ac_new_val="\$ac_env_${ac_var}_value"
1228 case $ac_old_set,$ac_new_set in
1229 set,)
1230 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1231echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1232 ac_cache_corrupted=: ;;
1233 ,set)
1234 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1235echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1236 ac_cache_corrupted=: ;;
1237 ,);;
1238 *)
1239 if test "x$ac_old_val" != "x$ac_new_val"; then
1240 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1241echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1242 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1243echo "$as_me: former value: $ac_old_val" >&2;}
1244 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1245echo "$as_me: current value: $ac_new_val" >&2;}
1246 ac_cache_corrupted=:
1247 fi;;
1248 esac
1249 # Pass precious variables to config.status.
1250 if test "$ac_new_set" = set; then
1251 case $ac_new_val in
1252 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1253 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1254 *) ac_arg=$ac_var=$ac_new_val ;;
1255 esac
1256 case " $ac_configure_args " in
1257 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1258 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1259 esac
1260 fi
1261done
1262if $ac_cache_corrupted; then
1263 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1264echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1265 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1266echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1267 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268fi
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1274ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Michael W. Hudson54241132001-12-07 15:38:26 +00001277
1278
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Martin v. Löwis11437992002-04-12 09:54:03 +00001280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
Martin v. Löwis88afe662002-10-26 13:47:44 +00001293
1294
1295
1296
1297
1298
1299
1300
1301
Skip Montanaro6dead952003-09-25 14:50:04 +00001302
1303 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001304
1305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
1307
1308
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001309
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001310
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001311# We don't use PACKAGE_ variables, and they cause conflicts
1312# with other autoconf-based packages that include Python.h
1313grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1314rm confdefs.h
1315mv confdefs.h.new confdefs.h
1316
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001317
Fred Drake9bd44622003-07-30 17:39:48 +00001318VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001319
Martin v. Löwis1142de32002-03-29 16:28:31 +00001320
1321SOVERSION=1.0
1322
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001323# The later defininition of _XOPEN_SOURCE disables certain features
1324# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1325
1326cat >>confdefs.h <<\_ACEOF
1327#define _GNU_SOURCE 1
1328_ACEOF
1329
1330
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001331# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1332# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1333# them.
1334
1335cat >>confdefs.h <<\_ACEOF
1336#define _NETBSD_SOURCE 1
1337_ACEOF
1338
1339
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001340# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1341# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1342# them.
1343
1344cat >>confdefs.h <<\_ACEOF
1345#define __BSD_VISIBLE 1
1346_ACEOF
1347
1348
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001349define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001350
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001351# Arguments passed to configure.
1352
1353CONFIG_ARGS="$ac_configure_args"
1354
Jack Jansene578a632001-08-15 01:27:14 +00001355# Check whether --enable-framework or --disable-framework was given.
1356if test "${enable_framework+set}" = set; then
1357 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001358
Jack Jansene578a632001-08-15 01:27:14 +00001359 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001360 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001361 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001362 esac
1363 case $enableval in
1364 no)
1365 PYTHONFRAMEWORK=
1366 PYTHONFRAMEWORKDIR=no-framework
1367 PYTHONFRAMEWORKPREFIX=
1368 PYTHONFRAMEWORKINSTALLDIR=
1369 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001370 ;;
1371 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001372 PYTHONFRAMEWORK=Python
1373 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001374 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001375 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1376 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001377 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001378
Guido van Rossum563e7081996-09-10 18:20:48 +00001379else
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
Jack Jansene578a632001-08-15 01:27:14 +00001381 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001382 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001383 PYTHONFRAMEWORKPREFIX=
1384 PYTHONFRAMEWORKINSTALLDIR=
1385 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001386
Martin v. Löwis11437992002-04-12 09:54:03 +00001387fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001388
1389
1390
1391
Jack Jansene578a632001-08-15 01:27:14 +00001392
1393##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394## AC_HELP_STRING(--with-dyld,
1395## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001396##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001397# Set name for machine-dependent library files
1398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399echo "$as_me:$LINENO: checking MACHDEP" >&5
1400echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001401if test -z "$MACHDEP"
1402then
Guido van Rossum563e7081996-09-10 18:20:48 +00001403 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001404 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1405 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001406 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001407 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001408 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001409 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001410 ac_md_system=`echo $ac_sys_system |
1411 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1412 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001413 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001414 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001415
Guido van Rossum07397971997-04-29 21:49:50 +00001416 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001417 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001418 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001419 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001420 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001421 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001422 esac
1423fi
Guido van Rossum91922671997-10-09 20:24:13 +00001424
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001425# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1426# disable features if it is defined, without any means to access these
1427# features as extensions. For these systems, we skip the definition of
1428# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1429# some feature, make sure there is no alternative way to access this
1430# feature. Also, when using wildcards, make sure you have verified the
1431# need for not defining _XOPEN_SOURCE on all systems matching the
1432# wildcard, and that the wildcard does not include future systems
1433# (which may remove their limitations).
1434case $ac_sys_system/$ac_sys_release in
1435 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1436 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001437 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1438 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001439 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001440 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1441 # of union __?sigval. Reported by Stuart Bishop.
1442 SunOS/5.6)
1443 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001444 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1445 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001446 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001447 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001448 define_xopen_source=no;;
1449 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001450 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001451 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001453 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1454 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1455 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1456 # This should hopefully be fixed in FreeBSD 4.9
1457 FreeBSD/4.8* | Darwin/6* )
1458 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001459 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1460 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1461 # has another value. By not (re)defining it, the defaults come in place.
1462 AIX/4)
1463 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001464esac
1465
1466if test $define_xopen_source = yes
1467then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001468
1469cat >>confdefs.h <<\_ACEOF
1470#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001471_ACEOF
1472
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001473
1474 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1475 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1476 # several APIs are not declared. Since this is also needed in some
1477 # cases for HP-UX, we define it globally.
1478
1479
1480cat >>confdefs.h <<\_ACEOF
1481#define _XOPEN_SOURCE_EXTENDED 1
1482_ACEOF
1483
1484
1485cat >>confdefs.h <<\_ACEOF
1486#define _POSIX_C_SOURCE 200112L
1487_ACEOF
1488
1489
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001490fi
1491
Guido van Rossum91922671997-10-09 20:24:13 +00001492#
1493# SGI compilers allow the specification of the both the ABI and the
1494# ISA on the command line. Depending on the values of these switches,
1495# different and often incompatable code will be generated.
1496#
1497# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1498# thus supply support for various ABI/ISA combinations. The MACHDEP
1499# variable is also adjusted.
1500#
1501
1502if test ! -z "$SGI_ABI"
1503then
1504 CC="cc $SGI_ABI"
1505 LDFLAGS="$SGI_ABI $LDFLAGS"
1506 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001508echo "$as_me:$LINENO: result: $MACHDEP" >&5
1509echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001510
Jack Jansen83f898c2002-12-30 22:23:40 +00001511# And add extra plat-mac for darwin
1512
Jack Jansen7b59b422003-03-17 15:44:10 +00001513
Jack Jansen83f898c2002-12-30 22:23:40 +00001514echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1515echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1516if test -z "$EXTRAPLATDIR"
1517then
1518 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001519 darwin)
1520 EXTRAPLATDIR="\$(PLATMACDIRS)"
1521 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1522 ;;
1523 *)
1524 EXTRAPLATDIR=""
1525 EXTRAMACHDEPPATH=""
1526 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001527 esac
1528fi
1529echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1530echo "${ECHO_T}$EXTRAPLATDIR" >&6
1531
Jack Jansen6b08a402004-06-03 12:41:45 +00001532# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1533# it may influence the way we can build extensions, so distutils
1534# needs to check it
1535
1536CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1537
Guido van Rossum627b2d71993-12-24 10:39:16 +00001538# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001539
1540# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1541# for debug/optimization stuff. BASECFLAGS is for flags that are required
1542# just to get things to compile and link. Users are free to override OPT
1543# when running configure or make. The build should not break if they do.
1544# BASECFLAGS should generally not be messed with, however.
1545
1546# XXX shouldn't some/most/all of this code be merged with the stuff later
1547# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001548echo "$as_me:$LINENO: checking for --without-gcc" >&5
1549echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001551# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001552if test "${with_gcc+set}" = set; then
1553 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
Guido van Rossum7f43da71994-08-01 12:15:30 +00001555 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001556 no) CC=cc
1557 without_gcc=yes;;
1558 yes) CC=gcc
1559 without_gcc=no;;
1560 *) CC=$withval
1561 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001562 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001563else
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001565 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001566 AIX*) CC=cc_r
1567 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001569 case $BE_HOST_CPU in
1570 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001571 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001572 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001573 BASECFLAGS="$BASECFLAGS -export pragma"
1574 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001576 ;;
1577 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001578 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001579 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001580 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001581 ;;
1582 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1584echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1585 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001586 ;;
1587 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001588 AR="\$(srcdir)/Modules/ar_beos"
1589 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001590 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001591 Monterey*)
1592 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001593 without_gcc=;;
1594 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001595 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001596fi;
1597echo "$as_me:$LINENO: result: $without_gcc" >&5
1598echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001599
1600
Guido van Rossum95012191999-12-16 17:50:52 +00001601
Fred Drakea1a84e72001-03-06 05:52:16 +00001602MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001603echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1604echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1605
Guido van Rossum95012191999-12-16 17:50:52 +00001606# Check whether --with-cxx or --without-cxx was given.
1607if test "${with_cxx+set}" = set; then
1608 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001609
Martin v. Löwis22352952000-12-13 17:37:02 +00001610 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001611 case $withval in
1612 no) CXX=
1613 with_cxx=no;;
1614 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001615 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001616 with_cxx=$withval;;
1617 esac
1618else
Martin v. Löwis11437992002-04-12 09:54:03 +00001619
Guido van Rossum95012191999-12-16 17:50:52 +00001620 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001621 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623fi;
1624echo "$as_me:$LINENO: result: $with_cxx" >&5
1625echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001626
1627if test "$with_cxx" = "yes"
1628then
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1630echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1631 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001632fi
1633
1634
1635
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001638then
1639 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1640do
Martin v. Löwis11437992002-04-12 09:54:03 +00001641 # 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 +00001642set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001643echo "$as_me:$LINENO: checking for $ac_word" >&5
1644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1645if test "${ac_cv_prog_CXX+set}" = set; then
1646 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001647else
1648 if test -n "$CXX"; then
1649 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1650else
Martin v. Löwis11437992002-04-12 09:54:03 +00001651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1652for as_dir in $PATH
1653do
1654 IFS=$as_save_IFS
1655 test -z "$as_dir" && as_dir=.
1656 for ac_exec_ext in '' $ac_executable_extensions; do
1657 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1658 ac_cv_prog_CXX="$ac_prog"
1659 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1660 break 2
1661 fi
1662done
1663done
1664
Martin v. Löwis22352952000-12-13 17:37:02 +00001665fi
1666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001667CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001668if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 echo "$as_me:$LINENO: result: $CXX" >&5
1670echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001671else
Martin v. Löwis11437992002-04-12 09:54:03 +00001672 echo "$as_me:$LINENO: result: no" >&5
1673echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001674fi
1675
Martin v. Löwis11437992002-04-12 09:54:03 +00001676 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001677done
1678test -n "$CXX" || CXX="notfound"
1679
1680 if test "$CXX" = "notfound"
1681 then
1682 CXX=
1683 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001684 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001685ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1689 cat >conftest.$ac_ext <<_ACEOF
1690#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001691/* confdefs.h. */
1692_ACEOF
1693cat confdefs.h >>conftest.$ac_ext
1694cat >>conftest.$ac_ext <<_ACEOF
1695/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001696
Martin v. Löwis11437992002-04-12 09:54:03 +00001697int
1698main ()
1699{
Michael W. Hudson54241132001-12-07 15:38:26 +00001700
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 ;
1702 return 0;
1703}
1704_ACEOF
1705ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001706ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001707# Try to create an executable without -o first, disregard a.out.
1708# It will help us diagnose broken compilers, and finding out an intuition
1709# of exeext.
1710echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1711echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1712ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1713if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1714 (eval $ac_link_default) 2>&5
1715 ac_status=$?
1716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1717 (exit $ac_status); }; then
1718 # Find the output, starting from the most likely. This scheme is
1719# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1720# resort.
1721
1722# Be careful to initialize this variable, since it used to be cached.
1723# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1724ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001725# b.out is created by i960 compilers.
1726for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1727do
1728 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001730 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1731 ;;
1732 conftest.$ac_ext )
1733 # This is the source file.
1734 ;;
1735 [ab].out )
1736 # We found the default executable, but exeext='' is most
1737 # certainly right.
1738 break;;
1739 *.* )
1740 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1741 # FIXME: I believe we export ac_cv_exeext for Libtool,
1742 # but it would be cool to find out if it's true. Does anybody
1743 # maintain Libtool? --akim.
1744 export ac_cv_exeext
1745 break;;
1746 * )
1747 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 esac
1749done
1750else
1751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1755See \`config.log' for more details." >&5
1756echo "$as_me: error: C++ compiler cannot create executables
1757See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001759fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001760
1761ac_exeext=$ac_cv_exeext
1762echo "$as_me:$LINENO: result: $ac_file" >&5
1763echo "${ECHO_T}$ac_file" >&6
1764
1765# Check the compiler produces executables we can run. If not, either
1766# the compiler is broken, or we cross compile.
1767echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1768echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1769# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1770# If not cross compiling, check that we can run a simple program.
1771if test "$cross_compiling" != yes; then
1772 if { ac_try='./$ac_file'
1773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1774 (eval $ac_try) 2>&5
1775 ac_status=$?
1776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1777 (exit $ac_status); }; }; then
1778 cross_compiling=no
1779 else
1780 if test "$cross_compiling" = maybe; then
1781 cross_compiling=yes
1782 else
1783 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001784If you meant to cross compile, use \`--host'.
1785See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001786echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001787If you meant to cross compile, use \`--host'.
1788See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001789 { (exit 1); exit 1; }; }
1790 fi
1791 fi
1792fi
1793echo "$as_me:$LINENO: result: yes" >&5
1794echo "${ECHO_T}yes" >&6
1795
Skip Montanaro6dead952003-09-25 14:50:04 +00001796rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001797ac_clean_files=$ac_clean_files_save
1798# Check the compiler produces executables we can run. If not, either
1799# the compiler is broken, or we cross compile.
1800echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1801echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1802echo "$as_me:$LINENO: result: $cross_compiling" >&5
1803echo "${ECHO_T}$cross_compiling" >&6
1804
1805echo "$as_me:$LINENO: checking for suffix of executables" >&5
1806echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1808 (eval $ac_link) 2>&5
1809 ac_status=$?
1810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1811 (exit $ac_status); }; then
1812 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1813# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1814# work properly (i.e., refer to `conftest.exe'), while it won't with
1815# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001816for ac_file in conftest.exe conftest conftest.*; do
1817 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001818 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001819 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001820 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1821 export ac_cv_exeext
1822 break;;
1823 * ) break;;
1824 esac
1825done
1826else
Skip Montanaro6dead952003-09-25 14:50:04 +00001827 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1828See \`config.log' for more details." >&5
1829echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1830See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 { (exit 1); exit 1; }; }
1832fi
1833
1834rm -f conftest$ac_cv_exeext
1835echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1836echo "${ECHO_T}$ac_cv_exeext" >&6
1837
1838rm -f conftest.$ac_ext
1839EXEEXT=$ac_cv_exeext
1840ac_exeext=$EXEEXT
1841
1842 ac_ext=c
1843ac_cpp='$CPP $CPPFLAGS'
1844ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1845ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1846ac_compiler_gnu=$ac_cv_c_compiler_gnu
1847
1848
Martin v. Löwis22352952000-12-13 17:37:02 +00001849
1850 fi
1851fi
1852
Guido van Rossum8b131c51995-03-09 14:10:13 +00001853# If the user switches compilers, we can't believe the cache
1854if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1855then
Martin v. Löwis11437992002-04-12 09:54:03 +00001856 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1857(it is also a good idea to do 'make clean' before compiling)" >&5
1858echo "$as_me: error: cached CC is different -- throw away $cache_file
1859(it is also a good idea to do 'make clean' before compiling)" >&2;}
1860 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001861fi
1862
Martin v. Löwis11437992002-04-12 09:54:03 +00001863ac_ext=c
1864ac_cpp='$CPP $CPPFLAGS'
1865ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1866ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1867ac_compiler_gnu=$ac_cv_c_compiler_gnu
1868if test -n "$ac_tool_prefix"; then
1869 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1870set dummy ${ac_tool_prefix}gcc; ac_word=$2
1871echo "$as_me:$LINENO: checking for $ac_word" >&5
1872echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1873if test "${ac_cv_prog_CC+set}" = set; then
1874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001875else
1876 if test -n "$CC"; then
1877 ac_cv_prog_CC="$CC" # Let the user override the test.
1878else
Martin v. Löwis11437992002-04-12 09:54:03 +00001879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1880for as_dir in $PATH
1881do
1882 IFS=$as_save_IFS
1883 test -z "$as_dir" && as_dir=.
1884 for ac_exec_ext in '' $ac_executable_extensions; do
1885 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1886 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1887 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1888 break 2
1889 fi
1890done
1891done
1892
Jack Jansendd19cf82001-12-06 22:36:17 +00001893fi
1894fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001895CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001896if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001897 echo "$as_me:$LINENO: result: $CC" >&5
1898echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001899else
Martin v. Löwis11437992002-04-12 09:54:03 +00001900 echo "$as_me:$LINENO: result: no" >&5
1901echo "${ECHO_T}no" >&6
1902fi
1903
1904fi
1905if test -z "$ac_cv_prog_CC"; then
1906 ac_ct_CC=$CC
1907 # Extract the first word of "gcc", so it can be a program name with args.
1908set dummy gcc; ac_word=$2
1909echo "$as_me:$LINENO: checking for $ac_word" >&5
1910echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1911if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1912 echo $ECHO_N "(cached) $ECHO_C" >&6
1913else
1914 if test -n "$ac_ct_CC"; then
1915 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1916else
1917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1918for as_dir in $PATH
1919do
1920 IFS=$as_save_IFS
1921 test -z "$as_dir" && as_dir=.
1922 for ac_exec_ext in '' $ac_executable_extensions; do
1923 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1924 ac_cv_prog_ac_ct_CC="gcc"
1925 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1926 break 2
1927 fi
1928done
1929done
1930
1931fi
1932fi
1933ac_ct_CC=$ac_cv_prog_ac_ct_CC
1934if test -n "$ac_ct_CC"; then
1935 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1936echo "${ECHO_T}$ac_ct_CC" >&6
1937else
1938 echo "$as_me:$LINENO: result: no" >&5
1939echo "${ECHO_T}no" >&6
1940fi
1941
1942 CC=$ac_ct_CC
1943else
1944 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001945fi
1946
Jack Jansendd19cf82001-12-06 22:36:17 +00001947if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001948 if test -n "$ac_tool_prefix"; then
1949 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1950set dummy ${ac_tool_prefix}cc; ac_word=$2
1951echo "$as_me:$LINENO: checking for $ac_word" >&5
1952echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1953if test "${ac_cv_prog_CC+set}" = set; then
1954 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001955else
1956 if test -n "$CC"; then
1957 ac_cv_prog_CC="$CC" # Let the user override the test.
1958else
Martin v. Löwis11437992002-04-12 09:54:03 +00001959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1960for as_dir in $PATH
1961do
1962 IFS=$as_save_IFS
1963 test -z "$as_dir" && as_dir=.
1964 for ac_exec_ext in '' $ac_executable_extensions; do
1965 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1966 ac_cv_prog_CC="${ac_tool_prefix}cc"
1967 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1968 break 2
1969 fi
1970done
1971done
1972
1973fi
1974fi
1975CC=$ac_cv_prog_CC
1976if test -n "$CC"; then
1977 echo "$as_me:$LINENO: result: $CC" >&5
1978echo "${ECHO_T}$CC" >&6
1979else
1980 echo "$as_me:$LINENO: result: no" >&5
1981echo "${ECHO_T}no" >&6
1982fi
1983
1984fi
1985if test -z "$ac_cv_prog_CC"; then
1986 ac_ct_CC=$CC
1987 # Extract the first word of "cc", so it can be a program name with args.
1988set dummy cc; ac_word=$2
1989echo "$as_me:$LINENO: checking for $ac_word" >&5
1990echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1991if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1992 echo $ECHO_N "(cached) $ECHO_C" >&6
1993else
1994 if test -n "$ac_ct_CC"; then
1995 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1996else
1997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1998for as_dir in $PATH
1999do
2000 IFS=$as_save_IFS
2001 test -z "$as_dir" && as_dir=.
2002 for ac_exec_ext in '' $ac_executable_extensions; do
2003 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2004 ac_cv_prog_ac_ct_CC="cc"
2005 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2006 break 2
2007 fi
2008done
2009done
2010
2011fi
2012fi
2013ac_ct_CC=$ac_cv_prog_ac_ct_CC
2014if test -n "$ac_ct_CC"; then
2015 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2016echo "${ECHO_T}$ac_ct_CC" >&6
2017else
2018 echo "$as_me:$LINENO: result: no" >&5
2019echo "${ECHO_T}no" >&6
2020fi
2021
2022 CC=$ac_ct_CC
2023else
2024 CC="$ac_cv_prog_CC"
2025fi
2026
2027fi
2028if test -z "$CC"; then
2029 # Extract the first word of "cc", so it can be a program name with args.
2030set dummy cc; ac_word=$2
2031echo "$as_me:$LINENO: checking for $ac_word" >&5
2032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2033if test "${ac_cv_prog_CC+set}" = set; then
2034 echo $ECHO_N "(cached) $ECHO_C" >&6
2035else
2036 if test -n "$CC"; then
2037 ac_cv_prog_CC="$CC" # Let the user override the test.
2038else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002039 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2041for as_dir in $PATH
2042do
2043 IFS=$as_save_IFS
2044 test -z "$as_dir" && as_dir=.
2045 for ac_exec_ext in '' $ac_executable_extensions; do
2046 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2047 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2048 ac_prog_rejected=yes
2049 continue
2050 fi
2051 ac_cv_prog_CC="cc"
2052 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2053 break 2
2054 fi
2055done
2056done
2057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002058if test $ac_prog_rejected = yes; then
2059 # We found a bogon in the path, so make sure we never use it.
2060 set dummy $ac_cv_prog_CC
2061 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002062 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002063 # We chose a different compiler from the bogus one.
2064 # However, it has the same basename, so the bogon will be chosen
2065 # first if we set CC to just the basename; use the full file name.
2066 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002067 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002068 fi
2069fi
2070fi
2071fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002072CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002073if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002074 echo "$as_me:$LINENO: result: $CC" >&5
2075echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002076else
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 echo "$as_me:$LINENO: result: no" >&5
2078echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002079fi
2080
Martin v. Löwis11437992002-04-12 09:54:03 +00002081fi
2082if test -z "$CC"; then
2083 if test -n "$ac_tool_prefix"; then
2084 for ac_prog in cl
2085 do
2086 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2088echo "$as_me:$LINENO: checking for $ac_word" >&5
2089echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2090if test "${ac_cv_prog_CC+set}" = set; then
2091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002092else
2093 if test -n "$CC"; then
2094 ac_cv_prog_CC="$CC" # Let the user override the test.
2095else
Martin v. Löwis11437992002-04-12 09:54:03 +00002096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2097for as_dir in $PATH
2098do
2099 IFS=$as_save_IFS
2100 test -z "$as_dir" && as_dir=.
2101 for ac_exec_ext in '' $ac_executable_extensions; do
2102 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2103 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2104 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2105 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002106 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002107done
2108done
2109
2110fi
2111fi
2112CC=$ac_cv_prog_CC
2113if test -n "$CC"; then
2114 echo "$as_me:$LINENO: result: $CC" >&5
2115echo "${ECHO_T}$CC" >&6
2116else
2117 echo "$as_me:$LINENO: result: no" >&5
2118echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002119fi
2120
Martin v. Löwis11437992002-04-12 09:54:03 +00002121 test -n "$CC" && break
2122 done
2123fi
2124if test -z "$CC"; then
2125 ac_ct_CC=$CC
2126 for ac_prog in cl
2127do
2128 # Extract the first word of "$ac_prog", so it can be a program name with args.
2129set dummy $ac_prog; ac_word=$2
2130echo "$as_me:$LINENO: checking for $ac_word" >&5
2131echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2132if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2133 echo $ECHO_N "(cached) $ECHO_C" >&6
2134else
2135 if test -n "$ac_ct_CC"; then
2136 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2137else
2138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2139for as_dir in $PATH
2140do
2141 IFS=$as_save_IFS
2142 test -z "$as_dir" && as_dir=.
2143 for ac_exec_ext in '' $ac_executable_extensions; do
2144 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2145 ac_cv_prog_ac_ct_CC="$ac_prog"
2146 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2147 break 2
2148 fi
2149done
2150done
Jack Jansendd19cf82001-12-06 22:36:17 +00002151
Martin v. Löwis11437992002-04-12 09:54:03 +00002152fi
2153fi
2154ac_ct_CC=$ac_cv_prog_ac_ct_CC
2155if test -n "$ac_ct_CC"; then
2156 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2157echo "${ECHO_T}$ac_ct_CC" >&6
2158else
2159 echo "$as_me:$LINENO: result: no" >&5
2160echo "${ECHO_T}no" >&6
2161fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002162
Martin v. Löwis11437992002-04-12 09:54:03 +00002163 test -n "$ac_ct_CC" && break
2164done
Michael W. Hudson54241132001-12-07 15:38:26 +00002165
Martin v. Löwis11437992002-04-12 09:54:03 +00002166 CC=$ac_ct_CC
2167fi
2168
2169fi
2170
2171
Skip Montanaro6dead952003-09-25 14:50:04 +00002172test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2173See \`config.log' for more details." >&5
2174echo "$as_me: error: no acceptable C compiler found in \$PATH
2175See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002176 { (exit 1); exit 1; }; }
2177
2178# Provide some information about the compiler.
2179echo "$as_me:$LINENO:" \
2180 "checking for C compiler version" >&5
2181ac_compiler=`set X $ac_compile; echo $2`
2182{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2183 (eval $ac_compiler --version </dev/null >&5) 2>&5
2184 ac_status=$?
2185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2186 (exit $ac_status); }
2187{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2188 (eval $ac_compiler -v </dev/null >&5) 2>&5
2189 ac_status=$?
2190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2191 (exit $ac_status); }
2192{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2193 (eval $ac_compiler -V </dev/null >&5) 2>&5
2194 ac_status=$?
2195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2196 (exit $ac_status); }
2197
2198cat >conftest.$ac_ext <<_ACEOF
2199#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002200/* confdefs.h. */
2201_ACEOF
2202cat confdefs.h >>conftest.$ac_ext
2203cat >>conftest.$ac_ext <<_ACEOF
2204/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002205
Martin v. Löwis11437992002-04-12 09:54:03 +00002206int
2207main ()
2208{
2209
2210 ;
2211 return 0;
2212}
2213_ACEOF
2214ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002215ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002216# Try to create an executable without -o first, disregard a.out.
2217# It will help us diagnose broken compilers, and finding out an intuition
2218# of exeext.
2219echo "$as_me:$LINENO: checking for C compiler default output" >&5
2220echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2221ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2222if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2223 (eval $ac_link_default) 2>&5
2224 ac_status=$?
2225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2226 (exit $ac_status); }; then
2227 # Find the output, starting from the most likely. This scheme is
2228# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2229# resort.
2230
2231# Be careful to initialize this variable, since it used to be cached.
2232# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2233ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002234# b.out is created by i960 compilers.
2235for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2236do
2237 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002238 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002239 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2240 ;;
2241 conftest.$ac_ext )
2242 # This is the source file.
2243 ;;
2244 [ab].out )
2245 # We found the default executable, but exeext='' is most
2246 # certainly right.
2247 break;;
2248 *.* )
2249 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2250 # FIXME: I believe we export ac_cv_exeext for Libtool,
2251 # but it would be cool to find out if it's true. Does anybody
2252 # maintain Libtool? --akim.
2253 export ac_cv_exeext
2254 break;;
2255 * )
2256 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002257 esac
2258done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002259else
Martin v. Löwis11437992002-04-12 09:54:03 +00002260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002261sed 's/^/| /' conftest.$ac_ext >&5
2262
2263{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2264See \`config.log' for more details." >&5
2265echo "$as_me: error: C compiler cannot create executables
2266See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002267 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002268fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270ac_exeext=$ac_cv_exeext
2271echo "$as_me:$LINENO: result: $ac_file" >&5
2272echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002273
Martin v. Löwis11437992002-04-12 09:54:03 +00002274# Check the compiler produces executables we can run. If not, either
2275# the compiler is broken, or we cross compile.
2276echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2277echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2278# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2279# If not cross compiling, check that we can run a simple program.
2280if test "$cross_compiling" != yes; then
2281 if { ac_try='./$ac_file'
2282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2283 (eval $ac_try) 2>&5
2284 ac_status=$?
2285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2286 (exit $ac_status); }; }; then
2287 cross_compiling=no
2288 else
2289 if test "$cross_compiling" = maybe; then
2290 cross_compiling=yes
2291 else
2292 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002293If you meant to cross compile, use \`--host'.
2294See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002295echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002296If you meant to cross compile, use \`--host'.
2297See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002298 { (exit 1); exit 1; }; }
2299 fi
2300 fi
2301fi
2302echo "$as_me:$LINENO: result: yes" >&5
2303echo "${ECHO_T}yes" >&6
2304
Skip Montanaro6dead952003-09-25 14:50:04 +00002305rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002306ac_clean_files=$ac_clean_files_save
2307# Check the compiler produces executables we can run. If not, either
2308# the compiler is broken, or we cross compile.
2309echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2310echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2311echo "$as_me:$LINENO: result: $cross_compiling" >&5
2312echo "${ECHO_T}$cross_compiling" >&6
2313
2314echo "$as_me:$LINENO: checking for suffix of executables" >&5
2315echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2317 (eval $ac_link) 2>&5
2318 ac_status=$?
2319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2320 (exit $ac_status); }; then
2321 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2322# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2323# work properly (i.e., refer to `conftest.exe'), while it won't with
2324# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002325for ac_file in conftest.exe conftest conftest.*; do
2326 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002327 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002329 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2330 export ac_cv_exeext
2331 break;;
2332 * ) break;;
2333 esac
2334done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002335else
Skip Montanaro6dead952003-09-25 14:50:04 +00002336 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2337See \`config.log' for more details." >&5
2338echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2339See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002341fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002342
Martin v. Löwis11437992002-04-12 09:54:03 +00002343rm -f conftest$ac_cv_exeext
2344echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2345echo "${ECHO_T}$ac_cv_exeext" >&6
2346
2347rm -f conftest.$ac_ext
2348EXEEXT=$ac_cv_exeext
2349ac_exeext=$EXEEXT
2350echo "$as_me:$LINENO: checking for suffix of object files" >&5
2351echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2352if test "${ac_cv_objext+set}" = set; then
2353 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002354else
Martin v. Löwis11437992002-04-12 09:54:03 +00002355 cat >conftest.$ac_ext <<_ACEOF
2356#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002357/* confdefs.h. */
2358_ACEOF
2359cat confdefs.h >>conftest.$ac_ext
2360cat >>conftest.$ac_ext <<_ACEOF
2361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002362
Martin v. Löwis11437992002-04-12 09:54:03 +00002363int
2364main ()
2365{
2366
2367 ;
2368 return 0;
2369}
2370_ACEOF
2371rm -f conftest.o conftest.obj
2372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2373 (eval $ac_compile) 2>&5
2374 ac_status=$?
2375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2376 (exit $ac_status); }; then
2377 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2378 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002379 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002380 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2381 break;;
2382 esac
2383done
2384else
2385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002386sed 's/^/| /' conftest.$ac_ext >&5
2387
2388{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2389See \`config.log' for more details." >&5
2390echo "$as_me: error: cannot compute suffix of object files: cannot compile
2391See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002392 { (exit 1); exit 1; }; }
2393fi
2394
2395rm -f conftest.$ac_cv_objext conftest.$ac_ext
2396fi
2397echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2398echo "${ECHO_T}$ac_cv_objext" >&6
2399OBJEXT=$ac_cv_objext
2400ac_objext=$OBJEXT
2401echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2402echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2403if test "${ac_cv_c_compiler_gnu+set}" = set; then
2404 echo $ECHO_N "(cached) $ECHO_C" >&6
2405else
2406 cat >conftest.$ac_ext <<_ACEOF
2407#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002408/* confdefs.h. */
2409_ACEOF
2410cat confdefs.h >>conftest.$ac_ext
2411cat >>conftest.$ac_ext <<_ACEOF
2412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002413
Martin v. Löwis11437992002-04-12 09:54:03 +00002414int
2415main ()
2416{
2417#ifndef __GNUC__
2418 choke me
2419#endif
2420
2421 ;
2422 return 0;
2423}
2424_ACEOF
2425rm -f conftest.$ac_objext
2426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2427 (eval $ac_compile) 2>&5
2428 ac_status=$?
2429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430 (exit $ac_status); } &&
2431 { ac_try='test -s conftest.$ac_objext'
2432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2433 (eval $ac_try) 2>&5
2434 ac_status=$?
2435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2436 (exit $ac_status); }; }; then
2437 ac_compiler_gnu=yes
2438else
2439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002440sed 's/^/| /' conftest.$ac_ext >&5
2441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442ac_compiler_gnu=no
2443fi
2444rm -f conftest.$ac_objext conftest.$ac_ext
2445ac_cv_c_compiler_gnu=$ac_compiler_gnu
2446
2447fi
2448echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2449echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2450GCC=`test $ac_compiler_gnu = yes && echo yes`
2451ac_test_CFLAGS=${CFLAGS+set}
2452ac_save_CFLAGS=$CFLAGS
2453CFLAGS="-g"
2454echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2455echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2456if test "${ac_cv_prog_cc_g+set}" = set; then
2457 echo $ECHO_N "(cached) $ECHO_C" >&6
2458else
2459 cat >conftest.$ac_ext <<_ACEOF
2460#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002461/* confdefs.h. */
2462_ACEOF
2463cat confdefs.h >>conftest.$ac_ext
2464cat >>conftest.$ac_ext <<_ACEOF
2465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
Martin v. Löwis11437992002-04-12 09:54:03 +00002467int
2468main ()
2469{
2470
2471 ;
2472 return 0;
2473}
2474_ACEOF
2475rm -f conftest.$ac_objext
2476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2477 (eval $ac_compile) 2>&5
2478 ac_status=$?
2479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480 (exit $ac_status); } &&
2481 { ac_try='test -s conftest.$ac_objext'
2482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2483 (eval $ac_try) 2>&5
2484 ac_status=$?
2485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2486 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002487 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002488else
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002490sed 's/^/| /' conftest.$ac_ext >&5
2491
Martin v. Löwis11437992002-04-12 09:54:03 +00002492ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002494rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002496echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2497echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002498if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002500elif test $ac_cv_prog_cc_g = yes; then
2501 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002502 CFLAGS="-g -O2"
2503 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002504 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002505 fi
2506else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002507 if test "$GCC" = yes; then
2508 CFLAGS="-O2"
2509 else
2510 CFLAGS=
2511 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002512fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002513echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2514echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2515if test "${ac_cv_prog_cc_stdc+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
2517else
2518 ac_cv_prog_cc_stdc=no
2519ac_save_CC=$CC
2520cat >conftest.$ac_ext <<_ACEOF
2521#line $LINENO "configure"
2522/* confdefs.h. */
2523_ACEOF
2524cat confdefs.h >>conftest.$ac_ext
2525cat >>conftest.$ac_ext <<_ACEOF
2526/* end confdefs.h. */
2527#include <stdarg.h>
2528#include <stdio.h>
2529#include <sys/types.h>
2530#include <sys/stat.h>
2531/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2532struct buf { int x; };
2533FILE * (*rcsopen) (struct buf *, struct stat *, int);
2534static char *e (p, i)
2535 char **p;
2536 int i;
2537{
2538 return p[i];
2539}
2540static char *f (char * (*g) (char **, int), char **p, ...)
2541{
2542 char *s;
2543 va_list v;
2544 va_start (v,p);
2545 s = g (p, va_arg (v,int));
2546 va_end (v);
2547 return s;
2548}
2549int test (int i, double x);
2550struct s1 {int (*f) (int a);};
2551struct s2 {int (*f) (double a);};
2552int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2553int argc;
2554char **argv;
2555int
2556main ()
2557{
2558return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2559 ;
2560 return 0;
2561}
2562_ACEOF
2563# Don't try gcc -ansi; that turns off useful extensions and
2564# breaks some systems' header files.
2565# AIX -qlanglvl=ansi
2566# Ultrix and OSF/1 -std1
2567# HP-UX 10.20 and later -Ae
2568# HP-UX older versions -Aa -D_HPUX_SOURCE
2569# SVR4 -Xc -D__EXTENSIONS__
2570for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2571do
2572 CC="$ac_save_CC $ac_arg"
2573 rm -f conftest.$ac_objext
2574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2575 (eval $ac_compile) 2>&5
2576 ac_status=$?
2577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); } &&
2579 { ac_try='test -s conftest.$ac_objext'
2580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2581 (eval $ac_try) 2>&5
2582 ac_status=$?
2583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2584 (exit $ac_status); }; }; then
2585 ac_cv_prog_cc_stdc=$ac_arg
2586break
2587else
2588 echo "$as_me: failed program was:" >&5
2589sed 's/^/| /' conftest.$ac_ext >&5
2590
2591fi
2592rm -f conftest.$ac_objext
2593done
2594rm -f conftest.$ac_ext conftest.$ac_objext
2595CC=$ac_save_CC
2596
2597fi
2598
2599case "x$ac_cv_prog_cc_stdc" in
2600 x|xno)
2601 echo "$as_me:$LINENO: result: none needed" >&5
2602echo "${ECHO_T}none needed" >&6 ;;
2603 *)
2604 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2605echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2606 CC="$CC $ac_cv_prog_cc_stdc" ;;
2607esac
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609# Some people use a C++ compiler to compile C. Since we use `exit',
2610# in C++ we need to declare it. In case someone uses the same compiler
2611# for both compiling C and C++ we need to have the C++ compiler decide
2612# the declaration of exit, since it's the most demanding environment.
2613cat >conftest.$ac_ext <<_ACEOF
2614#ifndef __cplusplus
2615 choke me
2616#endif
2617_ACEOF
2618rm -f conftest.$ac_objext
2619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2620 (eval $ac_compile) 2>&5
2621 ac_status=$?
2622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623 (exit $ac_status); } &&
2624 { ac_try='test -s conftest.$ac_objext'
2625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2626 (eval $ac_try) 2>&5
2627 ac_status=$?
2628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629 (exit $ac_status); }; }; then
2630 for ac_declaration in \
2631 ''\
2632 '#include <stdlib.h>' \
2633 'extern "C" void std::exit (int) throw (); using std::exit;' \
2634 'extern "C" void std::exit (int); using std::exit;' \
2635 'extern "C" void exit (int) throw ();' \
2636 'extern "C" void exit (int);' \
2637 'void exit (int);'
2638do
2639 cat >conftest.$ac_ext <<_ACEOF
2640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002641/* confdefs.h. */
2642_ACEOF
2643cat confdefs.h >>conftest.$ac_ext
2644cat >>conftest.$ac_ext <<_ACEOF
2645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002646#include <stdlib.h>
2647$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002648int
2649main ()
2650{
2651exit (42);
2652 ;
2653 return 0;
2654}
2655_ACEOF
2656rm -f conftest.$ac_objext
2657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2658 (eval $ac_compile) 2>&5
2659 ac_status=$?
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); } &&
2662 { ac_try='test -s conftest.$ac_objext'
2663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2664 (eval $ac_try) 2>&5
2665 ac_status=$?
2666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2667 (exit $ac_status); }; }; then
2668 :
2669else
2670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002671sed 's/^/| /' conftest.$ac_ext >&5
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673continue
2674fi
2675rm -f conftest.$ac_objext conftest.$ac_ext
2676 cat >conftest.$ac_ext <<_ACEOF
2677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002678/* confdefs.h. */
2679_ACEOF
2680cat confdefs.h >>conftest.$ac_ext
2681cat >>conftest.$ac_ext <<_ACEOF
2682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002683$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002684int
2685main ()
2686{
2687exit (42);
2688 ;
2689 return 0;
2690}
2691_ACEOF
2692rm -f conftest.$ac_objext
2693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2694 (eval $ac_compile) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); } &&
2698 { ac_try='test -s conftest.$ac_objext'
2699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2700 (eval $ac_try) 2>&5
2701 ac_status=$?
2702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2703 (exit $ac_status); }; }; then
2704 break
2705else
2706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002707sed 's/^/| /' conftest.$ac_ext >&5
2708
Martin v. Löwis11437992002-04-12 09:54:03 +00002709fi
2710rm -f conftest.$ac_objext conftest.$ac_ext
2711done
2712rm -f conftest*
2713if test -n "$ac_declaration"; then
2714 echo '#ifdef __cplusplus' >>confdefs.h
2715 echo $ac_declaration >>confdefs.h
2716 echo '#endif' >>confdefs.h
2717fi
2718
2719else
2720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002721sed 's/^/| /' conftest.$ac_ext >&5
2722
Martin v. Löwis11437992002-04-12 09:54:03 +00002723fi
2724rm -f conftest.$ac_objext conftest.$ac_ext
2725ac_ext=c
2726ac_cpp='$CPP $CPPFLAGS'
2727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002730
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002731
2732# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002733
2734ac_ext=c
2735ac_cpp='$CPP $CPPFLAGS'
2736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2738ac_compiler_gnu=$ac_cv_c_compiler_gnu
2739echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2740echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002741# On Suns, sometimes $CPP names a directory.
2742if test -n "$CPP" && test -d "$CPP"; then
2743 CPP=
2744fi
2745if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 if test "${ac_cv_prog_CPP+set}" = set; then
2747 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002748else
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 # Double quotes because CPP needs to be expanded
2750 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2751 do
2752 ac_preproc_ok=false
2753for ac_c_preproc_warn_flag in '' yes
2754do
2755 # Use a header file that comes with gcc, so configuring glibc
2756 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002757 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2758 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002759 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 # not just through cpp. "Syntax error" is here to catch this case.
2761 cat >conftest.$ac_ext <<_ACEOF
2762#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002763/* confdefs.h. */
2764_ACEOF
2765cat confdefs.h >>conftest.$ac_ext
2766cat >>conftest.$ac_ext <<_ACEOF
2767/* end confdefs.h. */
2768#ifdef __STDC__
2769# include <limits.h>
2770#else
2771# include <assert.h>
2772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 Syntax error
2774_ACEOF
2775if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2776 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2777 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002778 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 rm -f conftest.er1
2780 cat conftest.err >&5
2781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2782 (exit $ac_status); } >/dev/null; then
2783 if test -s conftest.err; then
2784 ac_cpp_err=$ac_c_preproc_warn_flag
2785 else
2786 ac_cpp_err=
2787 fi
2788else
2789 ac_cpp_err=yes
2790fi
2791if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002792 :
2793else
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002795sed 's/^/| /' conftest.$ac_ext >&5
2796
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 # Broken: fails on valid input.
2798continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002800rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002801
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 # OK, works on sane cases. Now check whether non-existent headers
2803 # can be detected and how.
2804 cat >conftest.$ac_ext <<_ACEOF
2805#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002806/* confdefs.h. */
2807_ACEOF
2808cat confdefs.h >>conftest.$ac_ext
2809cat >>conftest.$ac_ext <<_ACEOF
2810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002811#include <ac_nonexistent.h>
2812_ACEOF
2813if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2814 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2815 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002816 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 rm -f conftest.er1
2818 cat conftest.err >&5
2819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2820 (exit $ac_status); } >/dev/null; then
2821 if test -s conftest.err; then
2822 ac_cpp_err=$ac_c_preproc_warn_flag
2823 else
2824 ac_cpp_err=
2825 fi
2826else
2827 ac_cpp_err=yes
2828fi
2829if test -z "$ac_cpp_err"; then
2830 # Broken: success on invalid input.
2831continue
2832else
2833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002834sed 's/^/| /' conftest.$ac_ext >&5
2835
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 # Passes both tests.
2837ac_preproc_ok=:
2838break
2839fi
2840rm -f conftest.err conftest.$ac_ext
2841
2842done
2843# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2844rm -f conftest.err conftest.$ac_ext
2845if $ac_preproc_ok; then
2846 break
2847fi
2848
2849 done
2850 ac_cv_prog_CPP=$CPP
2851
2852fi
2853 CPP=$ac_cv_prog_CPP
2854else
2855 ac_cv_prog_CPP=$CPP
2856fi
2857echo "$as_me:$LINENO: result: $CPP" >&5
2858echo "${ECHO_T}$CPP" >&6
2859ac_preproc_ok=false
2860for ac_c_preproc_warn_flag in '' yes
2861do
2862 # Use a header file that comes with gcc, so configuring glibc
2863 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002864 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2865 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 # On the NeXT, cc -E runs the code through the compiler's parser,
2867 # not just through cpp. "Syntax error" is here to catch this case.
2868 cat >conftest.$ac_ext <<_ACEOF
2869#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002870/* confdefs.h. */
2871_ACEOF
2872cat confdefs.h >>conftest.$ac_ext
2873cat >>conftest.$ac_ext <<_ACEOF
2874/* end confdefs.h. */
2875#ifdef __STDC__
2876# include <limits.h>
2877#else
2878# include <assert.h>
2879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 Syntax error
2881_ACEOF
2882if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2883 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2884 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002885 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 rm -f conftest.er1
2887 cat conftest.err >&5
2888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2889 (exit $ac_status); } >/dev/null; then
2890 if test -s conftest.err; then
2891 ac_cpp_err=$ac_c_preproc_warn_flag
2892 else
2893 ac_cpp_err=
2894 fi
2895else
2896 ac_cpp_err=yes
2897fi
2898if test -z "$ac_cpp_err"; then
2899 :
2900else
2901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002902sed 's/^/| /' conftest.$ac_ext >&5
2903
Martin v. Löwis11437992002-04-12 09:54:03 +00002904 # Broken: fails on valid input.
2905continue
2906fi
2907rm -f conftest.err conftest.$ac_ext
2908
2909 # OK, works on sane cases. Now check whether non-existent headers
2910 # can be detected and how.
2911 cat >conftest.$ac_ext <<_ACEOF
2912#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002913/* confdefs.h. */
2914_ACEOF
2915cat confdefs.h >>conftest.$ac_ext
2916cat >>conftest.$ac_ext <<_ACEOF
2917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002918#include <ac_nonexistent.h>
2919_ACEOF
2920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2922 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002923 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002924 rm -f conftest.er1
2925 cat conftest.err >&5
2926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2927 (exit $ac_status); } >/dev/null; then
2928 if test -s conftest.err; then
2929 ac_cpp_err=$ac_c_preproc_warn_flag
2930 else
2931 ac_cpp_err=
2932 fi
2933else
2934 ac_cpp_err=yes
2935fi
2936if test -z "$ac_cpp_err"; then
2937 # Broken: success on invalid input.
2938continue
2939else
2940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002941sed 's/^/| /' conftest.$ac_ext >&5
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943 # Passes both tests.
2944ac_preproc_ok=:
2945break
2946fi
2947rm -f conftest.err conftest.$ac_ext
2948
2949done
2950# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2951rm -f conftest.err conftest.$ac_ext
2952if $ac_preproc_ok; then
2953 :
2954else
Skip Montanaro6dead952003-09-25 14:50:04 +00002955 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2956See \`config.log' for more details." >&5
2957echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2958See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 { (exit 1); exit 1; }; }
2960fi
2961
2962ac_ext=c
2963ac_cpp='$CPP $CPPFLAGS'
2964ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2965ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2966ac_compiler_gnu=$ac_cv_c_compiler_gnu
2967
2968
Skip Montanaro6dead952003-09-25 14:50:04 +00002969echo "$as_me:$LINENO: checking for egrep" >&5
2970echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2971if test "${ac_cv_prog_egrep+set}" = set; then
2972 echo $ECHO_N "(cached) $ECHO_C" >&6
2973else
2974 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2975 then ac_cv_prog_egrep='grep -E'
2976 else ac_cv_prog_egrep='egrep'
2977 fi
2978fi
2979echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2980echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2981 EGREP=$ac_cv_prog_egrep
2982
2983
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985echo "$as_me:$LINENO: checking for AIX" >&5
2986echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2987cat >conftest.$ac_ext <<_ACEOF
2988#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002989/* confdefs.h. */
2990_ACEOF
2991cat confdefs.h >>conftest.$ac_ext
2992cat >>conftest.$ac_ext <<_ACEOF
2993/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002994#ifdef _AIX
2995 yes
2996#endif
2997
Martin v. Löwis11437992002-04-12 09:54:03 +00002998_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003000 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 echo "$as_me:$LINENO: result: yes" >&5
3002echo "${ECHO_T}yes" >&6
3003cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003004#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003005_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006
3007else
Martin v. Löwis11437992002-04-12 09:54:03 +00003008 echo "$as_me:$LINENO: result: no" >&5
3009echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003010fi
3011rm -f conftest*
3012
Michael W. Hudson54241132001-12-07 15:38:26 +00003013
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003014
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003015# Check for unsupported systems
3016case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003017Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003018 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3019 echo See README for details.
3020 exit 1;;
3021esac
3022
Michael W. Hudson54241132001-12-07 15:38:26 +00003023
Martin v. Löwis11437992002-04-12 09:54:03 +00003024echo "$as_me:$LINENO: checking for --with-suffix" >&5
3025echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003026
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003027# Check whether --with-suffix or --without-suffix was given.
3028if test "${with_suffix+set}" = set; then
3029 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003030
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003031 case $withval in
3032 no) EXEEXT=;;
3033 yes) EXEEXT=.exe;;
3034 *) EXEEXT=$withval;;
3035 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003036fi;
3037echo "$as_me:$LINENO: result: $EXEEXT" >&5
3038echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003039
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003040# Test whether we're running on a non-case-sensitive system, in which
3041# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003042
Martin v. Löwis11437992002-04-12 09:54:03 +00003043echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3044echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003045if test ! -d CaseSensitiveTestDir; then
3046mkdir CaseSensitiveTestDir
3047fi
3048
3049if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003050then
Martin v. Löwis11437992002-04-12 09:54:03 +00003051 echo "$as_me:$LINENO: result: yes" >&5
3052echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003053 BUILDEXEEXT=.exe
3054else
Martin v. Löwis11437992002-04-12 09:54:03 +00003055 echo "$as_me:$LINENO: result: no" >&5
3056echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003057 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003058fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003059rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003060
Guido van Rossumdd997f71998-10-07 19:58:26 +00003061case $MACHDEP in
3062bsdos*)
3063 case $CC in
3064 gcc) CC="$CC -D_HAVE_BSDI";;
3065 esac;;
3066esac
3067
Guido van Rossum24b1e751997-08-21 02:29:16 +00003068case $ac_sys_system in
3069hp*|HP*)
3070 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003071 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003072 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003073Monterey*)
3074 case $CC in
3075 cc) CC="$CC -Wl,-Bexport";;
3076 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003077SunOS*)
3078 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003079
3080cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003081#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003082_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003083
3084 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003085esac
3086
Michael W. Hudson54241132001-12-07 15:38:26 +00003087
3088
Martin v. Löwis11437992002-04-12 09:54:03 +00003089echo "$as_me:$LINENO: checking LIBRARY" >&5
3090echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003091if test -z "$LIBRARY"
3092then
3093 LIBRARY='libpython$(VERSION).a'
3094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003095echo "$as_me:$LINENO: result: $LIBRARY" >&5
3096echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003097
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003098# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003099# name of the library into which to insert object files). BLDLIBRARY is also
3100# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3101# is blank as the main program is not linked directly against LDLIBRARY.
3102# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3103# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3104# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3105# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003106#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003107# RUNSHARED is used to run shared python without installed libraries
3108#
3109# INSTSONAME is the name of the shared library that will be use to install
3110# on the system - some systems like version suffix, others don't
3111
3112
Michael W. Hudson54241132001-12-07 15:38:26 +00003113
3114
3115
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003116
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003117LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003118BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003119INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003120DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003121LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003122RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003123
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003124# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003125# If CXX is set, and if it is needed to link a main function that was
3126# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3127# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003128# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003129# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003130
Martin v. Löwis11437992002-04-12 09:54:03 +00003131echo "$as_me:$LINENO: checking LINKCC" >&5
3132echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003133if test -z "$LINKCC"
3134then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003135 if test -z "$CXX"; then
3136 LINKCC="\$(PURIFY) \$(CC)"
3137 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003138 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003139 $CXX -c conftest.$ac_ext 2>&5
3140 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3141 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3142 then
3143 LINKCC="\$(PURIFY) \$(CC)"
3144 else
3145 LINKCC="\$(PURIFY) \$(CXX)"
3146 fi
3147 rm -fr conftest*
3148 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003149 case $ac_sys_system in
3150 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003151 exp_extra="\"\""
3152 if test $ac_sys_release -ge 5 -o \
3153 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3154 exp_extra="."
3155 fi
3156 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003157 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003158 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003159 esac
3160fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003161echo "$as_me:$LINENO: result: $LINKCC" >&5
3162echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003163
Martin v. Löwis11437992002-04-12 09:54:03 +00003164echo "$as_me:$LINENO: checking for --enable-shared" >&5
3165echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003166# Check whether --enable-shared or --disable-shared was given.
3167if test "${enable_shared+set}" = set; then
3168 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003169
Martin v. Löwis11437992002-04-12 09:54:03 +00003170fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003171
3172if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003173then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003174 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003175 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003176 enable_shared="yes";;
3177 *)
3178 enable_shared="no";;
3179 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003181echo "$as_me:$LINENO: result: $enable_shared" >&5
3182echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003183
3184
Martin v. Löwis11437992002-04-12 09:54:03 +00003185echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3186echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003187
Guido van Rossumb8552162001-09-05 14:58:11 +00003188# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3189# library that we build, but we do not want to link against it (we
3190# will find it with a -framework option). For this reason there is an
3191# extra variable BLDLIBRARY against which Python and the extension
3192# modules are linked, BLDLIBRARY. This is normally the same as
3193# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003194if test "$enable_framework"
3195then
3196 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003197 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003198 BLDLIBRARY=''
3199else
3200 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003201fi
Jack Jansene578a632001-08-15 01:27:14 +00003202
Martin v. Löwis1142de32002-03-29 16:28:31 +00003203# Other platforms follow
3204if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003205
3206cat >>confdefs.h <<\_ACEOF
3207#define Py_ENABLE_SHARED 1
3208_ACEOF
3209
Martin v. Löwis1142de32002-03-29 16:28:31 +00003210 case $ac_sys_system in
3211 BeOS*)
3212 LDLIBRARY='libpython$(VERSION).so'
3213 ;;
3214 CYGWIN*)
3215 LDLIBRARY='libpython$(VERSION).dll.a'
3216 DLLLIBRARY='libpython$(VERSION).dll'
3217 ;;
3218 SunOS*)
3219 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003220 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003221 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003222 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003223 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003224 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003225 LDLIBRARY='libpython$(VERSION).so'
3226 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003227 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228 INSTSONAME="$LDLIBRARY".$SOVERSION
3229 ;;
3230 hp*|HP*)
3231 LDLIBRARY='libpython$(VERSION).sl'
3232 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003233 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003234 ;;
3235 OSF*)
3236 LDLIBRARY='libpython$(VERSION).so'
3237 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003238 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003239 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003240 atheos*)
3241 LDLIBRARY='libpython$(VERSION).so'
3242 BLDLIBRARY='-L. -lpython$(VERSION)'
3243 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3244 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245 esac
Jason Tishler30765592003-09-04 11:04:06 +00003246else # shared is disabled
3247 case $ac_sys_system in
3248 CYGWIN*)
3249 BLDLIBRARY='$(LIBRARY)'
3250 LDLIBRARY='libpython$(VERSION).dll.a'
3251 ;;
3252 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003253fi
3254
Martin v. Löwis11437992002-04-12 09:54:03 +00003255echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3256echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003257
Martin v. Löwis11437992002-04-12 09:54:03 +00003258if test -n "$ac_tool_prefix"; then
3259 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3260set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3261echo "$as_me:$LINENO: checking for $ac_word" >&5
3262echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3263if test "${ac_cv_prog_RANLIB+set}" = set; then
3264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265else
3266 if test -n "$RANLIB"; then
3267 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3268else
Martin v. Löwis11437992002-04-12 09:54:03 +00003269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3270for as_dir in $PATH
3271do
3272 IFS=$as_save_IFS
3273 test -z "$as_dir" && as_dir=.
3274 for ac_exec_ext in '' $ac_executable_extensions; do
3275 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3276 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3277 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3278 break 2
3279 fi
3280done
3281done
3282
Guido van Rossum627b2d71993-12-24 10:39:16 +00003283fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003285RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 echo "$as_me:$LINENO: result: $RANLIB" >&5
3288echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289else
Martin v. Löwis11437992002-04-12 09:54:03 +00003290 echo "$as_me:$LINENO: result: no" >&5
3291echo "${ECHO_T}no" >&6
3292fi
3293
3294fi
3295if test -z "$ac_cv_prog_RANLIB"; then
3296 ac_ct_RANLIB=$RANLIB
3297 # Extract the first word of "ranlib", so it can be a program name with args.
3298set dummy ranlib; ac_word=$2
3299echo "$as_me:$LINENO: checking for $ac_word" >&5
3300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3301if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6
3303else
3304 if test -n "$ac_ct_RANLIB"; then
3305 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3306else
3307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in $PATH
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
3312 for ac_exec_ext in '' $ac_executable_extensions; do
3313 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3314 ac_cv_prog_ac_ct_RANLIB="ranlib"
3315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3316 break 2
3317 fi
3318done
3319done
3320
3321 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3322fi
3323fi
3324ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3325if test -n "$ac_ct_RANLIB"; then
3326 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3327echo "${ECHO_T}$ac_ct_RANLIB" >&6
3328else
3329 echo "$as_me:$LINENO: result: no" >&5
3330echo "${ECHO_T}no" >&6
3331fi
3332
3333 RANLIB=$ac_ct_RANLIB
3334else
3335 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003337
3338
Guido van Rossum7f43da71994-08-01 12:15:30 +00003339for ac_prog in ar aal
3340do
Martin v. Löwis11437992002-04-12 09:54:03 +00003341 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003342set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003343echo "$as_me:$LINENO: checking for $ac_word" >&5
3344echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3345if test "${ac_cv_prog_AR+set}" = set; then
3346 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347else
3348 if test -n "$AR"; then
3349 ac_cv_prog_AR="$AR" # Let the user override the test.
3350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3352for as_dir in $PATH
3353do
3354 IFS=$as_save_IFS
3355 test -z "$as_dir" && as_dir=.
3356 for ac_exec_ext in '' $ac_executable_extensions; do
3357 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3358 ac_cv_prog_AR="$ac_prog"
3359 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3360 break 2
3361 fi
3362done
3363done
3364
Guido van Rossum7f43da71994-08-01 12:15:30 +00003365fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003367AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003368if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003369 echo "$as_me:$LINENO: result: $AR" >&5
3370echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371else
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 echo "$as_me:$LINENO: result: no" >&5
3373echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003375
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003377done
3378test -n "$AR" || AR="ar"
3379
Michael W. Hudson54241132001-12-07 15:38:26 +00003380
Neil Schemenauera42c8272001-03-31 00:01:55 +00003381case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003382bsdos*|hp*|HP*)
3383 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003384 if test -z "$INSTALL"
3385 then
3386 INSTALL="${srcdir}/install-sh -c"
3387 fi
3388esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003389ac_aux_dir=
3390for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3391 if test -f $ac_dir/install-sh; then
3392 ac_aux_dir=$ac_dir
3393 ac_install_sh="$ac_aux_dir/install-sh -c"
3394 break
3395 elif test -f $ac_dir/install.sh; then
3396 ac_aux_dir=$ac_dir
3397 ac_install_sh="$ac_aux_dir/install.sh -c"
3398 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 elif test -f $ac_dir/shtool; then
3400 ac_aux_dir=$ac_dir
3401 ac_install_sh="$ac_aux_dir/shtool install -c"
3402 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003403 fi
3404done
3405if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3407echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3408 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003410ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3411ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3412ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003413
3414# Find a good install program. We prefer a C program (faster),
3415# so one script is as good as another. But avoid the broken or
3416# incompatible versions:
3417# SysV /etc/install, /usr/sbin/install
3418# SunOS /usr/etc/install
3419# IRIX /sbin/install
3420# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003421# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003422# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3423# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3424# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3425# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003426echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3427echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003428if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003429if test "${ac_cv_path_install+set}" = set; then
3430 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433for as_dir in $PATH
3434do
3435 IFS=$as_save_IFS
3436 test -z "$as_dir" && as_dir=.
3437 # Account for people who put trailing slashes in PATH elements.
3438case $as_dir/ in
3439 ./ | .// | /cC/* | \
3440 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3441 /usr/ucb/* ) ;;
3442 *)
3443 # OSF1 and SCO ODT 3.0 have their own names for install.
3444 # Don't use installbsd from OSF since it installs stuff as root
3445 # by default.
3446 for ac_prog in ginstall scoinst install; do
3447 for ac_exec_ext in '' $ac_executable_extensions; do
3448 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3449 if test $ac_prog = install &&
3450 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3451 # AIX install. It has an incompatible calling convention.
3452 :
3453 elif test $ac_prog = install &&
3454 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3455 # program-specific install script used by HP pwplus--don't use.
3456 :
3457 else
3458 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3459 break 3
3460 fi
3461 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003462 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003463 done
3464 ;;
3465esac
3466done
3467
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003468
3469fi
3470 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003472 else
3473 # As a last resort, use the slow shell script. We don't cache a
3474 # path for INSTALL within a source directory, because that will
3475 # break other packages using the cache if that directory is
3476 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003478 fi
3479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003480echo "$as_me:$LINENO: result: $INSTALL" >&5
3481echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003482
3483# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3484# It thinks the first close brace ends the variable substitution.
3485test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3486
Martin v. Löwis11437992002-04-12 09:54:03 +00003487test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003488
3489test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3490
Michael W. Hudson54241132001-12-07 15:38:26 +00003491
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003492# Not every filesystem supports hard links
3493
3494if test -z "$LN" ; then
3495 case $ac_sys_system in
3496 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003497 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003498 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003499 *) LN=ln;;
3500 esac
3501fi
3502
Fred Drake109d9862001-07-11 06:27:56 +00003503# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003504echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3505echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3506
Fred Drake109d9862001-07-11 06:27:56 +00003507# Check whether --with-pydebug or --without-pydebug was given.
3508if test "${with_pydebug+set}" = set; then
3509 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003510
Fred Drake109d9862001-07-11 06:27:56 +00003511if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003512then
3513
3514cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003515#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003516_ACEOF
3517
3518 echo "$as_me:$LINENO: result: yes" >&5
3519echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003520 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003521else echo "$as_me:$LINENO: result: no" >&5
3522echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003523fi
3524else
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 echo "$as_me:$LINENO: result: no" >&5
3526echo "${ECHO_T}no" >&6
3527fi;
Fred Drake109d9862001-07-11 06:27:56 +00003528
Skip Montanarodecc6a42003-01-01 20:07:49 +00003529# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3530# merged with this chunk of code?
3531
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003532# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003533# ------------------------
3534# (The following bit of code is complicated enough - please keep things
3535# indented properly. Just pretend you're editing Python code. ;-)
3536
3537# There are two parallel sets of case statements below, one that checks to
3538# see if OPT was set and one that does BASECFLAGS setting based upon
3539# compiler and platform. BASECFLAGS tweaks need to be made even if the
3540# user set OPT.
3541
3542# tweak OPT based on compiler and platform, only if the user didn't set
3543# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003544
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003545if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003546then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003547 case $GCC in
3548 yes)
3549 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003550 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003551 if test "$Py_DEBUG" = 'true' ; then
3552 # Optimization messes up debuggers, so turn it off for
3553 # debug builds.
3554 OPT="-g -Wall -Wstrict-prototypes"
3555 else
3556 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003557 fi
3558 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003559 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003560 OPT="-O3 -Wall -Wstrict-prototypes"
3561 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003562 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003563 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003564 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3565 ;;
3566 esac
Fred Drake109d9862001-07-11 06:27:56 +00003567 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003568
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003569 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003570 OPT="-O"
3571 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003572 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003573
3574 # The current (beta) Monterey compiler dies with optimizations
3575 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003576 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003577 Monterey*)
3578 OPT=""
3579 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003580 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003581
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003582fi
3583
Skip Montanarodecc6a42003-01-01 20:07:49 +00003584
3585# tweak BASECFLAGS based on compiler and platform
3586case $GCC in
3587yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003588 # Python violates C99 rules, by casting between incompatible
3589 # pointer types. GCC may generate bad code as a result of that,
3590 # so use -fno-strict-aliasing if supported.
3591 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3592echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3593 ac_save_cc="$CC"
3594 CC="$CC -fno-strict-aliasing"
3595 if test "$cross_compiling" = yes; then
3596 ac_cv_no_strict_aliasing_ok=no
3597else
3598 cat >conftest.$ac_ext <<_ACEOF
3599#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003600/* confdefs.h. */
3601_ACEOF
3602cat confdefs.h >>conftest.$ac_ext
3603cat >>conftest.$ac_ext <<_ACEOF
3604/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003605int main() { return 0; }
3606_ACEOF
3607rm -f conftest$ac_exeext
3608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3609 (eval $ac_link) 2>&5
3610 ac_status=$?
3611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3614 (eval $ac_try) 2>&5
3615 ac_status=$?
3616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3617 (exit $ac_status); }; }; then
3618 ac_cv_no_strict_aliasing_ok=yes
3619else
3620 echo "$as_me: program exited with status $ac_status" >&5
3621echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003622sed 's/^/| /' conftest.$ac_ext >&5
3623
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003624( exit $ac_status )
3625ac_cv_no_strict_aliasing_ok=no
3626fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003627rm -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 +00003628fi
3629 CC="$ac_save_cc"
3630 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3631echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3632 if test $ac_cv_no_strict_aliasing_ok = yes
3633 then
3634 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3635 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003636 case $ac_sys_system in
3637 SCO_SV*)
3638 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3639 ;;
3640 # is there any other compiler on Darwin besides gcc?
3641 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003642 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003643 ;;
3644 esac
3645 ;;
3646
3647*)
3648 case $ac_sys_system in
3649 OpenUNIX*|UnixWare*)
3650 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3651 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003652 OSF*)
3653 BASECFLAGS="$BASECFLAGS -ieee -std"
3654 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003655 SCO_SV*)
3656 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3657 ;;
3658 esac
3659 ;;
3660esac
3661
Fred Drakee1ceaa02001-12-04 20:55:47 +00003662if test "$Py_DEBUG" = 'true'; then
3663 :
3664else
3665 OPT="-DNDEBUG $OPT"
3666fi
3667
Guido van Rossum563e7081996-09-10 18:20:48 +00003668if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003669then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003670 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003671fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003672
Martin v. Löwis11437992002-04-12 09:54:03 +00003673echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3674echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3675if test "${ac_cv_opt_olimit_ok+set}" = set; then
3676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003677else
3678 ac_save_cc="$CC"
3679CC="$CC -OPT:Olimit=0"
3680if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003681 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003682else
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 cat >conftest.$ac_ext <<_ACEOF
3684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003685/* confdefs.h. */
3686_ACEOF
3687cat confdefs.h >>conftest.$ac_ext
3688cat >>conftest.$ac_ext <<_ACEOF
3689/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003690int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003691_ACEOF
3692rm -f conftest$ac_exeext
3693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3694 (eval $ac_link) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3699 (eval $ac_try) 2>&5
3700 ac_status=$?
3701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3702 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003703 ac_cv_opt_olimit_ok=yes
3704else
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 echo "$as_me: program exited with status $ac_status" >&5
3706echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003707sed 's/^/| /' conftest.$ac_ext >&5
3708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709( exit $ac_status )
3710ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003711fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003712rm -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 +00003713fi
Guido van Rossum91922671997-10-09 20:24:13 +00003714CC="$ac_save_cc"
3715fi
3716
Martin v. Löwis11437992002-04-12 09:54:03 +00003717echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3718echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003719if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003720 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003721 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3722 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3723 # environment?
3724 Darwin*)
3725 ;;
3726 *)
3727 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3728 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003729 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003730else
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3732echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3733 if test "${ac_cv_olimit_ok+set}" = set; then
3734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003735else
3736 ac_save_cc="$CC"
3737 CC="$CC -Olimit 1500"
3738 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003739 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003740else
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 cat >conftest.$ac_ext <<_ACEOF
3742#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003743/* confdefs.h. */
3744_ACEOF
3745cat confdefs.h >>conftest.$ac_ext
3746cat >>conftest.$ac_ext <<_ACEOF
3747/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003748int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749_ACEOF
3750rm -f conftest$ac_exeext
3751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3752 (eval $ac_link) 2>&5
3753 ac_status=$?
3754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3755 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3757 (eval $ac_try) 2>&5
3758 ac_status=$?
3759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3760 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003761 ac_cv_olimit_ok=yes
3762else
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 echo "$as_me: program exited with status $ac_status" >&5
3764echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003765sed 's/^/| /' conftest.$ac_ext >&5
3766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767( exit $ac_status )
3768ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003769fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003770rm -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 +00003771fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003772 CC="$ac_save_cc"
3773fi
3774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3776echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003777 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003778 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003779 fi
3780fi
3781
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003782# On some compilers, pthreads are available without further options
3783# (e.g. MacOS X). On some of these systems, the compiler will not
3784# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3785# So we have to see first whether pthreads are available without
3786# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003787echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3788echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3789if test "${ac_cv_pthread_is_default+set}" = set; then
3790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003791else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003792 if test "$cross_compiling" = yes; then
3793 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794else
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 cat >conftest.$ac_ext <<_ACEOF
3796#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003797/* confdefs.h. */
3798_ACEOF
3799cat confdefs.h >>conftest.$ac_ext
3800cat >>conftest.$ac_ext <<_ACEOF
3801/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003802
Martin v. Löwis130fb172001-07-19 11:00:41 +00003803#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003804
3805void* routine(void* p){return NULL;}
3806
3807int main(){
3808 pthread_t p;
3809 if(pthread_create(&p,NULL,routine,NULL)!=0)
3810 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003811 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003812 return 0;
3813}
3814
Martin v. Löwis11437992002-04-12 09:54:03 +00003815_ACEOF
3816rm -f conftest$ac_exeext
3817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3818 (eval $ac_link) 2>&5
3819 ac_status=$?
3820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3823 (eval $ac_try) 2>&5
3824 ac_status=$?
3825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3826 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003827
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003828 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003829 ac_cv_kthread=no
3830 ac_cv_pthread=no
3831
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003832else
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 echo "$as_me: program exited with status $ac_status" >&5
3834echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003835sed 's/^/| /' conftest.$ac_ext >&5
3836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837( exit $ac_status )
3838ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003839fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003840rm -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 +00003841fi
3842
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003843fi
3844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3846echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003847
Michael W. Hudson54241132001-12-07 15:38:26 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003850then
3851 ac_cv_kpthread=no
3852else
3853# -Kpthread, if available, provides the right #defines
3854# and linker options to make pthread_create available
3855# Some compilers won't report that they do not support -Kpthread,
3856# so we need to run a program to see whether it really made the
3857# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003858echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3859echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3860if test "${ac_cv_kpthread+set}" = set; then
3861 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003862else
3863 ac_save_cc="$CC"
3864CC="$CC -Kpthread"
3865if test "$cross_compiling" = yes; then
3866 ac_cv_kpthread=no
3867else
Martin v. Löwis11437992002-04-12 09:54:03 +00003868 cat >conftest.$ac_ext <<_ACEOF
3869#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003870/* confdefs.h. */
3871_ACEOF
3872cat confdefs.h >>conftest.$ac_ext
3873cat >>conftest.$ac_ext <<_ACEOF
3874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003875
3876#include <pthread.h>
3877
3878void* routine(void* p){return NULL;}
3879
3880int main(){
3881 pthread_t p;
3882 if(pthread_create(&p,NULL,routine,NULL)!=0)
3883 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003884 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003885 return 0;
3886}
3887
Martin v. Löwis11437992002-04-12 09:54:03 +00003888_ACEOF
3889rm -f conftest$ac_exeext
3890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3891 (eval $ac_link) 2>&5
3892 ac_status=$?
3893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3894 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3896 (eval $ac_try) 2>&5
3897 ac_status=$?
3898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3899 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003900 ac_cv_kpthread=yes
3901else
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 echo "$as_me: program exited with status $ac_status" >&5
3903echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003904sed 's/^/| /' conftest.$ac_ext >&5
3905
Martin v. Löwis11437992002-04-12 09:54:03 +00003906( exit $ac_status )
3907ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003908fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003909rm -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 +00003910fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003911CC="$ac_save_cc"
3912fi
3913
Martin v. Löwis11437992002-04-12 09:54:03 +00003914echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3915echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003916fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003917
Skip Montanarod8d39a02003-07-10 20:44:10 +00003918if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003919then
3920# -Kthread, if available, provides the right #defines
3921# and linker options to make pthread_create available
3922# Some compilers won't report that they do not support -Kthread,
3923# so we need to run a program to see whether it really made the
3924# function available.
3925echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3926echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3927if test "${ac_cv_kthread+set}" = set; then
3928 echo $ECHO_N "(cached) $ECHO_C" >&6
3929else
3930 ac_save_cc="$CC"
3931CC="$CC -Kthread"
3932if test "$cross_compiling" = yes; then
3933 ac_cv_kthread=no
3934else
3935 cat >conftest.$ac_ext <<_ACEOF
3936#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003937/* confdefs.h. */
3938_ACEOF
3939cat confdefs.h >>conftest.$ac_ext
3940cat >>conftest.$ac_ext <<_ACEOF
3941/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003942
3943#include <pthread.h>
3944
3945void* routine(void* p){return NULL;}
3946
3947int main(){
3948 pthread_t p;
3949 if(pthread_create(&p,NULL,routine,NULL)!=0)
3950 return 1;
3951 (void)pthread_detach(p);
3952 return 0;
3953}
3954
3955_ACEOF
3956rm -f conftest$ac_exeext
3957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3958 (eval $ac_link) 2>&5
3959 ac_status=$?
3960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3963 (eval $ac_try) 2>&5
3964 ac_status=$?
3965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3966 (exit $ac_status); }; }; then
3967 ac_cv_kthread=yes
3968else
3969 echo "$as_me: program exited with status $ac_status" >&5
3970echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003971sed 's/^/| /' conftest.$ac_ext >&5
3972
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003973( exit $ac_status )
3974ac_cv_kthread=no
3975fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003976rm -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 +00003977fi
3978CC="$ac_save_cc"
3979fi
3980
3981echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3982echo "${ECHO_T}$ac_cv_kthread" >&6
3983fi
3984
Skip Montanarod8d39a02003-07-10 20:44:10 +00003985if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003986then
3987# -pthread, if available, provides the right #defines
3988# and linker options to make pthread_create available
3989# Some compilers won't report that they do not support -pthread,
3990# so we need to run a program to see whether it really made the
3991# function available.
3992echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3993echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3994if test "${ac_cv_thread+set}" = set; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
3996else
3997 ac_save_cc="$CC"
3998CC="$CC -pthread"
3999if test "$cross_compiling" = yes; then
4000 ac_cv_pthread=no
4001else
4002 cat >conftest.$ac_ext <<_ACEOF
4003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004004/* confdefs.h. */
4005_ACEOF
4006cat confdefs.h >>conftest.$ac_ext
4007cat >>conftest.$ac_ext <<_ACEOF
4008/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004009
4010#include <pthread.h>
4011
4012void* routine(void* p){return NULL;}
4013
4014int main(){
4015 pthread_t p;
4016 if(pthread_create(&p,NULL,routine,NULL)!=0)
4017 return 1;
4018 (void)pthread_detach(p);
4019 return 0;
4020}
4021
4022_ACEOF
4023rm -f conftest$ac_exeext
4024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4025 (eval $ac_link) 2>&5
4026 ac_status=$?
4027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4030 (eval $ac_try) 2>&5
4031 ac_status=$?
4032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4033 (exit $ac_status); }; }; then
4034 ac_cv_pthread=yes
4035else
4036 echo "$as_me: program exited with status $ac_status" >&5
4037echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004038sed 's/^/| /' conftest.$ac_ext >&5
4039
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004040( exit $ac_status )
4041ac_cv_pthread=no
4042fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004043rm -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 +00004044fi
4045CC="$ac_save_cc"
4046fi
4047
4048echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4049echo "${ECHO_T}$ac_cv_pthread" >&6
4050fi
4051
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004052# If we have set a CC compiler flag for thread support then
4053# check if it works for CXX, too.
4054ac_cv_cxx_thread=no
4055if test ! -z "$CXX"
4056then
4057echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4058echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4059ac_save_cxx="$CXX"
4060
4061if test "$ac_cv_kpthread" = "yes"
4062then
4063 CXX="$CXX -Kpthread"
4064 ac_cv_cxx_thread=yes
4065elif test "$ac_cv_kthread" = "yes"
4066then
4067 CXX="$CXX -Kthread"
4068 ac_cv_cxx_thread=yes
4069elif test "$ac_cv_pthread" = "yes"
4070then
4071 CXX="$CXX -pthread"
4072 ac_cv_cxx_thread=yes
4073fi
4074
4075if test $ac_cv_cxx_thread = yes
4076then
4077 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4078 $CXX -c conftest.$ac_ext 2>&5
4079 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4080 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4081 then
4082 ac_cv_cxx_thread=yes
4083 else
4084 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004085 fi
4086 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004087fi
4088fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004089CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004090echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4091echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4092
Michael W. Hudson54241132001-12-07 15:38:26 +00004093
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004094# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004095echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4096echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4097if test "${ac_cv_header_stdc+set}" = set; then
4098 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 cat >conftest.$ac_ext <<_ACEOF
4101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004102/* confdefs.h. */
4103_ACEOF
4104cat confdefs.h >>conftest.$ac_ext
4105cat >>conftest.$ac_ext <<_ACEOF
4106/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004107#include <stdlib.h>
4108#include <stdarg.h>
4109#include <string.h>
4110#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004111
Skip Montanaro6dead952003-09-25 14:50:04 +00004112int
4113main ()
4114{
4115
4116 ;
4117 return 0;
4118}
Martin v. Löwis11437992002-04-12 09:54:03 +00004119_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004120rm -f conftest.$ac_objext
4121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4122 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004125 (exit $ac_status); } &&
4126 { ac_try='test -s conftest.$ac_objext'
4127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4128 (eval $ac_try) 2>&5
4129 ac_status=$?
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132 ac_cv_header_stdc=yes
4133else
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004135sed 's/^/| /' conftest.$ac_ext >&5
4136
4137ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004138fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004139rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004140
4141if test $ac_cv_header_stdc = yes; then
4142 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 cat >conftest.$ac_ext <<_ACEOF
4144#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004145/* confdefs.h. */
4146_ACEOF
4147cat confdefs.h >>conftest.$ac_ext
4148cat >>conftest.$ac_ext <<_ACEOF
4149/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004151
4152_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004154 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155 :
4156else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157 ac_cv_header_stdc=no
4158fi
4159rm -f conftest*
4160
4161fi
4162
4163if test $ac_cv_header_stdc = yes; then
4164 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 cat >conftest.$ac_ext <<_ACEOF
4166#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* confdefs.h. */
4168_ACEOF
4169cat confdefs.h >>conftest.$ac_ext
4170cat >>conftest.$ac_ext <<_ACEOF
4171/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004173
4174_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004176 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177 :
4178else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004179 ac_cv_header_stdc=no
4180fi
4181rm -f conftest*
4182
4183fi
4184
4185if test $ac_cv_header_stdc = yes; then
4186 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004188 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189else
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 cat >conftest.$ac_ext <<_ACEOF
4191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004192/* confdefs.h. */
4193_ACEOF
4194cat confdefs.h >>conftest.$ac_ext
4195cat >>conftest.$ac_ext <<_ACEOF
4196/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004197#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004198#if ((' ' & 0x0FF) == 0x020)
4199# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4200# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4201#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004202# define ISLOWER(c) \
4203 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 || ('j' <= (c) && (c) <= 'r') \
4205 || ('s' <= (c) && (c) <= 'z'))
4206# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4207#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004208
Martin v. Löwis11437992002-04-12 09:54:03 +00004209#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4210int
4211main ()
4212{
4213 int i;
4214 for (i = 0; i < 256; i++)
4215 if (XOR (islower (i), ISLOWER (i))
4216 || toupper (i) != TOUPPER (i))
4217 exit(2);
4218 exit (0);
4219}
4220_ACEOF
4221rm -f conftest$ac_exeext
4222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4223 (eval $ac_link) 2>&5
4224 ac_status=$?
4225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4228 (eval $ac_try) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232 :
4233else
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 echo "$as_me: program exited with status $ac_status" >&5
4235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004236sed 's/^/| /' conftest.$ac_ext >&5
4237
Martin v. Löwis11437992002-04-12 09:54:03 +00004238( exit $ac_status )
4239ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004241rm -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 +00004242fi
4243fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004244fi
4245echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4246echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004247if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004248
4249cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004251_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252
4253fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004254
Skip Montanarob9820a32004-01-17 00:16:12 +00004255# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4266 inttypes.h stdint.h unistd.h
4267do
4268as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4269echo "$as_me:$LINENO: checking for $ac_header" >&5
4270echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4271if eval "test \"\${$as_ac_Header+set}\" = set"; then
4272 echo $ECHO_N "(cached) $ECHO_C" >&6
4273else
4274 cat >conftest.$ac_ext <<_ACEOF
4275#line $LINENO "configure"
4276/* confdefs.h. */
4277_ACEOF
4278cat confdefs.h >>conftest.$ac_ext
4279cat >>conftest.$ac_ext <<_ACEOF
4280/* end confdefs.h. */
4281$ac_includes_default
4282
4283#include <$ac_header>
4284_ACEOF
4285rm -f conftest.$ac_objext
4286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4287 (eval $ac_compile) 2>&5
4288 ac_status=$?
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290 (exit $ac_status); } &&
4291 { ac_try='test -s conftest.$ac_objext'
4292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4293 (eval $ac_try) 2>&5
4294 ac_status=$?
4295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4296 (exit $ac_status); }; }; then
4297 eval "$as_ac_Header=yes"
4298else
4299 echo "$as_me: failed program was:" >&5
4300sed 's/^/| /' conftest.$ac_ext >&5
4301
4302eval "$as_ac_Header=no"
4303fi
4304rm -f conftest.$ac_objext conftest.$ac_ext
4305fi
4306echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4307echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4308if test `eval echo '${'$as_ac_Header'}'` = yes; then
4309 cat >>confdefs.h <<_ACEOF
4310#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4311_ACEOF
4312
4313fi
4314
4315done
4316
4317
Martin v. Löwis11437992002-04-12 09:54:03 +00004318
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
4346
4347
4348
4349
4350
4351
4352
4353
Skip Montanaro7befb992004-02-10 16:50:21 +00004354for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4355libintl.h ncurses.h poll.h pthread.h \
4356stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004357unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004358sys/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 +00004359sys/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 +00004360sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004361sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4362bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363do
Martin v. Löwis11437992002-04-12 09:54:03 +00004364as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4365if eval "test \"\${$as_ac_Header+set}\" = set"; then
4366 echo "$as_me:$LINENO: checking for $ac_header" >&5
4367echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4368if eval "test \"\${$as_ac_Header+set}\" = set"; then
4369 echo $ECHO_N "(cached) $ECHO_C" >&6
4370fi
4371echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4372echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 # Is the header compilable?
4375echo "$as_me:$LINENO: checking $ac_header usability" >&5
4376echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4377cat >conftest.$ac_ext <<_ACEOF
4378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004379/* confdefs.h. */
4380_ACEOF
4381cat confdefs.h >>conftest.$ac_ext
4382cat >>conftest.$ac_ext <<_ACEOF
4383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004384$ac_includes_default
4385#include <$ac_header>
4386_ACEOF
4387rm -f conftest.$ac_objext
4388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4389 (eval $ac_compile) 2>&5
4390 ac_status=$?
4391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4392 (exit $ac_status); } &&
4393 { ac_try='test -s conftest.$ac_objext'
4394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4395 (eval $ac_try) 2>&5
4396 ac_status=$?
4397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4398 (exit $ac_status); }; }; then
4399 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004400else
Martin v. Löwis11437992002-04-12 09:54:03 +00004401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004402sed 's/^/| /' conftest.$ac_ext >&5
4403
Martin v. Löwis11437992002-04-12 09:54:03 +00004404ac_header_compiler=no
4405fi
4406rm -f conftest.$ac_objext conftest.$ac_ext
4407echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4408echo "${ECHO_T}$ac_header_compiler" >&6
4409
4410# Is the header present?
4411echo "$as_me:$LINENO: checking $ac_header presence" >&5
4412echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4413cat >conftest.$ac_ext <<_ACEOF
4414#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004420#include <$ac_header>
4421_ACEOF
4422if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4423 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004426 rm -f conftest.er1
4427 cat conftest.err >&5
4428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429 (exit $ac_status); } >/dev/null; then
4430 if test -s conftest.err; then
4431 ac_cpp_err=$ac_c_preproc_warn_flag
4432 else
4433 ac_cpp_err=
4434 fi
4435else
4436 ac_cpp_err=yes
4437fi
4438if test -z "$ac_cpp_err"; then
4439 ac_header_preproc=yes
4440else
4441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004442sed 's/^/| /' conftest.$ac_ext >&5
4443
Martin v. Löwis11437992002-04-12 09:54:03 +00004444 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004445fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004446rm -f conftest.err conftest.$ac_ext
4447echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4448echo "${ECHO_T}$ac_header_preproc" >&6
4449
4450# So? What about this header?
4451case $ac_header_compiler:$ac_header_preproc in
4452 yes:no )
4453 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4454echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4455 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004456echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4457 (
4458 cat <<\_ASBOX
4459## ------------------------------------ ##
4460## Report this to bug-autoconf@gnu.org. ##
4461## ------------------------------------ ##
4462_ASBOX
4463 ) |
4464 sed "s/^/$as_me: WARNING: /" >&2
4465 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004466 no:yes )
4467 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4468echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4469 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4470echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4471 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004472echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4473 (
4474 cat <<\_ASBOX
4475## ------------------------------------ ##
4476## Report this to bug-autoconf@gnu.org. ##
4477## ------------------------------------ ##
4478_ASBOX
4479 ) |
4480 sed "s/^/$as_me: WARNING: /" >&2
4481 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004482esac
4483echo "$as_me:$LINENO: checking for $ac_header" >&5
4484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4485if eval "test \"\${$as_ac_Header+set}\" = set"; then
4486 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004487else
Martin v. Löwis11437992002-04-12 09:54:03 +00004488 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004490echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4491echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4492
4493fi
4494if test `eval echo '${'$as_ac_Header'}'` = yes; then
4495 cat >>confdefs.h <<_ACEOF
4496#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4497_ACEOF
4498
4499fi
4500
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501done
4502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503
4504
4505
4506
4507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004509for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4510 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4511echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4512echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4513if eval "test \"\${$as_ac_Header+set}\" = set"; then
4514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004515else
Martin v. Löwis11437992002-04-12 09:54:03 +00004516 cat >conftest.$ac_ext <<_ACEOF
4517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004518/* confdefs.h. */
4519_ACEOF
4520cat confdefs.h >>conftest.$ac_ext
4521cat >>conftest.$ac_ext <<_ACEOF
4522/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523#include <sys/types.h>
4524#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004525
Martin v. Löwis11437992002-04-12 09:54:03 +00004526int
4527main ()
4528{
4529if ((DIR *) 0)
4530return 0;
4531 ;
4532 return 0;
4533}
4534_ACEOF
4535rm -f conftest.$ac_objext
4536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4537 (eval $ac_compile) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); } &&
4541 { ac_try='test -s conftest.$ac_objext'
4542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; }; then
4547 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004548else
Martin v. Löwis11437992002-04-12 09:54:03 +00004549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004550sed 's/^/| /' conftest.$ac_ext >&5
4551
Martin v. Löwis11437992002-04-12 09:54:03 +00004552eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004554rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4557echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4558if test `eval echo '${'$as_ac_Header'}'` = yes; then
4559 cat >>confdefs.h <<_ACEOF
4560#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4561_ACEOF
4562
4563ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566done
4567# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4568if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004569 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4570echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4571if test "${ac_cv_search_opendir+set}" = set; then
4572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004573else
Martin v. Löwis11437992002-04-12 09:54:03 +00004574 ac_func_search_save_LIBS=$LIBS
4575ac_cv_search_opendir=no
4576cat >conftest.$ac_ext <<_ACEOF
4577#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004578/* confdefs.h. */
4579_ACEOF
4580cat confdefs.h >>conftest.$ac_ext
4581cat >>conftest.$ac_ext <<_ACEOF
4582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004583
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004584/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004585#ifdef __cplusplus
4586extern "C"
4587#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004588/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004589 builtin and then its argument prototype would still apply. */
4590char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004591int
4592main ()
4593{
4594opendir ();
4595 ;
4596 return 0;
4597}
4598_ACEOF
4599rm -f conftest.$ac_objext conftest$ac_exeext
4600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4601 (eval $ac_link) 2>&5
4602 ac_status=$?
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604 (exit $ac_status); } &&
4605 { ac_try='test -s conftest$ac_exeext'
4606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607 (eval $ac_try) 2>&5
4608 ac_status=$?
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610 (exit $ac_status); }; }; then
4611 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004612else
Martin v. Löwis11437992002-04-12 09:54:03 +00004613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004614sed 's/^/| /' conftest.$ac_ext >&5
4615
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4618if test "$ac_cv_search_opendir" = no; then
4619 for ac_lib in dir; do
4620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4621 cat >conftest.$ac_ext <<_ACEOF
4622#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004623/* confdefs.h. */
4624_ACEOF
4625cat confdefs.h >>conftest.$ac_ext
4626cat >>conftest.$ac_ext <<_ACEOF
4627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004628
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004629/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004630#ifdef __cplusplus
4631extern "C"
4632#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004633/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004634 builtin and then its argument prototype would still apply. */
4635char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004636int
4637main ()
4638{
4639opendir ();
4640 ;
4641 return 0;
4642}
4643_ACEOF
4644rm -f conftest.$ac_objext conftest$ac_exeext
4645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4646 (eval $ac_link) 2>&5
4647 ac_status=$?
4648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4649 (exit $ac_status); } &&
4650 { ac_try='test -s conftest$ac_exeext'
4651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4652 (eval $ac_try) 2>&5
4653 ac_status=$?
4654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4655 (exit $ac_status); }; }; then
4656 ac_cv_search_opendir="-l$ac_lib"
4657break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658else
Martin v. Löwis11437992002-04-12 09:54:03 +00004659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004660sed 's/^/| /' conftest.$ac_ext >&5
4661
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004663rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4664 done
4665fi
4666LIBS=$ac_func_search_save_LIBS
4667fi
4668echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4669echo "${ECHO_T}$ac_cv_search_opendir" >&6
4670if test "$ac_cv_search_opendir" != no; then
4671 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004672
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004674
Michael W. Hudson54241132001-12-07 15:38:26 +00004675else
Martin v. Löwis11437992002-04-12 09:54:03 +00004676 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4677echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4678if test "${ac_cv_search_opendir+set}" = set; then
4679 echo $ECHO_N "(cached) $ECHO_C" >&6
4680else
4681 ac_func_search_save_LIBS=$LIBS
4682ac_cv_search_opendir=no
4683cat >conftest.$ac_ext <<_ACEOF
4684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004685/* confdefs.h. */
4686_ACEOF
4687cat confdefs.h >>conftest.$ac_ext
4688cat >>conftest.$ac_ext <<_ACEOF
4689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004690
4691/* Override any gcc2 internal prototype to avoid an error. */
4692#ifdef __cplusplus
4693extern "C"
4694#endif
4695/* We use char because int might match the return type of a gcc2
4696 builtin and then its argument prototype would still apply. */
4697char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004698int
4699main ()
4700{
4701opendir ();
4702 ;
4703 return 0;
4704}
4705_ACEOF
4706rm -f conftest.$ac_objext conftest$ac_exeext
4707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4708 (eval $ac_link) 2>&5
4709 ac_status=$?
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } &&
4712 { ac_try='test -s conftest$ac_exeext'
4713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4714 (eval $ac_try) 2>&5
4715 ac_status=$?
4716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4717 (exit $ac_status); }; }; then
4718 ac_cv_search_opendir="none required"
4719else
4720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004721sed 's/^/| /' conftest.$ac_ext >&5
4722
Martin v. Löwis11437992002-04-12 09:54:03 +00004723fi
4724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4725if test "$ac_cv_search_opendir" = no; then
4726 for ac_lib in x; do
4727 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4728 cat >conftest.$ac_ext <<_ACEOF
4729#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004730/* confdefs.h. */
4731_ACEOF
4732cat confdefs.h >>conftest.$ac_ext
4733cat >>conftest.$ac_ext <<_ACEOF
4734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004735
4736/* Override any gcc2 internal prototype to avoid an error. */
4737#ifdef __cplusplus
4738extern "C"
4739#endif
4740/* We use char because int might match the return type of a gcc2
4741 builtin and then its argument prototype would still apply. */
4742char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004743int
4744main ()
4745{
4746opendir ();
4747 ;
4748 return 0;
4749}
4750_ACEOF
4751rm -f conftest.$ac_objext conftest$ac_exeext
4752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4753 (eval $ac_link) 2>&5
4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); } &&
4757 { ac_try='test -s conftest$ac_exeext'
4758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 ac_cv_search_opendir="-l$ac_lib"
4764break
4765else
4766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004767sed 's/^/| /' conftest.$ac_ext >&5
4768
Martin v. Löwis11437992002-04-12 09:54:03 +00004769fi
4770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4771 done
4772fi
4773LIBS=$ac_func_search_save_LIBS
4774fi
4775echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4776echo "${ECHO_T}$ac_cv_search_opendir" >&6
4777if test "$ac_cv_search_opendir" != no; then
4778 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780fi
4781
4782fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004783
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004784echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4785echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4786if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4787 echo $ECHO_N "(cached) $ECHO_C" >&6
4788else
4789 cat >conftest.$ac_ext <<_ACEOF
4790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004791/* confdefs.h. */
4792_ACEOF
4793cat confdefs.h >>conftest.$ac_ext
4794cat >>conftest.$ac_ext <<_ACEOF
4795/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004796#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004797int
4798main ()
4799{
4800return makedev(0, 0);
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805rm -f conftest.$ac_objext conftest$ac_exeext
4806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4807 (eval $ac_link) 2>&5
4808 ac_status=$?
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } &&
4811 { ac_try='test -s conftest$ac_exeext'
4812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; }; then
4817 ac_cv_header_sys_types_h_makedev=yes
4818else
4819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004820sed 's/^/| /' conftest.$ac_ext >&5
4821
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004822ac_cv_header_sys_types_h_makedev=no
4823fi
4824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4825
4826fi
4827echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4828echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4829
4830if test $ac_cv_header_sys_types_h_makedev = no; then
4831if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4832 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4833echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4834if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4835 echo $ECHO_N "(cached) $ECHO_C" >&6
4836fi
4837echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4838echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4839else
4840 # Is the header compilable?
4841echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4842echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4843cat >conftest.$ac_ext <<_ACEOF
4844#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004845/* confdefs.h. */
4846_ACEOF
4847cat confdefs.h >>conftest.$ac_ext
4848cat >>conftest.$ac_ext <<_ACEOF
4849/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004850$ac_includes_default
4851#include <sys/mkdev.h>
4852_ACEOF
4853rm -f conftest.$ac_objext
4854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4855 (eval $ac_compile) 2>&5
4856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); } &&
4859 { ac_try='test -s conftest.$ac_objext'
4860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4861 (eval $ac_try) 2>&5
4862 ac_status=$?
4863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864 (exit $ac_status); }; }; then
4865 ac_header_compiler=yes
4866else
4867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004868sed 's/^/| /' conftest.$ac_ext >&5
4869
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004870ac_header_compiler=no
4871fi
4872rm -f conftest.$ac_objext conftest.$ac_ext
4873echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4874echo "${ECHO_T}$ac_header_compiler" >&6
4875
4876# Is the header present?
4877echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4878echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4879cat >conftest.$ac_ext <<_ACEOF
4880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004881/* confdefs.h. */
4882_ACEOF
4883cat confdefs.h >>conftest.$ac_ext
4884cat >>conftest.$ac_ext <<_ACEOF
4885/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004886#include <sys/mkdev.h>
4887_ACEOF
4888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4890 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004891 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004892 rm -f conftest.er1
4893 cat conftest.err >&5
4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895 (exit $ac_status); } >/dev/null; then
4896 if test -s conftest.err; then
4897 ac_cpp_err=$ac_c_preproc_warn_flag
4898 else
4899 ac_cpp_err=
4900 fi
4901else
4902 ac_cpp_err=yes
4903fi
4904if test -z "$ac_cpp_err"; then
4905 ac_header_preproc=yes
4906else
4907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004908sed 's/^/| /' conftest.$ac_ext >&5
4909
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004910 ac_header_preproc=no
4911fi
4912rm -f conftest.err conftest.$ac_ext
4913echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4914echo "${ECHO_T}$ac_header_preproc" >&6
4915
4916# So? What about this header?
4917case $ac_header_compiler:$ac_header_preproc in
4918 yes:no )
4919 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4920echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4921 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004922echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4923 (
4924 cat <<\_ASBOX
4925## ------------------------------------ ##
4926## Report this to bug-autoconf@gnu.org. ##
4927## ------------------------------------ ##
4928_ASBOX
4929 ) |
4930 sed "s/^/$as_me: WARNING: /" >&2
4931 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004932 no:yes )
4933 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4934echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4935 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4936echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4937 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004938echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4939 (
4940 cat <<\_ASBOX
4941## ------------------------------------ ##
4942## Report this to bug-autoconf@gnu.org. ##
4943## ------------------------------------ ##
4944_ASBOX
4945 ) |
4946 sed "s/^/$as_me: WARNING: /" >&2
4947 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004948esac
4949echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4950echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4951if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4952 echo $ECHO_N "(cached) $ECHO_C" >&6
4953else
4954 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4955fi
4956echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4957echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4958
4959fi
4960if test $ac_cv_header_sys_mkdev_h = yes; then
4961
4962cat >>confdefs.h <<\_ACEOF
4963#define MAJOR_IN_MKDEV 1
4964_ACEOF
4965
4966fi
4967
4968
4969
4970 if test $ac_cv_header_sys_mkdev_h = no; then
4971 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4972 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4973echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4974if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4975 echo $ECHO_N "(cached) $ECHO_C" >&6
4976fi
4977echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4978echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4979else
4980 # Is the header compilable?
4981echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4982echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4983cat >conftest.$ac_ext <<_ACEOF
4984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004985/* confdefs.h. */
4986_ACEOF
4987cat confdefs.h >>conftest.$ac_ext
4988cat >>conftest.$ac_ext <<_ACEOF
4989/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004990$ac_includes_default
4991#include <sys/sysmacros.h>
4992_ACEOF
4993rm -f conftest.$ac_objext
4994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4995 (eval $ac_compile) 2>&5
4996 ac_status=$?
4997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998 (exit $ac_status); } &&
4999 { ac_try='test -s conftest.$ac_objext'
5000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5001 (eval $ac_try) 2>&5
5002 ac_status=$?
5003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); }; }; then
5005 ac_header_compiler=yes
5006else
5007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005008sed 's/^/| /' conftest.$ac_ext >&5
5009
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005010ac_header_compiler=no
5011fi
5012rm -f conftest.$ac_objext conftest.$ac_ext
5013echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5014echo "${ECHO_T}$ac_header_compiler" >&6
5015
5016# Is the header present?
5017echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5018echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5019cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005021/* confdefs.h. */
5022_ACEOF
5023cat confdefs.h >>conftest.$ac_ext
5024cat >>conftest.$ac_ext <<_ACEOF
5025/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005026#include <sys/sysmacros.h>
5027_ACEOF
5028if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5029 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5030 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005031 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005032 rm -f conftest.er1
5033 cat conftest.err >&5
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } >/dev/null; then
5036 if test -s conftest.err; then
5037 ac_cpp_err=$ac_c_preproc_warn_flag
5038 else
5039 ac_cpp_err=
5040 fi
5041else
5042 ac_cpp_err=yes
5043fi
5044if test -z "$ac_cpp_err"; then
5045 ac_header_preproc=yes
5046else
5047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005048sed 's/^/| /' conftest.$ac_ext >&5
5049
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005050 ac_header_preproc=no
5051fi
5052rm -f conftest.err conftest.$ac_ext
5053echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5054echo "${ECHO_T}$ac_header_preproc" >&6
5055
5056# So? What about this header?
5057case $ac_header_compiler:$ac_header_preproc in
5058 yes:no )
5059 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5060echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5061 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005062echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5063 (
5064 cat <<\_ASBOX
5065## ------------------------------------ ##
5066## Report this to bug-autoconf@gnu.org. ##
5067## ------------------------------------ ##
5068_ASBOX
5069 ) |
5070 sed "s/^/$as_me: WARNING: /" >&2
5071 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005072 no:yes )
5073 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5074echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5075 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5076echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5077 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005078echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5079 (
5080 cat <<\_ASBOX
5081## ------------------------------------ ##
5082## Report this to bug-autoconf@gnu.org. ##
5083## ------------------------------------ ##
5084_ASBOX
5085 ) |
5086 sed "s/^/$as_me: WARNING: /" >&2
5087 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005088esac
5089echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5090echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5091if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5092 echo $ECHO_N "(cached) $ECHO_C" >&6
5093else
5094 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5095fi
5096echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5097echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5098
5099fi
5100if test $ac_cv_header_sys_sysmacros_h = yes; then
5101
5102cat >>confdefs.h <<\_ACEOF
5103#define MAJOR_IN_SYSMACROS 1
5104_ACEOF
5105
5106fi
5107
5108
5109 fi
5110fi
5111
Michael W. Hudson54241132001-12-07 15:38:26 +00005112
Guido van Rossum627b2d71993-12-24 10:39:16 +00005113# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005114was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005115echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5116echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5117cat >conftest.$ac_ext <<_ACEOF
5118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005119/* confdefs.h. */
5120_ACEOF
5121cat confdefs.h >>conftest.$ac_ext
5122cat >>conftest.$ac_ext <<_ACEOF
5123/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005125
5126_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005128 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005129 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130else
Martin v. Löwis11437992002-04-12 09:54:03 +00005131
5132
5133cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005135_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005136
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005137
Guido van Rossum627b2d71993-12-24 10:39:16 +00005138fi
5139rm -f conftest*
5140
Martin v. Löwis11437992002-04-12 09:54:03 +00005141echo "$as_me:$LINENO: result: $was_it_defined" >&5
5142echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005143
Neal Norwitz11690112002-07-30 01:08:28 +00005144# Check whether using makedev requires defining _OSF_SOURCE
5145echo "$as_me:$LINENO: checking for makedev" >&5
5146echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5147cat >conftest.$ac_ext <<_ACEOF
5148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005149/* confdefs.h. */
5150_ACEOF
5151cat confdefs.h >>conftest.$ac_ext
5152cat >>conftest.$ac_ext <<_ACEOF
5153/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005154#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005155int
5156main ()
5157{
5158 makedev(0, 0)
5159 ;
5160 return 0;
5161}
5162_ACEOF
5163rm -f conftest.$ac_objext conftest$ac_exeext
5164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5165 (eval $ac_link) 2>&5
5166 ac_status=$?
5167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5168 (exit $ac_status); } &&
5169 { ac_try='test -s conftest$ac_exeext'
5170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5171 (eval $ac_try) 2>&5
5172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); }; }; then
5175 ac_cv_has_makedev=yes
5176else
5177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005178sed 's/^/| /' conftest.$ac_ext >&5
5179
Neal Norwitz11690112002-07-30 01:08:28 +00005180ac_cv_has_makedev=no
5181fi
5182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5183if test "$ac_cv_has_makedev" = "no"; then
5184 # we didn't link, try if _OSF_SOURCE will allow us to link
5185 cat >conftest.$ac_ext <<_ACEOF
5186#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005187/* confdefs.h. */
5188_ACEOF
5189cat confdefs.h >>conftest.$ac_ext
5190cat >>conftest.$ac_ext <<_ACEOF
5191/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005192
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005193#define _OSF_SOURCE 1
5194#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005195
Neal Norwitz11690112002-07-30 01:08:28 +00005196int
5197main ()
5198{
5199 makedev(0, 0)
5200 ;
5201 return 0;
5202}
5203_ACEOF
5204rm -f conftest.$ac_objext conftest$ac_exeext
5205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5206 (eval $ac_link) 2>&5
5207 ac_status=$?
5208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5209 (exit $ac_status); } &&
5210 { ac_try='test -s conftest$ac_exeext'
5211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5212 (eval $ac_try) 2>&5
5213 ac_status=$?
5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215 (exit $ac_status); }; }; then
5216 ac_cv_has_makedev=yes
5217else
5218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005219sed 's/^/| /' conftest.$ac_ext >&5
5220
Neal Norwitz11690112002-07-30 01:08:28 +00005221ac_cv_has_makedev=no
5222fi
5223rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5224 if test "$ac_cv_has_makedev" = "yes"; then
5225
5226cat >>confdefs.h <<\_ACEOF
5227#define _OSF_SOURCE 1
5228_ACEOF
5229
5230 fi
5231fi
5232echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5233echo "${ECHO_T}$ac_cv_has_makedev" >&6
5234if test "$ac_cv_has_makedev" = "yes"; then
5235
5236cat >>confdefs.h <<\_ACEOF
5237#define HAVE_MAKEDEV 1
5238_ACEOF
5239
5240fi
5241
Martin v. Löwis399a6892002-10-04 10:22:02 +00005242# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5243# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5244# defined, but the compiler does not support pragma redefine_extname,
5245# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5246# structures (such as rlimit64) without declaring them. As a
5247# work-around, disable LFS on such configurations
5248
5249use_lfs=yes
5250echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5251echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5252cat >conftest.$ac_ext <<_ACEOF
5253#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005254/* confdefs.h. */
5255_ACEOF
5256cat confdefs.h >>conftest.$ac_ext
5257cat >>conftest.$ac_ext <<_ACEOF
5258/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005259
5260#define _LARGEFILE_SOURCE 1
5261#define _FILE_OFFSET_BITS 64
5262#include <sys/resource.h>
5263
Martin v. Löwis399a6892002-10-04 10:22:02 +00005264int
5265main ()
5266{
5267struct rlimit foo;
5268 ;
5269 return 0;
5270}
5271_ACEOF
5272rm -f conftest.$ac_objext
5273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5274 (eval $ac_compile) 2>&5
5275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); } &&
5278 { ac_try='test -s conftest.$ac_objext'
5279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5280 (eval $ac_try) 2>&5
5281 ac_status=$?
5282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5283 (exit $ac_status); }; }; then
5284 sol_lfs_bug=no
5285else
5286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005287sed 's/^/| /' conftest.$ac_ext >&5
5288
Martin v. Löwis399a6892002-10-04 10:22:02 +00005289sol_lfs_bug=yes
5290fi
5291rm -f conftest.$ac_objext conftest.$ac_ext
5292echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5293echo "${ECHO_T}$sol_lfs_bug" >&6
5294if test "$sol_lfs_bug" = "yes"; then
5295 use_lfs=no
5296fi
5297
5298if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005299# Two defines needed to enable largefile support on various platforms
5300# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005301
Martin v. Löwis11437992002-04-12 09:54:03 +00005302cat >>confdefs.h <<\_ACEOF
5303#define _LARGEFILE_SOURCE 1
5304_ACEOF
5305
5306
5307cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005308#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005309_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005310
Martin v. Löwis399a6892002-10-04 10:22:02 +00005311fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005312
Guido van Rossum84e7b241996-08-19 21:59:00 +00005313# Add some code to confdefs.h so that the test for off_t works on SCO
5314cat >> confdefs.h <<\EOF
5315#if defined(SCO_DS)
5316#undef _OFF_T
5317#endif
5318EOF
5319
Guido van Rossumef2255b2000-03-10 22:30:29 +00005320# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005321echo "$as_me:$LINENO: checking for mode_t" >&5
5322echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5323if test "${ac_cv_type_mode_t+set}" = set; then
5324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005325else
Martin v. Löwis11437992002-04-12 09:54:03 +00005326 cat >conftest.$ac_ext <<_ACEOF
5327#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005333$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005334int
5335main ()
5336{
5337if ((mode_t *) 0)
5338 return 0;
5339if (sizeof (mode_t))
5340 return 0;
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345rm -f conftest.$ac_objext
5346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5347 (eval $ac_compile) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); } &&
5351 { ac_try='test -s conftest.$ac_objext'
5352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5353 (eval $ac_try) 2>&5
5354 ac_status=$?
5355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005357 ac_cv_type_mode_t=yes
5358else
Martin v. Löwis11437992002-04-12 09:54:03 +00005359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005360sed 's/^/| /' conftest.$ac_ext >&5
5361
Martin v. Löwis11437992002-04-12 09:54:03 +00005362ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005366echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5367echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5368if test $ac_cv_type_mode_t = yes; then
5369 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370else
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372cat >>confdefs.h <<_ACEOF
5373#define mode_t int
5374_ACEOF
5375
5376fi
5377
5378echo "$as_me:$LINENO: checking for off_t" >&5
5379echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5380if test "${ac_cv_type_off_t+set}" = set; then
5381 echo $ECHO_N "(cached) $ECHO_C" >&6
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005385/* confdefs.h. */
5386_ACEOF
5387cat confdefs.h >>conftest.$ac_ext
5388cat >>conftest.$ac_ext <<_ACEOF
5389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005390$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005391int
5392main ()
5393{
5394if ((off_t *) 0)
5395 return 0;
5396if (sizeof (off_t))
5397 return 0;
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest.$ac_objext
5403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5404 (eval $ac_compile) 2>&5
5405 ac_status=$?
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); } &&
5408 { ac_try='test -s conftest.$ac_objext'
5409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5410 (eval $ac_try) 2>&5
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005414 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005415else
Martin v. Löwis11437992002-04-12 09:54:03 +00005416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005417sed 's/^/| /' conftest.$ac_ext >&5
5418
Martin v. Löwis11437992002-04-12 09:54:03 +00005419ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005421rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005423echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5424echo "${ECHO_T}$ac_cv_type_off_t" >&6
5425if test $ac_cv_type_off_t = yes; then
5426 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005427else
Martin v. Löwis11437992002-04-12 09:54:03 +00005428
5429cat >>confdefs.h <<_ACEOF
5430#define off_t long
5431_ACEOF
5432
5433fi
5434
5435echo "$as_me:$LINENO: checking for pid_t" >&5
5436echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5437if test "${ac_cv_type_pid_t+set}" = set; then
5438 echo $ECHO_N "(cached) $ECHO_C" >&6
5439else
5440 cat >conftest.$ac_ext <<_ACEOF
5441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005447$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005448int
5449main ()
5450{
5451if ((pid_t *) 0)
5452 return 0;
5453if (sizeof (pid_t))
5454 return 0;
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459rm -f conftest.$ac_objext
5460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5461 (eval $ac_compile) 2>&5
5462 ac_status=$?
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
5465 { ac_try='test -s conftest.$ac_objext'
5466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467 (eval $ac_try) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005471 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472else
Martin v. Löwis11437992002-04-12 09:54:03 +00005473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005474sed 's/^/| /' conftest.$ac_ext >&5
5475
Martin v. Löwis11437992002-04-12 09:54:03 +00005476ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005478rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005480echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5481echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5482if test $ac_cv_type_pid_t = yes; then
5483 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484else
Martin v. Löwis11437992002-04-12 09:54:03 +00005485
5486cat >>confdefs.h <<_ACEOF
5487#define pid_t int
5488_ACEOF
5489
5490fi
5491
5492echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5493echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5494if test "${ac_cv_type_signal+set}" = set; then
5495 echo $ECHO_N "(cached) $ECHO_C" >&6
5496else
5497 cat >conftest.$ac_ext <<_ACEOF
5498#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005499/* confdefs.h. */
5500_ACEOF
5501cat confdefs.h >>conftest.$ac_ext
5502cat >>conftest.$ac_ext <<_ACEOF
5503/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005504#include <sys/types.h>
5505#include <signal.h>
5506#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005507# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005508#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005509#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005510extern "C" void (*signal (int, void (*)(int)))(int);
5511#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005512void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005513#endif
5514
Martin v. Löwis11437992002-04-12 09:54:03 +00005515int
5516main ()
5517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005518int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005519 ;
5520 return 0;
5521}
5522_ACEOF
5523rm -f conftest.$ac_objext
5524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5525 (eval $ac_compile) 2>&5
5526 ac_status=$?
5527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5528 (exit $ac_status); } &&
5529 { ac_try='test -s conftest.$ac_objext'
5530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5531 (eval $ac_try) 2>&5
5532 ac_status=$?
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005536else
Martin v. Löwis11437992002-04-12 09:54:03 +00005537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005538sed 's/^/| /' conftest.$ac_ext >&5
5539
Martin v. Löwis11437992002-04-12 09:54:03 +00005540ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005542rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005544echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5545echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005546
Martin v. Löwis11437992002-04-12 09:54:03 +00005547cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005550
Michael W. Hudson54241132001-12-07 15:38:26 +00005551
Martin v. Löwis11437992002-04-12 09:54:03 +00005552echo "$as_me:$LINENO: checking for size_t" >&5
5553echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5554if test "${ac_cv_type_size_t+set}" = set; then
5555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005556else
Martin v. Löwis11437992002-04-12 09:54:03 +00005557 cat >conftest.$ac_ext <<_ACEOF
5558#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005559/* confdefs.h. */
5560_ACEOF
5561cat confdefs.h >>conftest.$ac_ext
5562cat >>conftest.$ac_ext <<_ACEOF
5563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005564$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005565int
5566main ()
5567{
5568if ((size_t *) 0)
5569 return 0;
5570if (sizeof (size_t))
5571 return 0;
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext
5577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5578 (eval $ac_compile) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); } &&
5582 { ac_try='test -s conftest.$ac_objext'
5583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584 (eval $ac_try) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005588 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005589else
Martin v. Löwis11437992002-04-12 09:54:03 +00005590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005591sed 's/^/| /' conftest.$ac_ext >&5
5592
Martin v. Löwis11437992002-04-12 09:54:03 +00005593ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005595rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005597echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5598echo "${ECHO_T}$ac_cv_type_size_t" >&6
5599if test $ac_cv_type_size_t = yes; then
5600 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005601else
Martin v. Löwis11437992002-04-12 09:54:03 +00005602
5603cat >>confdefs.h <<_ACEOF
5604#define size_t unsigned
5605_ACEOF
5606
5607fi
5608
5609echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5610echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5611if test "${ac_cv_type_uid_t+set}" = set; then
5612 echo $ECHO_N "(cached) $ECHO_C" >&6
5613else
5614 cat >conftest.$ac_ext <<_ACEOF
5615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005616/* confdefs.h. */
5617_ACEOF
5618cat confdefs.h >>conftest.$ac_ext
5619cat >>conftest.$ac_ext <<_ACEOF
5620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005621#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005622
5623_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005625 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005626 ac_cv_type_uid_t=yes
5627else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628 ac_cv_type_uid_t=no
5629fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005630rm -f conftest*
5631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005633echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5634echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005635if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636
Martin v. Löwis11437992002-04-12 09:54:03 +00005637cat >>confdefs.h <<\_ACEOF
5638#define uid_t int
5639_ACEOF
5640
5641
5642cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005643#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005645
5646fi
5647
Jack Jansendd19cf82001-12-06 22:36:17 +00005648
Michael W. Hudson54241132001-12-07 15:38:26 +00005649# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005650# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005651echo "$as_me:$LINENO: checking for int" >&5
5652echo $ECHO_N "checking for int... $ECHO_C" >&6
5653if test "${ac_cv_type_int+set}" = set; then
5654 echo $ECHO_N "(cached) $ECHO_C" >&6
5655else
5656 cat >conftest.$ac_ext <<_ACEOF
5657#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005658/* confdefs.h. */
5659_ACEOF
5660cat confdefs.h >>conftest.$ac_ext
5661cat >>conftest.$ac_ext <<_ACEOF
5662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005663$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005664int
5665main ()
5666{
5667if ((int *) 0)
5668 return 0;
5669if (sizeof (int))
5670 return 0;
5671 ;
5672 return 0;
5673}
5674_ACEOF
5675rm -f conftest.$ac_objext
5676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5677 (eval $ac_compile) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); } &&
5681 { ac_try='test -s conftest.$ac_objext'
5682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5683 (eval $ac_try) 2>&5
5684 ac_status=$?
5685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5687 ac_cv_type_int=yes
5688else
5689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005690sed 's/^/| /' conftest.$ac_ext >&5
5691
Martin v. Löwis11437992002-04-12 09:54:03 +00005692ac_cv_type_int=no
5693fi
5694rm -f conftest.$ac_objext conftest.$ac_ext
5695fi
5696echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5697echo "${ECHO_T}$ac_cv_type_int" >&6
5698
5699echo "$as_me:$LINENO: checking size of int" >&5
5700echo $ECHO_N "checking size of int... $ECHO_C" >&6
5701if test "${ac_cv_sizeof_int+set}" = set; then
5702 echo $ECHO_N "(cached) $ECHO_C" >&6
5703else
5704 if test "$ac_cv_type_int" = yes; then
5705 # The cast to unsigned long works around a bug in the HP C Compiler
5706 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5707 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5708 # This bug is HP SR number 8606223364.
5709 if test "$cross_compiling" = yes; then
5710 # Depending upon the size, compute the lo and hi bounds.
5711cat >conftest.$ac_ext <<_ACEOF
5712#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005719int
5720main ()
5721{
5722static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5723test_array [0] = 0
5724
5725 ;
5726 return 0;
5727}
5728_ACEOF
5729rm -f conftest.$ac_objext
5730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5731 (eval $ac_compile) 2>&5
5732 ac_status=$?
5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734 (exit $ac_status); } &&
5735 { ac_try='test -s conftest.$ac_objext'
5736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5737 (eval $ac_try) 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); }; }; then
5741 ac_lo=0 ac_mid=0
5742 while :; do
5743 cat >conftest.$ac_ext <<_ACEOF
5744#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005745/* confdefs.h. */
5746_ACEOF
5747cat confdefs.h >>conftest.$ac_ext
5748cat >>conftest.$ac_ext <<_ACEOF
5749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005750$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005751int
5752main ()
5753{
5754static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5755test_array [0] = 0
5756
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5763 (eval $ac_compile) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
5767 { ac_try='test -s conftest.$ac_objext'
5768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5769 (eval $ac_try) 2>&5
5770 ac_status=$?
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772 (exit $ac_status); }; }; then
5773 ac_hi=$ac_mid; break
5774else
5775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005776sed 's/^/| /' conftest.$ac_ext >&5
5777
Martin v. Löwis11437992002-04-12 09:54:03 +00005778ac_lo=`expr $ac_mid + 1`
5779 if test $ac_lo -le $ac_mid; then
5780 ac_lo= ac_hi=
5781 break
5782 fi
5783 ac_mid=`expr 2 '*' $ac_mid + 1`
5784fi
5785rm -f conftest.$ac_objext conftest.$ac_ext
5786 done
5787else
5788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005789sed 's/^/| /' conftest.$ac_ext >&5
5790
Martin v. Löwis11437992002-04-12 09:54:03 +00005791cat >conftest.$ac_ext <<_ACEOF
5792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005793/* confdefs.h. */
5794_ACEOF
5795cat confdefs.h >>conftest.$ac_ext
5796cat >>conftest.$ac_ext <<_ACEOF
5797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005799int
5800main ()
5801{
5802static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5803test_array [0] = 0
5804
5805 ;
5806 return 0;
5807}
5808_ACEOF
5809rm -f conftest.$ac_objext
5810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5811 (eval $ac_compile) 2>&5
5812 ac_status=$?
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); } &&
5815 { ac_try='test -s conftest.$ac_objext'
5816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5817 (eval $ac_try) 2>&5
5818 ac_status=$?
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); }; }; then
5821 ac_hi=-1 ac_mid=-1
5822 while :; do
5823 cat >conftest.$ac_ext <<_ACEOF
5824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005825/* confdefs.h. */
5826_ACEOF
5827cat confdefs.h >>conftest.$ac_ext
5828cat >>conftest.$ac_ext <<_ACEOF
5829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005831int
5832main ()
5833{
5834static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5835test_array [0] = 0
5836
5837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext
5842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5843 (eval $ac_compile) 2>&5
5844 ac_status=$?
5845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846 (exit $ac_status); } &&
5847 { ac_try='test -s conftest.$ac_objext'
5848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849 (eval $ac_try) 2>&5
5850 ac_status=$?
5851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852 (exit $ac_status); }; }; then
5853 ac_lo=$ac_mid; break
5854else
5855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005856sed 's/^/| /' conftest.$ac_ext >&5
5857
Martin v. Löwis11437992002-04-12 09:54:03 +00005858ac_hi=`expr '(' $ac_mid ')' - 1`
5859 if test $ac_mid -le $ac_hi; then
5860 ac_lo= ac_hi=
5861 break
5862 fi
5863 ac_mid=`expr 2 '*' $ac_mid`
5864fi
5865rm -f conftest.$ac_objext conftest.$ac_ext
5866 done
5867else
5868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005869sed 's/^/| /' conftest.$ac_ext >&5
5870
Martin v. Löwis11437992002-04-12 09:54:03 +00005871ac_lo= ac_hi=
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874fi
5875rm -f conftest.$ac_objext conftest.$ac_ext
5876# Binary search between lo and hi bounds.
5877while test "x$ac_lo" != "x$ac_hi"; do
5878 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5879 cat >conftest.$ac_ext <<_ACEOF
5880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005886$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
5890static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5891test_array [0] = 0
5892
5893 ;
5894 return 0;
5895}
5896_ACEOF
5897rm -f conftest.$ac_objext
5898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5899 (eval $ac_compile) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); } &&
5903 { ac_try='test -s conftest.$ac_objext'
5904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905 (eval $ac_try) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); }; }; then
5909 ac_hi=$ac_mid
5910else
5911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005912sed 's/^/| /' conftest.$ac_ext >&5
5913
Martin v. Löwis11437992002-04-12 09:54:03 +00005914ac_lo=`expr '(' $ac_mid ')' + 1`
5915fi
5916rm -f conftest.$ac_objext conftest.$ac_ext
5917done
5918case $ac_lo in
5919?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005920'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5921See \`config.log' for more details." >&5
5922echo "$as_me: error: cannot compute sizeof (int), 77
5923See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 { (exit 1); exit 1; }; } ;;
5925esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005926else
5927 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005928 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5929See \`config.log' for more details." >&5
5930echo "$as_me: error: cannot run test program while cross compiling
5931See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005933else
Martin v. Löwis11437992002-04-12 09:54:03 +00005934 cat >conftest.$ac_ext <<_ACEOF
5935#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005936/* confdefs.h. */
5937_ACEOF
5938cat confdefs.h >>conftest.$ac_ext
5939cat >>conftest.$ac_ext <<_ACEOF
5940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005941$ac_includes_default
5942long longval () { return (long) (sizeof (int)); }
5943unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005945#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005946int
5947main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005948{
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
5950 FILE *f = fopen ("conftest.val", "w");
5951 if (! f)
5952 exit (1);
5953 if (((long) (sizeof (int))) < 0)
5954 {
5955 long i = longval ();
5956 if (i != ((long) (sizeof (int))))
5957 exit (1);
5958 fprintf (f, "%ld\n", i);
5959 }
5960 else
5961 {
5962 unsigned long i = ulongval ();
5963 if (i != ((long) (sizeof (int))))
5964 exit (1);
5965 fprintf (f, "%lu\n", i);
5966 }
5967 exit (ferror (f) || fclose (f) != 0);
5968
5969 ;
5970 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005971}
Martin v. Löwis11437992002-04-12 09:54:03 +00005972_ACEOF
5973rm -f conftest$ac_exeext
5974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5975 (eval $ac_link) 2>&5
5976 ac_status=$?
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5980 (eval $ac_try) 2>&5
5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); }; }; then
5984 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005985else
Martin v. Löwis11437992002-04-12 09:54:03 +00005986 echo "$as_me: program exited with status $ac_status" >&5
5987echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005988sed 's/^/| /' conftest.$ac_ext >&5
5989
Martin v. Löwis11437992002-04-12 09:54:03 +00005990( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005991{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5992See \`config.log' for more details." >&5
5993echo "$as_me: error: cannot compute sizeof (int), 77
5994See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 { (exit 1); exit 1; }; }
5996fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005997rm -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 +00005998fi
5999fi
6000rm -f conftest.val
6001else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006002 ac_cv_sizeof_int=0
6003fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006005echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6006echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6007cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006008#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006009_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006010
6011
Martin v. Löwis11437992002-04-12 09:54:03 +00006012echo "$as_me:$LINENO: checking for long" >&5
6013echo $ECHO_N "checking for long... $ECHO_C" >&6
6014if test "${ac_cv_type_long+set}" = set; then
6015 echo $ECHO_N "(cached) $ECHO_C" >&6
6016else
6017 cat >conftest.$ac_ext <<_ACEOF
6018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006024$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006025int
6026main ()
6027{
6028if ((long *) 0)
6029 return 0;
6030if (sizeof (long))
6031 return 0;
6032 ;
6033 return 0;
6034}
6035_ACEOF
6036rm -f conftest.$ac_objext
6037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6038 (eval $ac_compile) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); } &&
6042 { ac_try='test -s conftest.$ac_objext'
6043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6044 (eval $ac_try) 2>&5
6045 ac_status=$?
6046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6047 (exit $ac_status); }; }; then
6048 ac_cv_type_long=yes
6049else
6050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006051sed 's/^/| /' conftest.$ac_ext >&5
6052
Martin v. Löwis11437992002-04-12 09:54:03 +00006053ac_cv_type_long=no
6054fi
6055rm -f conftest.$ac_objext conftest.$ac_ext
6056fi
6057echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6058echo "${ECHO_T}$ac_cv_type_long" >&6
6059
6060echo "$as_me:$LINENO: checking size of long" >&5
6061echo $ECHO_N "checking size of long... $ECHO_C" >&6
6062if test "${ac_cv_sizeof_long+set}" = set; then
6063 echo $ECHO_N "(cached) $ECHO_C" >&6
6064else
6065 if test "$ac_cv_type_long" = yes; then
6066 # The cast to unsigned long works around a bug in the HP C Compiler
6067 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6068 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6069 # This bug is HP SR number 8606223364.
6070 if test "$cross_compiling" = yes; then
6071 # Depending upon the size, compute the lo and hi bounds.
6072cat >conftest.$ac_ext <<_ACEOF
6073#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006074/* confdefs.h. */
6075_ACEOF
6076cat confdefs.h >>conftest.$ac_ext
6077cat >>conftest.$ac_ext <<_ACEOF
6078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006079$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006080int
6081main ()
6082{
6083static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6084test_array [0] = 0
6085
6086 ;
6087 return 0;
6088}
6089_ACEOF
6090rm -f conftest.$ac_objext
6091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6092 (eval $ac_compile) 2>&5
6093 ac_status=$?
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); } &&
6096 { ac_try='test -s conftest.$ac_objext'
6097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6098 (eval $ac_try) 2>&5
6099 ac_status=$?
6100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6101 (exit $ac_status); }; }; then
6102 ac_lo=0 ac_mid=0
6103 while :; do
6104 cat >conftest.$ac_ext <<_ACEOF
6105#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006106/* confdefs.h. */
6107_ACEOF
6108cat confdefs.h >>conftest.$ac_ext
6109cat >>conftest.$ac_ext <<_ACEOF
6110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006111$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006112int
6113main ()
6114{
6115static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6116test_array [0] = 0
6117
6118 ;
6119 return 0;
6120}
6121_ACEOF
6122rm -f conftest.$ac_objext
6123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6124 (eval $ac_compile) 2>&5
6125 ac_status=$?
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); } &&
6128 { ac_try='test -s conftest.$ac_objext'
6129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6130 (eval $ac_try) 2>&5
6131 ac_status=$?
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); }; }; then
6134 ac_hi=$ac_mid; break
6135else
6136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006137sed 's/^/| /' conftest.$ac_ext >&5
6138
Martin v. Löwis11437992002-04-12 09:54:03 +00006139ac_lo=`expr $ac_mid + 1`
6140 if test $ac_lo -le $ac_mid; then
6141 ac_lo= ac_hi=
6142 break
6143 fi
6144 ac_mid=`expr 2 '*' $ac_mid + 1`
6145fi
6146rm -f conftest.$ac_objext conftest.$ac_ext
6147 done
6148else
6149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006150sed 's/^/| /' conftest.$ac_ext >&5
6151
Martin v. Löwis11437992002-04-12 09:54:03 +00006152cat >conftest.$ac_ext <<_ACEOF
6153#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006154/* confdefs.h. */
6155_ACEOF
6156cat confdefs.h >>conftest.$ac_ext
6157cat >>conftest.$ac_ext <<_ACEOF
6158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006159$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006160int
6161main ()
6162{
6163static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6164test_array [0] = 0
6165
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest.$ac_objext
6171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6172 (eval $ac_compile) 2>&5
6173 ac_status=$?
6174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175 (exit $ac_status); } &&
6176 { ac_try='test -s conftest.$ac_objext'
6177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178 (eval $ac_try) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); }; }; then
6182 ac_hi=-1 ac_mid=-1
6183 while :; do
6184 cat >conftest.$ac_ext <<_ACEOF
6185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006191$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006192int
6193main ()
6194{
6195static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6196test_array [0] = 0
6197
6198 ;
6199 return 0;
6200}
6201_ACEOF
6202rm -f conftest.$ac_objext
6203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6204 (eval $ac_compile) 2>&5
6205 ac_status=$?
6206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6207 (exit $ac_status); } &&
6208 { ac_try='test -s conftest.$ac_objext'
6209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6210 (eval $ac_try) 2>&5
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); }; }; then
6214 ac_lo=$ac_mid; break
6215else
6216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006217sed 's/^/| /' conftest.$ac_ext >&5
6218
Martin v. Löwis11437992002-04-12 09:54:03 +00006219ac_hi=`expr '(' $ac_mid ')' - 1`
6220 if test $ac_mid -le $ac_hi; then
6221 ac_lo= ac_hi=
6222 break
6223 fi
6224 ac_mid=`expr 2 '*' $ac_mid`
6225fi
6226rm -f conftest.$ac_objext conftest.$ac_ext
6227 done
6228else
6229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006230sed 's/^/| /' conftest.$ac_ext >&5
6231
Martin v. Löwis11437992002-04-12 09:54:03 +00006232ac_lo= ac_hi=
6233fi
6234rm -f conftest.$ac_objext conftest.$ac_ext
6235fi
6236rm -f conftest.$ac_objext conftest.$ac_ext
6237# Binary search between lo and hi bounds.
6238while test "x$ac_lo" != "x$ac_hi"; do
6239 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6240 cat >conftest.$ac_ext <<_ACEOF
6241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_hi=$ac_mid
6271else
6272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006273sed 's/^/| /' conftest.$ac_ext >&5
6274
Martin v. Löwis11437992002-04-12 09:54:03 +00006275ac_lo=`expr '(' $ac_mid ')' + 1`
6276fi
6277rm -f conftest.$ac_objext conftest.$ac_ext
6278done
6279case $ac_lo in
6280?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006281'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6282See \`config.log' for more details." >&5
6283echo "$as_me: error: cannot compute sizeof (long), 77
6284See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006285 { (exit 1); exit 1; }; } ;;
6286esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006287else
6288 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006289 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6290See \`config.log' for more details." >&5
6291echo "$as_me: error: cannot run test program while cross compiling
6292See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006293 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006294else
Martin v. Löwis11437992002-04-12 09:54:03 +00006295 cat >conftest.$ac_ext <<_ACEOF
6296#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006297/* confdefs.h. */
6298_ACEOF
6299cat confdefs.h >>conftest.$ac_ext
6300cat >>conftest.$ac_ext <<_ACEOF
6301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006302$ac_includes_default
6303long longval () { return (long) (sizeof (long)); }
6304unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006305#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006306#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006307int
6308main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006309{
Martin v. Löwis11437992002-04-12 09:54:03 +00006310
6311 FILE *f = fopen ("conftest.val", "w");
6312 if (! f)
6313 exit (1);
6314 if (((long) (sizeof (long))) < 0)
6315 {
6316 long i = longval ();
6317 if (i != ((long) (sizeof (long))))
6318 exit (1);
6319 fprintf (f, "%ld\n", i);
6320 }
6321 else
6322 {
6323 unsigned long i = ulongval ();
6324 if (i != ((long) (sizeof (long))))
6325 exit (1);
6326 fprintf (f, "%lu\n", i);
6327 }
6328 exit (ferror (f) || fclose (f) != 0);
6329
6330 ;
6331 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006332}
Martin v. Löwis11437992002-04-12 09:54:03 +00006333_ACEOF
6334rm -f conftest$ac_exeext
6335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6336 (eval $ac_link) 2>&5
6337 ac_status=$?
6338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6341 (eval $ac_try) 2>&5
6342 ac_status=$?
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); }; }; then
6345 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006346else
Martin v. Löwis11437992002-04-12 09:54:03 +00006347 echo "$as_me: program exited with status $ac_status" >&5
6348echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006349sed 's/^/| /' conftest.$ac_ext >&5
6350
Martin v. Löwis11437992002-04-12 09:54:03 +00006351( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006352{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6353See \`config.log' for more details." >&5
6354echo "$as_me: error: cannot compute sizeof (long), 77
6355See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006356 { (exit 1); exit 1; }; }
6357fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006358rm -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 +00006359fi
6360fi
6361rm -f conftest.val
6362else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006363 ac_cv_sizeof_long=0
6364fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006366echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6367echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6368cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006369#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006370_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006371
6372
Martin v. Löwis11437992002-04-12 09:54:03 +00006373echo "$as_me:$LINENO: checking for void *" >&5
6374echo $ECHO_N "checking for void *... $ECHO_C" >&6
6375if test "${ac_cv_type_void_p+set}" = set; then
6376 echo $ECHO_N "(cached) $ECHO_C" >&6
6377else
6378 cat >conftest.$ac_ext <<_ACEOF
6379#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006380/* confdefs.h. */
6381_ACEOF
6382cat confdefs.h >>conftest.$ac_ext
6383cat >>conftest.$ac_ext <<_ACEOF
6384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006386int
6387main ()
6388{
6389if ((void * *) 0)
6390 return 0;
6391if (sizeof (void *))
6392 return 0;
6393 ;
6394 return 0;
6395}
6396_ACEOF
6397rm -f conftest.$ac_objext
6398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6399 (eval $ac_compile) 2>&5
6400 ac_status=$?
6401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6402 (exit $ac_status); } &&
6403 { ac_try='test -s conftest.$ac_objext'
6404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6405 (eval $ac_try) 2>&5
6406 ac_status=$?
6407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408 (exit $ac_status); }; }; then
6409 ac_cv_type_void_p=yes
6410else
6411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006412sed 's/^/| /' conftest.$ac_ext >&5
6413
Martin v. Löwis11437992002-04-12 09:54:03 +00006414ac_cv_type_void_p=no
6415fi
6416rm -f conftest.$ac_objext conftest.$ac_ext
6417fi
6418echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6419echo "${ECHO_T}$ac_cv_type_void_p" >&6
6420
6421echo "$as_me:$LINENO: checking size of void *" >&5
6422echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6423if test "${ac_cv_sizeof_void_p+set}" = set; then
6424 echo $ECHO_N "(cached) $ECHO_C" >&6
6425else
6426 if test "$ac_cv_type_void_p" = yes; then
6427 # The cast to unsigned long works around a bug in the HP C Compiler
6428 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6429 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6430 # This bug is HP SR number 8606223364.
6431 if test "$cross_compiling" = yes; then
6432 # Depending upon the size, compute the lo and hi bounds.
6433cat >conftest.$ac_ext <<_ACEOF
6434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006435/* confdefs.h. */
6436_ACEOF
6437cat confdefs.h >>conftest.$ac_ext
6438cat >>conftest.$ac_ext <<_ACEOF
6439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006440$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006441int
6442main ()
6443{
6444static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6445test_array [0] = 0
6446
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext
6452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6453 (eval $ac_compile) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); } &&
6457 { ac_try='test -s conftest.$ac_objext'
6458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6459 (eval $ac_try) 2>&5
6460 ac_status=$?
6461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); }; }; then
6463 ac_lo=0 ac_mid=0
6464 while :; do
6465 cat >conftest.$ac_ext <<_ACEOF
6466#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006467/* confdefs.h. */
6468_ACEOF
6469cat confdefs.h >>conftest.$ac_ext
6470cat >>conftest.$ac_ext <<_ACEOF
6471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006472$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006473int
6474main ()
6475{
6476static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6477test_array [0] = 0
6478
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext
6484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6485 (eval $ac_compile) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); } &&
6489 { ac_try='test -s conftest.$ac_objext'
6490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6491 (eval $ac_try) 2>&5
6492 ac_status=$?
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); }; }; then
6495 ac_hi=$ac_mid; break
6496else
6497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006498sed 's/^/| /' conftest.$ac_ext >&5
6499
Martin v. Löwis11437992002-04-12 09:54:03 +00006500ac_lo=`expr $ac_mid + 1`
6501 if test $ac_lo -le $ac_mid; then
6502 ac_lo= ac_hi=
6503 break
6504 fi
6505 ac_mid=`expr 2 '*' $ac_mid + 1`
6506fi
6507rm -f conftest.$ac_objext conftest.$ac_ext
6508 done
6509else
6510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006511sed 's/^/| /' conftest.$ac_ext >&5
6512
Martin v. Löwis11437992002-04-12 09:54:03 +00006513cat >conftest.$ac_ext <<_ACEOF
6514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006521int
6522main ()
6523{
6524static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6525test_array [0] = 0
6526
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext
6532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6533 (eval $ac_compile) 2>&5
6534 ac_status=$?
6535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); } &&
6537 { ac_try='test -s conftest.$ac_objext'
6538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6539 (eval $ac_try) 2>&5
6540 ac_status=$?
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); }; }; then
6543 ac_hi=-1 ac_mid=-1
6544 while :; do
6545 cat >conftest.$ac_ext <<_ACEOF
6546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006547/* confdefs.h. */
6548_ACEOF
6549cat confdefs.h >>conftest.$ac_ext
6550cat >>conftest.$ac_ext <<_ACEOF
6551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006553int
6554main ()
6555{
6556static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6557test_array [0] = 0
6558
6559 ;
6560 return 0;
6561}
6562_ACEOF
6563rm -f conftest.$ac_objext
6564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6565 (eval $ac_compile) 2>&5
6566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); } &&
6569 { ac_try='test -s conftest.$ac_objext'
6570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6571 (eval $ac_try) 2>&5
6572 ac_status=$?
6573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574 (exit $ac_status); }; }; then
6575 ac_lo=$ac_mid; break
6576else
6577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006578sed 's/^/| /' conftest.$ac_ext >&5
6579
Martin v. Löwis11437992002-04-12 09:54:03 +00006580ac_hi=`expr '(' $ac_mid ')' - 1`
6581 if test $ac_mid -le $ac_hi; then
6582 ac_lo= ac_hi=
6583 break
6584 fi
6585 ac_mid=`expr 2 '*' $ac_mid`
6586fi
6587rm -f conftest.$ac_objext conftest.$ac_ext
6588 done
6589else
6590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006591sed 's/^/| /' conftest.$ac_ext >&5
6592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593ac_lo= ac_hi=
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596fi
6597rm -f conftest.$ac_objext conftest.$ac_ext
6598# Binary search between lo and hi bounds.
6599while test "x$ac_lo" != "x$ac_hi"; do
6600 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6601 cat >conftest.$ac_ext <<_ACEOF
6602#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006608$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006609int
6610main ()
6611{
6612static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6613test_array [0] = 0
6614
6615 ;
6616 return 0;
6617}
6618_ACEOF
6619rm -f conftest.$ac_objext
6620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6621 (eval $ac_compile) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); } &&
6625 { ac_try='test -s conftest.$ac_objext'
6626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627 (eval $ac_try) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); }; }; then
6631 ac_hi=$ac_mid
6632else
6633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006634sed 's/^/| /' conftest.$ac_ext >&5
6635
Martin v. Löwis11437992002-04-12 09:54:03 +00006636ac_lo=`expr '(' $ac_mid ')' + 1`
6637fi
6638rm -f conftest.$ac_objext conftest.$ac_ext
6639done
6640case $ac_lo in
6641?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006642'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6643See \`config.log' for more details." >&5
6644echo "$as_me: error: cannot compute sizeof (void *), 77
6645See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006646 { (exit 1); exit 1; }; } ;;
6647esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006648else
6649 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006650 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6651See \`config.log' for more details." >&5
6652echo "$as_me: error: cannot run test program while cross compiling
6653See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006655else
Martin v. Löwis11437992002-04-12 09:54:03 +00006656 cat >conftest.$ac_ext <<_ACEOF
6657#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006658/* confdefs.h. */
6659_ACEOF
6660cat confdefs.h >>conftest.$ac_ext
6661cat >>conftest.$ac_ext <<_ACEOF
6662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006663$ac_includes_default
6664long longval () { return (long) (sizeof (void *)); }
6665unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006666#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006667#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006668int
6669main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006670{
Martin v. Löwis11437992002-04-12 09:54:03 +00006671
6672 FILE *f = fopen ("conftest.val", "w");
6673 if (! f)
6674 exit (1);
6675 if (((long) (sizeof (void *))) < 0)
6676 {
6677 long i = longval ();
6678 if (i != ((long) (sizeof (void *))))
6679 exit (1);
6680 fprintf (f, "%ld\n", i);
6681 }
6682 else
6683 {
6684 unsigned long i = ulongval ();
6685 if (i != ((long) (sizeof (void *))))
6686 exit (1);
6687 fprintf (f, "%lu\n", i);
6688 }
6689 exit (ferror (f) || fclose (f) != 0);
6690
6691 ;
6692 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006693}
Martin v. Löwis11437992002-04-12 09:54:03 +00006694_ACEOF
6695rm -f conftest$ac_exeext
6696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6697 (eval $ac_link) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6702 (eval $ac_try) 2>&5
6703 ac_status=$?
6704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705 (exit $ac_status); }; }; then
6706 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006707else
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 echo "$as_me: program exited with status $ac_status" >&5
6709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006710sed 's/^/| /' conftest.$ac_ext >&5
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006713{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6714See \`config.log' for more details." >&5
6715echo "$as_me: error: cannot compute sizeof (void *), 77
6716See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 { (exit 1); exit 1; }; }
6718fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006719rm -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 +00006720fi
6721fi
6722rm -f conftest.val
6723else
Guido van Rossumad678af1998-10-02 14:42:15 +00006724 ac_cv_sizeof_void_p=0
6725fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006727echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6729cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006730#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006732
6733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734echo "$as_me:$LINENO: checking for short" >&5
6735echo $ECHO_N "checking for short... $ECHO_C" >&6
6736if test "${ac_cv_type_short+set}" = set; then
6737 echo $ECHO_N "(cached) $ECHO_C" >&6
6738else
6739 cat >conftest.$ac_ext <<_ACEOF
6740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006741/* confdefs.h. */
6742_ACEOF
6743cat confdefs.h >>conftest.$ac_ext
6744cat >>conftest.$ac_ext <<_ACEOF
6745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006746$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006747int
6748main ()
6749{
6750if ((short *) 0)
6751 return 0;
6752if (sizeof (short))
6753 return 0;
6754 ;
6755 return 0;
6756}
6757_ACEOF
6758rm -f conftest.$ac_objext
6759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6760 (eval $ac_compile) 2>&5
6761 ac_status=$?
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); } &&
6764 { ac_try='test -s conftest.$ac_objext'
6765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6766 (eval $ac_try) 2>&5
6767 ac_status=$?
6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6769 (exit $ac_status); }; }; then
6770 ac_cv_type_short=yes
6771else
6772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006773sed 's/^/| /' conftest.$ac_ext >&5
6774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775ac_cv_type_short=no
6776fi
6777rm -f conftest.$ac_objext conftest.$ac_ext
6778fi
6779echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6780echo "${ECHO_T}$ac_cv_type_short" >&6
6781
6782echo "$as_me:$LINENO: checking size of short" >&5
6783echo $ECHO_N "checking size of short... $ECHO_C" >&6
6784if test "${ac_cv_sizeof_short+set}" = set; then
6785 echo $ECHO_N "(cached) $ECHO_C" >&6
6786else
6787 if test "$ac_cv_type_short" = yes; then
6788 # The cast to unsigned long works around a bug in the HP C Compiler
6789 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6790 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6791 # This bug is HP SR number 8606223364.
6792 if test "$cross_compiling" = yes; then
6793 # Depending upon the size, compute the lo and hi bounds.
6794cat >conftest.$ac_ext <<_ACEOF
6795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006801$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006802int
6803main ()
6804{
6805static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6806test_array [0] = 0
6807
6808 ;
6809 return 0;
6810}
6811_ACEOF
6812rm -f conftest.$ac_objext
6813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6814 (eval $ac_compile) 2>&5
6815 ac_status=$?
6816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817 (exit $ac_status); } &&
6818 { ac_try='test -s conftest.$ac_objext'
6819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6820 (eval $ac_try) 2>&5
6821 ac_status=$?
6822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6823 (exit $ac_status); }; }; then
6824 ac_lo=0 ac_mid=0
6825 while :; do
6826 cat >conftest.$ac_ext <<_ACEOF
6827#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006828/* confdefs.h. */
6829_ACEOF
6830cat confdefs.h >>conftest.$ac_ext
6831cat >>conftest.$ac_ext <<_ACEOF
6832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006833$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006834int
6835main ()
6836{
6837static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6838test_array [0] = 0
6839
6840 ;
6841 return 0;
6842}
6843_ACEOF
6844rm -f conftest.$ac_objext
6845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6846 (eval $ac_compile) 2>&5
6847 ac_status=$?
6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849 (exit $ac_status); } &&
6850 { ac_try='test -s conftest.$ac_objext'
6851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6852 (eval $ac_try) 2>&5
6853 ac_status=$?
6854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855 (exit $ac_status); }; }; then
6856 ac_hi=$ac_mid; break
6857else
6858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006859sed 's/^/| /' conftest.$ac_ext >&5
6860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861ac_lo=`expr $ac_mid + 1`
6862 if test $ac_lo -le $ac_mid; then
6863 ac_lo= ac_hi=
6864 break
6865 fi
6866 ac_mid=`expr 2 '*' $ac_mid + 1`
6867fi
6868rm -f conftest.$ac_objext conftest.$ac_ext
6869 done
6870else
6871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006872sed 's/^/| /' conftest.$ac_ext >&5
6873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874cat >conftest.$ac_ext <<_ACEOF
6875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006876/* confdefs.h. */
6877_ACEOF
6878cat confdefs.h >>conftest.$ac_ext
6879cat >>conftest.$ac_ext <<_ACEOF
6880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006881$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006882int
6883main ()
6884{
6885static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6886test_array [0] = 0
6887
6888 ;
6889 return 0;
6890}
6891_ACEOF
6892rm -f conftest.$ac_objext
6893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6894 (eval $ac_compile) 2>&5
6895 ac_status=$?
6896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6897 (exit $ac_status); } &&
6898 { ac_try='test -s conftest.$ac_objext'
6899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6900 (eval $ac_try) 2>&5
6901 ac_status=$?
6902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6903 (exit $ac_status); }; }; then
6904 ac_hi=-1 ac_mid=-1
6905 while :; do
6906 cat >conftest.$ac_ext <<_ACEOF
6907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006908/* confdefs.h. */
6909_ACEOF
6910cat confdefs.h >>conftest.$ac_ext
6911cat >>conftest.$ac_ext <<_ACEOF
6912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006914int
6915main ()
6916{
6917static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6918test_array [0] = 0
6919
6920 ;
6921 return 0;
6922}
6923_ACEOF
6924rm -f conftest.$ac_objext
6925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6926 (eval $ac_compile) 2>&5
6927 ac_status=$?
6928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6929 (exit $ac_status); } &&
6930 { ac_try='test -s conftest.$ac_objext'
6931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6932 (eval $ac_try) 2>&5
6933 ac_status=$?
6934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6935 (exit $ac_status); }; }; then
6936 ac_lo=$ac_mid; break
6937else
6938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006939sed 's/^/| /' conftest.$ac_ext >&5
6940
Martin v. Löwis11437992002-04-12 09:54:03 +00006941ac_hi=`expr '(' $ac_mid ')' - 1`
6942 if test $ac_mid -le $ac_hi; then
6943 ac_lo= ac_hi=
6944 break
6945 fi
6946 ac_mid=`expr 2 '*' $ac_mid`
6947fi
6948rm -f conftest.$ac_objext conftest.$ac_ext
6949 done
6950else
6951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006952sed 's/^/| /' conftest.$ac_ext >&5
6953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954ac_lo= ac_hi=
6955fi
6956rm -f conftest.$ac_objext conftest.$ac_ext
6957fi
6958rm -f conftest.$ac_objext conftest.$ac_ext
6959# Binary search between lo and hi bounds.
6960while test "x$ac_lo" != "x$ac_hi"; do
6961 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6962 cat >conftest.$ac_ext <<_ACEOF
6963#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006964/* confdefs.h. */
6965_ACEOF
6966cat confdefs.h >>conftest.$ac_ext
6967cat >>conftest.$ac_ext <<_ACEOF
6968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006969$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006970int
6971main ()
6972{
6973static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6974test_array [0] = 0
6975
6976 ;
6977 return 0;
6978}
6979_ACEOF
6980rm -f conftest.$ac_objext
6981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6982 (eval $ac_compile) 2>&5
6983 ac_status=$?
6984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985 (exit $ac_status); } &&
6986 { ac_try='test -s conftest.$ac_objext'
6987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6988 (eval $ac_try) 2>&5
6989 ac_status=$?
6990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991 (exit $ac_status); }; }; then
6992 ac_hi=$ac_mid
6993else
6994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006995sed 's/^/| /' conftest.$ac_ext >&5
6996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997ac_lo=`expr '(' $ac_mid ')' + 1`
6998fi
6999rm -f conftest.$ac_objext conftest.$ac_ext
7000done
7001case $ac_lo in
7002?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007003'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7004See \`config.log' for more details." >&5
7005echo "$as_me: error: cannot compute sizeof (short), 77
7006See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 { (exit 1); exit 1; }; } ;;
7008esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007009else
7010 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7012See \`config.log' for more details." >&5
7013echo "$as_me: error: cannot run test program while cross compiling
7014See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007016else
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 cat >conftest.$ac_ext <<_ACEOF
7018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007024$ac_includes_default
7025long longval () { return (long) (sizeof (short)); }
7026unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007027#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007028#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007029int
7030main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007031{
Martin v. Löwis11437992002-04-12 09:54:03 +00007032
7033 FILE *f = fopen ("conftest.val", "w");
7034 if (! f)
7035 exit (1);
7036 if (((long) (sizeof (short))) < 0)
7037 {
7038 long i = longval ();
7039 if (i != ((long) (sizeof (short))))
7040 exit (1);
7041 fprintf (f, "%ld\n", i);
7042 }
7043 else
7044 {
7045 unsigned long i = ulongval ();
7046 if (i != ((long) (sizeof (short))))
7047 exit (1);
7048 fprintf (f, "%lu\n", i);
7049 }
7050 exit (ferror (f) || fclose (f) != 0);
7051
7052 ;
7053 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007054}
Martin v. Löwis11437992002-04-12 09:54:03 +00007055_ACEOF
7056rm -f conftest$ac_exeext
7057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7058 (eval $ac_link) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7063 (eval $ac_try) 2>&5
7064 ac_status=$?
7065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7066 (exit $ac_status); }; }; then
7067 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007068else
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 echo "$as_me: program exited with status $ac_status" >&5
7070echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007071sed 's/^/| /' conftest.$ac_ext >&5
7072
Martin v. Löwis11437992002-04-12 09:54:03 +00007073( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007074{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7075See \`config.log' for more details." >&5
7076echo "$as_me: error: cannot compute sizeof (short), 77
7077See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 { (exit 1); exit 1; }; }
7079fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007080rm -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 +00007081fi
7082fi
7083rm -f conftest.val
7084else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085 ac_cv_sizeof_short=0
7086fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007088echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7089echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7090cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007091#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007092_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093
7094
Martin v. Löwis11437992002-04-12 09:54:03 +00007095echo "$as_me:$LINENO: checking for float" >&5
7096echo $ECHO_N "checking for float... $ECHO_C" >&6
7097if test "${ac_cv_type_float+set}" = set; then
7098 echo $ECHO_N "(cached) $ECHO_C" >&6
7099else
7100 cat >conftest.$ac_ext <<_ACEOF
7101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007102/* confdefs.h. */
7103_ACEOF
7104cat confdefs.h >>conftest.$ac_ext
7105cat >>conftest.$ac_ext <<_ACEOF
7106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007107$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007108int
7109main ()
7110{
7111if ((float *) 0)
7112 return 0;
7113if (sizeof (float))
7114 return 0;
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119rm -f conftest.$ac_objext
7120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7121 (eval $ac_compile) 2>&5
7122 ac_status=$?
7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124 (exit $ac_status); } &&
7125 { ac_try='test -s conftest.$ac_objext'
7126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127 (eval $ac_try) 2>&5
7128 ac_status=$?
7129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130 (exit $ac_status); }; }; then
7131 ac_cv_type_float=yes
7132else
7133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
Martin v. Löwis11437992002-04-12 09:54:03 +00007136ac_cv_type_float=no
7137fi
7138rm -f conftest.$ac_objext conftest.$ac_ext
7139fi
7140echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7141echo "${ECHO_T}$ac_cv_type_float" >&6
7142
7143echo "$as_me:$LINENO: checking size of float" >&5
7144echo $ECHO_N "checking size of float... $ECHO_C" >&6
7145if test "${ac_cv_sizeof_float+set}" = set; then
7146 echo $ECHO_N "(cached) $ECHO_C" >&6
7147else
7148 if test "$ac_cv_type_float" = yes; then
7149 # The cast to unsigned long works around a bug in the HP C Compiler
7150 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7151 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7152 # This bug is HP SR number 8606223364.
7153 if test "$cross_compiling" = yes; then
7154 # Depending upon the size, compute the lo and hi bounds.
7155cat >conftest.$ac_ext <<_ACEOF
7156#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007157/* confdefs.h. */
7158_ACEOF
7159cat confdefs.h >>conftest.$ac_ext
7160cat >>conftest.$ac_ext <<_ACEOF
7161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007162$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007163int
7164main ()
7165{
7166static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7167test_array [0] = 0
7168
7169 ;
7170 return 0;
7171}
7172_ACEOF
7173rm -f conftest.$ac_objext
7174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7175 (eval $ac_compile) 2>&5
7176 ac_status=$?
7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178 (exit $ac_status); } &&
7179 { ac_try='test -s conftest.$ac_objext'
7180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7181 (eval $ac_try) 2>&5
7182 ac_status=$?
7183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184 (exit $ac_status); }; }; then
7185 ac_lo=0 ac_mid=0
7186 while :; do
7187 cat >conftest.$ac_ext <<_ACEOF
7188#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007189/* confdefs.h. */
7190_ACEOF
7191cat confdefs.h >>conftest.$ac_ext
7192cat >>conftest.$ac_ext <<_ACEOF
7193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007194$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007195int
7196main ()
7197{
7198static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7199test_array [0] = 0
7200
7201 ;
7202 return 0;
7203}
7204_ACEOF
7205rm -f conftest.$ac_objext
7206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7207 (eval $ac_compile) 2>&5
7208 ac_status=$?
7209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210 (exit $ac_status); } &&
7211 { ac_try='test -s conftest.$ac_objext'
7212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213 (eval $ac_try) 2>&5
7214 ac_status=$?
7215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216 (exit $ac_status); }; }; then
7217 ac_hi=$ac_mid; break
7218else
7219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007220sed 's/^/| /' conftest.$ac_ext >&5
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222ac_lo=`expr $ac_mid + 1`
7223 if test $ac_lo -le $ac_mid; then
7224 ac_lo= ac_hi=
7225 break
7226 fi
7227 ac_mid=`expr 2 '*' $ac_mid + 1`
7228fi
7229rm -f conftest.$ac_objext conftest.$ac_ext
7230 done
7231else
7232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007233sed 's/^/| /' conftest.$ac_ext >&5
7234
Martin v. Löwis11437992002-04-12 09:54:03 +00007235cat >conftest.$ac_ext <<_ACEOF
7236#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007237/* confdefs.h. */
7238_ACEOF
7239cat confdefs.h >>conftest.$ac_ext
7240cat >>conftest.$ac_ext <<_ACEOF
7241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007242$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007243int
7244main ()
7245{
7246static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7247test_array [0] = 0
7248
7249 ;
7250 return 0;
7251}
7252_ACEOF
7253rm -f conftest.$ac_objext
7254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7255 (eval $ac_compile) 2>&5
7256 ac_status=$?
7257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); } &&
7259 { ac_try='test -s conftest.$ac_objext'
7260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7261 (eval $ac_try) 2>&5
7262 ac_status=$?
7263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264 (exit $ac_status); }; }; then
7265 ac_hi=-1 ac_mid=-1
7266 while :; do
7267 cat >conftest.$ac_ext <<_ACEOF
7268#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007269/* confdefs.h. */
7270_ACEOF
7271cat confdefs.h >>conftest.$ac_ext
7272cat >>conftest.$ac_ext <<_ACEOF
7273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007274$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007275int
7276main ()
7277{
7278static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7279test_array [0] = 0
7280
7281 ;
7282 return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext
7286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7287 (eval $ac_compile) 2>&5
7288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } &&
7291 { ac_try='test -s conftest.$ac_objext'
7292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7293 (eval $ac_try) 2>&5
7294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_lo=$ac_mid; break
7298else
7299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007300sed 's/^/| /' conftest.$ac_ext >&5
7301
Martin v. Löwis11437992002-04-12 09:54:03 +00007302ac_hi=`expr '(' $ac_mid ')' - 1`
7303 if test $ac_mid -le $ac_hi; then
7304 ac_lo= ac_hi=
7305 break
7306 fi
7307 ac_mid=`expr 2 '*' $ac_mid`
7308fi
7309rm -f conftest.$ac_objext conftest.$ac_ext
7310 done
7311else
7312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007313sed 's/^/| /' conftest.$ac_ext >&5
7314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315ac_lo= ac_hi=
7316fi
7317rm -f conftest.$ac_objext conftest.$ac_ext
7318fi
7319rm -f conftest.$ac_objext conftest.$ac_ext
7320# Binary search between lo and hi bounds.
7321while test "x$ac_lo" != "x$ac_hi"; do
7322 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7323 cat >conftest.$ac_ext <<_ACEOF
7324#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007325/* confdefs.h. */
7326_ACEOF
7327cat confdefs.h >>conftest.$ac_ext
7328cat >>conftest.$ac_ext <<_ACEOF
7329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007330$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007331int
7332main ()
7333{
7334static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7335test_array [0] = 0
7336
7337 ;
7338 return 0;
7339}
7340_ACEOF
7341rm -f conftest.$ac_objext
7342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7343 (eval $ac_compile) 2>&5
7344 ac_status=$?
7345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7346 (exit $ac_status); } &&
7347 { ac_try='test -s conftest.$ac_objext'
7348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7349 (eval $ac_try) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); }; }; then
7353 ac_hi=$ac_mid
7354else
7355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007356sed 's/^/| /' conftest.$ac_ext >&5
7357
Martin v. Löwis11437992002-04-12 09:54:03 +00007358ac_lo=`expr '(' $ac_mid ')' + 1`
7359fi
7360rm -f conftest.$ac_objext conftest.$ac_ext
7361done
7362case $ac_lo in
7363?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007364'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7365See \`config.log' for more details." >&5
7366echo "$as_me: error: cannot compute sizeof (float), 77
7367See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 { (exit 1); exit 1; }; } ;;
7369esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007370else
7371 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007372 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7373See \`config.log' for more details." >&5
7374echo "$as_me: error: cannot run test program while cross compiling
7375See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007377else
Martin v. Löwis11437992002-04-12 09:54:03 +00007378 cat >conftest.$ac_ext <<_ACEOF
7379#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007380/* confdefs.h. */
7381_ACEOF
7382cat confdefs.h >>conftest.$ac_ext
7383cat >>conftest.$ac_ext <<_ACEOF
7384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007385$ac_includes_default
7386long longval () { return (long) (sizeof (float)); }
7387unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007388#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007389#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007390int
7391main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007392{
Martin v. Löwis11437992002-04-12 09:54:03 +00007393
7394 FILE *f = fopen ("conftest.val", "w");
7395 if (! f)
7396 exit (1);
7397 if (((long) (sizeof (float))) < 0)
7398 {
7399 long i = longval ();
7400 if (i != ((long) (sizeof (float))))
7401 exit (1);
7402 fprintf (f, "%ld\n", i);
7403 }
7404 else
7405 {
7406 unsigned long i = ulongval ();
7407 if (i != ((long) (sizeof (float))))
7408 exit (1);
7409 fprintf (f, "%lu\n", i);
7410 }
7411 exit (ferror (f) || fclose (f) != 0);
7412
7413 ;
7414 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007415}
Martin v. Löwis11437992002-04-12 09:54:03 +00007416_ACEOF
7417rm -f conftest$ac_exeext
7418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7419 (eval $ac_link) 2>&5
7420 ac_status=$?
7421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7424 (eval $ac_try) 2>&5
7425 ac_status=$?
7426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7427 (exit $ac_status); }; }; then
7428 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007429else
Martin v. Löwis11437992002-04-12 09:54:03 +00007430 echo "$as_me: program exited with status $ac_status" >&5
7431echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
Martin v. Löwis11437992002-04-12 09:54:03 +00007434( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007435{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7436See \`config.log' for more details." >&5
7437echo "$as_me: error: cannot compute sizeof (float), 77
7438See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 { (exit 1); exit 1; }; }
7440fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007441rm -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 +00007442fi
7443fi
7444rm -f conftest.val
7445else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446 ac_cv_sizeof_float=0
7447fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007448fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007449echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7450echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7451cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007452#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007453_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007454
7455
Martin v. Löwis11437992002-04-12 09:54:03 +00007456echo "$as_me:$LINENO: checking for double" >&5
7457echo $ECHO_N "checking for double... $ECHO_C" >&6
7458if test "${ac_cv_type_double+set}" = set; then
7459 echo $ECHO_N "(cached) $ECHO_C" >&6
7460else
7461 cat >conftest.$ac_ext <<_ACEOF
7462#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007463/* confdefs.h. */
7464_ACEOF
7465cat confdefs.h >>conftest.$ac_ext
7466cat >>conftest.$ac_ext <<_ACEOF
7467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007468$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007469int
7470main ()
7471{
7472if ((double *) 0)
7473 return 0;
7474if (sizeof (double))
7475 return 0;
7476 ;
7477 return 0;
7478}
7479_ACEOF
7480rm -f conftest.$ac_objext
7481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7482 (eval $ac_compile) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); } &&
7486 { ac_try='test -s conftest.$ac_objext'
7487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7488 (eval $ac_try) 2>&5
7489 ac_status=$?
7490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7491 (exit $ac_status); }; }; then
7492 ac_cv_type_double=yes
7493else
7494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007495sed 's/^/| /' conftest.$ac_ext >&5
7496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497ac_cv_type_double=no
7498fi
7499rm -f conftest.$ac_objext conftest.$ac_ext
7500fi
7501echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7502echo "${ECHO_T}$ac_cv_type_double" >&6
7503
7504echo "$as_me:$LINENO: checking size of double" >&5
7505echo $ECHO_N "checking size of double... $ECHO_C" >&6
7506if test "${ac_cv_sizeof_double+set}" = set; then
7507 echo $ECHO_N "(cached) $ECHO_C" >&6
7508else
7509 if test "$ac_cv_type_double" = yes; then
7510 # The cast to unsigned long works around a bug in the HP C Compiler
7511 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7512 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7513 # This bug is HP SR number 8606223364.
7514 if test "$cross_compiling" = yes; then
7515 # Depending upon the size, compute the lo and hi bounds.
7516cat >conftest.$ac_ext <<_ACEOF
7517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* confdefs.h. */
7519_ACEOF
7520cat confdefs.h >>conftest.$ac_ext
7521cat >>conftest.$ac_ext <<_ACEOF
7522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007523$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
7527static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
7535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7536 (eval $ac_compile) 2>&5
7537 ac_status=$?
7538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539 (exit $ac_status); } &&
7540 { ac_try='test -s conftest.$ac_objext'
7541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7542 (eval $ac_try) 2>&5
7543 ac_status=$?
7544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545 (exit $ac_status); }; }; then
7546 ac_lo=0 ac_mid=0
7547 while :; do
7548 cat >conftest.$ac_ext <<_ACEOF
7549#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007550/* confdefs.h. */
7551_ACEOF
7552cat confdefs.h >>conftest.$ac_ext
7553cat >>conftest.$ac_ext <<_ACEOF
7554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007555$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007556int
7557main ()
7558{
7559static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7560test_array [0] = 0
7561
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
7567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7568 (eval $ac_compile) 2>&5
7569 ac_status=$?
7570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7571 (exit $ac_status); } &&
7572 { ac_try='test -s conftest.$ac_objext'
7573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7574 (eval $ac_try) 2>&5
7575 ac_status=$?
7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577 (exit $ac_status); }; }; then
7578 ac_hi=$ac_mid; break
7579else
7580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007581sed 's/^/| /' conftest.$ac_ext >&5
7582
Martin v. Löwis11437992002-04-12 09:54:03 +00007583ac_lo=`expr $ac_mid + 1`
7584 if test $ac_lo -le $ac_mid; then
7585 ac_lo= ac_hi=
7586 break
7587 fi
7588 ac_mid=`expr 2 '*' $ac_mid + 1`
7589fi
7590rm -f conftest.$ac_objext conftest.$ac_ext
7591 done
7592else
7593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007594sed 's/^/| /' conftest.$ac_ext >&5
7595
Martin v. Löwis11437992002-04-12 09:54:03 +00007596cat >conftest.$ac_ext <<_ACEOF
7597#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007598/* confdefs.h. */
7599_ACEOF
7600cat confdefs.h >>conftest.$ac_ext
7601cat >>conftest.$ac_ext <<_ACEOF
7602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007603$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007604int
7605main ()
7606{
7607static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7608test_array [0] = 0
7609
7610 ;
7611 return 0;
7612}
7613_ACEOF
7614rm -f conftest.$ac_objext
7615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7616 (eval $ac_compile) 2>&5
7617 ac_status=$?
7618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7619 (exit $ac_status); } &&
7620 { ac_try='test -s conftest.$ac_objext'
7621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7622 (eval $ac_try) 2>&5
7623 ac_status=$?
7624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625 (exit $ac_status); }; }; then
7626 ac_hi=-1 ac_mid=-1
7627 while :; do
7628 cat >conftest.$ac_ext <<_ACEOF
7629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007636int
7637main ()
7638{
7639static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7640test_array [0] = 0
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext
7647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7648 (eval $ac_compile) 2>&5
7649 ac_status=$?
7650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651 (exit $ac_status); } &&
7652 { ac_try='test -s conftest.$ac_objext'
7653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7654 (eval $ac_try) 2>&5
7655 ac_status=$?
7656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7657 (exit $ac_status); }; }; then
7658 ac_lo=$ac_mid; break
7659else
7660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007661sed 's/^/| /' conftest.$ac_ext >&5
7662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663ac_hi=`expr '(' $ac_mid ')' - 1`
7664 if test $ac_mid -le $ac_hi; then
7665 ac_lo= ac_hi=
7666 break
7667 fi
7668 ac_mid=`expr 2 '*' $ac_mid`
7669fi
7670rm -f conftest.$ac_objext conftest.$ac_ext
7671 done
7672else
7673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007674sed 's/^/| /' conftest.$ac_ext >&5
7675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676ac_lo= ac_hi=
7677fi
7678rm -f conftest.$ac_objext conftest.$ac_ext
7679fi
7680rm -f conftest.$ac_objext conftest.$ac_ext
7681# Binary search between lo and hi bounds.
7682while test "x$ac_lo" != "x$ac_hi"; do
7683 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7684 cat >conftest.$ac_ext <<_ACEOF
7685#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007692int
7693main ()
7694{
7695static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
7703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7704 (eval $ac_compile) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); } &&
7708 { ac_try='test -s conftest.$ac_objext'
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; }; then
7714 ac_hi=$ac_mid
7715else
7716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007717sed 's/^/| /' conftest.$ac_ext >&5
7718
Martin v. Löwis11437992002-04-12 09:54:03 +00007719ac_lo=`expr '(' $ac_mid ')' + 1`
7720fi
7721rm -f conftest.$ac_objext conftest.$ac_ext
7722done
7723case $ac_lo in
7724?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007725'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7726See \`config.log' for more details." >&5
7727echo "$as_me: error: cannot compute sizeof (double), 77
7728See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 { (exit 1); exit 1; }; } ;;
7730esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007731else
7732 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007733 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7734See \`config.log' for more details." >&5
7735echo "$as_me: error: cannot run test program while cross compiling
7736See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007738else
Martin v. Löwis11437992002-04-12 09:54:03 +00007739 cat >conftest.$ac_ext <<_ACEOF
7740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746$ac_includes_default
7747long longval () { return (long) (sizeof (double)); }
7748unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007749#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007750#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007751int
7752main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007753{
Martin v. Löwis11437992002-04-12 09:54:03 +00007754
7755 FILE *f = fopen ("conftest.val", "w");
7756 if (! f)
7757 exit (1);
7758 if (((long) (sizeof (double))) < 0)
7759 {
7760 long i = longval ();
7761 if (i != ((long) (sizeof (double))))
7762 exit (1);
7763 fprintf (f, "%ld\n", i);
7764 }
7765 else
7766 {
7767 unsigned long i = ulongval ();
7768 if (i != ((long) (sizeof (double))))
7769 exit (1);
7770 fprintf (f, "%lu\n", i);
7771 }
7772 exit (ferror (f) || fclose (f) != 0);
7773
7774 ;
7775 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007776}
Martin v. Löwis11437992002-04-12 09:54:03 +00007777_ACEOF
7778rm -f conftest$ac_exeext
7779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7780 (eval $ac_link) 2>&5
7781 ac_status=$?
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7785 (eval $ac_try) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); }; }; then
7789 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007790else
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 echo "$as_me: program exited with status $ac_status" >&5
7792echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007793sed 's/^/| /' conftest.$ac_ext >&5
7794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007796{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7797See \`config.log' for more details." >&5
7798echo "$as_me: error: cannot compute sizeof (double), 77
7799See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 { (exit 1); exit 1; }; }
7801fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007802rm -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 +00007803fi
7804fi
7805rm -f conftest.val
7806else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807 ac_cv_sizeof_double=0
7808fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007810echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7811echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7812cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007814_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007815
7816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817echo "$as_me:$LINENO: checking for fpos_t" >&5
7818echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7819if test "${ac_cv_type_fpos_t+set}" = set; then
7820 echo $ECHO_N "(cached) $ECHO_C" >&6
7821else
7822 cat >conftest.$ac_ext <<_ACEOF
7823#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* confdefs.h. */
7825_ACEOF
7826cat confdefs.h >>conftest.$ac_ext
7827cat >>conftest.$ac_ext <<_ACEOF
7828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007829$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007830int
7831main ()
7832{
7833if ((fpos_t *) 0)
7834 return 0;
7835if (sizeof (fpos_t))
7836 return 0;
7837 ;
7838 return 0;
7839}
7840_ACEOF
7841rm -f conftest.$ac_objext
7842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7843 (eval $ac_compile) 2>&5
7844 ac_status=$?
7845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7846 (exit $ac_status); } &&
7847 { ac_try='test -s conftest.$ac_objext'
7848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7849 (eval $ac_try) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 ac_cv_type_fpos_t=yes
7854else
7855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007856sed 's/^/| /' conftest.$ac_ext >&5
7857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858ac_cv_type_fpos_t=no
7859fi
7860rm -f conftest.$ac_objext conftest.$ac_ext
7861fi
7862echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7863echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7864
7865echo "$as_me:$LINENO: checking size of fpos_t" >&5
7866echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7867if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7868 echo $ECHO_N "(cached) $ECHO_C" >&6
7869else
7870 if test "$ac_cv_type_fpos_t" = yes; then
7871 # The cast to unsigned long works around a bug in the HP C Compiler
7872 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7873 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7874 # This bug is HP SR number 8606223364.
7875 if test "$cross_compiling" = yes; then
7876 # Depending upon the size, compute the lo and hi bounds.
7877cat >conftest.$ac_ext <<_ACEOF
7878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* confdefs.h. */
7880_ACEOF
7881cat confdefs.h >>conftest.$ac_ext
7882cat >>conftest.$ac_ext <<_ACEOF
7883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007884$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
7888static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7889test_array [0] = 0
7890
7891 ;
7892 return 0;
7893}
7894_ACEOF
7895rm -f conftest.$ac_objext
7896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7897 (eval $ac_compile) 2>&5
7898 ac_status=$?
7899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7900 (exit $ac_status); } &&
7901 { ac_try='test -s conftest.$ac_objext'
7902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7903 (eval $ac_try) 2>&5
7904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
7907 ac_lo=0 ac_mid=0
7908 while :; do
7909 cat >conftest.$ac_ext <<_ACEOF
7910#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007911/* confdefs.h. */
7912_ACEOF
7913cat confdefs.h >>conftest.$ac_ext
7914cat >>conftest.$ac_ext <<_ACEOF
7915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
7920static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7921test_array [0] = 0
7922
7923 ;
7924 return 0;
7925}
7926_ACEOF
7927rm -f conftest.$ac_objext
7928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7929 (eval $ac_compile) 2>&5
7930 ac_status=$?
7931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932 (exit $ac_status); } &&
7933 { ac_try='test -s conftest.$ac_objext'
7934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935 (eval $ac_try) 2>&5
7936 ac_status=$?
7937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938 (exit $ac_status); }; }; then
7939 ac_hi=$ac_mid; break
7940else
7941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007942sed 's/^/| /' conftest.$ac_ext >&5
7943
Martin v. Löwis11437992002-04-12 09:54:03 +00007944ac_lo=`expr $ac_mid + 1`
7945 if test $ac_lo -le $ac_mid; then
7946 ac_lo= ac_hi=
7947 break
7948 fi
7949 ac_mid=`expr 2 '*' $ac_mid + 1`
7950fi
7951rm -f conftest.$ac_objext conftest.$ac_ext
7952 done
7953else
7954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007955sed 's/^/| /' conftest.$ac_ext >&5
7956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957cat >conftest.$ac_ext <<_ACEOF
7958#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
7967{
7968static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7969test_array [0] = 0
7970
7971 ;
7972 return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext
7976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7977 (eval $ac_compile) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); } &&
7981 { ac_try='test -s conftest.$ac_objext'
7982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7983 (eval $ac_try) 2>&5
7984 ac_status=$?
7985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986 (exit $ac_status); }; }; then
7987 ac_hi=-1 ac_mid=-1
7988 while :; do
7989 cat >conftest.$ac_ext <<_ACEOF
7990#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
8000static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8001test_array [0] = 0
8002
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
8008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8009 (eval $ac_compile) 2>&5
8010 ac_status=$?
8011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8012 (exit $ac_status); } &&
8013 { ac_try='test -s conftest.$ac_objext'
8014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8015 (eval $ac_try) 2>&5
8016 ac_status=$?
8017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8018 (exit $ac_status); }; }; then
8019 ac_lo=$ac_mid; break
8020else
8021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008022sed 's/^/| /' conftest.$ac_ext >&5
8023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024ac_hi=`expr '(' $ac_mid ')' - 1`
8025 if test $ac_mid -le $ac_hi; then
8026 ac_lo= ac_hi=
8027 break
8028 fi
8029 ac_mid=`expr 2 '*' $ac_mid`
8030fi
8031rm -f conftest.$ac_objext conftest.$ac_ext
8032 done
8033else
8034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008035sed 's/^/| /' conftest.$ac_ext >&5
8036
Martin v. Löwis11437992002-04-12 09:54:03 +00008037ac_lo= ac_hi=
8038fi
8039rm -f conftest.$ac_objext conftest.$ac_ext
8040fi
8041rm -f conftest.$ac_objext conftest.$ac_ext
8042# Binary search between lo and hi bounds.
8043while test "x$ac_lo" != "x$ac_hi"; do
8044 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8045 cat >conftest.$ac_ext <<_ACEOF
8046#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008047/* confdefs.h. */
8048_ACEOF
8049cat confdefs.h >>conftest.$ac_ext
8050cat >>conftest.$ac_ext <<_ACEOF
8051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008052$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008053int
8054main ()
8055{
8056static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8057test_array [0] = 0
8058
8059 ;
8060 return 0;
8061}
8062_ACEOF
8063rm -f conftest.$ac_objext
8064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8065 (eval $ac_compile) 2>&5
8066 ac_status=$?
8067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); } &&
8069 { ac_try='test -s conftest.$ac_objext'
8070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8071 (eval $ac_try) 2>&5
8072 ac_status=$?
8073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8074 (exit $ac_status); }; }; then
8075 ac_hi=$ac_mid
8076else
8077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008078sed 's/^/| /' conftest.$ac_ext >&5
8079
Martin v. Löwis11437992002-04-12 09:54:03 +00008080ac_lo=`expr '(' $ac_mid ')' + 1`
8081fi
8082rm -f conftest.$ac_objext conftest.$ac_ext
8083done
8084case $ac_lo in
8085?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008086'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8087See \`config.log' for more details." >&5
8088echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8089See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 { (exit 1); exit 1; }; } ;;
8091esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008092else
8093 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008094 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8095See \`config.log' for more details." >&5
8096echo "$as_me: error: cannot run test program while cross compiling
8097See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008099else
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 cat >conftest.$ac_ext <<_ACEOF
8101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* confdefs.h. */
8103_ACEOF
8104cat confdefs.h >>conftest.$ac_ext
8105cat >>conftest.$ac_ext <<_ACEOF
8106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107$ac_includes_default
8108long longval () { return (long) (sizeof (fpos_t)); }
8109unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008110#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008111#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008112int
8113main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008114{
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
8116 FILE *f = fopen ("conftest.val", "w");
8117 if (! f)
8118 exit (1);
8119 if (((long) (sizeof (fpos_t))) < 0)
8120 {
8121 long i = longval ();
8122 if (i != ((long) (sizeof (fpos_t))))
8123 exit (1);
8124 fprintf (f, "%ld\n", i);
8125 }
8126 else
8127 {
8128 unsigned long i = ulongval ();
8129 if (i != ((long) (sizeof (fpos_t))))
8130 exit (1);
8131 fprintf (f, "%lu\n", i);
8132 }
8133 exit (ferror (f) || fclose (f) != 0);
8134
8135 ;
8136 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008137}
Martin v. Löwis11437992002-04-12 09:54:03 +00008138_ACEOF
8139rm -f conftest$ac_exeext
8140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8141 (eval $ac_link) 2>&5
8142 ac_status=$?
8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146 (eval $ac_try) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); }; }; then
8150 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008151else
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 echo "$as_me: program exited with status $ac_status" >&5
8153echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008154sed 's/^/| /' conftest.$ac_ext >&5
8155
Martin v. Löwis11437992002-04-12 09:54:03 +00008156( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008157{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8158See \`config.log' for more details." >&5
8159echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8160See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 { (exit 1); exit 1; }; }
8162fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008163rm -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 +00008164fi
8165fi
8166rm -f conftest.val
8167else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168 ac_cv_sizeof_fpos_t=0
8169fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008171echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8172echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8173cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008175_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008176
Michael W. Hudson54241132001-12-07 15:38:26 +00008177
8178
Martin v. Löwis11437992002-04-12 09:54:03 +00008179echo "$as_me:$LINENO: checking for long long support" >&5
8180echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008182cat >conftest.$ac_ext <<_ACEOF
8183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008184/* confdefs.h. */
8185_ACEOF
8186cat confdefs.h >>conftest.$ac_ext
8187cat >>conftest.$ac_ext <<_ACEOF
8188/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008189
Martin v. Löwis11437992002-04-12 09:54:03 +00008190int
8191main ()
8192{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008193long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 ;
8195 return 0;
8196}
8197_ACEOF
8198rm -f conftest.$ac_objext
8199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8200 (eval $ac_compile) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); } &&
8204 { ac_try='test -s conftest.$ac_objext'
8205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8206 (eval $ac_try) 2>&5
8207 ac_status=$?
8208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8209 (exit $ac_status); }; }; then
8210
8211
8212cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008213#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008214_ACEOF
8215
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008216 have_long_long=yes
8217
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008218else
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008220sed 's/^/| /' conftest.$ac_ext >&5
8221
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008223rm -f conftest.$ac_objext conftest.$ac_ext
8224echo "$as_me:$LINENO: result: $have_long_long" >&5
8225echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008226if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008227echo "$as_me:$LINENO: checking for long long" >&5
8228echo $ECHO_N "checking for long long... $ECHO_C" >&6
8229if test "${ac_cv_type_long_long+set}" = set; then
8230 echo $ECHO_N "(cached) $ECHO_C" >&6
8231else
8232 cat >conftest.$ac_ext <<_ACEOF
8233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* confdefs.h. */
8235_ACEOF
8236cat confdefs.h >>conftest.$ac_ext
8237cat >>conftest.$ac_ext <<_ACEOF
8238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008240int
8241main ()
8242{
8243if ((long long *) 0)
8244 return 0;
8245if (sizeof (long long))
8246 return 0;
8247 ;
8248 return 0;
8249}
8250_ACEOF
8251rm -f conftest.$ac_objext
8252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8253 (eval $ac_compile) 2>&5
8254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); } &&
8257 { ac_try='test -s conftest.$ac_objext'
8258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8259 (eval $ac_try) 2>&5
8260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263 ac_cv_type_long_long=yes
8264else
8265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008266sed 's/^/| /' conftest.$ac_ext >&5
8267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268ac_cv_type_long_long=no
8269fi
8270rm -f conftest.$ac_objext conftest.$ac_ext
8271fi
8272echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8273echo "${ECHO_T}$ac_cv_type_long_long" >&6
8274
8275echo "$as_me:$LINENO: checking size of long long" >&5
8276echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8277if test "${ac_cv_sizeof_long_long+set}" = set; then
8278 echo $ECHO_N "(cached) $ECHO_C" >&6
8279else
8280 if test "$ac_cv_type_long_long" = yes; then
8281 # The cast to unsigned long works around a bug in the HP C Compiler
8282 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8283 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8284 # This bug is HP SR number 8606223364.
8285 if test "$cross_compiling" = yes; then
8286 # Depending upon the size, compute the lo and hi bounds.
8287cat >conftest.$ac_ext <<_ACEOF
8288#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008289/* confdefs.h. */
8290_ACEOF
8291cat confdefs.h >>conftest.$ac_ext
8292cat >>conftest.$ac_ext <<_ACEOF
8293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008294$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008295int
8296main ()
8297{
8298static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8299test_array [0] = 0
8300
8301 ;
8302 return 0;
8303}
8304_ACEOF
8305rm -f conftest.$ac_objext
8306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8307 (eval $ac_compile) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); } &&
8311 { ac_try='test -s conftest.$ac_objext'
8312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); }; }; then
8317 ac_lo=0 ac_mid=0
8318 while :; do
8319 cat >conftest.$ac_ext <<_ACEOF
8320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008321/* confdefs.h. */
8322_ACEOF
8323cat confdefs.h >>conftest.$ac_ext
8324cat >>conftest.$ac_ext <<_ACEOF
8325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008326$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008327int
8328main ()
8329{
8330static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8331test_array [0] = 0
8332
8333 ;
8334 return 0;
8335}
8336_ACEOF
8337rm -f conftest.$ac_objext
8338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8339 (eval $ac_compile) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } &&
8343 { ac_try='test -s conftest.$ac_objext'
8344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8345 (eval $ac_try) 2>&5
8346 ac_status=$?
8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348 (exit $ac_status); }; }; then
8349 ac_hi=$ac_mid; break
8350else
8351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008352sed 's/^/| /' conftest.$ac_ext >&5
8353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354ac_lo=`expr $ac_mid + 1`
8355 if test $ac_lo -le $ac_mid; then
8356 ac_lo= ac_hi=
8357 break
8358 fi
8359 ac_mid=`expr 2 '*' $ac_mid + 1`
8360fi
8361rm -f conftest.$ac_objext conftest.$ac_ext
8362 done
8363else
8364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008365sed 's/^/| /' conftest.$ac_ext >&5
8366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367cat >conftest.$ac_ext <<_ACEOF
8368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008369/* confdefs.h. */
8370_ACEOF
8371cat confdefs.h >>conftest.$ac_ext
8372cat >>conftest.$ac_ext <<_ACEOF
8373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008374$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008375int
8376main ()
8377{
8378static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8379test_array [0] = 0
8380
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385rm -f conftest.$ac_objext
8386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8387 (eval $ac_compile) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); } &&
8391 { ac_try='test -s conftest.$ac_objext'
8392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); }; }; then
8397 ac_hi=-1 ac_mid=-1
8398 while :; do
8399 cat >conftest.$ac_ext <<_ACEOF
8400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008401/* confdefs.h. */
8402_ACEOF
8403cat confdefs.h >>conftest.$ac_ext
8404cat >>conftest.$ac_ext <<_ACEOF
8405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008406$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008407int
8408main ()
8409{
8410static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8411test_array [0] = 0
8412
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
8418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8419 (eval $ac_compile) 2>&5
8420 ac_status=$?
8421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8422 (exit $ac_status); } &&
8423 { ac_try='test -s conftest.$ac_objext'
8424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8425 (eval $ac_try) 2>&5
8426 ac_status=$?
8427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8428 (exit $ac_status); }; }; then
8429 ac_lo=$ac_mid; break
8430else
8431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008432sed 's/^/| /' conftest.$ac_ext >&5
8433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434ac_hi=`expr '(' $ac_mid ')' - 1`
8435 if test $ac_mid -le $ac_hi; then
8436 ac_lo= ac_hi=
8437 break
8438 fi
8439 ac_mid=`expr 2 '*' $ac_mid`
8440fi
8441rm -f conftest.$ac_objext conftest.$ac_ext
8442 done
8443else
8444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008445sed 's/^/| /' conftest.$ac_ext >&5
8446
Martin v. Löwis11437992002-04-12 09:54:03 +00008447ac_lo= ac_hi=
8448fi
8449rm -f conftest.$ac_objext conftest.$ac_ext
8450fi
8451rm -f conftest.$ac_objext conftest.$ac_ext
8452# Binary search between lo and hi bounds.
8453while test "x$ac_lo" != "x$ac_hi"; do
8454 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8455 cat >conftest.$ac_ext <<_ACEOF
8456#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
8466static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8467test_array [0] = 0
8468
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
8474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8475 (eval $ac_compile) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); } &&
8479 { ac_try='test -s conftest.$ac_objext'
8480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8481 (eval $ac_try) 2>&5
8482 ac_status=$?
8483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484 (exit $ac_status); }; }; then
8485 ac_hi=$ac_mid
8486else
8487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008488sed 's/^/| /' conftest.$ac_ext >&5
8489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490ac_lo=`expr '(' $ac_mid ')' + 1`
8491fi
8492rm -f conftest.$ac_objext conftest.$ac_ext
8493done
8494case $ac_lo in
8495?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008496'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8497See \`config.log' for more details." >&5
8498echo "$as_me: error: cannot compute sizeof (long long), 77
8499See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 { (exit 1); exit 1; }; } ;;
8501esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008502else
8503 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008504 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8505See \`config.log' for more details." >&5
8506echo "$as_me: error: cannot run test program while cross compiling
8507See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008509else
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 cat >conftest.$ac_ext <<_ACEOF
8511#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* confdefs.h. */
8513_ACEOF
8514cat confdefs.h >>conftest.$ac_ext
8515cat >>conftest.$ac_ext <<_ACEOF
8516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517$ac_includes_default
8518long longval () { return (long) (sizeof (long long)); }
8519unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008520#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008521#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008522int
8523main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008524{
Martin v. Löwis11437992002-04-12 09:54:03 +00008525
8526 FILE *f = fopen ("conftest.val", "w");
8527 if (! f)
8528 exit (1);
8529 if (((long) (sizeof (long long))) < 0)
8530 {
8531 long i = longval ();
8532 if (i != ((long) (sizeof (long long))))
8533 exit (1);
8534 fprintf (f, "%ld\n", i);
8535 }
8536 else
8537 {
8538 unsigned long i = ulongval ();
8539 if (i != ((long) (sizeof (long long))))
8540 exit (1);
8541 fprintf (f, "%lu\n", i);
8542 }
8543 exit (ferror (f) || fclose (f) != 0);
8544
8545 ;
8546 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008547}
Martin v. Löwis11437992002-04-12 09:54:03 +00008548_ACEOF
8549rm -f conftest$ac_exeext
8550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8551 (eval $ac_link) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8556 (eval $ac_try) 2>&5
8557 ac_status=$?
8558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8559 (exit $ac_status); }; }; then
8560 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008561else
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 echo "$as_me: program exited with status $ac_status" >&5
8563echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008564sed 's/^/| /' conftest.$ac_ext >&5
8565
Martin v. Löwis11437992002-04-12 09:54:03 +00008566( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008567{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8568See \`config.log' for more details." >&5
8569echo "$as_me: error: cannot compute sizeof (long long), 77
8570See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 { (exit 1); exit 1; }; }
8572fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008573rm -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 +00008574fi
8575fi
8576rm -f conftest.val
8577else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578 ac_cv_sizeof_long_long=0
8579fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008581echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8582echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8583cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008584#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008585_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586
Michael W. Hudson54241132001-12-07 15:38:26 +00008587
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008588fi
8589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8591echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008592have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008593cat >conftest.$ac_ext <<_ACEOF
8594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
8603{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008604uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
8610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8611 (eval $ac_compile) 2>&5
8612 ac_status=$?
8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614 (exit $ac_status); } &&
8615 { ac_try='test -s conftest.$ac_objext'
8616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8617 (eval $ac_try) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); }; }; then
8621
8622
8623cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008624#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008625_ACEOF
8626
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008627 have_uintptr_t=yes
8628
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008631sed 's/^/| /' conftest.$ac_ext >&5
8632
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008633fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008634rm -f conftest.$ac_objext conftest.$ac_ext
8635echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8636echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008637if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008638echo "$as_me:$LINENO: checking for uintptr_t" >&5
8639echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8640if test "${ac_cv_type_uintptr_t+set}" = set; then
8641 echo $ECHO_N "(cached) $ECHO_C" >&6
8642else
8643 cat >conftest.$ac_ext <<_ACEOF
8644#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008645/* confdefs.h. */
8646_ACEOF
8647cat confdefs.h >>conftest.$ac_ext
8648cat >>conftest.$ac_ext <<_ACEOF
8649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008650$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008651int
8652main ()
8653{
8654if ((uintptr_t *) 0)
8655 return 0;
8656if (sizeof (uintptr_t))
8657 return 0;
8658 ;
8659 return 0;
8660}
8661_ACEOF
8662rm -f conftest.$ac_objext
8663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8664 (eval $ac_compile) 2>&5
8665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); } &&
8668 { ac_try='test -s conftest.$ac_objext'
8669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8670 (eval $ac_try) 2>&5
8671 ac_status=$?
8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); }; }; then
8674 ac_cv_type_uintptr_t=yes
8675else
8676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008677sed 's/^/| /' conftest.$ac_ext >&5
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679ac_cv_type_uintptr_t=no
8680fi
8681rm -f conftest.$ac_objext conftest.$ac_ext
8682fi
8683echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8684echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8685
8686echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8687echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8688if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8689 echo $ECHO_N "(cached) $ECHO_C" >&6
8690else
8691 if test "$ac_cv_type_uintptr_t" = yes; then
8692 # The cast to unsigned long works around a bug in the HP C Compiler
8693 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8694 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8695 # This bug is HP SR number 8606223364.
8696 if test "$cross_compiling" = yes; then
8697 # Depending upon the size, compute the lo and hi bounds.
8698cat >conftest.$ac_ext <<_ACEOF
8699#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008700/* confdefs.h. */
8701_ACEOF
8702cat confdefs.h >>conftest.$ac_ext
8703cat >>conftest.$ac_ext <<_ACEOF
8704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008705$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
8709static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8710test_array [0] = 0
8711
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
8717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8718 (eval $ac_compile) 2>&5
8719 ac_status=$?
8720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8721 (exit $ac_status); } &&
8722 { ac_try='test -s conftest.$ac_objext'
8723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8724 (eval $ac_try) 2>&5
8725 ac_status=$?
8726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727 (exit $ac_status); }; }; then
8728 ac_lo=0 ac_mid=0
8729 while :; do
8730 cat >conftest.$ac_ext <<_ACEOF
8731#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
8741static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8742test_array [0] = 0
8743
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext
8749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8750 (eval $ac_compile) 2>&5
8751 ac_status=$?
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); } &&
8754 { ac_try='test -s conftest.$ac_objext'
8755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8756 (eval $ac_try) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); }; }; then
8760 ac_hi=$ac_mid; break
8761else
8762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008763sed 's/^/| /' conftest.$ac_ext >&5
8764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765ac_lo=`expr $ac_mid + 1`
8766 if test $ac_lo -le $ac_mid; then
8767 ac_lo= ac_hi=
8768 break
8769 fi
8770 ac_mid=`expr 2 '*' $ac_mid + 1`
8771fi
8772rm -f conftest.$ac_objext conftest.$ac_ext
8773 done
8774else
8775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008776sed 's/^/| /' conftest.$ac_ext >&5
8777
Martin v. Löwis11437992002-04-12 09:54:03 +00008778cat >conftest.$ac_ext <<_ACEOF
8779#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* confdefs.h. */
8781_ACEOF
8782cat confdefs.h >>conftest.$ac_ext
8783cat >>conftest.$ac_ext <<_ACEOF
8784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008786int
8787main ()
8788{
8789static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8790test_array [0] = 0
8791
8792 ;
8793 return 0;
8794}
8795_ACEOF
8796rm -f conftest.$ac_objext
8797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8798 (eval $ac_compile) 2>&5
8799 ac_status=$?
8800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801 (exit $ac_status); } &&
8802 { ac_try='test -s conftest.$ac_objext'
8803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8804 (eval $ac_try) 2>&5
8805 ac_status=$?
8806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8807 (exit $ac_status); }; }; then
8808 ac_hi=-1 ac_mid=-1
8809 while :; do
8810 cat >conftest.$ac_ext <<_ACEOF
8811#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* confdefs.h. */
8813_ACEOF
8814cat confdefs.h >>conftest.$ac_ext
8815cat >>conftest.$ac_ext <<_ACEOF
8816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008818int
8819main ()
8820{
8821static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8822test_array [0] = 0
8823
8824 ;
8825 return 0;
8826}
8827_ACEOF
8828rm -f conftest.$ac_objext
8829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8830 (eval $ac_compile) 2>&5
8831 ac_status=$?
8832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); } &&
8834 { ac_try='test -s conftest.$ac_objext'
8835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; }; then
8840 ac_lo=$ac_mid; break
8841else
8842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008843sed 's/^/| /' conftest.$ac_ext >&5
8844
Martin v. Löwis11437992002-04-12 09:54:03 +00008845ac_hi=`expr '(' $ac_mid ')' - 1`
8846 if test $ac_mid -le $ac_hi; then
8847 ac_lo= ac_hi=
8848 break
8849 fi
8850 ac_mid=`expr 2 '*' $ac_mid`
8851fi
8852rm -f conftest.$ac_objext conftest.$ac_ext
8853 done
8854else
8855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008856sed 's/^/| /' conftest.$ac_ext >&5
8857
Martin v. Löwis11437992002-04-12 09:54:03 +00008858ac_lo= ac_hi=
8859fi
8860rm -f conftest.$ac_objext conftest.$ac_ext
8861fi
8862rm -f conftest.$ac_objext conftest.$ac_ext
8863# Binary search between lo and hi bounds.
8864while test "x$ac_lo" != "x$ac_hi"; do
8865 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8866 cat >conftest.$ac_ext <<_ACEOF
8867#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* confdefs.h. */
8869_ACEOF
8870cat confdefs.h >>conftest.$ac_ext
8871cat >>conftest.$ac_ext <<_ACEOF
8872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008873$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
8876{
8877static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8878test_array [0] = 0
8879
8880 ;
8881 return 0;
8882}
8883_ACEOF
8884rm -f conftest.$ac_objext
8885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8886 (eval $ac_compile) 2>&5
8887 ac_status=$?
8888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8889 (exit $ac_status); } &&
8890 { ac_try='test -s conftest.$ac_objext'
8891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8892 (eval $ac_try) 2>&5
8893 ac_status=$?
8894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8895 (exit $ac_status); }; }; then
8896 ac_hi=$ac_mid
8897else
8898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008899sed 's/^/| /' conftest.$ac_ext >&5
8900
Martin v. Löwis11437992002-04-12 09:54:03 +00008901ac_lo=`expr '(' $ac_mid ')' + 1`
8902fi
8903rm -f conftest.$ac_objext conftest.$ac_ext
8904done
8905case $ac_lo in
8906?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008907'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8908See \`config.log' for more details." >&5
8909echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8910See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 { (exit 1); exit 1; }; } ;;
8912esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008913else
8914 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008915 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8916See \`config.log' for more details." >&5
8917echo "$as_me: error: cannot run test program while cross compiling
8918See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008920else
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 cat >conftest.$ac_ext <<_ACEOF
8922#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* confdefs.h. */
8924_ACEOF
8925cat confdefs.h >>conftest.$ac_ext
8926cat >>conftest.$ac_ext <<_ACEOF
8927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928$ac_includes_default
8929long longval () { return (long) (sizeof (uintptr_t)); }
8930unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008931#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008935{
Martin v. Löwis11437992002-04-12 09:54:03 +00008936
8937 FILE *f = fopen ("conftest.val", "w");
8938 if (! f)
8939 exit (1);
8940 if (((long) (sizeof (uintptr_t))) < 0)
8941 {
8942 long i = longval ();
8943 if (i != ((long) (sizeof (uintptr_t))))
8944 exit (1);
8945 fprintf (f, "%ld\n", i);
8946 }
8947 else
8948 {
8949 unsigned long i = ulongval ();
8950 if (i != ((long) (sizeof (uintptr_t))))
8951 exit (1);
8952 fprintf (f, "%lu\n", i);
8953 }
8954 exit (ferror (f) || fclose (f) != 0);
8955
8956 ;
8957 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008958}
Martin v. Löwis11437992002-04-12 09:54:03 +00008959_ACEOF
8960rm -f conftest$ac_exeext
8961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8962 (eval $ac_link) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8967 (eval $ac_try) 2>&5
8968 ac_status=$?
8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970 (exit $ac_status); }; }; then
8971 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008972else
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 echo "$as_me: program exited with status $ac_status" >&5
8974echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008975sed 's/^/| /' conftest.$ac_ext >&5
8976
Martin v. Löwis11437992002-04-12 09:54:03 +00008977( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008978{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8979See \`config.log' for more details." >&5
8980echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8981See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 { (exit 1); exit 1; }; }
8983fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008984rm -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 +00008985fi
8986fi
8987rm -f conftest.val
8988else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989 ac_cv_sizeof_uintptr_t=0
8990fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008992echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8993echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8994cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008995#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008996_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008997
Michael W. Hudson54241132001-12-07 15:38:26 +00008998
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008999fi
9000
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009002echo "$as_me:$LINENO: checking size of off_t" >&5
9003echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9004if test "${ac_cv_sizeof_off_t+set}" = set; then
9005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006else
9007 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009008 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009else
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 cat >conftest.$ac_ext <<_ACEOF
9011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* confdefs.h. */
9013_ACEOF
9014cat confdefs.h >>conftest.$ac_ext
9015cat >>conftest.$ac_ext <<_ACEOF
9016/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009017#include <stdio.h>
9018#include <sys/types.h>
9019main()
9020{
9021 FILE *f=fopen("conftestval", "w");
9022 if (!f) exit(1);
9023 fprintf(f, "%d\n", sizeof(off_t));
9024 exit(0);
9025}
Martin v. Löwis11437992002-04-12 09:54:03 +00009026_ACEOF
9027rm -f conftest$ac_exeext
9028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9029 (eval $ac_link) 2>&5
9030 ac_status=$?
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9034 (eval $ac_try) 2>&5
9035 ac_status=$?
9036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9037 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009038 ac_cv_sizeof_off_t=`cat conftestval`
9039else
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 echo "$as_me: program exited with status $ac_status" >&5
9041echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009042sed 's/^/| /' conftest.$ac_ext >&5
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044( exit $ac_status )
9045ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009046fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009047rm -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 +00009048fi
9049
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009050fi
9051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9053echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9054
9055cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009056#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009057_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058
Michael W. Hudson54241132001-12-07 15:38:26 +00009059
Martin v. Löwis11437992002-04-12 09:54:03 +00009060echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9061echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009062if test "$have_long_long" = yes -a \
9063 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9064 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<\_ACEOF
9067#define HAVE_LARGEFILE_SUPPORT 1
9068_ACEOF
9069
9070 echo "$as_me:$LINENO: result: yes" >&5
9071echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072else
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 echo "$as_me:$LINENO: result: no" >&5
9074echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009075fi
9076
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009077# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009078echo "$as_me:$LINENO: checking size of time_t" >&5
9079echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9080if test "${ac_cv_sizeof_time_t+set}" = set; then
9081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009082else
9083 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009084 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009085else
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 cat >conftest.$ac_ext <<_ACEOF
9087#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009088/* confdefs.h. */
9089_ACEOF
9090cat confdefs.h >>conftest.$ac_ext
9091cat >>conftest.$ac_ext <<_ACEOF
9092/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009093#include <stdio.h>
9094#include <time.h>
9095main()
9096{
9097 FILE *f=fopen("conftestval", "w");
9098 if (!f) exit(1);
9099 fprintf(f, "%d\n", sizeof(time_t));
9100 exit(0);
9101}
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
9103rm -f conftest$ac_exeext
9104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9105 (eval $ac_link) 2>&5
9106 ac_status=$?
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9110 (eval $ac_try) 2>&5
9111 ac_status=$?
9112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9113 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009114 ac_cv_sizeof_time_t=`cat conftestval`
9115else
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 echo "$as_me: program exited with status $ac_status" >&5
9117echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009118sed 's/^/| /' conftest.$ac_ext >&5
9119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120( exit $ac_status )
9121ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009122fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009123rm -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 +00009124fi
9125
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009126fi
9127
Martin v. Löwis11437992002-04-12 09:54:03 +00009128echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9129echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9130
9131cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009132#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009133_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009134
Michael W. Hudson54241132001-12-07 15:38:26 +00009135
9136
Trent Mick635f6fb2000-08-23 21:33:05 +00009137# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009138ac_save_cc="$CC"
9139if test "$ac_cv_kpthread" = "yes"
9140then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009141elif test "$ac_cv_kthread" = "yes"
9142then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009143elif test "$ac_cv_pthread" = "yes"
9144then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009146echo "$as_me:$LINENO: checking for pthread_t" >&5
9147echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009148have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009149cat >conftest.$ac_ext <<_ACEOF
9150#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009151/* confdefs.h. */
9152_ACEOF
9153cat confdefs.h >>conftest.$ac_ext
9154cat >>conftest.$ac_ext <<_ACEOF
9155/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009156#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Guido van Rossum12580492000-09-24 16:47:19 +00009160pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext
9166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9167 (eval $ac_compile) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } &&
9171 { ac_try='test -s conftest.$ac_objext'
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009177 have_pthread_t=yes
9178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009180sed 's/^/| /' conftest.$ac_ext >&5
9181
Trent Mick635f6fb2000-08-23 21:33:05 +00009182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009183rm -f conftest.$ac_objext conftest.$ac_ext
9184echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9185echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009186if test "$have_pthread_t" = yes ; then
9187 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9189echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9190 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9191 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009192else
9193 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009194 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 cat >conftest.$ac_ext <<_ACEOF
9197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009198/* confdefs.h. */
9199_ACEOF
9200cat confdefs.h >>conftest.$ac_ext
9201cat >>conftest.$ac_ext <<_ACEOF
9202/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009203#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009204#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009205 main()
9206 {
9207 FILE *f=fopen("conftestval", "w");
9208 if (!f) exit(1);
9209 fprintf(f, "%d\n", sizeof(pthread_t));
9210 exit(0);
9211 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009212_ACEOF
9213rm -f conftest$ac_exeext
9214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9215 (eval $ac_link) 2>&5
9216 ac_status=$?
9217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009224 ac_cv_sizeof_pthread_t=`cat conftestval`
9225else
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 echo "$as_me: program exited with status $ac_status" >&5
9227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009228sed 's/^/| /' conftest.$ac_ext >&5
9229
Martin v. Löwis11437992002-04-12 09:54:03 +00009230( exit $ac_status )
9231ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009232fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009233rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009234fi
9235
Trent Mick635f6fb2000-08-23 21:33:05 +00009236fi
9237
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9239echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9240
9241cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009242#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009243_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009244
9245fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009246CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009247
Martin v. Löwis11437992002-04-12 09:54:03 +00009248echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9249echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009250# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9251if test "${enable_toolbox_glue+set}" = set; then
9252 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009253
Martin v. Löwis11437992002-04-12 09:54:03 +00009254fi;
Jack Jansene578a632001-08-15 01:27:14 +00009255
9256if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009257then
Jack Jansene578a632001-08-15 01:27:14 +00009258 case $ac_sys_system/$ac_sys_release in
9259 Darwin/*)
9260 enable_toolbox_glue="yes";;
9261 *)
9262 enable_toolbox_glue="no";;
9263 esac
9264fi
9265case "$enable_toolbox_glue" in
9266yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009267 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009268 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009269 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
9271cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009272#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009274
9275 ;;
9276*)
9277 extra_frameworks=""
9278 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009279 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009280 ;;
9281esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009282echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9283echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009284
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285
9286case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009287 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009288 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009289 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009292 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009293 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009294 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009296 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297esac
9298
Martin v. Löwis11437992002-04-12 09:54:03 +00009299echo "$as_me:$LINENO: checking for --enable-framework" >&5
9300echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009301if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009303 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009305 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306
Martin v. Löwis11437992002-04-12 09:54:03 +00009307cat >>confdefs.h <<\_ACEOF
9308#define WITH_NEXT_FRAMEWORK 1
9309_ACEOF
9310
9311 echo "$as_me:$LINENO: result: yes" >&5
9312echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009313else
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 echo "$as_me:$LINENO: result: no" >&5
9315echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009316fi
9317
Martin v. Löwis11437992002-04-12 09:54:03 +00009318echo "$as_me:$LINENO: checking for dyld" >&5
9319echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009320case $ac_sys_system/$ac_sys_release in
9321 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322
Martin v. Löwis11437992002-04-12 09:54:03 +00009323cat >>confdefs.h <<\_ACEOF
9324#define WITH_DYLD 1
9325_ACEOF
9326
9327 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9328echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009329 ;;
9330 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 echo "$as_me:$LINENO: result: no" >&5
9332echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009333 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009334esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009335
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337
Michael W. Hudson54241132001-12-07 15:38:26 +00009338
9339
9340
9341
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009343# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009344echo "$as_me:$LINENO: checking SO" >&5
9345echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009346if test -z "$SO"
9347then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009348 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009349 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009350 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009351 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009352 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009353else
9354 # this might also be a termcap variable, see #610332
9355 echo
9356 echo '====================================================================='
9357 echo '+ +'
9358 echo '+ WARNING: You have set SO in your environment. +'
9359 echo '+ Do you really mean to change the extension for shared libraries? +'
9360 echo '+ Continuing in 10 seconds to let you to ponder. +'
9361 echo '+ +'
9362 echo '====================================================================='
9363 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009365echo "$as_me:$LINENO: result: $SO" >&5
9366echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009367# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009368# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369# (Shared libraries in this instance are shared modules to be loaded into
9370# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009371echo "$as_me:$LINENO: checking LDSHARED" >&5
9372echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373if test -z "$LDSHARED"
9374then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009376 AIX*)
9377 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009378 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009379 ;;
9380 BeOS*)
9381 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009382 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009383 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009384 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009385 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009387 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009388 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009389 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009390 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009391 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009392 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009393 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009394 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9395 if test "$enable_framework" ; then
9396 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009397 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9398 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009399 else
9400 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009401 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009402 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009403 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00009404 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9405 if test "$enable_framework" ; then
9406 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009407 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9408 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009409 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009410 # No framework, use the Python app as bundle-loader
9411 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009412 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009413 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009414 Darwin/*)
9415 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9416 # This allows an extension to be used in any Python
9417 if test ${MACOSX_DEPLOYMENT_TARGET-10.1} '>' 10.2
9418 then
9419 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
9420 BLDSHARED="$LDSHARED"
9421 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
9422 else
9423 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9424 if test "$enable_framework" ; then
9425 # Link against the framework. All externals should be defined.
9426 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9427 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
9428 else
9429 # No framework, use the Python app as bundle-loader
9430 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9431 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
9432 fi
9433 fi
9434 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009435 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009436 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009437 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009438 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009439 then
9440 LDSHARED="cc -shared ${LDFLAGS}"
9441 else
9442 LDSHARED="ld -Bshareable ${LDFLAGS}"
9443 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009444 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009445 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009446 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009447 then LDSHARED='$(CC) -shared'
9448 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009449 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009450 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009451 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009452 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009453 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009454 *) LDSHARED="ld";;
9455 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009457echo "$as_me:$LINENO: result: $LDSHARED" >&5
9458echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009459BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009460# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009461# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009462echo "$as_me:$LINENO: checking CCSHARED" >&5
9463echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009464if test -z "$CCSHARED"
9465then
Guido van Rossum07397971997-04-29 21:49:50 +00009466 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009467 SunOS*) if test "$GCC" = yes;
9468 then CCSHARED="-fPIC";
9469 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009470 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009471 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009472 else CCSHARED="+z";
9473 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009474 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009475 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009476 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009477 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009478 if test "$GCC" = "yes"
9479 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009480 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009481 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009482 SCO_SV*)
9483 if test "$GCC" = "yes"
9484 then CCSHARED="-fPIC"
9485 else CCSHARED="-Kpic -belf"
9486 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009487 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009488 IRIX*/6*) case $CC in
9489 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009490 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009491 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009492 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009493 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009494fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009495echo "$as_me:$LINENO: result: $CCSHARED" >&5
9496echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009497# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009498# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009499echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9500echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009501if test -z "$LINKFORSHARED"
9502then
Guido van Rossum07397971997-04-29 21:49:50 +00009503 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009504 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009505 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009506 LINKFORSHARED="-Wl,-E -Wl,+s";;
9507# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009508 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009509 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009510 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009512 # -u __dummy makes the linker aware of the objc runtime
9513 # in System.framework; otherwise, __objcInit (referenced in
9514 # crt1.o) gets erroneously defined as common, which breaks dynamic
9515 # loading of any modules which reference it in System.framework.
9516 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9517 # not used by the core itself but which needs to be in the core so
9518 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009519 # -prebind is no longer used, because it actually seems to give a
9520 # slowdown in stead of a speedup, maybe due to the large number of
9521 # dynamic loads Python does.
9522 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009523 if test "$enable_framework"
9524 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009525 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009526 fi
9527 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009528 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009529 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009530 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009532 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9533 then
9534 LINKFORSHARED="-Wl,--export-dynamic"
9535 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009536 SunOS/5*) case $CC in
9537 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009538 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009539 then
9540 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009541 fi;;
9542 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009543 CYGWIN*)
9544 if test $enable_shared = "no"
9545 then
9546 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9547 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009548 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009550echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9551echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009552
Michael W. Hudson54241132001-12-07 15:38:26 +00009553
Martin v. Löwis11437992002-04-12 09:54:03 +00009554echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9555echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009556if test ! "$LIBRARY" = "$LDLIBRARY"
9557then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009558 case $ac_sys_system in
9559 CYGWIN*)
9560 # Cygwin needs CCSHARED when building extension DLLs
9561 # but not when building the interpreter DLL.
9562 CFLAGSFORSHARED='';;
9563 *)
9564 CFLAGSFORSHARED='$(CCSHARED)'
9565 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009567echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9568echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009569
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009570# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9571# library (with --enable-shared).
9572# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009573# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9574# if it is not required, since it creates a dependency of the shared library
9575# to LIBS. This, in turn, means that applications linking the shared libpython
9576# don't need to link LIBS explicitly. The default should be only changed
9577# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009578
9579echo "$as_me:$LINENO: checking SHLIBS" >&5
9580echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9581case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009582 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009583 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009584esac
9585echo "$as_me:$LINENO: result: $SHLIBS" >&5
9586echo "${ECHO_T}$SHLIBS" >&6
9587
9588
Guido van Rossum627b2d71993-12-24 10:39:16 +00009589# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009590
9591echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9592echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9593if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009595else
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009597LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009598cat >conftest.$ac_ext <<_ACEOF
9599#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* confdefs.h. */
9601_ACEOF
9602cat confdefs.h >>conftest.$ac_ext
9603cat >>conftest.$ac_ext <<_ACEOF
9604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009606/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607#ifdef __cplusplus
9608extern "C"
9609#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009610/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 builtin and then its argument prototype would still apply. */
9612char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009613int
9614main ()
9615{
9616dlopen ();
9617 ;
9618 return 0;
9619}
9620_ACEOF
9621rm -f conftest.$ac_objext conftest$ac_exeext
9622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9623 (eval $ac_link) 2>&5
9624 ac_status=$?
9625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9626 (exit $ac_status); } &&
9627 { ac_try='test -s conftest$ac_exeext'
9628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9629 (eval $ac_try) 2>&5
9630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); }; }; then
9633 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009634else
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009636sed 's/^/| /' conftest.$ac_ext >&5
9637
Martin v. Löwis11437992002-04-12 09:54:03 +00009638ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009640rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9641LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009642fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009643echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9644echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9645if test $ac_cv_lib_dl_dlopen = yes; then
9646 cat >>confdefs.h <<_ACEOF
9647#define HAVE_LIBDL 1
9648_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009649
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009650 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009652fi
9653 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009654
9655echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9656echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9657if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9658 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009659else
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009661LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009662cat >conftest.$ac_ext <<_ACEOF
9663#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009664/* confdefs.h. */
9665_ACEOF
9666cat confdefs.h >>conftest.$ac_ext
9667cat >>conftest.$ac_ext <<_ACEOF
9668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009669
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009670/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009671#ifdef __cplusplus
9672extern "C"
9673#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009674/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 builtin and then its argument prototype would still apply. */
9676char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009677int
9678main ()
9679{
9680shl_load ();
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext conftest$ac_exeext
9686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9687 (eval $ac_link) 2>&5
9688 ac_status=$?
9689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9690 (exit $ac_status); } &&
9691 { ac_try='test -s conftest$ac_exeext'
9692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9693 (eval $ac_try) 2>&5
9694 ac_status=$?
9695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9696 (exit $ac_status); }; }; then
9697 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009700sed 's/^/| /' conftest.$ac_ext >&5
9701
Martin v. Löwis11437992002-04-12 09:54:03 +00009702ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009704rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9705LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009706fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009707echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9708echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9709if test $ac_cv_lib_dld_shl_load = yes; then
9710 cat >>confdefs.h <<_ACEOF
9711#define HAVE_LIBDLD 1
9712_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009714 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009715
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009716fi
9717 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009718
9719# only check for sem_ini if thread support is requested
9720if test "$with_threads" = "yes" -o -z "$with_threads"; then
9721 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009722echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9723if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009725else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009726 ac_func_search_save_LIBS=$LIBS
9727ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009728cat >conftest.$ac_ext <<_ACEOF
9729#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009730/* confdefs.h. */
9731_ACEOF
9732cat confdefs.h >>conftest.$ac_ext
9733cat >>conftest.$ac_ext <<_ACEOF
9734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009736/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737#ifdef __cplusplus
9738extern "C"
9739#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009740/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 builtin and then its argument prototype would still apply. */
9742char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009743int
9744main ()
9745{
9746sem_init ();
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751rm -f conftest.$ac_objext conftest$ac_exeext
9752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9753 (eval $ac_link) 2>&5
9754 ac_status=$?
9755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9756 (exit $ac_status); } &&
9757 { ac_try='test -s conftest$ac_exeext'
9758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9759 (eval $ac_try) 2>&5
9760 ac_status=$?
9761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9762 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009763 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009764else
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009766sed 's/^/| /' conftest.$ac_ext >&5
9767
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009768fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009770if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009771 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009772 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9773 cat >conftest.$ac_ext <<_ACEOF
9774#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009775/* confdefs.h. */
9776_ACEOF
9777cat confdefs.h >>conftest.$ac_ext
9778cat >>conftest.$ac_ext <<_ACEOF
9779/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009780
9781/* Override any gcc2 internal prototype to avoid an error. */
9782#ifdef __cplusplus
9783extern "C"
9784#endif
9785/* We use char because int might match the return type of a gcc2
9786 builtin and then its argument prototype would still apply. */
9787char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009788int
9789main ()
9790{
9791sem_init ();
9792 ;
9793 return 0;
9794}
Martin v. Löwis11437992002-04-12 09:54:03 +00009795_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009796rm -f conftest.$ac_objext conftest$ac_exeext
9797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9798 (eval $ac_link) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); } &&
9802 { ac_try='test -s conftest$ac_exeext'
9803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9804 (eval $ac_try) 2>&5
9805 ac_status=$?
9806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9807 (exit $ac_status); }; }; then
9808 ac_cv_search_sem_init="-l$ac_lib"
9809break
9810else
9811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009812sed 's/^/| /' conftest.$ac_ext >&5
9813
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009814fi
9815rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9816 done
9817fi
9818LIBS=$ac_func_search_save_LIBS
9819fi
9820echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9821echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9822if test "$ac_cv_search_sem_init" != no; then
9823 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009824
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009825fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009826 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009827 # posix4 on Solaris 2.6
9828 # pthread (first!) on Linux
9829fi
9830
Martin v. Löwis19d17342003-06-14 21:03:05 +00009831# check if we need libintl for locale functions
9832echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9833echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9834if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9835 echo $ECHO_N "(cached) $ECHO_C" >&6
9836else
9837 ac_check_lib_save_LIBS=$LIBS
9838LIBS="-lintl $LIBS"
9839cat >conftest.$ac_ext <<_ACEOF
9840#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* confdefs.h. */
9842_ACEOF
9843cat confdefs.h >>conftest.$ac_ext
9844cat >>conftest.$ac_ext <<_ACEOF
9845/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009846
9847/* Override any gcc2 internal prototype to avoid an error. */
9848#ifdef __cplusplus
9849extern "C"
9850#endif
9851/* We use char because int might match the return type of a gcc2
9852 builtin and then its argument prototype would still apply. */
9853char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009854int
9855main ()
9856{
9857textdomain ();
9858 ;
9859 return 0;
9860}
9861_ACEOF
9862rm -f conftest.$ac_objext conftest$ac_exeext
9863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9864 (eval $ac_link) 2>&5
9865 ac_status=$?
9866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867 (exit $ac_status); } &&
9868 { ac_try='test -s conftest$ac_exeext'
9869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9870 (eval $ac_try) 2>&5
9871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); }; }; then
9874 ac_cv_lib_intl_textdomain=yes
9875else
9876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009877sed 's/^/| /' conftest.$ac_ext >&5
9878
Martin v. Löwis19d17342003-06-14 21:03:05 +00009879ac_cv_lib_intl_textdomain=no
9880fi
9881rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9882LIBS=$ac_check_lib_save_LIBS
9883fi
9884echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9885echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9886if test $ac_cv_lib_intl_textdomain = yes; then
9887
9888cat >>confdefs.h <<\_ACEOF
9889#define WITH_LIBINTL 1
9890_ACEOF
9891
9892fi
9893
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009894
9895# checks for system dependent C++ extensions support
9896case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9898echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9899 cat >conftest.$ac_ext <<_ACEOF
9900#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009901/* confdefs.h. */
9902_ACEOF
9903cat confdefs.h >>conftest.$ac_ext
9904cat >>conftest.$ac_ext <<_ACEOF
9905/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009906#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009907int
9908main ()
9909{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009910loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 ;
9912 return 0;
9913}
9914_ACEOF
9915rm -f conftest.$ac_objext conftest$ac_exeext
9916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9917 (eval $ac_link) 2>&5
9918 ac_status=$?
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); } &&
9921 { ac_try='test -s conftest$ac_exeext'
9922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9923 (eval $ac_try) 2>&5
9924 ac_status=$?
9925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9926 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009927
Martin v. Löwis11437992002-04-12 09:54:03 +00009928cat >>confdefs.h <<\_ACEOF
9929#define AIX_GENUINE_CPLUSPLUS 1
9930_ACEOF
9931
9932 echo "$as_me:$LINENO: result: yes" >&5
9933echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009934else
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009936sed 's/^/| /' conftest.$ac_ext >&5
9937
Martin v. Löwis11437992002-04-12 09:54:03 +00009938echo "$as_me:$LINENO: result: no" >&5
9939echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009940fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009941rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009942 *) ;;
9943esac
9944
Guido van Rossum70c7f481998-03-26 18:44:10 +00009945# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009946# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009947echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9948echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9949if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9950 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009951else
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009953LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009954cat >conftest.$ac_ext <<_ACEOF
9955#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009956/* confdefs.h. */
9957_ACEOF
9958cat confdefs.h >>conftest.$ac_ext
9959cat >>conftest.$ac_ext <<_ACEOF
9960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009962/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009963#ifdef __cplusplus
9964extern "C"
9965#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009966/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 builtin and then its argument prototype would still apply. */
9968char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009969int
9970main ()
9971{
9972t_open ();
9973 ;
9974 return 0;
9975}
9976_ACEOF
9977rm -f conftest.$ac_objext conftest$ac_exeext
9978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9979 (eval $ac_link) 2>&5
9980 ac_status=$?
9981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982 (exit $ac_status); } &&
9983 { ac_try='test -s conftest$ac_exeext'
9984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9985 (eval $ac_try) 2>&5
9986 ac_status=$?
9987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988 (exit $ac_status); }; }; then
9989 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009990else
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009992sed 's/^/| /' conftest.$ac_ext >&5
9993
Martin v. Löwis11437992002-04-12 09:54:03 +00009994ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009999echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10000echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10001if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010002 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010003fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010004 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010005echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10006echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10007if test "${ac_cv_lib_socket_socket+set}" = set; then
10008 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010009else
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010011LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010012cat >conftest.$ac_ext <<_ACEOF
10013#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010014/* confdefs.h. */
10015_ACEOF
10016cat confdefs.h >>conftest.$ac_ext
10017cat >>conftest.$ac_ext <<_ACEOF
10018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010019
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010020/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010021#ifdef __cplusplus
10022extern "C"
10023#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010024/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 builtin and then its argument prototype would still apply. */
10026char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010027int
10028main ()
10029{
10030socket ();
10031 ;
10032 return 0;
10033}
10034_ACEOF
10035rm -f conftest.$ac_objext conftest$ac_exeext
10036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10037 (eval $ac_link) 2>&5
10038 ac_status=$?
10039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10040 (exit $ac_status); } &&
10041 { ac_try='test -s conftest$ac_exeext'
10042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10043 (eval $ac_try) 2>&5
10044 ac_status=$?
10045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10046 (exit $ac_status); }; }; then
10047 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010048else
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010050sed 's/^/| /' conftest.$ac_ext >&5
10051
Martin v. Löwis11437992002-04-12 09:54:03 +000010052ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010054rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10055LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010057echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10058echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10059if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010060 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010061fi
10062 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010063
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010064case "$ac_sys_system" in
10065BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010066echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10067echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10068if test "${ac_cv_lib_net_socket+set}" = set; then
10069 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010070else
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010072LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010073cat >conftest.$ac_ext <<_ACEOF
10074#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010080
Guido van Rossumad678af1998-10-02 14:42:15 +000010081/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010082#ifdef __cplusplus
10083extern "C"
10084#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010085/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 builtin and then its argument prototype would still apply. */
10087char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010088int
10089main ()
10090{
10091socket ();
10092 ;
10093 return 0;
10094}
10095_ACEOF
10096rm -f conftest.$ac_objext conftest$ac_exeext
10097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10098 (eval $ac_link) 2>&5
10099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); } &&
10102 { ac_try='test -s conftest$ac_exeext'
10103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10105 ac_status=$?
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
10108 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010109else
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010111sed 's/^/| /' conftest.$ac_ext >&5
10112
Martin v. Löwis11437992002-04-12 09:54:03 +000010113ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10116LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010118echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10119echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10120if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010121 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010122fi
10123 # BeOS
10124;;
10125esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010126
Martin v. Löwis11437992002-04-12 09:54:03 +000010127echo "$as_me:$LINENO: checking for --with-libs" >&5
10128echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10129
Guido van Rossuma68acba1996-07-31 17:36:39 +000010130# Check whether --with-libs or --without-libs was given.
10131if test "${with_libs+set}" = set; then
10132 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010133
10134echo "$as_me:$LINENO: result: $withval" >&5
10135echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010136LIBS="$withval $LIBS"
10137
10138else
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 echo "$as_me:$LINENO: result: no" >&5
10140echo "${ECHO_T}no" >&6
10141fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010142
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010143# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010144
10145
Martin v. Löwis11437992002-04-12 09:54:03 +000010146echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10147echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10148
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010149# Check whether --with-signal-module or --without-signal-module was given.
10150if test "${with_signal_module+set}" = set; then
10151 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010152
Martin v. Löwis11437992002-04-12 09:54:03 +000010153fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010154
10155if test -z "$with_signal_module"
10156then with_signal_module="yes"
10157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010158echo "$as_me:$LINENO: result: $with_signal_module" >&5
10159echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010160
10161if test "${with_signal_module}" = "yes"; then
10162 USE_SIGNAL_MODULE=""
10163 SIGNAL_OBJS=""
10164else
10165 USE_SIGNAL_MODULE="#"
10166 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10167fi
10168
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010169# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010170
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010171USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010172
Martin v. Löwis11437992002-04-12 09:54:03 +000010173echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10174echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10175
Guido van Rossumec2f0731997-01-22 20:54:01 +000010176
10177# Check whether --with-dec-threads or --without-dec-threads was given.
10178if test "${with_dec_threads+set}" = set; then
10179 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010180
10181echo "$as_me:$LINENO: result: $withval" >&5
10182echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010183LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010184if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010185 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010186fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010187else
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 echo "$as_me:$LINENO: result: no" >&5
10189echo "${ECHO_T}no" >&6
10190fi;
10191
10192# Templates for things AC_DEFINEd more than once.
10193# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010194
10195
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
10197
10198
10199
10200
10201echo "$as_me:$LINENO: checking for --with-threads" >&5
10202echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10203
Guido van Rossumec2f0731997-01-22 20:54:01 +000010204# Check whether --with-threads or --without-threads was given.
10205if test "${with_threads+set}" = set; then
10206 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010207
Martin v. Löwis11437992002-04-12 09:54:03 +000010208fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010209
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010210# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010211
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010212# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010213if test "${with_thread+set}" = set; then
10214 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010215 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010216fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010217
10218if test -z "$with_threads"
10219then with_threads="yes"
10220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010221echo "$as_me:$LINENO: result: $with_threads" >&5
10222echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010223
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010224
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010225if test "$with_threads" = "no"
10226then
10227 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010228elif test "$ac_cv_pthread_is_default" = yes
10229then
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010231#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010233
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010234 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010236#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010237_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010238
10239 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010241elif test "$ac_cv_kpthread" = "yes"
10242then
10243 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010244 if test "$ac_cv_cxx_thread" = "yes"; then
10245 CXX="$CXX -Kpthread"
10246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010248#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010249_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010250
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010251 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010252 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010253elif test "$ac_cv_kthread" = "yes"
10254then
10255 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010256 if test "$ac_cv_cxx_thread" = "yes"; then
10257 CXX="$CXX -Kthread"
10258 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010259 cat >>confdefs.h <<\_ACEOF
10260#define WITH_THREAD 1
10261_ACEOF
10262
10263 posix_threads=yes
10264 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010265elif test "$ac_cv_pthread" = "yes"
10266then
10267 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010268 if test "$ac_cv_cxx_thread" = "yes"; then
10269 CXX="$CXX -pthread"
10270 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010271 cat >>confdefs.h <<\_ACEOF
10272#define WITH_THREAD 1
10273_ACEOF
10274
10275 posix_threads=yes
10276 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010277else
10278 if test ! -z "$with_threads" -a -d "$with_threads"
10279 then LDFLAGS="$LDFLAGS -L$with_threads"
10280 fi
10281 if test ! -z "$withval" -a -d "$withval"
10282 then LDFLAGS="$LDFLAGS -L$withval"
10283 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284
10285 # According to the POSIX spec, a pthreads implementation must
10286 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10288echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10289 cat >conftest.$ac_ext <<_ACEOF
10290#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* confdefs.h. */
10292_ACEOF
10293cat confdefs.h >>conftest.$ac_ext
10294cat >>conftest.$ac_ext <<_ACEOF
10295/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010296
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010297#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010298#ifdef _POSIX_THREADS
10299yes
10300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
10302_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010304 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010305 unistd_defines_pthreads=yes
10306else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010307 unistd_defines_pthreads=no
10308fi
10309rm -f conftest*
10310
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10312echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010313
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010315#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010316_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010317
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 if test "${ac_cv_header_cthreads_h+set}" = set; then
10319 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10320echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10321if test "${ac_cv_header_cthreads_h+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
10323fi
10324echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10325echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010326else
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 # Is the header compilable?
10328echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10329echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10330cat >conftest.$ac_ext <<_ACEOF
10331#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* confdefs.h. */
10333_ACEOF
10334cat confdefs.h >>conftest.$ac_ext
10335cat >>conftest.$ac_ext <<_ACEOF
10336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337$ac_includes_default
10338#include <cthreads.h>
10339_ACEOF
10340rm -f conftest.$ac_objext
10341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10342 (eval $ac_compile) 2>&5
10343 ac_status=$?
10344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10345 (exit $ac_status); } &&
10346 { ac_try='test -s conftest.$ac_objext'
10347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10348 (eval $ac_try) 2>&5
10349 ac_status=$?
10350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10351 (exit $ac_status); }; }; then
10352 ac_header_compiler=yes
10353else
10354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010355sed 's/^/| /' conftest.$ac_ext >&5
10356
Martin v. Löwis11437992002-04-12 09:54:03 +000010357ac_header_compiler=no
10358fi
10359rm -f conftest.$ac_objext conftest.$ac_ext
10360echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10361echo "${ECHO_T}$ac_header_compiler" >&6
10362
10363# Is the header present?
10364echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10365echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10366cat >conftest.$ac_ext <<_ACEOF
10367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010368/* confdefs.h. */
10369_ACEOF
10370cat confdefs.h >>conftest.$ac_ext
10371cat >>conftest.$ac_ext <<_ACEOF
10372/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010373#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
10375if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10376 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10377 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010378 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 rm -f conftest.er1
10380 cat conftest.err >&5
10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); } >/dev/null; then
10383 if test -s conftest.err; then
10384 ac_cpp_err=$ac_c_preproc_warn_flag
10385 else
10386 ac_cpp_err=
10387 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ac_cpp_err=yes
10390fi
10391if test -z "$ac_cpp_err"; then
10392 ac_header_preproc=yes
10393else
10394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010395sed 's/^/| /' conftest.$ac_ext >&5
10396
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010399rm -f conftest.err conftest.$ac_ext
10400echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10401echo "${ECHO_T}$ac_header_preproc" >&6
10402
10403# So? What about this header?
10404case $ac_header_compiler:$ac_header_preproc in
10405 yes:no )
10406 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10407echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10408 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010409echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10410 (
10411 cat <<\_ASBOX
10412## ------------------------------------ ##
10413## Report this to bug-autoconf@gnu.org. ##
10414## ------------------------------------ ##
10415_ASBOX
10416 ) |
10417 sed "s/^/$as_me: WARNING: /" >&2
10418 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 no:yes )
10420 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10421echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10422 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10423echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10424 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010425echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10426 (
10427 cat <<\_ASBOX
10428## ------------------------------------ ##
10429## Report this to bug-autoconf@gnu.org. ##
10430## ------------------------------------ ##
10431_ASBOX
10432 ) |
10433 sed "s/^/$as_me: WARNING: /" >&2
10434 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010435esac
10436echo "$as_me:$LINENO: checking for cthreads.h" >&5
10437echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10438if test "${ac_cv_header_cthreads_h+set}" = set; then
10439 echo $ECHO_N "(cached) $ECHO_C" >&6
10440else
10441 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010443echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10444echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10445
10446fi
10447if test $ac_cv_header_cthreads_h = yes; then
10448 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010449#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010450_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010451
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010453#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010454_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010455
Martin v. Löwis11437992002-04-12 09:54:03 +000010456
10457cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010458#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010460
10461 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010462 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010463else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010464
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10466 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10467echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10468if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10469 echo $ECHO_N "(cached) $ECHO_C" >&6
10470fi
10471echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10472echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010473else
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 # Is the header compilable?
10475echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10476echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10477cat >conftest.$ac_ext <<_ACEOF
10478#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* confdefs.h. */
10480_ACEOF
10481cat confdefs.h >>conftest.$ac_ext
10482cat >>conftest.$ac_ext <<_ACEOF
10483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010484$ac_includes_default
10485#include <mach/cthreads.h>
10486_ACEOF
10487rm -f conftest.$ac_objext
10488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10489 (eval $ac_compile) 2>&5
10490 ac_status=$?
10491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10492 (exit $ac_status); } &&
10493 { ac_try='test -s conftest.$ac_objext'
10494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10495 (eval $ac_try) 2>&5
10496 ac_status=$?
10497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10498 (exit $ac_status); }; }; then
10499 ac_header_compiler=yes
10500else
10501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010502sed 's/^/| /' conftest.$ac_ext >&5
10503
Martin v. Löwis11437992002-04-12 09:54:03 +000010504ac_header_compiler=no
10505fi
10506rm -f conftest.$ac_objext conftest.$ac_ext
10507echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10508echo "${ECHO_T}$ac_header_compiler" >&6
10509
10510# Is the header present?
10511echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10512echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10513cat >conftest.$ac_ext <<_ACEOF
10514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* confdefs.h. */
10516_ACEOF
10517cat confdefs.h >>conftest.$ac_ext
10518cat >>conftest.$ac_ext <<_ACEOF
10519/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010520#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010521_ACEOF
10522if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10523 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10524 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010525 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 rm -f conftest.er1
10527 cat conftest.err >&5
10528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10529 (exit $ac_status); } >/dev/null; then
10530 if test -s conftest.err; then
10531 ac_cpp_err=$ac_c_preproc_warn_flag
10532 else
10533 ac_cpp_err=
10534 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010535else
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 ac_cpp_err=yes
10537fi
10538if test -z "$ac_cpp_err"; then
10539 ac_header_preproc=yes
10540else
10541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010542sed 's/^/| /' conftest.$ac_ext >&5
10543
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010545fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010546rm -f conftest.err conftest.$ac_ext
10547echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10548echo "${ECHO_T}$ac_header_preproc" >&6
10549
10550# So? What about this header?
10551case $ac_header_compiler:$ac_header_preproc in
10552 yes:no )
10553 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10554echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10555 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010556echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10557 (
10558 cat <<\_ASBOX
10559## ------------------------------------ ##
10560## Report this to bug-autoconf@gnu.org. ##
10561## ------------------------------------ ##
10562_ASBOX
10563 ) |
10564 sed "s/^/$as_me: WARNING: /" >&2
10565 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 no:yes )
10567 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10568echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10569 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10570echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10571 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010572echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10573 (
10574 cat <<\_ASBOX
10575## ------------------------------------ ##
10576## Report this to bug-autoconf@gnu.org. ##
10577## ------------------------------------ ##
10578_ASBOX
10579 ) |
10580 sed "s/^/$as_me: WARNING: /" >&2
10581 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010582esac
10583echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10584echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10585if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10586 echo $ECHO_N "(cached) $ECHO_C" >&6
10587else
10588 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010590echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10591echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10592
10593fi
10594if test $ac_cv_header_mach_cthreads_h = yes; then
10595 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010596#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010597_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010598
Martin v. Löwis11437992002-04-12 09:54:03 +000010599 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010600#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010601_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010602
Martin v. Löwis11437992002-04-12 09:54:03 +000010603
10604cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010605#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010606_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010607
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010608 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010609else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010610
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 echo "$as_me:$LINENO: checking for --with-pth" >&5
10612echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10613
10614# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010615if test "${with_pth+set}" = set; then
10616 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010617 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010618echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010619 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010620#define WITH_THREAD 1
10621_ACEOF
10622
10623
10624cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010625#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010626_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010627
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010628 LIBS="-lpth $LIBS"
10629 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010630else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010631 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010632echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010633
10634 # Just looking for pthread_create in libpthread is not enough:
10635 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10636 # So we really have to include pthread.h, and then link.
10637 _libs=$LIBS
10638 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10640echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10641 cat >conftest.$ac_ext <<_ACEOF
10642#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* confdefs.h. */
10644_ACEOF
10645cat confdefs.h >>conftest.$ac_ext
10646cat >>conftest.$ac_ext <<_ACEOF
10647/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010648#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010649
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010650void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010651int
10652main ()
10653{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010654
10655pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 ;
10657 return 0;
10658}
10659_ACEOF
10660rm -f conftest.$ac_objext conftest$ac_exeext
10661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10662 (eval $ac_link) 2>&5
10663 ac_status=$?
10664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10665 (exit $ac_status); } &&
10666 { ac_try='test -s conftest$ac_exeext'
10667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10668 (eval $ac_try) 2>&5
10669 ac_status=$?
10670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671 (exit $ac_status); }; }; then
10672
10673 echo "$as_me:$LINENO: result: yes" >&5
10674echo "${ECHO_T}yes" >&6
10675 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010676#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010677_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010678
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010679 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010680 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010681else
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010683sed 's/^/| /' conftest.$ac_ext >&5
10684
Martin v. Löwis11437992002-04-12 09:54:03 +000010685
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010686 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10688echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10689if test "${ac_cv_func_pthread_detach+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010691else
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 cat >conftest.$ac_ext <<_ACEOF
10693#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* confdefs.h. */
10695_ACEOF
10696cat confdefs.h >>conftest.$ac_ext
10697cat >>conftest.$ac_ext <<_ACEOF
10698/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010699/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010700 which can conflict with char pthread_detach (); below.
10701 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010702 <limits.h> exists even on freestanding compilers. Under hpux,
10703 including <limits.h> includes <sys/time.h> and causes problems
10704 checking for functions defined therein. */
10705#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010706# include <limits.h>
10707#else
10708# include <assert.h>
10709#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010710/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010711#ifdef __cplusplus
10712extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010713{
Martin v. Löwis11437992002-04-12 09:54:03 +000010714#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010715/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 builtin and then its argument prototype would still apply. */
10717char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010718/* The GNU C library defines this for functions which it implements
10719 to always fail with ENOSYS. Some functions are actually named
10720 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010721#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010722choke me
10723#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010724char (*f) () = pthread_detach;
10725#endif
10726#ifdef __cplusplus
10727}
Guido van Rossumad678af1998-10-02 14:42:15 +000010728#endif
10729
Skip Montanaro6dead952003-09-25 14:50:04 +000010730int
10731main ()
10732{
10733return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ;
10735 return 0;
10736}
10737_ACEOF
10738rm -f conftest.$ac_objext conftest$ac_exeext
10739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10740 (eval $ac_link) 2>&5
10741 ac_status=$?
10742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10743 (exit $ac_status); } &&
10744 { ac_try='test -s conftest$ac_exeext'
10745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10746 (eval $ac_try) 2>&5
10747 ac_status=$?
10748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10749 (exit $ac_status); }; }; then
10750 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010751else
Martin v. Löwis11437992002-04-12 09:54:03 +000010752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010753sed 's/^/| /' conftest.$ac_ext >&5
10754
Martin v. Löwis11437992002-04-12 09:54:03 +000010755ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010759echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10760echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10761if test $ac_cv_func_pthread_detach = yes; then
10762 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010763#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010764_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010765
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010766 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010767 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010768else
Guido van Rossumad678af1998-10-02 14:42:15 +000010769
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010770 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10771 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10772echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10773if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10774 echo $ECHO_N "(cached) $ECHO_C" >&6
10775fi
10776echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10777echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10778else
10779 # Is the header compilable?
10780echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10781echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10782cat >conftest.$ac_ext <<_ACEOF
10783#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010784/* confdefs.h. */
10785_ACEOF
10786cat confdefs.h >>conftest.$ac_ext
10787cat >>conftest.$ac_ext <<_ACEOF
10788/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010789$ac_includes_default
10790#include <atheos/threads.h>
10791_ACEOF
10792rm -f conftest.$ac_objext
10793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10794 (eval $ac_compile) 2>&5
10795 ac_status=$?
10796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10797 (exit $ac_status); } &&
10798 { ac_try='test -s conftest.$ac_objext'
10799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10800 (eval $ac_try) 2>&5
10801 ac_status=$?
10802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803 (exit $ac_status); }; }; then
10804 ac_header_compiler=yes
10805else
10806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010807sed 's/^/| /' conftest.$ac_ext >&5
10808
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010809ac_header_compiler=no
10810fi
10811rm -f conftest.$ac_objext conftest.$ac_ext
10812echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10813echo "${ECHO_T}$ac_header_compiler" >&6
10814
10815# Is the header present?
10816echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10817echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10818cat >conftest.$ac_ext <<_ACEOF
10819#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* confdefs.h. */
10821_ACEOF
10822cat confdefs.h >>conftest.$ac_ext
10823cat >>conftest.$ac_ext <<_ACEOF
10824/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010825#include <atheos/threads.h>
10826_ACEOF
10827if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10828 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10829 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010830 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010831 rm -f conftest.er1
10832 cat conftest.err >&5
10833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10834 (exit $ac_status); } >/dev/null; then
10835 if test -s conftest.err; then
10836 ac_cpp_err=$ac_c_preproc_warn_flag
10837 else
10838 ac_cpp_err=
10839 fi
10840else
10841 ac_cpp_err=yes
10842fi
10843if test -z "$ac_cpp_err"; then
10844 ac_header_preproc=yes
10845else
10846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010847sed 's/^/| /' conftest.$ac_ext >&5
10848
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010849 ac_header_preproc=no
10850fi
10851rm -f conftest.err conftest.$ac_ext
10852echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10853echo "${ECHO_T}$ac_header_preproc" >&6
10854
10855# So? What about this header?
10856case $ac_header_compiler:$ac_header_preproc in
10857 yes:no )
10858 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10859echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10860 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010861echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10862 (
10863 cat <<\_ASBOX
10864## ------------------------------------ ##
10865## Report this to bug-autoconf@gnu.org. ##
10866## ------------------------------------ ##
10867_ASBOX
10868 ) |
10869 sed "s/^/$as_me: WARNING: /" >&2
10870 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010871 no:yes )
10872 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10873echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10874 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10875echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10876 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010877echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10878 (
10879 cat <<\_ASBOX
10880## ------------------------------------ ##
10881## Report this to bug-autoconf@gnu.org. ##
10882## ------------------------------------ ##
10883_ASBOX
10884 ) |
10885 sed "s/^/$as_me: WARNING: /" >&2
10886 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010887esac
10888echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10889echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10890if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10891 echo $ECHO_N "(cached) $ECHO_C" >&6
10892else
10893 ac_cv_header_atheos_threads_h=$ac_header_preproc
10894fi
10895echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10896echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10897
10898fi
10899if test $ac_cv_header_atheos_threads_h = yes; then
10900 cat >>confdefs.h <<\_ACEOF
10901#define WITH_THREAD 1
10902_ACEOF
10903
10904
10905cat >>confdefs.h <<\_ACEOF
10906#define ATHEOS_THREADS 1
10907_ACEOF
10908
10909 THREADOBJ="Python/thread.o"
10910else
10911
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10913 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10914echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10915if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10916 echo $ECHO_N "(cached) $ECHO_C" >&6
10917fi
10918echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10919echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010920else
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 # Is the header compilable?
10922echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10923echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10924cat >conftest.$ac_ext <<_ACEOF
10925#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010926/* confdefs.h. */
10927_ACEOF
10928cat confdefs.h >>conftest.$ac_ext
10929cat >>conftest.$ac_ext <<_ACEOF
10930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010931$ac_includes_default
10932#include <kernel/OS.h>
10933_ACEOF
10934rm -f conftest.$ac_objext
10935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10936 (eval $ac_compile) 2>&5
10937 ac_status=$?
10938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10939 (exit $ac_status); } &&
10940 { ac_try='test -s conftest.$ac_objext'
10941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10942 (eval $ac_try) 2>&5
10943 ac_status=$?
10944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10945 (exit $ac_status); }; }; then
10946 ac_header_compiler=yes
10947else
10948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010949sed 's/^/| /' conftest.$ac_ext >&5
10950
Martin v. Löwis11437992002-04-12 09:54:03 +000010951ac_header_compiler=no
10952fi
10953rm -f conftest.$ac_objext conftest.$ac_ext
10954echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10955echo "${ECHO_T}$ac_header_compiler" >&6
10956
10957# Is the header present?
10958echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10959echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10960cat >conftest.$ac_ext <<_ACEOF
10961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010967#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010968_ACEOF
10969if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10970 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10971 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010972 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 rm -f conftest.er1
10974 cat conftest.err >&5
10975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10976 (exit $ac_status); } >/dev/null; then
10977 if test -s conftest.err; then
10978 ac_cpp_err=$ac_c_preproc_warn_flag
10979 else
10980 ac_cpp_err=
10981 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010982else
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 ac_cpp_err=yes
10984fi
10985if test -z "$ac_cpp_err"; then
10986 ac_header_preproc=yes
10987else
10988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010989sed 's/^/| /' conftest.$ac_ext >&5
10990
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010993rm -f conftest.err conftest.$ac_ext
10994echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10995echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010996
Martin v. Löwis11437992002-04-12 09:54:03 +000010997# So? What about this header?
10998case $ac_header_compiler:$ac_header_preproc in
10999 yes:no )
11000 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11001echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11002 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011003echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11004 (
11005 cat <<\_ASBOX
11006## ------------------------------------ ##
11007## Report this to bug-autoconf@gnu.org. ##
11008## ------------------------------------ ##
11009_ASBOX
11010 ) |
11011 sed "s/^/$as_me: WARNING: /" >&2
11012 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 no:yes )
11014 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11015echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11016 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11017echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11018 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011019echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11020 (
11021 cat <<\_ASBOX
11022## ------------------------------------ ##
11023## Report this to bug-autoconf@gnu.org. ##
11024## ------------------------------------ ##
11025_ASBOX
11026 ) |
11027 sed "s/^/$as_me: WARNING: /" >&2
11028 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011029esac
11030echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11031echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11032if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11033 echo $ECHO_N "(cached) $ECHO_C" >&6
11034else
11035 ac_cv_header_kernel_OS_h=$ac_header_preproc
11036fi
11037echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11038echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11039
11040fi
11041if test $ac_cv_header_kernel_OS_h = yes; then
11042 cat >>confdefs.h <<\_ACEOF
11043#define WITH_THREAD 1
11044_ACEOF
11045
11046
11047cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011048#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011049_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011050
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011051 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011052else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011053
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11055echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11056if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058else
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011060LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011061cat >conftest.$ac_ext <<_ACEOF
11062#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011063/* confdefs.h. */
11064_ACEOF
11065cat confdefs.h >>conftest.$ac_ext
11066cat >>conftest.$ac_ext <<_ACEOF
11067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011068
Greg Steinadf63d62000-07-05 10:38:09 +000011069/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011070#ifdef __cplusplus
11071extern "C"
11072#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011073/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 builtin and then its argument prototype would still apply. */
11075char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011076int
11077main ()
11078{
11079pthread_create ();
11080 ;
11081 return 0;
11082}
11083_ACEOF
11084rm -f conftest.$ac_objext conftest$ac_exeext
11085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11086 (eval $ac_link) 2>&5
11087 ac_status=$?
11088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089 (exit $ac_status); } &&
11090 { ac_try='test -s conftest$ac_exeext'
11091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11092 (eval $ac_try) 2>&5
11093 ac_status=$?
11094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11095 (exit $ac_status); }; }; then
11096 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011097else
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011099sed 's/^/| /' conftest.$ac_ext >&5
11100
Martin v. Löwis11437992002-04-12 09:54:03 +000011101ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11104LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011106echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11107echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11108if test $ac_cv_lib_pthreads_pthread_create = yes; then
11109 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011110#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011111_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011113 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011114 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011115 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011116else
Greg Steinadf63d62000-07-05 10:38:09 +000011117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11119echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11120if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11121 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011122else
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011124LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011125cat >conftest.$ac_ext <<_ACEOF
11126#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011127/* confdefs.h. */
11128_ACEOF
11129cat confdefs.h >>conftest.$ac_ext
11130cat >>conftest.$ac_ext <<_ACEOF
11131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
Guido van Rossum49545951997-12-02 19:28:29 +000011133/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011134#ifdef __cplusplus
11135extern "C"
11136#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011137/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 builtin and then its argument prototype would still apply. */
11139char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011140int
11141main ()
11142{
11143pthread_create ();
11144 ;
11145 return 0;
11146}
11147_ACEOF
11148rm -f conftest.$ac_objext conftest$ac_exeext
11149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11150 (eval $ac_link) 2>&5
11151 ac_status=$?
11152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11153 (exit $ac_status); } &&
11154 { ac_try='test -s conftest$ac_exeext'
11155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11156 (eval $ac_try) 2>&5
11157 ac_status=$?
11158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11159 (exit $ac_status); }; }; then
11160 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011161else
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011163sed 's/^/| /' conftest.$ac_ext >&5
11164
Martin v. Löwis11437992002-04-12 09:54:03 +000011165ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011167rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11168LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011170echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11171echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11172if test $ac_cv_lib_c_r_pthread_create = yes; then
11173 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011174#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011175_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011176
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011177 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011178 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011179 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011180else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11183echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11184if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11185 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011186else
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011188LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011189cat >conftest.$ac_ext <<_ACEOF
11190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011191/* confdefs.h. */
11192_ACEOF
11193cat confdefs.h >>conftest.$ac_ext
11194cat >>conftest.$ac_ext <<_ACEOF
11195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011196
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011197/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011198#ifdef __cplusplus
11199extern "C"
11200#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011201/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 builtin and then its argument prototype would still apply. */
11203char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011204int
11205main ()
11206{
11207__pthread_create_system ();
11208 ;
11209 return 0;
11210}
11211_ACEOF
11212rm -f conftest.$ac_objext conftest$ac_exeext
11213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11214 (eval $ac_link) 2>&5
11215 ac_status=$?
11216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11217 (exit $ac_status); } &&
11218 { ac_try='test -s conftest$ac_exeext'
11219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11220 (eval $ac_try) 2>&5
11221 ac_status=$?
11222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11223 (exit $ac_status); }; }; then
11224 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011225else
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011227sed 's/^/| /' conftest.$ac_ext >&5
11228
Martin v. Löwis11437992002-04-12 09:54:03 +000011229ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11232LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011234echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11235echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11236if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11237 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011238#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011239_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011240
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011241 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011242 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011243 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011244else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011245
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11247echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11248if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011250else
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011252LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011253cat >conftest.$ac_ext <<_ACEOF
11254#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* confdefs.h. */
11256_ACEOF
11257cat confdefs.h >>conftest.$ac_ext
11258cat >>conftest.$ac_ext <<_ACEOF
11259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Guido van Rossumb93a8621998-05-07 13:27:32 +000011261/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011262#ifdef __cplusplus
11263extern "C"
11264#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011265/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 builtin and then its argument prototype would still apply. */
11267char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011268int
11269main ()
11270{
11271pthread_create ();
11272 ;
11273 return 0;
11274}
11275_ACEOF
11276rm -f conftest.$ac_objext conftest$ac_exeext
11277if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11278 (eval $ac_link) 2>&5
11279 ac_status=$?
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281 (exit $ac_status); } &&
11282 { ac_try='test -s conftest$ac_exeext'
11283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11284 (eval $ac_try) 2>&5
11285 ac_status=$?
11286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287 (exit $ac_status); }; }; then
11288 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011289else
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011291sed 's/^/| /' conftest.$ac_ext >&5
11292
Martin v. Löwis11437992002-04-12 09:54:03 +000011293ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11296LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011298echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11299echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11300if test $ac_cv_lib_cma_pthread_create = yes; then
11301 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011303_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011305 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011306 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011307 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011308else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011309
Martin v. Löwis130fb172001-07-19 11:00:41 +000011310 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011311fi
11312
Guido van Rossum627b2d71993-12-24 10:39:16 +000011313
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011314fi
11315
Guido van Rossum0be3e491997-05-22 20:33:33 +000011316fi
11317
Guido van Rossum49545951997-12-02 19:28:29 +000011318fi
11319
Guido van Rossumb93a8621998-05-07 13:27:32 +000011320fi
11321
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011322
Michael W. Hudson54241132001-12-07 15:38:26 +000011323fi
11324
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011325
11326fi
11327
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011329rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11330fi;
11331fi
11332
11333
11334fi
11335
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011336
Michael W. Hudson54241132001-12-07 15:38:26 +000011337
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11339echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11340if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11341 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342else
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011344LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011345cat >conftest.$ac_ext <<_ACEOF
11346#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011352
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011353/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011354#ifdef __cplusplus
11355extern "C"
11356#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011357/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011358 builtin and then its argument prototype would still apply. */
11359char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011360int
11361main ()
11362{
11363usconfig ();
11364 ;
11365 return 0;
11366}
11367_ACEOF
11368rm -f conftest.$ac_objext conftest$ac_exeext
11369if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11370 (eval $ac_link) 2>&5
11371 ac_status=$?
11372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373 (exit $ac_status); } &&
11374 { ac_try='test -s conftest$ac_exeext'
11375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11376 (eval $ac_try) 2>&5
11377 ac_status=$?
11378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11379 (exit $ac_status); }; }; then
11380 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381else
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011383sed 's/^/| /' conftest.$ac_ext >&5
11384
Martin v. Löwis11437992002-04-12 09:54:03 +000011385ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011387rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11388LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011390echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11391echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11392if test $ac_cv_lib_mpc_usconfig = yes; then
11393 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011394#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011395_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011396
Martin v. Löwis130fb172001-07-19 11:00:41 +000011397 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011398 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011399 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011400fi
11401
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011402
Neal Norwitza978ab02002-11-02 16:58:05 +000011403 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11405echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11406if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011408else
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011410LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011411cat >conftest.$ac_ext <<_ACEOF
11412#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* confdefs.h. */
11414_ACEOF
11415cat confdefs.h >>conftest.$ac_ext
11416cat >>conftest.$ac_ext <<_ACEOF
11417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011419/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011420#ifdef __cplusplus
11421extern "C"
11422#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011423/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 builtin and then its argument prototype would still apply. */
11425char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011426int
11427main ()
11428{
11429thr_create ();
11430 ;
11431 return 0;
11432}
11433_ACEOF
11434rm -f conftest.$ac_objext conftest$ac_exeext
11435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11436 (eval $ac_link) 2>&5
11437 ac_status=$?
11438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11439 (exit $ac_status); } &&
11440 { ac_try='test -s conftest$ac_exeext'
11441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11442 (eval $ac_try) 2>&5
11443 ac_status=$?
11444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445 (exit $ac_status); }; }; then
11446 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447else
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011449sed 's/^/| /' conftest.$ac_ext >&5
11450
Martin v. Löwis11437992002-04-12 09:54:03 +000011451ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011453rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11454LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011456echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11457echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11458if test $ac_cv_lib_thread_thr_create = yes; then
11459 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011460#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011461_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011462
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011463 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011464 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011465 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466fi
11467
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011468 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011469
Martin v. Löwis130fb172001-07-19 11:00:41 +000011470 if test "$USE_THREAD_MODULE" != "#"
11471 then
11472 # If the above checks didn't disable threads, (at least) OSF1
11473 # needs this '-threads' argument during linking.
11474 case $ac_sys_system in
11475 OSF1) LDLAST=-threads;;
11476 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011477 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011478fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011479
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011480if test "$posix_threads" = "yes"; then
11481 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011482
11483cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011484#define _POSIX_THREADS 1
11485_ACEOF
11486
11487 fi
11488
11489 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11490 case $ac_sys_system/$ac_sys_release in
11491 SunOS/5.6)
11492cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011493#define HAVE_PTHREAD_DESTRUCTOR 1
11494_ACEOF
11495
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011496 ;;
11497 SunOS/5.8)
11498cat >>confdefs.h <<\_ACEOF
11499#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11500_ACEOF
11501
11502 ;;
11503 esac
11504
11505 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11506echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11507 if test "${ac_cv_pthread_system_supported+set}" = set; then
11508 echo $ECHO_N "(cached) $ECHO_C" >&6
11509else
11510 if test "$cross_compiling" = yes; then
11511 ac_cv_pthread_system_supported=no
11512else
11513 cat >conftest.$ac_ext <<_ACEOF
11514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011515/* confdefs.h. */
11516_ACEOF
11517cat confdefs.h >>conftest.$ac_ext
11518cat >>conftest.$ac_ext <<_ACEOF
11519/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011520#include <pthread.h>
11521 void *foo(void *parm) {
11522 return NULL;
11523 }
11524 main() {
11525 pthread_attr_t attr;
11526 pthread_t id;
11527 if (pthread_attr_init(&attr)) exit(-1);
11528 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11529 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11530 exit(0);
11531 }
11532_ACEOF
11533rm -f conftest$ac_exeext
11534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11535 (eval $ac_link) 2>&5
11536 ac_status=$?
11537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11540 (eval $ac_try) 2>&5
11541 ac_status=$?
11542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11543 (exit $ac_status); }; }; then
11544 ac_cv_pthread_system_supported=yes
11545else
11546 echo "$as_me: program exited with status $ac_status" >&5
11547echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011548sed 's/^/| /' conftest.$ac_ext >&5
11549
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011550( exit $ac_status )
11551ac_cv_pthread_system_supported=no
11552fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011553rm -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 +000011554fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011555
Guido van Rossum627b2d71993-12-24 10:39:16 +000011556fi
11557
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011558 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11559echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11560 if test "$ac_cv_pthread_system_supported" = "yes"; then
11561
11562cat >>confdefs.h <<\_ACEOF
11563#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11564_ACEOF
11565
11566 fi
11567
11568for ac_func in pthread_sigmask
11569do
11570as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11571echo "$as_me:$LINENO: checking for $ac_func" >&5
11572echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11573if eval "test \"\${$as_ac_var+set}\" = set"; then
11574 echo $ECHO_N "(cached) $ECHO_C" >&6
11575else
11576 cat >conftest.$ac_ext <<_ACEOF
11577#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011578/* confdefs.h. */
11579_ACEOF
11580cat confdefs.h >>conftest.$ac_ext
11581cat >>conftest.$ac_ext <<_ACEOF
11582/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011583/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011584 which can conflict with char $ac_func (); below.
11585 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011586 <limits.h> exists even on freestanding compilers. Under hpux,
11587 including <limits.h> includes <sys/time.h> and causes problems
11588 checking for functions defined therein. */
11589#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011590# include <limits.h>
11591#else
11592# include <assert.h>
11593#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011594/* Override any gcc2 internal prototype to avoid an error. */
11595#ifdef __cplusplus
11596extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011597{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011598#endif
11599/* We use char because int might match the return type of a gcc2
11600 builtin and then its argument prototype would still apply. */
11601char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011602/* The GNU C library defines this for functions which it implements
11603 to always fail with ENOSYS. Some functions are actually named
11604 something starting with __ and the normal name is an alias. */
11605#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11606choke me
11607#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011608char (*f) () = $ac_func;
11609#endif
11610#ifdef __cplusplus
11611}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011612#endif
11613
Skip Montanaro6dead952003-09-25 14:50:04 +000011614int
11615main ()
11616{
11617return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011618 ;
11619 return 0;
11620}
11621_ACEOF
11622rm -f conftest.$ac_objext conftest$ac_exeext
11623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11624 (eval $ac_link) 2>&5
11625 ac_status=$?
11626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11627 (exit $ac_status); } &&
11628 { ac_try='test -s conftest$ac_exeext'
11629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11630 (eval $ac_try) 2>&5
11631 ac_status=$?
11632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11633 (exit $ac_status); }; }; then
11634 eval "$as_ac_var=yes"
11635else
11636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011637sed 's/^/| /' conftest.$ac_ext >&5
11638
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011639eval "$as_ac_var=no"
11640fi
11641rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11642fi
11643echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11644echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11645if test `eval echo '${'$as_ac_var'}'` = yes; then
11646 cat >>confdefs.h <<_ACEOF
11647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11648_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011649 case $ac_sys_system in
11650 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011651
Jason Tishlerfac083d2003-07-22 15:20:49 +000011652cat >>confdefs.h <<\_ACEOF
11653#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11654_ACEOF
11655
11656 ;;
11657 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658fi
11659done
11660
11661fi
11662
11663
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011664# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
11666
11667echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11668echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011669# Check whether --enable-ipv6 or --disable-ipv6 was given.
11670if test "${enable_ipv6+set}" = set; then
11671 enableval="$enable_ipv6"
11672 case "$enableval" in
11673 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011674 echo "$as_me:$LINENO: result: no" >&5
11675echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011676 ipv6=no
11677 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 *) echo "$as_me:$LINENO: result: yes" >&5
11679echo "${ECHO_T}yes" >&6
11680 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011681#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011682_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011683
11684 ipv6=yes
11685 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011687else
Martin v. Löwis11437992002-04-12 09:54:03 +000011688
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011689 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 echo "$as_me:$LINENO: result: no" >&5
11691echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011692 ipv6=no
11693
11694else
Martin v. Löwis11437992002-04-12 09:54:03 +000011695 cat >conftest.$ac_ext <<_ACEOF
11696#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011697/* confdefs.h. */
11698_ACEOF
11699cat confdefs.h >>conftest.$ac_ext
11700cat >>conftest.$ac_ext <<_ACEOF
11701/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011702 /* AF_INET6 available check */
11703#include <sys/types.h>
11704#include <sys/socket.h>
11705main()
11706{
11707 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11708 exit(1);
11709 else
11710 exit(0);
11711}
11712
Martin v. Löwis11437992002-04-12 09:54:03 +000011713_ACEOF
11714rm -f conftest$ac_exeext
11715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11716 (eval $ac_link) 2>&5
11717 ac_status=$?
11718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11721 (eval $ac_try) 2>&5
11722 ac_status=$?
11723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724 (exit $ac_status); }; }; then
11725 echo "$as_me:$LINENO: result: yes" >&5
11726echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011727 ipv6=yes
11728else
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 echo "$as_me: program exited with status $ac_status" >&5
11730echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011731sed 's/^/| /' conftest.$ac_ext >&5
11732
Martin v. Löwis11437992002-04-12 09:54:03 +000011733( exit $ac_status )
11734echo "$as_me:$LINENO: result: no" >&5
11735echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011736 ipv6=no
11737fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011738rm -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 +000011739fi
11740
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011741if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11743echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11744 cat >conftest.$ac_ext <<_ACEOF
11745#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011746/* confdefs.h. */
11747_ACEOF
11748cat confdefs.h >>conftest.$ac_ext
11749cat >>conftest.$ac_ext <<_ACEOF
11750/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011751#include <sys/types.h>
11752#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011753int
11754main ()
11755{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011756struct sockaddr_in6 x;
11757x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 ;
11759 return 0;
11760}
11761_ACEOF
11762rm -f conftest.$ac_objext
11763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11764 (eval $ac_compile) 2>&5
11765 ac_status=$?
11766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11767 (exit $ac_status); } &&
11768 { ac_try='test -s conftest.$ac_objext'
11769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11770 (eval $ac_try) 2>&5
11771 ac_status=$?
11772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11773 (exit $ac_status); }; }; then
11774 echo "$as_me:$LINENO: result: yes" >&5
11775echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011776 ipv6=yes
11777else
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011779sed 's/^/| /' conftest.$ac_ext >&5
11780
Martin v. Löwis11437992002-04-12 09:54:03 +000011781echo "$as_me:$LINENO: result: no" >&5
11782echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011783 ipv6=no
11784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011785rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011786fi
11787
11788if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011790#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011791_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011792
11793fi
11794
Martin v. Löwis11437992002-04-12 09:54:03 +000011795fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011796
11797ipv6type=unknown
11798ipv6lib=none
11799ipv6trylibc=no
11800
11801if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11803echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011804 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11805 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011806 case $i in
11807 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 cat >conftest.$ac_ext <<_ACEOF
11809#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011816#include <netinet/in.h>
11817#ifdef IPV6_INRIA_VERSION
11818yes
11819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011822 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011823 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011824fi
11825rm -f conftest*
11826
11827 ;;
11828 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 cat >conftest.$ac_ext <<_ACEOF
11830#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* confdefs.h. */
11832_ACEOF
11833cat confdefs.h >>conftest.$ac_ext
11834cat >>conftest.$ac_ext <<_ACEOF
11835/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011837#include <netinet/in.h>
11838#ifdef __KAME__
11839yes
11840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011841_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011843 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011844 ipv6type=$i;
11845 ipv6lib=inet6
11846 ipv6libdir=/usr/local/v6/lib
11847 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011848fi
11849rm -f conftest*
11850
11851 ;;
11852 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011853 cat >conftest.$ac_ext <<_ACEOF
11854#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011855/* confdefs.h. */
11856_ACEOF
11857cat confdefs.h >>conftest.$ac_ext
11858cat >>conftest.$ac_ext <<_ACEOF
11859/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011861#include <features.h>
11862#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11863yes
11864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011867 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011868 ipv6type=$i;
11869 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870fi
11871rm -f conftest*
11872
11873 ;;
11874 linux-inet6)
11875 if test -d /usr/inet6; then
11876 ipv6type=$i
11877 ipv6lib=inet6
11878 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011879 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011880 fi
11881 ;;
11882 solaris)
11883 if test -f /etc/netconfig; then
11884 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11885 ipv6type=$i
11886 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011887 fi
11888 fi
11889 ;;
11890 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 cat >conftest.$ac_ext <<_ACEOF
11892#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011899#include <sys/param.h>
11900#ifdef _TOSHIBA_INET6
11901yes
11902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011905 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906 ipv6type=$i;
11907 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011908 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011909fi
11910rm -f conftest*
11911
11912 ;;
11913 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 cat >conftest.$ac_ext <<_ACEOF
11915#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011916/* confdefs.h. */
11917_ACEOF
11918cat confdefs.h >>conftest.$ac_ext
11919cat >>conftest.$ac_ext <<_ACEOF
11920/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011921
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011922#include </usr/local/v6/include/sys/v6config.h>
11923#ifdef __V6D__
11924yes
11925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011926_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011928 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011929 ipv6type=$i;
11930 ipv6lib=v6;
11931 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011932 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011933fi
11934rm -f conftest*
11935
11936 ;;
11937 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 cat >conftest.$ac_ext <<_ACEOF
11939#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011940/* confdefs.h. */
11941_ACEOF
11942cat confdefs.h >>conftest.$ac_ext
11943cat >>conftest.$ac_ext <<_ACEOF
11944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011946#include <sys/param.h>
11947#ifdef _ZETA_MINAMI_INET6
11948yes
11949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011952 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011953 ipv6type=$i;
11954 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011955 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011956fi
11957rm -f conftest*
11958
11959 ;;
11960 esac
11961 if test "$ipv6type" != "unknown"; then
11962 break
11963 fi
11964 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 echo "$as_me:$LINENO: result: $ipv6type" >&5
11966echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011967fi
11968
11969if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11970 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11971 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11972 echo "using lib$ipv6lib"
11973 else
11974 if test $ipv6trylibc = "yes"; then
11975 echo "using libc"
11976 else
11977 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11978 echo "You need to fetch lib$ipv6lib.a from appropriate"
11979 echo 'ipv6 kit and compile beforehand.'
11980 exit 1
11981 fi
11982 fi
11983fi
11984
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011985# Check for --with-doc-strings
11986echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11987echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11988
11989# Check whether --with-doc-strings or --without-doc-strings was given.
11990if test "${with_doc_strings+set}" = set; then
11991 withval="$with_doc_strings"
11992
11993fi;
11994
11995if test -z "$with_doc_strings"
11996then with_doc_strings="yes"
11997fi
11998if test "$with_doc_strings" != "no"
11999then
12000
12001cat >>confdefs.h <<\_ACEOF
12002#define WITH_DOC_STRINGS 1
12003_ACEOF
12004
12005fi
12006echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12007echo "${ECHO_T}$with_doc_strings" >&6
12008
Neil Schemenauera35c6882001-02-27 04:45:05 +000012009# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000012010echo "$as_me:$LINENO: checking for --with-tsc" >&5
12011echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
12012
12013# Check whether --with-tsc or --without-tsc was given.
12014if test "${with_tsc+set}" = set; then
12015 withval="$with_tsc"
12016
12017if test "$withval" != no
12018then
12019
12020cat >>confdefs.h <<\_ACEOF
12021#define WITH_TSC 1
12022_ACEOF
12023
12024 echo "$as_me:$LINENO: result: yes" >&5
12025echo "${ECHO_T}yes" >&6
12026else echo "$as_me:$LINENO: result: no" >&5
12027echo "${ECHO_T}no" >&6
12028fi
12029else
12030 echo "$as_me:$LINENO: result: no" >&5
12031echo "${ECHO_T}no" >&6
12032fi;
12033
12034# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012035echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12036echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12037
Neil Schemenauera35c6882001-02-27 04:45:05 +000012038# Check whether --with-pymalloc or --without-pymalloc was given.
12039if test "${with_pymalloc+set}" = set; then
12040 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012041
Martin v. Löwis11437992002-04-12 09:54:03 +000012042fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012043
Neil Schemenauer16c22972002-03-22 15:34:49 +000012044if test -z "$with_pymalloc"
12045then with_pymalloc="yes"
12046fi
12047if test "$with_pymalloc" != "no"
12048then
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
12050cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012051#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012052_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012053
12054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012055echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12056echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012057
Barry Warsawef82cd72000-06-30 16:21:01 +000012058# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012059echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12060echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12061
Barry Warsawef82cd72000-06-30 16:21:01 +000012062# Check whether --with-wctype-functions or --without-wctype-functions was given.
12063if test "${with_wctype_functions+set}" = set; then
12064 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012065
Barry Warsawef82cd72000-06-30 16:21:01 +000012066if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012067then
12068
12069cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012070#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012071_ACEOF
12072
12073 echo "$as_me:$LINENO: result: yes" >&5
12074echo "${ECHO_T}yes" >&6
12075else echo "$as_me:$LINENO: result: no" >&5
12076echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012077fi
12078else
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 echo "$as_me:$LINENO: result: no" >&5
12080echo "${ECHO_T}no" >&6
12081fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012083# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012084
Guido van Rossum98935bf2001-09-05 19:13:16 +000012085DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012086
Guido van Rossume97ee181999-12-20 21:27:22 +000012087# the dlopen() function means we might want to use dynload_shlib.o. some
12088# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Thomas Wouters3a584202000-08-05 23:28:51 +000012090for ac_func in dlopen
12091do
Martin v. Löwis11437992002-04-12 09:54:03 +000012092as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12093echo "$as_me:$LINENO: checking for $ac_func" >&5
12094echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12095if eval "test \"\${$as_ac_var+set}\" = set"; then
12096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012097else
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 cat >conftest.$ac_ext <<_ACEOF
12099#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012100/* confdefs.h. */
12101_ACEOF
12102cat confdefs.h >>conftest.$ac_ext
12103cat >>conftest.$ac_ext <<_ACEOF
12104/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012105/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012106 which can conflict with char $ac_func (); below.
12107 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012108 <limits.h> exists even on freestanding compilers. Under hpux,
12109 including <limits.h> includes <sys/time.h> and causes problems
12110 checking for functions defined therein. */
12111#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012112# include <limits.h>
12113#else
12114# include <assert.h>
12115#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012116/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012117#ifdef __cplusplus
12118extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012119{
Martin v. Löwis11437992002-04-12 09:54:03 +000012120#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012121/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012122 builtin and then its argument prototype would still apply. */
12123char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012124/* The GNU C library defines this for functions which it implements
12125 to always fail with ENOSYS. Some functions are actually named
12126 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012127#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012128choke me
12129#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012130char (*f) () = $ac_func;
12131#endif
12132#ifdef __cplusplus
12133}
Guido van Rossume97ee181999-12-20 21:27:22 +000012134#endif
12135
Skip Montanaro6dead952003-09-25 14:50:04 +000012136int
12137main ()
12138{
12139return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 ;
12141 return 0;
12142}
12143_ACEOF
12144rm -f conftest.$ac_objext conftest$ac_exeext
12145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12146 (eval $ac_link) 2>&5
12147 ac_status=$?
12148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12149 (exit $ac_status); } &&
12150 { ac_try='test -s conftest$ac_exeext'
12151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12152 (eval $ac_try) 2>&5
12153 ac_status=$?
12154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155 (exit $ac_status); }; }; then
12156 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012157else
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012159sed 's/^/| /' conftest.$ac_ext >&5
12160
Martin v. Löwis11437992002-04-12 09:54:03 +000012161eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012165echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12166echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12167if test `eval echo '${'$as_ac_var'}'` = yes; then
12168 cat >>confdefs.h <<_ACEOF
12169#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12170_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012171
Guido van Rossume97ee181999-12-20 21:27:22 +000012172fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012173done
Guido van Rossume97ee181999-12-20 21:27:22 +000012174
Michael W. Hudson54241132001-12-07 15:38:26 +000012175
Guido van Rossume97ee181999-12-20 21:27:22 +000012176# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12177# loading of modules.
12178
Martin v. Löwis11437992002-04-12 09:54:03 +000012179echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12180echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012181if test -z "$DYNLOADFILE"
12182then
12183 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012184 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12185 if test "$ac_cv_func_dlopen" = yes
12186 then DYNLOADFILE="dynload_shlib.o"
12187 else DYNLOADFILE="dynload_aix.o"
12188 fi
12189 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012190 BeOS*) DYNLOADFILE="dynload_beos.o";;
12191 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012192 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012193 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012194 *)
12195 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12196 # out any dynamic loading
12197 if test "$ac_cv_func_dlopen" = yes
12198 then DYNLOADFILE="dynload_shlib.o"
12199 else DYNLOADFILE="dynload_stub.o"
12200 fi
12201 ;;
12202 esac
12203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012204echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12205echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012206if test "$DYNLOADFILE" != "dynload_stub.o"
12207then
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
12209cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012210#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012211_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012212
12213fi
12214
Neil Schemenauer4e425612001-06-19 15:44:15 +000012215# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12216
Michael W. Hudson54241132001-12-07 15:38:26 +000012217
Martin v. Löwis11437992002-04-12 09:54:03 +000012218echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12219echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012220if test -z "$MACHDEP_OBJS"
12221then
Jack Jansene578a632001-08-15 01:27:14 +000012222 MACHDEP_OBJS=$extra_machdep_objs
12223else
12224 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012226echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12227echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012228
Guido van Rossum627b2d71993-12-24 10:39:16 +000012229# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
Martin v. Löwisd5843682002-11-21 20:41:28 +000012301for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012302 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012303 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012304 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012305 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012306 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012307 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012308 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012309 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012310 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012311 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012312 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012313do
Martin v. Löwis11437992002-04-12 09:54:03 +000012314as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12315echo "$as_me:$LINENO: checking for $ac_func" >&5
12316echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12317if eval "test \"\${$as_ac_var+set}\" = set"; then
12318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012319else
Martin v. Löwis11437992002-04-12 09:54:03 +000012320 cat >conftest.$ac_ext <<_ACEOF
12321#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012322/* confdefs.h. */
12323_ACEOF
12324cat confdefs.h >>conftest.$ac_ext
12325cat >>conftest.$ac_ext <<_ACEOF
12326/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012327/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012328 which can conflict with char $ac_func (); below.
12329 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012330 <limits.h> exists even on freestanding compilers. Under hpux,
12331 including <limits.h> includes <sys/time.h> and causes problems
12332 checking for functions defined therein. */
12333#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012334# include <limits.h>
12335#else
12336# include <assert.h>
12337#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012338/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012339#ifdef __cplusplus
12340extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012341{
Martin v. Löwis11437992002-04-12 09:54:03 +000012342#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012343/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 builtin and then its argument prototype would still apply. */
12345char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012346/* The GNU C library defines this for functions which it implements
12347 to always fail with ENOSYS. Some functions are actually named
12348 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012350choke me
12351#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012352char (*f) () = $ac_func;
12353#endif
12354#ifdef __cplusplus
12355}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012356#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357
Skip Montanaro6dead952003-09-25 14:50:04 +000012358int
12359main ()
12360{
12361return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 ;
12363 return 0;
12364}
12365_ACEOF
12366rm -f conftest.$ac_objext conftest$ac_exeext
12367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12368 (eval $ac_link) 2>&5
12369 ac_status=$?
12370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371 (exit $ac_status); } &&
12372 { ac_try='test -s conftest$ac_exeext'
12373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12374 (eval $ac_try) 2>&5
12375 ac_status=$?
12376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12377 (exit $ac_status); }; }; then
12378 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012379else
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012381sed 's/^/| /' conftest.$ac_ext >&5
12382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012387echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12388echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12389if test `eval echo '${'$as_ac_var'}'` = yes; then
12390 cat >>confdefs.h <<_ACEOF
12391#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12392_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012394fi
12395done
12396
Michael W. Hudson54241132001-12-07 15:38:26 +000012397
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012398# For some functions, having a definition is not sufficient, since
12399# we want to take their address.
12400echo "$as_me:$LINENO: checking for chroot" >&5
12401echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12402cat >conftest.$ac_ext <<_ACEOF
12403#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012404/* confdefs.h. */
12405_ACEOF
12406cat confdefs.h >>conftest.$ac_ext
12407cat >>conftest.$ac_ext <<_ACEOF
12408/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012409#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012410int
12411main ()
12412{
12413void *x=chroot
12414 ;
12415 return 0;
12416}
12417_ACEOF
12418rm -f conftest.$ac_objext
12419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12420 (eval $ac_compile) 2>&5
12421 ac_status=$?
12422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12423 (exit $ac_status); } &&
12424 { ac_try='test -s conftest.$ac_objext'
12425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12426 (eval $ac_try) 2>&5
12427 ac_status=$?
12428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12429 (exit $ac_status); }; }; then
12430
12431cat >>confdefs.h <<\_ACEOF
12432#define HAVE_CHROOT 1
12433_ACEOF
12434
12435 echo "$as_me:$LINENO: result: yes" >&5
12436echo "${ECHO_T}yes" >&6
12437else
12438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012439sed 's/^/| /' conftest.$ac_ext >&5
12440
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012441echo "$as_me:$LINENO: result: no" >&5
12442echo "${ECHO_T}no" >&6
12443
12444fi
12445rm -f conftest.$ac_objext conftest.$ac_ext
12446echo "$as_me:$LINENO: checking for link" >&5
12447echo $ECHO_N "checking for link... $ECHO_C" >&6
12448cat >conftest.$ac_ext <<_ACEOF
12449#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* confdefs.h. */
12451_ACEOF
12452cat confdefs.h >>conftest.$ac_ext
12453cat >>conftest.$ac_ext <<_ACEOF
12454/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012455#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012456int
12457main ()
12458{
12459void *x=link
12460 ;
12461 return 0;
12462}
12463_ACEOF
12464rm -f conftest.$ac_objext
12465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12466 (eval $ac_compile) 2>&5
12467 ac_status=$?
12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469 (exit $ac_status); } &&
12470 { ac_try='test -s conftest.$ac_objext'
12471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12472 (eval $ac_try) 2>&5
12473 ac_status=$?
12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475 (exit $ac_status); }; }; then
12476
12477cat >>confdefs.h <<\_ACEOF
12478#define HAVE_LINK 1
12479_ACEOF
12480
12481 echo "$as_me:$LINENO: result: yes" >&5
12482echo "${ECHO_T}yes" >&6
12483else
12484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012485sed 's/^/| /' conftest.$ac_ext >&5
12486
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012487echo "$as_me:$LINENO: result: no" >&5
12488echo "${ECHO_T}no" >&6
12489
12490fi
12491rm -f conftest.$ac_objext conftest.$ac_ext
12492echo "$as_me:$LINENO: checking for symlink" >&5
12493echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12494cat >conftest.$ac_ext <<_ACEOF
12495#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* confdefs.h. */
12497_ACEOF
12498cat confdefs.h >>conftest.$ac_ext
12499cat >>conftest.$ac_ext <<_ACEOF
12500/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012501#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012502int
12503main ()
12504{
12505void *x=symlink
12506 ;
12507 return 0;
12508}
12509_ACEOF
12510rm -f conftest.$ac_objext
12511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12512 (eval $ac_compile) 2>&5
12513 ac_status=$?
12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12515 (exit $ac_status); } &&
12516 { ac_try='test -s conftest.$ac_objext'
12517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12518 (eval $ac_try) 2>&5
12519 ac_status=$?
12520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521 (exit $ac_status); }; }; then
12522
12523cat >>confdefs.h <<\_ACEOF
12524#define HAVE_SYMLINK 1
12525_ACEOF
12526
12527 echo "$as_me:$LINENO: result: yes" >&5
12528echo "${ECHO_T}yes" >&6
12529else
12530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012531sed 's/^/| /' conftest.$ac_ext >&5
12532
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012533echo "$as_me:$LINENO: result: no" >&5
12534echo "${ECHO_T}no" >&6
12535
12536fi
12537rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012538echo "$as_me:$LINENO: checking for fchdir" >&5
12539echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12540cat >conftest.$ac_ext <<_ACEOF
12541#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* confdefs.h. */
12543_ACEOF
12544cat confdefs.h >>conftest.$ac_ext
12545cat >>conftest.$ac_ext <<_ACEOF
12546/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012547#include <unistd.h>
12548int
12549main ()
12550{
12551void *x=fchdir
12552 ;
12553 return 0;
12554}
12555_ACEOF
12556rm -f conftest.$ac_objext
12557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12558 (eval $ac_compile) 2>&5
12559 ac_status=$?
12560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12561 (exit $ac_status); } &&
12562 { ac_try='test -s conftest.$ac_objext'
12563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12564 (eval $ac_try) 2>&5
12565 ac_status=$?
12566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567 (exit $ac_status); }; }; then
12568
12569cat >>confdefs.h <<\_ACEOF
12570#define HAVE_FCHDIR 1
12571_ACEOF
12572
12573 echo "$as_me:$LINENO: result: yes" >&5
12574echo "${ECHO_T}yes" >&6
12575else
12576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012577sed 's/^/| /' conftest.$ac_ext >&5
12578
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012579echo "$as_me:$LINENO: result: no" >&5
12580echo "${ECHO_T}no" >&6
12581
12582fi
12583rm -f conftest.$ac_objext conftest.$ac_ext
12584echo "$as_me:$LINENO: checking for fsync" >&5
12585echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12586cat >conftest.$ac_ext <<_ACEOF
12587#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012588/* confdefs.h. */
12589_ACEOF
12590cat confdefs.h >>conftest.$ac_ext
12591cat >>conftest.$ac_ext <<_ACEOF
12592/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012593#include <unistd.h>
12594int
12595main ()
12596{
12597void *x=fsync
12598 ;
12599 return 0;
12600}
12601_ACEOF
12602rm -f conftest.$ac_objext
12603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12604 (eval $ac_compile) 2>&5
12605 ac_status=$?
12606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607 (exit $ac_status); } &&
12608 { ac_try='test -s conftest.$ac_objext'
12609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12610 (eval $ac_try) 2>&5
12611 ac_status=$?
12612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613 (exit $ac_status); }; }; then
12614
12615cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012616#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012617_ACEOF
12618
12619 echo "$as_me:$LINENO: result: yes" >&5
12620echo "${ECHO_T}yes" >&6
12621else
12622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012623sed 's/^/| /' conftest.$ac_ext >&5
12624
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012625echo "$as_me:$LINENO: result: no" >&5
12626echo "${ECHO_T}no" >&6
12627
12628fi
12629rm -f conftest.$ac_objext conftest.$ac_ext
12630echo "$as_me:$LINENO: checking for fdatasync" >&5
12631echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12632cat >conftest.$ac_ext <<_ACEOF
12633#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* confdefs.h. */
12635_ACEOF
12636cat confdefs.h >>conftest.$ac_ext
12637cat >>conftest.$ac_ext <<_ACEOF
12638/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012639#include <unistd.h>
12640int
12641main ()
12642{
12643void *x=fdatasync
12644 ;
12645 return 0;
12646}
12647_ACEOF
12648rm -f conftest.$ac_objext
12649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12650 (eval $ac_compile) 2>&5
12651 ac_status=$?
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); } &&
12654 { ac_try='test -s conftest.$ac_objext'
12655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12656 (eval $ac_try) 2>&5
12657 ac_status=$?
12658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659 (exit $ac_status); }; }; then
12660
12661cat >>confdefs.h <<\_ACEOF
12662#define HAVE_FDATASYNC 1
12663_ACEOF
12664
12665 echo "$as_me:$LINENO: result: yes" >&5
12666echo "${ECHO_T}yes" >&6
12667else
12668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012669sed 's/^/| /' conftest.$ac_ext >&5
12670
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012671echo "$as_me:$LINENO: result: no" >&5
12672echo "${ECHO_T}no" >&6
12673
12674fi
12675rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012676
Martin v. Löwisd5843682002-11-21 20:41:28 +000012677# On some systems (eg. FreeBSD 5), we would find a definition of the
12678# functions ctermid_r, setgroups in the library, but no prototype
12679# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12680# address to avoid compiler warnings and potential miscompilations
12681# because of the missing prototypes.
12682
12683echo "$as_me:$LINENO: checking for ctermid_r" >&5
12684echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12685cat >conftest.$ac_ext <<_ACEOF
12686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* confdefs.h. */
12688_ACEOF
12689cat confdefs.h >>conftest.$ac_ext
12690cat >>conftest.$ac_ext <<_ACEOF
12691/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012692
12693#include "confdefs.h"
12694#include <stdio.h>
12695
Martin v. Löwisd5843682002-11-21 20:41:28 +000012696int
12697main ()
12698{
12699void* p = ctermid_r
12700 ;
12701 return 0;
12702}
12703_ACEOF
12704rm -f conftest.$ac_objext
12705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12706 (eval $ac_compile) 2>&5
12707 ac_status=$?
12708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12709 (exit $ac_status); } &&
12710 { ac_try='test -s conftest.$ac_objext'
12711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12712 (eval $ac_try) 2>&5
12713 ac_status=$?
12714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12715 (exit $ac_status); }; }; then
12716
12717cat >>confdefs.h <<\_ACEOF
12718#define HAVE_CTERMID_R 1
12719_ACEOF
12720
12721 echo "$as_me:$LINENO: result: yes" >&5
12722echo "${ECHO_T}yes" >&6
12723else
12724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012725sed 's/^/| /' conftest.$ac_ext >&5
12726
Martin v. Löwisd5843682002-11-21 20:41:28 +000012727echo "$as_me:$LINENO: result: no" >&5
12728echo "${ECHO_T}no" >&6
12729
12730fi
12731rm -f conftest.$ac_objext conftest.$ac_ext
12732
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012733echo "$as_me:$LINENO: checking for flock" >&5
12734echo $ECHO_N "checking for flock... $ECHO_C" >&6
12735cat >conftest.$ac_ext <<_ACEOF
12736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012737/* confdefs.h. */
12738_ACEOF
12739cat confdefs.h >>conftest.$ac_ext
12740cat >>conftest.$ac_ext <<_ACEOF
12741/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012742
12743#include "confdefs.h"
12744#include <sys/file.h>
12745
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012746int
12747main ()
12748{
12749void* p = flock
12750 ;
12751 return 0;
12752}
12753_ACEOF
12754rm -f conftest.$ac_objext
12755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12756 (eval $ac_compile) 2>&5
12757 ac_status=$?
12758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12759 (exit $ac_status); } &&
12760 { ac_try='test -s conftest.$ac_objext'
12761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12762 (eval $ac_try) 2>&5
12763 ac_status=$?
12764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12765 (exit $ac_status); }; }; then
12766
12767cat >>confdefs.h <<\_ACEOF
12768#define HAVE_FLOCK 1
12769_ACEOF
12770
12771 echo "$as_me:$LINENO: result: yes" >&5
12772echo "${ECHO_T}yes" >&6
12773else
12774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012775sed 's/^/| /' conftest.$ac_ext >&5
12776
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012777echo "$as_me:$LINENO: result: no" >&5
12778echo "${ECHO_T}no" >&6
12779
12780fi
12781rm -f conftest.$ac_objext conftest.$ac_ext
12782
12783echo "$as_me:$LINENO: checking for getpagesize" >&5
12784echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12785cat >conftest.$ac_ext <<_ACEOF
12786#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012787/* confdefs.h. */
12788_ACEOF
12789cat confdefs.h >>conftest.$ac_ext
12790cat >>conftest.$ac_ext <<_ACEOF
12791/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012792
12793#include "confdefs.h"
12794#include <unistd.h>
12795
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012796int
12797main ()
12798{
12799void* p = getpagesize
12800 ;
12801 return 0;
12802}
12803_ACEOF
12804rm -f conftest.$ac_objext
12805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12806 (eval $ac_compile) 2>&5
12807 ac_status=$?
12808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12809 (exit $ac_status); } &&
12810 { ac_try='test -s conftest.$ac_objext'
12811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12812 (eval $ac_try) 2>&5
12813 ac_status=$?
12814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12815 (exit $ac_status); }; }; then
12816
12817cat >>confdefs.h <<\_ACEOF
12818#define HAVE_GETPAGESIZE 1
12819_ACEOF
12820
12821 echo "$as_me:$LINENO: result: yes" >&5
12822echo "${ECHO_T}yes" >&6
12823else
12824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012825sed 's/^/| /' conftest.$ac_ext >&5
12826
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012827echo "$as_me:$LINENO: result: no" >&5
12828echo "${ECHO_T}no" >&6
12829
12830fi
12831rm -f conftest.$ac_objext conftest.$ac_ext
12832
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012833for ac_prog in true
12834do
12835 # Extract the first word of "$ac_prog", so it can be a program name with args.
12836set dummy $ac_prog; ac_word=$2
12837echo "$as_me:$LINENO: checking for $ac_word" >&5
12838echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12839if test "${ac_cv_prog_TRUE+set}" = set; then
12840 echo $ECHO_N "(cached) $ECHO_C" >&6
12841else
12842 if test -n "$TRUE"; then
12843 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12844else
12845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12846for as_dir in $PATH
12847do
12848 IFS=$as_save_IFS
12849 test -z "$as_dir" && as_dir=.
12850 for ac_exec_ext in '' $ac_executable_extensions; do
12851 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12852 ac_cv_prog_TRUE="$ac_prog"
12853 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12854 break 2
12855 fi
12856done
12857done
12858
12859fi
12860fi
12861TRUE=$ac_cv_prog_TRUE
12862if test -n "$TRUE"; then
12863 echo "$as_me:$LINENO: result: $TRUE" >&5
12864echo "${ECHO_T}$TRUE" >&6
12865else
12866 echo "$as_me:$LINENO: result: no" >&5
12867echo "${ECHO_T}no" >&6
12868fi
12869
12870 test -n "$TRUE" && break
12871done
12872test -n "$TRUE" || TRUE="/bin/true"
12873
12874
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012875echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12876echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12877if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12878 echo $ECHO_N "(cached) $ECHO_C" >&6
12879else
12880 ac_check_lib_save_LIBS=$LIBS
12881LIBS="-lc $LIBS"
12882cat >conftest.$ac_ext <<_ACEOF
12883#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012884/* confdefs.h. */
12885_ACEOF
12886cat confdefs.h >>conftest.$ac_ext
12887cat >>conftest.$ac_ext <<_ACEOF
12888/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012889
12890/* Override any gcc2 internal prototype to avoid an error. */
12891#ifdef __cplusplus
12892extern "C"
12893#endif
12894/* We use char because int might match the return type of a gcc2
12895 builtin and then its argument prototype would still apply. */
12896char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012897int
12898main ()
12899{
12900inet_aton ();
12901 ;
12902 return 0;
12903}
12904_ACEOF
12905rm -f conftest.$ac_objext conftest$ac_exeext
12906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12907 (eval $ac_link) 2>&5
12908 ac_status=$?
12909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12910 (exit $ac_status); } &&
12911 { ac_try='test -s conftest$ac_exeext'
12912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12913 (eval $ac_try) 2>&5
12914 ac_status=$?
12915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12916 (exit $ac_status); }; }; then
12917 ac_cv_lib_c_inet_aton=yes
12918else
12919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012920sed 's/^/| /' conftest.$ac_ext >&5
12921
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012922ac_cv_lib_c_inet_aton=no
12923fi
12924rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12925LIBS=$ac_check_lib_save_LIBS
12926fi
12927echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12928echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12929if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012930 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012931else
12932
12933echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12934echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12935if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12936 echo $ECHO_N "(cached) $ECHO_C" >&6
12937else
12938 ac_check_lib_save_LIBS=$LIBS
12939LIBS="-lresolv $LIBS"
12940cat >conftest.$ac_ext <<_ACEOF
12941#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012942/* confdefs.h. */
12943_ACEOF
12944cat confdefs.h >>conftest.$ac_ext
12945cat >>conftest.$ac_ext <<_ACEOF
12946/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012947
12948/* Override any gcc2 internal prototype to avoid an error. */
12949#ifdef __cplusplus
12950extern "C"
12951#endif
12952/* We use char because int might match the return type of a gcc2
12953 builtin and then its argument prototype would still apply. */
12954char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012955int
12956main ()
12957{
12958inet_aton ();
12959 ;
12960 return 0;
12961}
12962_ACEOF
12963rm -f conftest.$ac_objext conftest$ac_exeext
12964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12965 (eval $ac_link) 2>&5
12966 ac_status=$?
12967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12968 (exit $ac_status); } &&
12969 { ac_try='test -s conftest$ac_exeext'
12970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12971 (eval $ac_try) 2>&5
12972 ac_status=$?
12973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12974 (exit $ac_status); }; }; then
12975 ac_cv_lib_resolv_inet_aton=yes
12976else
12977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012978sed 's/^/| /' conftest.$ac_ext >&5
12979
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012980ac_cv_lib_resolv_inet_aton=no
12981fi
12982rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12983LIBS=$ac_check_lib_save_LIBS
12984fi
12985echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12986echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12987if test $ac_cv_lib_resolv_inet_aton = yes; then
12988 cat >>confdefs.h <<_ACEOF
12989#define HAVE_LIBRESOLV 1
12990_ACEOF
12991
12992 LIBS="-lresolv $LIBS"
12993
12994fi
12995
12996
12997fi
12998
12999
Martin v. Löwise9416172003-05-03 10:12:45 +000013000echo "$as_me:$LINENO: checking for hstrerror" >&5
13001echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13002cat >conftest.$ac_ext <<_ACEOF
13003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* confdefs.h. */
13005_ACEOF
13006cat confdefs.h >>conftest.$ac_ext
13007cat >>conftest.$ac_ext <<_ACEOF
13008/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013009
13010#include "confdefs.h"
13011#include <netdb.h>
13012
Martin v. Löwise9416172003-05-03 10:12:45 +000013013int
13014main ()
13015{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013016void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013017 ;
13018 return 0;
13019}
13020_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013021rm -f conftest.$ac_objext conftest$ac_exeext
13022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13023 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013024 ac_status=$?
13025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13026 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013027 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13029 (eval $ac_try) 2>&5
13030 ac_status=$?
13031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13032 (exit $ac_status); }; }; then
13033
13034cat >>confdefs.h <<\_ACEOF
13035#define HAVE_HSTRERROR 1
13036_ACEOF
13037
13038 echo "$as_me:$LINENO: result: yes" >&5
13039echo "${ECHO_T}yes" >&6
13040else
13041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013042sed 's/^/| /' conftest.$ac_ext >&5
13043
Martin v. Löwise9416172003-05-03 10:12:45 +000013044echo "$as_me:$LINENO: result: no" >&5
13045echo "${ECHO_T}no" >&6
13046
13047fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013048rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013049
13050echo "$as_me:$LINENO: checking for inet_aton" >&5
13051echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13052cat >conftest.$ac_ext <<_ACEOF
13053#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013054/* confdefs.h. */
13055_ACEOF
13056cat confdefs.h >>conftest.$ac_ext
13057cat >>conftest.$ac_ext <<_ACEOF
13058/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013059
13060#include "confdefs.h"
13061#include <sys/socket.h>
13062#include <netinet/in.h>
13063#include <arpa/inet.h>
13064
Martin v. Löwise9416172003-05-03 10:12:45 +000013065int
13066main ()
13067{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013068void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013069 ;
13070 return 0;
13071}
13072_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013073rm -f conftest.$ac_objext conftest$ac_exeext
13074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13075 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013076 ac_status=$?
13077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13078 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013079 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13081 (eval $ac_try) 2>&5
13082 ac_status=$?
13083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13084 (exit $ac_status); }; }; then
13085
13086cat >>confdefs.h <<\_ACEOF
13087#define HAVE_INET_ATON 1
13088_ACEOF
13089
13090 echo "$as_me:$LINENO: result: yes" >&5
13091echo "${ECHO_T}yes" >&6
13092else
13093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013094sed 's/^/| /' conftest.$ac_ext >&5
13095
Martin v. Löwise9416172003-05-03 10:12:45 +000013096echo "$as_me:$LINENO: result: no" >&5
13097echo "${ECHO_T}no" >&6
13098
13099fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013101
13102echo "$as_me:$LINENO: checking for inet_pton" >&5
13103echo $ECHO_N "checking for inet_pton... $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öwise9416172003-05-03 10:12:45 +000013111
13112#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013113#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013114#include <sys/socket.h>
13115#include <netinet/in.h>
13116#include <arpa/inet.h>
13117
Martin v. Löwise9416172003-05-03 10:12:45 +000013118int
13119main ()
13120{
13121void* p = inet_pton
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_INET_PTON 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öwise9416172003-05-03 10:12:45 +000013149echo "$as_me:$LINENO: result: no" >&5
13150echo "${ECHO_T}no" >&6
13151
13152fi
13153rm -f conftest.$ac_objext conftest.$ac_ext
13154
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013155# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013156echo "$as_me:$LINENO: checking for setgroups" >&5
13157echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13158cat >conftest.$ac_ext <<_ACEOF
13159#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013160/* confdefs.h. */
13161_ACEOF
13162cat confdefs.h >>conftest.$ac_ext
13163cat >>conftest.$ac_ext <<_ACEOF
13164/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013165
13166#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013167#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013168#ifdef HAVE_GRP_H
13169#include <grp.h>
13170#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013171
Martin v. Löwisd5843682002-11-21 20:41:28 +000013172int
13173main ()
13174{
13175void* p = setgroups
13176 ;
13177 return 0;
13178}
13179_ACEOF
13180rm -f conftest.$ac_objext
13181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13182 (eval $ac_compile) 2>&5
13183 ac_status=$?
13184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185 (exit $ac_status); } &&
13186 { ac_try='test -s conftest.$ac_objext'
13187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13188 (eval $ac_try) 2>&5
13189 ac_status=$?
13190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191 (exit $ac_status); }; }; then
13192
13193cat >>confdefs.h <<\_ACEOF
13194#define HAVE_SETGROUPS 1
13195_ACEOF
13196
13197 echo "$as_me:$LINENO: result: yes" >&5
13198echo "${ECHO_T}yes" >&6
13199else
13200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013201sed 's/^/| /' conftest.$ac_ext >&5
13202
Martin v. Löwisd5843682002-11-21 20:41:28 +000013203echo "$as_me:$LINENO: result: no" >&5
13204echo "${ECHO_T}no" >&6
13205
13206fi
13207rm -f conftest.$ac_objext conftest.$ac_ext
13208
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013209# check for openpty and forkpty
13210
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013212for ac_func in openpty
13213do
Martin v. Löwis11437992002-04-12 09:54:03 +000013214as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13215echo "$as_me:$LINENO: checking for $ac_func" >&5
13216echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13217if eval "test \"\${$as_ac_var+set}\" = set"; then
13218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013219else
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 cat >conftest.$ac_ext <<_ACEOF
13221#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013222/* confdefs.h. */
13223_ACEOF
13224cat confdefs.h >>conftest.$ac_ext
13225cat >>conftest.$ac_ext <<_ACEOF
13226/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013227/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013228 which can conflict with char $ac_func (); below.
13229 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013230 <limits.h> exists even on freestanding compilers. Under hpux,
13231 including <limits.h> includes <sys/time.h> and causes problems
13232 checking for functions defined therein. */
13233#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013234# include <limits.h>
13235#else
13236# include <assert.h>
13237#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013238/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013239#ifdef __cplusplus
13240extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013241{
Martin v. Löwis11437992002-04-12 09:54:03 +000013242#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013243/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 builtin and then its argument prototype would still apply. */
13245char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013246/* The GNU C library defines this for functions which it implements
13247 to always fail with ENOSYS. Some functions are actually named
13248 something starting with __ and the normal name is an alias. */
13249#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13250choke me
13251#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013252char (*f) () = $ac_func;
13253#endif
13254#ifdef __cplusplus
13255}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013256#endif
13257
Skip Montanaro6dead952003-09-25 14:50:04 +000013258int
13259main ()
13260{
13261return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 ;
13263 return 0;
13264}
13265_ACEOF
13266rm -f conftest.$ac_objext conftest$ac_exeext
13267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13268 (eval $ac_link) 2>&5
13269 ac_status=$?
13270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13271 (exit $ac_status); } &&
13272 { ac_try='test -s conftest$ac_exeext'
13273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13274 (eval $ac_try) 2>&5
13275 ac_status=$?
13276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13277 (exit $ac_status); }; }; then
13278 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013279else
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013281sed 's/^/| /' conftest.$ac_ext >&5
13282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013287echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13288echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13289if test `eval echo '${'$as_ac_var'}'` = yes; then
13290 cat >>confdefs.h <<_ACEOF
13291#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13292_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013294else
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13296echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13297if test "${ac_cv_lib_util_openpty+set}" = set; then
13298 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013299else
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013301LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013302cat >conftest.$ac_ext <<_ACEOF
13303#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013304/* confdefs.h. */
13305_ACEOF
13306cat confdefs.h >>conftest.$ac_ext
13307cat >>conftest.$ac_ext <<_ACEOF
13308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Fred Drake8cef4cf2000-06-28 16:40:38 +000013310/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013311#ifdef __cplusplus
13312extern "C"
13313#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013314/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 builtin and then its argument prototype would still apply. */
13316char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013317int
13318main ()
13319{
13320openpty ();
13321 ;
13322 return 0;
13323}
13324_ACEOF
13325rm -f conftest.$ac_objext conftest$ac_exeext
13326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13327 (eval $ac_link) 2>&5
13328 ac_status=$?
13329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13330 (exit $ac_status); } &&
13331 { ac_try='test -s conftest$ac_exeext'
13332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13333 (eval $ac_try) 2>&5
13334 ac_status=$?
13335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13336 (exit $ac_status); }; }; then
13337 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013338else
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013340sed 's/^/| /' conftest.$ac_ext >&5
13341
Martin v. Löwis11437992002-04-12 09:54:03 +000013342ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013344rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13345LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013347echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13348echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13349if test $ac_cv_lib_util_openpty = yes; then
13350 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013351#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013352_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013353 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013354fi
13355
13356fi
13357done
13358
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
Fred Drake8cef4cf2000-06-28 16:40:38 +000013360for ac_func in forkpty
13361do
Martin v. Löwis11437992002-04-12 09:54:03 +000013362as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13363echo "$as_me:$LINENO: checking for $ac_func" >&5
13364echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13365if eval "test \"\${$as_ac_var+set}\" = set"; then
13366 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013367else
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 cat >conftest.$ac_ext <<_ACEOF
13369#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013370/* confdefs.h. */
13371_ACEOF
13372cat confdefs.h >>conftest.$ac_ext
13373cat >>conftest.$ac_ext <<_ACEOF
13374/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013375/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013376 which can conflict with char $ac_func (); below.
13377 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013378 <limits.h> exists even on freestanding compilers. Under hpux,
13379 including <limits.h> includes <sys/time.h> and causes problems
13380 checking for functions defined therein. */
13381#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013382# include <limits.h>
13383#else
13384# include <assert.h>
13385#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013386/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013387#ifdef __cplusplus
13388extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013389{
Martin v. Löwis11437992002-04-12 09:54:03 +000013390#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013391/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 builtin and then its argument prototype would still apply. */
13393char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013394/* The GNU C library defines this for functions which it implements
13395 to always fail with ENOSYS. Some functions are actually named
13396 something starting with __ and the normal name is an alias. */
13397#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13398choke me
13399#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013400char (*f) () = $ac_func;
13401#endif
13402#ifdef __cplusplus
13403}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013404#endif
13405
Skip Montanaro6dead952003-09-25 14:50:04 +000013406int
13407main ()
13408{
13409return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ;
13411 return 0;
13412}
13413_ACEOF
13414rm -f conftest.$ac_objext conftest$ac_exeext
13415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13416 (eval $ac_link) 2>&5
13417 ac_status=$?
13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13419 (exit $ac_status); } &&
13420 { ac_try='test -s conftest$ac_exeext'
13421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422 (eval $ac_try) 2>&5
13423 ac_status=$?
13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425 (exit $ac_status); }; }; then
13426 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013427else
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013429sed 's/^/| /' conftest.$ac_ext >&5
13430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013435echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13436echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13437if test `eval echo '${'$as_ac_var'}'` = yes; then
13438 cat >>confdefs.h <<_ACEOF
13439#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13440_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013441
Fred Drake8cef4cf2000-06-28 16:40:38 +000013442else
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13444echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13445if test "${ac_cv_lib_util_forkpty+set}" = set; then
13446 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013447else
Martin v. Löwis11437992002-04-12 09:54:03 +000013448 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013449LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013450cat >conftest.$ac_ext <<_ACEOF
13451#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013452/* confdefs.h. */
13453_ACEOF
13454cat confdefs.h >>conftest.$ac_ext
13455cat >>conftest.$ac_ext <<_ACEOF
13456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
Fred Drake8cef4cf2000-06-28 16:40:38 +000013458/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013459#ifdef __cplusplus
13460extern "C"
13461#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013462/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 builtin and then its argument prototype would still apply. */
13464char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013465int
13466main ()
13467{
13468forkpty ();
13469 ;
13470 return 0;
13471}
13472_ACEOF
13473rm -f conftest.$ac_objext conftest$ac_exeext
13474if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13475 (eval $ac_link) 2>&5
13476 ac_status=$?
13477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13478 (exit $ac_status); } &&
13479 { ac_try='test -s conftest$ac_exeext'
13480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13481 (eval $ac_try) 2>&5
13482 ac_status=$?
13483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13484 (exit $ac_status); }; }; then
13485 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013486else
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013488sed 's/^/| /' conftest.$ac_ext >&5
13489
Martin v. Löwis11437992002-04-12 09:54:03 +000013490ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013491fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13493LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013495echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13496echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13497if test $ac_cv_lib_util_forkpty = yes; then
13498 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013499#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013500_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013501 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013502fi
13503
13504fi
13505done
13506
Jack Jansendd19cf82001-12-06 22:36:17 +000013507
Michael W. Hudson54241132001-12-07 15:38:26 +000013508# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
13510
13511
13512
13513
13514
Fred Drake8cef4cf2000-06-28 16:40:38 +000013515for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13516do
Martin v. Löwis11437992002-04-12 09:54:03 +000013517as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13518echo "$as_me:$LINENO: checking for $ac_func" >&5
13519echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13520if eval "test \"\${$as_ac_var+set}\" = set"; then
13521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013522else
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 cat >conftest.$ac_ext <<_ACEOF
13524#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* confdefs.h. */
13526_ACEOF
13527cat confdefs.h >>conftest.$ac_ext
13528cat >>conftest.$ac_ext <<_ACEOF
13529/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013530/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013531 which can conflict with char $ac_func (); below.
13532 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013533 <limits.h> exists even on freestanding compilers. Under hpux,
13534 including <limits.h> includes <sys/time.h> and causes problems
13535 checking for functions defined therein. */
13536#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013537# include <limits.h>
13538#else
13539# include <assert.h>
13540#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013541/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013542#ifdef __cplusplus
13543extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013544{
Martin v. Löwis11437992002-04-12 09:54:03 +000013545#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013546/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 builtin and then its argument prototype would still apply. */
13548char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013549/* The GNU C library defines this for functions which it implements
13550 to always fail with ENOSYS. Some functions are actually named
13551 something starting with __ and the normal name is an alias. */
13552#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13553choke me
13554#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013555char (*f) () = $ac_func;
13556#endif
13557#ifdef __cplusplus
13558}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013559#endif
13560
Skip Montanaro6dead952003-09-25 14:50:04 +000013561int
13562main ()
13563{
13564return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 ;
13566 return 0;
13567}
13568_ACEOF
13569rm -f conftest.$ac_objext conftest$ac_exeext
13570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13571 (eval $ac_link) 2>&5
13572 ac_status=$?
13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574 (exit $ac_status); } &&
13575 { ac_try='test -s conftest$ac_exeext'
13576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13577 (eval $ac_try) 2>&5
13578 ac_status=$?
13579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13580 (exit $ac_status); }; }; then
13581 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582else
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013584sed 's/^/| /' conftest.$ac_ext >&5
13585
Martin v. Löwis11437992002-04-12 09:54:03 +000013586eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013590echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13591echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13592if test `eval echo '${'$as_ac_var'}'` = yes; then
13593 cat >>confdefs.h <<_ACEOF
13594#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13595_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013598done
13599
Michael W. Hudson54241132001-12-07 15:38:26 +000013600
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
13602
13603
13604
13605
Martin v. Löwis1142de32002-03-29 16:28:31 +000013606for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013607do
Martin v. Löwis11437992002-04-12 09:54:03 +000013608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13609echo "$as_me:$LINENO: checking for $ac_func" >&5
13610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13611if eval "test \"\${$as_ac_var+set}\" = set"; then
13612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613else
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 cat >conftest.$ac_ext <<_ACEOF
13615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013616/* confdefs.h. */
13617_ACEOF
13618cat confdefs.h >>conftest.$ac_ext
13619cat >>conftest.$ac_ext <<_ACEOF
13620/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013621/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013622 which can conflict with char $ac_func (); below.
13623 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013624 <limits.h> exists even on freestanding compilers. Under hpux,
13625 including <limits.h> includes <sys/time.h> and causes problems
13626 checking for functions defined therein. */
13627#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013628# include <limits.h>
13629#else
13630# include <assert.h>
13631#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013632/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013633#ifdef __cplusplus
13634extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013635{
Martin v. Löwis11437992002-04-12 09:54:03 +000013636#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013637/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 builtin and then its argument prototype would still apply. */
13639char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013640/* The GNU C library defines this for functions which it implements
13641 to always fail with ENOSYS. Some functions are actually named
13642 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013644choke me
13645#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013646char (*f) () = $ac_func;
13647#endif
13648#ifdef __cplusplus
13649}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013650#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651
Skip Montanaro6dead952003-09-25 14:50:04 +000013652int
13653main ()
13654{
13655return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 ;
13657 return 0;
13658}
13659_ACEOF
13660rm -f conftest.$ac_objext conftest$ac_exeext
13661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13662 (eval $ac_link) 2>&5
13663 ac_status=$?
13664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13665 (exit $ac_status); } &&
13666 { ac_try='test -s conftest$ac_exeext'
13667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13668 (eval $ac_try) 2>&5
13669 ac_status=$?
13670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671 (exit $ac_status); }; }; then
13672 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013673else
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013675sed 's/^/| /' conftest.$ac_ext >&5
13676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013678fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013680fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013681echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13682echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13683if test `eval echo '${'$as_ac_var'}'` = yes; then
13684 cat >>confdefs.h <<_ACEOF
13685#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13686_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013687
Martin v. Löwis1142de32002-03-29 16:28:31 +000013688else
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013690fi
13691done
13692
13693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
Martin v. Löwis1142de32002-03-29 16:28:31 +000013695for ac_func in getpgrp
13696do
Martin v. Löwis11437992002-04-12 09:54:03 +000013697as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13698echo "$as_me:$LINENO: checking for $ac_func" >&5
13699echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13700if eval "test \"\${$as_ac_var+set}\" = set"; then
13701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013702else
Martin v. Löwis11437992002-04-12 09:54:03 +000013703 cat >conftest.$ac_ext <<_ACEOF
13704#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013705/* confdefs.h. */
13706_ACEOF
13707cat confdefs.h >>conftest.$ac_ext
13708cat >>conftest.$ac_ext <<_ACEOF
13709/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013710/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013711 which can conflict with char $ac_func (); below.
13712 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013713 <limits.h> exists even on freestanding compilers. Under hpux,
13714 including <limits.h> includes <sys/time.h> and causes problems
13715 checking for functions defined therein. */
13716#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013717# include <limits.h>
13718#else
13719# include <assert.h>
13720#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013721/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013722#ifdef __cplusplus
13723extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013724{
Martin v. Löwis11437992002-04-12 09:54:03 +000013725#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013726/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 builtin and then its argument prototype would still apply. */
13728char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013729/* The GNU C library defines this for functions which it implements
13730 to always fail with ENOSYS. Some functions are actually named
13731 something starting with __ and the normal name is an alias. */
13732#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13733choke me
13734#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013735char (*f) () = $ac_func;
13736#endif
13737#ifdef __cplusplus
13738}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013739#endif
13740
Skip Montanaro6dead952003-09-25 14:50:04 +000013741int
13742main ()
13743{
13744return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ;
13746 return 0;
13747}
13748_ACEOF
13749rm -f conftest.$ac_objext conftest$ac_exeext
13750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13751 (eval $ac_link) 2>&5
13752 ac_status=$?
13753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754 (exit $ac_status); } &&
13755 { ac_try='test -s conftest$ac_exeext'
13756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13757 (eval $ac_try) 2>&5
13758 ac_status=$?
13759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13760 (exit $ac_status); }; }; then
13761 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013762else
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013764sed 's/^/| /' conftest.$ac_ext >&5
13765
Martin v. Löwis11437992002-04-12 09:54:03 +000013766eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013768rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013770echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13771echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13772if test `eval echo '${'$as_ac_var'}'` = yes; then
13773 cat >>confdefs.h <<_ACEOF
13774#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13775_ACEOF
13776 cat >conftest.$ac_ext <<_ACEOF
13777#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013778/* confdefs.h. */
13779_ACEOF
13780cat confdefs.h >>conftest.$ac_ext
13781cat >>conftest.$ac_ext <<_ACEOF
13782/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013784int
13785main ()
13786{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 ;
13789 return 0;
13790}
13791_ACEOF
13792rm -f conftest.$ac_objext
13793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13794 (eval $ac_compile) 2>&5
13795 ac_status=$?
13796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797 (exit $ac_status); } &&
13798 { ac_try='test -s conftest.$ac_objext'
13799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13800 (eval $ac_try) 2>&5
13801 ac_status=$?
13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13803 (exit $ac_status); }; }; then
13804
13805cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013806#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013807_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013808
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Guido van Rossumf78abae1997-01-21 22:02:36 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013812sed 's/^/| /' conftest.$ac_ext >&5
13813
Guido van Rossum627b2d71993-12-24 10:39:16 +000013814fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013815rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013816
Guido van Rossum627b2d71993-12-24 10:39:16 +000013817fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013818done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013819
Jack Jansen150753c2003-03-29 22:07:47 +000013820
13821for ac_func in setpgrp
13822do
13823as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13824echo "$as_me:$LINENO: checking for $ac_func" >&5
13825echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13826if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828else
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 cat >conftest.$ac_ext <<_ACEOF
13830#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013831/* confdefs.h. */
13832_ACEOF
13833cat confdefs.h >>conftest.$ac_ext
13834cat >>conftest.$ac_ext <<_ACEOF
13835/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013836/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013837 which can conflict with char $ac_func (); below.
13838 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013839 <limits.h> exists even on freestanding compilers. Under hpux,
13840 including <limits.h> includes <sys/time.h> and causes problems
13841 checking for functions defined therein. */
13842#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013843# include <limits.h>
13844#else
13845# include <assert.h>
13846#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013847/* Override any gcc2 internal prototype to avoid an error. */
13848#ifdef __cplusplus
13849extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013850{
Martin v. Löwis11437992002-04-12 09:54:03 +000013851#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013852/* We use char because int might match the return type of a gcc2
13853 builtin and then its argument prototype would still apply. */
13854char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013855/* The GNU C library defines this for functions which it implements
13856 to always fail with ENOSYS. Some functions are actually named
13857 something starting with __ and the normal name is an alias. */
13858#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13859choke me
13860#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013861char (*f) () = $ac_func;
13862#endif
13863#ifdef __cplusplus
13864}
Jack Jansen150753c2003-03-29 22:07:47 +000013865#endif
13866
Skip Montanaro6dead952003-09-25 14:50:04 +000013867int
13868main ()
13869{
13870return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 ;
13872 return 0;
13873}
13874_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013875rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13877 (eval $ac_link) 2>&5
13878 ac_status=$?
13879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013880 (exit $ac_status); } &&
13881 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13883 (eval $ac_try) 2>&5
13884 ac_status=$?
13885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13886 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013887 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013888else
Jack Jansen150753c2003-03-29 22:07:47 +000013889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013890sed 's/^/| /' conftest.$ac_ext >&5
13891
Jack Jansen150753c2003-03-29 22:07:47 +000013892eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013893fi
Jack Jansen150753c2003-03-29 22:07:47 +000013894rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013895fi
Jack Jansen150753c2003-03-29 22:07:47 +000013896echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13897echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13898if test `eval echo '${'$as_ac_var'}'` = yes; then
13899 cat >>confdefs.h <<_ACEOF
13900#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13901_ACEOF
13902 cat >conftest.$ac_ext <<_ACEOF
13903#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013904/* confdefs.h. */
13905_ACEOF
13906cat confdefs.h >>conftest.$ac_ext
13907cat >>conftest.$ac_ext <<_ACEOF
13908/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013909#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013910int
13911main ()
13912{
13913setpgrp(0,0);
13914 ;
13915 return 0;
13916}
13917_ACEOF
13918rm -f conftest.$ac_objext
13919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13920 (eval $ac_compile) 2>&5
13921 ac_status=$?
13922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923 (exit $ac_status); } &&
13924 { ac_try='test -s conftest.$ac_objext'
13925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13926 (eval $ac_try) 2>&5
13927 ac_status=$?
13928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013930
13931cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013932#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013933_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013934
Jack Jansen150753c2003-03-29 22:07:47 +000013935
13936else
13937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013938sed 's/^/| /' conftest.$ac_ext >&5
13939
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013940fi
Jack Jansen150753c2003-03-29 22:07:47 +000013941rm -f conftest.$ac_objext conftest.$ac_ext
13942
13943fi
13944done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013945
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
Thomas Wouters3a584202000-08-05 23:28:51 +000013947for ac_func in gettimeofday
13948do
Martin v. Löwis11437992002-04-12 09:54:03 +000013949as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13950echo "$as_me:$LINENO: checking for $ac_func" >&5
13951echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13952if eval "test \"\${$as_ac_var+set}\" = set"; then
13953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013954else
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 cat >conftest.$ac_ext <<_ACEOF
13956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013957/* confdefs.h. */
13958_ACEOF
13959cat confdefs.h >>conftest.$ac_ext
13960cat >>conftest.$ac_ext <<_ACEOF
13961/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013962/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013963 which can conflict with char $ac_func (); below.
13964 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013965 <limits.h> exists even on freestanding compilers. Under hpux,
13966 including <limits.h> includes <sys/time.h> and causes problems
13967 checking for functions defined therein. */
13968#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013969# include <limits.h>
13970#else
13971# include <assert.h>
13972#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013973/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013974#ifdef __cplusplus
13975extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013976{
Martin v. Löwis11437992002-04-12 09:54:03 +000013977#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013978/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 builtin and then its argument prototype would still apply. */
13980char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013981/* The GNU C library defines this for functions which it implements
13982 to always fail with ENOSYS. Some functions are actually named
13983 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013984#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013985choke me
13986#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013987char (*f) () = $ac_func;
13988#endif
13989#ifdef __cplusplus
13990}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013991#endif
13992
Skip Montanaro6dead952003-09-25 14:50:04 +000013993int
13994main ()
13995{
13996return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 ;
13998 return 0;
13999}
14000_ACEOF
14001rm -f conftest.$ac_objext conftest$ac_exeext
14002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14003 (eval $ac_link) 2>&5
14004 ac_status=$?
14005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14006 (exit $ac_status); } &&
14007 { ac_try='test -s conftest$ac_exeext'
14008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14009 (eval $ac_try) 2>&5
14010 ac_status=$?
14011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14012 (exit $ac_status); }; }; then
14013 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014014else
Martin v. Löwis11437992002-04-12 09:54:03 +000014015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014016sed 's/^/| /' conftest.$ac_ext >&5
14017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014020rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014022echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14023echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14024if test `eval echo '${'$as_ac_var'}'` = yes; then
14025 cat >>confdefs.h <<_ACEOF
14026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14027_ACEOF
14028 cat >conftest.$ac_ext <<_ACEOF
14029#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* confdefs.h. */
14031_ACEOF
14032cat confdefs.h >>conftest.$ac_ext
14033cat >>conftest.$ac_ext <<_ACEOF
14034/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014035#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014036int
14037main ()
14038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014039gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 ;
14041 return 0;
14042}
14043_ACEOF
14044rm -f conftest.$ac_objext
14045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14046 (eval $ac_compile) 2>&5
14047 ac_status=$?
14048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14049 (exit $ac_status); } &&
14050 { ac_try='test -s conftest.$ac_objext'
14051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14052 (eval $ac_try) 2>&5
14053 ac_status=$?
14054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014056 :
14057else
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014059sed 's/^/| /' conftest.$ac_ext >&5
14060
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
14062cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014063#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014064_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014065
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Guido van Rossum627b2d71993-12-24 10:39:16 +000014067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014068rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014069
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014070fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014071done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014072
Michael W. Hudson54241132001-12-07 15:38:26 +000014073
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014074echo "$as_me:$LINENO: checking for major" >&5
14075echo $ECHO_N "checking for major... $ECHO_C" >&6
14076cat >conftest.$ac_ext <<_ACEOF
14077#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014078/* confdefs.h. */
14079_ACEOF
14080cat confdefs.h >>conftest.$ac_ext
14081cat >>conftest.$ac_ext <<_ACEOF
14082/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014083
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014084#if defined(MAJOR_IN_MKDEV)
14085#include <sys/mkdev.h>
14086#elif defined(MAJOR_IN_SYSMACROS)
14087#include <sys/sysmacros.h>
14088#else
14089#include <sys/types.h>
14090#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014091
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014092int
14093main ()
14094{
14095
14096 makedev(major(0),minor(0));
14097
14098 ;
14099 return 0;
14100}
14101_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014102rm -f conftest.$ac_objext conftest$ac_exeext
14103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14104 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014105 ac_status=$?
14106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14107 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014108 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14110 (eval $ac_try) 2>&5
14111 ac_status=$?
14112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14113 (exit $ac_status); }; }; then
14114
14115
14116cat >>confdefs.h <<\_ACEOF
14117#define HAVE_DEVICE_MACROS 1
14118_ACEOF
14119
14120 echo "$as_me:$LINENO: result: yes" >&5
14121echo "${ECHO_T}yes" >&6
14122
14123else
14124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014125sed 's/^/| /' conftest.$ac_ext >&5
14126
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014127
14128 echo "$as_me:$LINENO: result: no" >&5
14129echo "${ECHO_T}no" >&6
14130
14131fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014132rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014133
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014134# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014135# for [no]getaddrinfo in netdb.h.
14136echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14137echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14138cat >conftest.$ac_ext <<_ACEOF
14139#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014140/* confdefs.h. */
14141_ACEOF
14142cat confdefs.h >>conftest.$ac_ext
14143cat >>conftest.$ac_ext <<_ACEOF
14144/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014145
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014146#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014147#include <sys/socket.h>
14148#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014149#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014150
Martin v. Löwis11437992002-04-12 09:54:03 +000014151int
14152main ()
14153{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014154
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014155getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014156
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 ;
14158 return 0;
14159}
14160_ACEOF
14161rm -f conftest.$ac_objext conftest$ac_exeext
14162if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14163 (eval $ac_link) 2>&5
14164 ac_status=$?
14165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14166 (exit $ac_status); } &&
14167 { ac_try='test -s conftest$ac_exeext'
14168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14169 (eval $ac_try) 2>&5
14170 ac_status=$?
14171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172 (exit $ac_status); }; }; then
14173
14174echo "$as_me:$LINENO: result: yes" >&5
14175echo "${ECHO_T}yes" >&6
14176echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14177echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014178if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 echo "$as_me:$LINENO: result: buggy" >&5
14180echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014181buggygetaddrinfo=yes
14182else
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 cat >conftest.$ac_ext <<_ACEOF
14184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014185/* confdefs.h. */
14186_ACEOF
14187cat confdefs.h >>conftest.$ac_ext
14188cat >>conftest.$ac_ext <<_ACEOF
14189/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014190
14191#include <sys/types.h>
14192#include <netdb.h>
14193#include <string.h>
14194#include <sys/socket.h>
14195#include <netinet/in.h>
14196
14197main()
14198{
14199 int passive, gaierr, inet4 = 0, inet6 = 0;
14200 struct addrinfo hints, *ai, *aitop;
14201 char straddr[INET6_ADDRSTRLEN], strport[16];
14202
14203 for (passive = 0; passive <= 1; passive++) {
14204 memset(&hints, 0, sizeof(hints));
14205 hints.ai_family = AF_UNSPEC;
14206 hints.ai_flags = passive ? AI_PASSIVE : 0;
14207 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000014208 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014209 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14210 (void)gai_strerror(gaierr);
14211 goto bad;
14212 }
14213 for (ai = aitop; ai; ai = ai->ai_next) {
14214 if (ai->ai_addr == NULL ||
14215 ai->ai_addrlen == 0 ||
14216 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14217 straddr, sizeof(straddr), strport, sizeof(strport),
14218 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14219 goto bad;
14220 }
14221 switch (ai->ai_family) {
14222 case AF_INET:
14223 if (strcmp(strport, "54321") != 0) {
14224 goto bad;
14225 }
14226 if (passive) {
14227 if (strcmp(straddr, "0.0.0.0") != 0) {
14228 goto bad;
14229 }
14230 } else {
14231 if (strcmp(straddr, "127.0.0.1") != 0) {
14232 goto bad;
14233 }
14234 }
14235 inet4++;
14236 break;
14237 case AF_INET6:
14238 if (strcmp(strport, "54321") != 0) {
14239 goto bad;
14240 }
14241 if (passive) {
14242 if (strcmp(straddr, "::") != 0) {
14243 goto bad;
14244 }
14245 } else {
14246 if (strcmp(straddr, "::1") != 0) {
14247 goto bad;
14248 }
14249 }
14250 inet6++;
14251 break;
14252 case AF_UNSPEC:
14253 goto bad;
14254 break;
14255 default:
14256 /* another family support? */
14257 break;
14258 }
14259 }
14260 }
14261
14262 if (!(inet4 == 0 || inet4 == 2))
14263 goto bad;
14264 if (!(inet6 == 0 || inet6 == 2))
14265 goto bad;
14266
14267 if (aitop)
14268 freeaddrinfo(aitop);
14269 exit(0);
14270
14271 bad:
14272 if (aitop)
14273 freeaddrinfo(aitop);
14274 exit(1);
14275}
14276
Martin v. Löwis11437992002-04-12 09:54:03 +000014277_ACEOF
14278rm -f conftest$ac_exeext
14279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14280 (eval $ac_link) 2>&5
14281 ac_status=$?
14282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14283 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14285 (eval $ac_try) 2>&5
14286 ac_status=$?
14287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288 (exit $ac_status); }; }; then
14289 echo "$as_me:$LINENO: result: good" >&5
14290echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014291buggygetaddrinfo=no
14292else
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 echo "$as_me: program exited with status $ac_status" >&5
14294echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014295sed 's/^/| /' conftest.$ac_ext >&5
14296
Martin v. Löwis11437992002-04-12 09:54:03 +000014297( exit $ac_status )
14298echo "$as_me:$LINENO: result: buggy" >&5
14299echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014300buggygetaddrinfo=yes
14301fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014302rm -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 +000014303fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014304else
Martin v. Löwis11437992002-04-12 09:54:03 +000014305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014306sed 's/^/| /' conftest.$ac_ext >&5
14307
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309echo "$as_me:$LINENO: result: no" >&5
14310echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014311buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014312
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014314rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014315
14316if test "$buggygetaddrinfo" = "yes"; then
14317 if test "$ipv6" = "yes"; then
14318 echo 'Fatal: You must get working getaddrinfo() function.'
14319 echo ' or you can specify "--disable-ipv6"'.
14320 exit 1
14321 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014322else
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
14324cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014325#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014326_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014327
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014330for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014331do
Martin v. Löwis11437992002-04-12 09:54:03 +000014332as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14333echo "$as_me:$LINENO: checking for $ac_func" >&5
14334echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14335if eval "test \"\${$as_ac_var+set}\" = set"; then
14336 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014337else
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 cat >conftest.$ac_ext <<_ACEOF
14339#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014340/* confdefs.h. */
14341_ACEOF
14342cat confdefs.h >>conftest.$ac_ext
14343cat >>conftest.$ac_ext <<_ACEOF
14344/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014345/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014346 which can conflict with char $ac_func (); below.
14347 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014348 <limits.h> exists even on freestanding compilers. Under hpux,
14349 including <limits.h> includes <sys/time.h> and causes problems
14350 checking for functions defined therein. */
14351#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014352# include <limits.h>
14353#else
14354# include <assert.h>
14355#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014356/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014357#ifdef __cplusplus
14358extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014359{
Martin v. Löwis11437992002-04-12 09:54:03 +000014360#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014361/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 builtin and then its argument prototype would still apply. */
14363char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014364/* The GNU C library defines this for functions which it implements
14365 to always fail with ENOSYS. Some functions are actually named
14366 something starting with __ and the normal name is an alias. */
14367#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14368choke me
14369#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014370char (*f) () = $ac_func;
14371#endif
14372#ifdef __cplusplus
14373}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014374#endif
14375
Skip Montanaro6dead952003-09-25 14:50:04 +000014376int
14377main ()
14378{
14379return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 ;
14381 return 0;
14382}
14383_ACEOF
14384rm -f conftest.$ac_objext conftest$ac_exeext
14385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14386 (eval $ac_link) 2>&5
14387 ac_status=$?
14388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14389 (exit $ac_status); } &&
14390 { ac_try='test -s conftest$ac_exeext'
14391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14392 (eval $ac_try) 2>&5
14393 ac_status=$?
14394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14395 (exit $ac_status); }; }; then
14396 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014397else
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014399sed 's/^/| /' conftest.$ac_ext >&5
14400
Martin v. Löwis11437992002-04-12 09:54:03 +000014401eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014402fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014403rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014404fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014405echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14406echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14407if test `eval echo '${'$as_ac_var'}'` = yes; then
14408 cat >>confdefs.h <<_ACEOF
14409#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14410_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014411
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014412fi
14413done
14414
Michael W. Hudson54241132001-12-07 15:38:26 +000014415
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014416# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014417echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14418echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14419if test "${ac_cv_header_time+set}" = set; then
14420 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014421else
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 cat >conftest.$ac_ext <<_ACEOF
14423#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014424/* confdefs.h. */
14425_ACEOF
14426cat confdefs.h >>conftest.$ac_ext
14427cat >>conftest.$ac_ext <<_ACEOF
14428/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014429#include <sys/types.h>
14430#include <sys/time.h>
14431#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Martin v. Löwis11437992002-04-12 09:54:03 +000014433int
14434main ()
14435{
14436if ((struct tm *) 0)
14437return 0;
14438 ;
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_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014455else
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_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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_header_time" >&5
14464echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014465if test $ac_cv_header_time = yes; 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 TIME_WITH_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 whether struct tm is in sys/time.h or time.h" >&5
14474echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14475if test "${ac_cv_struct_tm+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 <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
Martin v. Löwis11437992002-04-12 09:54:03 +000014488int
14489main ()
14490{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014491struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ;
14493 return 0;
14494}
14495_ACEOF
14496rm -f conftest.$ac_objext
14497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14498 (eval $ac_compile) 2>&5
14499 ac_status=$?
14500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14501 (exit $ac_status); } &&
14502 { ac_try='test -s conftest.$ac_objext'
14503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14504 (eval $ac_try) 2>&5
14505 ac_status=$?
14506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14507 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014508 ac_cv_struct_tm=time.h
14509else
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014511sed 's/^/| /' conftest.$ac_ext >&5
14512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014514fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014515rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014517echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14518echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014519if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014522#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014524
14525fi
14526
Martin v. Löwis11437992002-04-12 09:54:03 +000014527echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14528echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14529if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014531else
Martin v. Löwis11437992002-04-12 09:54:03 +000014532 cat >conftest.$ac_ext <<_ACEOF
14533#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014534/* confdefs.h. */
14535_ACEOF
14536cat confdefs.h >>conftest.$ac_ext
14537cat >>conftest.$ac_ext <<_ACEOF
14538/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014539#include <sys/types.h>
14540#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014541
14542
Martin v. Löwis11437992002-04-12 09:54:03 +000014543int
14544main ()
14545{
14546static struct tm ac_aggr;
14547if (ac_aggr.tm_zone)
14548return 0;
14549 ;
14550 return 0;
14551}
14552_ACEOF
14553rm -f conftest.$ac_objext
14554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14555 (eval $ac_compile) 2>&5
14556 ac_status=$?
14557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14558 (exit $ac_status); } &&
14559 { ac_try='test -s conftest.$ac_objext'
14560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14561 (eval $ac_try) 2>&5
14562 ac_status=$?
14563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14564 (exit $ac_status); }; }; then
14565 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014566else
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014568sed 's/^/| /' conftest.$ac_ext >&5
14569
14570cat >conftest.$ac_ext <<_ACEOF
14571#line $LINENO "configure"
14572/* confdefs.h. */
14573_ACEOF
14574cat confdefs.h >>conftest.$ac_ext
14575cat >>conftest.$ac_ext <<_ACEOF
14576/* end confdefs.h. */
14577#include <sys/types.h>
14578#include <$ac_cv_struct_tm>
14579
14580
14581int
14582main ()
14583{
14584static struct tm ac_aggr;
14585if (sizeof ac_aggr.tm_zone)
14586return 0;
14587 ;
14588 return 0;
14589}
14590_ACEOF
14591rm -f conftest.$ac_objext
14592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14593 (eval $ac_compile) 2>&5
14594 ac_status=$?
14595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14596 (exit $ac_status); } &&
14597 { ac_try='test -s conftest.$ac_objext'
14598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14599 (eval $ac_try) 2>&5
14600 ac_status=$?
14601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602 (exit $ac_status); }; }; then
14603 ac_cv_member_struct_tm_tm_zone=yes
14604else
14605 echo "$as_me: failed program was:" >&5
14606sed 's/^/| /' conftest.$ac_ext >&5
14607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014610rm -f conftest.$ac_objext conftest.$ac_ext
14611fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014612rm -f conftest.$ac_objext conftest.$ac_ext
14613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014614echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14615echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14616if test $ac_cv_member_struct_tm_tm_zone = yes; then
14617
14618cat >>confdefs.h <<_ACEOF
14619#define HAVE_STRUCT_TM_TM_ZONE 1
14620_ACEOF
14621
14622
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014623fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14626
14627cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014628#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014630
14631else
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 echo "$as_me:$LINENO: checking for tzname" >&5
14633echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14634if test "${ac_cv_var_tzname+set}" = set; then
14635 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014636else
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 cat >conftest.$ac_ext <<_ACEOF
14638#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014639/* confdefs.h. */
14640_ACEOF
14641cat confdefs.h >>conftest.$ac_ext
14642cat >>conftest.$ac_ext <<_ACEOF
14643/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014644#include <time.h>
14645#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014646extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
Martin v. Löwis11437992002-04-12 09:54:03 +000014649int
14650main ()
14651{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014652atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 ;
14654 return 0;
14655}
14656_ACEOF
14657rm -f conftest.$ac_objext conftest$ac_exeext
14658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14659 (eval $ac_link) 2>&5
14660 ac_status=$?
14661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662 (exit $ac_status); } &&
14663 { ac_try='test -s conftest$ac_exeext'
14664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14665 (eval $ac_try) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014669 ac_cv_var_tzname=yes
14670else
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014672sed 's/^/| /' conftest.$ac_ext >&5
14673
Martin v. Löwis11437992002-04-12 09:54:03 +000014674ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014676rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014677fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014678echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14679echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014680 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014681
14682cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014683#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014684_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014685
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014686 fi
14687fi
14688
Martin v. Löwis11437992002-04-12 09:54:03 +000014689echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14690echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14691if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14692 echo $ECHO_N "(cached) $ECHO_C" >&6
14693else
14694 cat >conftest.$ac_ext <<_ACEOF
14695#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014696/* confdefs.h. */
14697_ACEOF
14698cat confdefs.h >>conftest.$ac_ext
14699cat >>conftest.$ac_ext <<_ACEOF
14700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014701$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014702int
14703main ()
14704{
14705static struct stat ac_aggr;
14706if (ac_aggr.st_rdev)
14707return 0;
14708 ;
14709 return 0;
14710}
14711_ACEOF
14712rm -f conftest.$ac_objext
14713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14714 (eval $ac_compile) 2>&5
14715 ac_status=$?
14716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717 (exit $ac_status); } &&
14718 { ac_try='test -s conftest.$ac_objext'
14719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14720 (eval $ac_try) 2>&5
14721 ac_status=$?
14722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723 (exit $ac_status); }; }; then
14724 ac_cv_member_struct_stat_st_rdev=yes
14725else
14726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014727sed 's/^/| /' conftest.$ac_ext >&5
14728
14729cat >conftest.$ac_ext <<_ACEOF
14730#line $LINENO "configure"
14731/* confdefs.h. */
14732_ACEOF
14733cat confdefs.h >>conftest.$ac_ext
14734cat >>conftest.$ac_ext <<_ACEOF
14735/* end confdefs.h. */
14736$ac_includes_default
14737int
14738main ()
14739{
14740static struct stat ac_aggr;
14741if (sizeof ac_aggr.st_rdev)
14742return 0;
14743 ;
14744 return 0;
14745}
14746_ACEOF
14747rm -f conftest.$ac_objext
14748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14749 (eval $ac_compile) 2>&5
14750 ac_status=$?
14751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14752 (exit $ac_status); } &&
14753 { ac_try='test -s conftest.$ac_objext'
14754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14755 (eval $ac_try) 2>&5
14756 ac_status=$?
14757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14758 (exit $ac_status); }; }; then
14759 ac_cv_member_struct_stat_st_rdev=yes
14760else
14761 echo "$as_me: failed program was:" >&5
14762sed 's/^/| /' conftest.$ac_ext >&5
14763
Martin v. Löwis11437992002-04-12 09:54:03 +000014764ac_cv_member_struct_stat_st_rdev=no
14765fi
14766rm -f conftest.$ac_objext conftest.$ac_ext
14767fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014768rm -f conftest.$ac_objext conftest.$ac_ext
14769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014770echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14771echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14772if test $ac_cv_member_struct_stat_st_rdev = yes; then
14773
14774cat >>confdefs.h <<_ACEOF
14775#define HAVE_STRUCT_STAT_ST_RDEV 1
14776_ACEOF
14777
14778
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014779fi
14780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14782echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14783if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14784 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014785else
Martin v. Löwis11437992002-04-12 09:54:03 +000014786 cat >conftest.$ac_ext <<_ACEOF
14787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014788/* confdefs.h. */
14789_ACEOF
14790cat confdefs.h >>conftest.$ac_ext
14791cat >>conftest.$ac_ext <<_ACEOF
14792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014794int
14795main ()
14796{
14797static struct stat ac_aggr;
14798if (ac_aggr.st_blksize)
14799return 0;
14800 ;
14801 return 0;
14802}
14803_ACEOF
14804rm -f conftest.$ac_objext
14805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14806 (eval $ac_compile) 2>&5
14807 ac_status=$?
14808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14809 (exit $ac_status); } &&
14810 { ac_try='test -s conftest.$ac_objext'
14811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14812 (eval $ac_try) 2>&5
14813 ac_status=$?
14814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14815 (exit $ac_status); }; }; then
14816 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014817else
Martin v. Löwis11437992002-04-12 09:54:03 +000014818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014819sed 's/^/| /' conftest.$ac_ext >&5
14820
14821cat >conftest.$ac_ext <<_ACEOF
14822#line $LINENO "configure"
14823/* confdefs.h. */
14824_ACEOF
14825cat confdefs.h >>conftest.$ac_ext
14826cat >>conftest.$ac_ext <<_ACEOF
14827/* end confdefs.h. */
14828$ac_includes_default
14829int
14830main ()
14831{
14832static struct stat ac_aggr;
14833if (sizeof ac_aggr.st_blksize)
14834return 0;
14835 ;
14836 return 0;
14837}
14838_ACEOF
14839rm -f conftest.$ac_objext
14840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14841 (eval $ac_compile) 2>&5
14842 ac_status=$?
14843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14844 (exit $ac_status); } &&
14845 { ac_try='test -s conftest.$ac_objext'
14846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14847 (eval $ac_try) 2>&5
14848 ac_status=$?
14849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850 (exit $ac_status); }; }; then
14851 ac_cv_member_struct_stat_st_blksize=yes
14852else
14853 echo "$as_me: failed program was:" >&5
14854sed 's/^/| /' conftest.$ac_ext >&5
14855
Martin v. Löwis11437992002-04-12 09:54:03 +000014856ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014858rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014859fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014860rm -f conftest.$ac_objext conftest.$ac_ext
14861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014862echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14863echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14864if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014865
Martin v. Löwis11437992002-04-12 09:54:03 +000014866cat >>confdefs.h <<_ACEOF
14867#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14868_ACEOF
14869
14870
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014871fi
14872
Martin v. Löwis11437992002-04-12 09:54:03 +000014873echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14874echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14875if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014877else
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 cat >conftest.$ac_ext <<_ACEOF
14879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014880/* confdefs.h. */
14881_ACEOF
14882cat confdefs.h >>conftest.$ac_ext
14883cat >>conftest.$ac_ext <<_ACEOF
14884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014885$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014886int
14887main ()
14888{
14889static struct stat ac_aggr;
14890if (ac_aggr.st_blocks)
14891return 0;
14892 ;
14893 return 0;
14894}
14895_ACEOF
14896rm -f conftest.$ac_objext
14897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14898 (eval $ac_compile) 2>&5
14899 ac_status=$?
14900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14901 (exit $ac_status); } &&
14902 { ac_try='test -s conftest.$ac_objext'
14903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14904 (eval $ac_try) 2>&5
14905 ac_status=$?
14906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14907 (exit $ac_status); }; }; then
14908 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014909else
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014911sed 's/^/| /' conftest.$ac_ext >&5
14912
14913cat >conftest.$ac_ext <<_ACEOF
14914#line $LINENO "configure"
14915/* confdefs.h. */
14916_ACEOF
14917cat confdefs.h >>conftest.$ac_ext
14918cat >>conftest.$ac_ext <<_ACEOF
14919/* end confdefs.h. */
14920$ac_includes_default
14921int
14922main ()
14923{
14924static struct stat ac_aggr;
14925if (sizeof ac_aggr.st_blocks)
14926return 0;
14927 ;
14928 return 0;
14929}
14930_ACEOF
14931rm -f conftest.$ac_objext
14932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14933 (eval $ac_compile) 2>&5
14934 ac_status=$?
14935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14936 (exit $ac_status); } &&
14937 { ac_try='test -s conftest.$ac_objext'
14938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14939 (eval $ac_try) 2>&5
14940 ac_status=$?
14941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14942 (exit $ac_status); }; }; then
14943 ac_cv_member_struct_stat_st_blocks=yes
14944else
14945 echo "$as_me: failed program was:" >&5
14946sed 's/^/| /' conftest.$ac_ext >&5
14947
Martin v. Löwis11437992002-04-12 09:54:03 +000014948ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014950rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014951fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014952rm -f conftest.$ac_objext conftest.$ac_ext
14953fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014954echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14955echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14956if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014957
Martin v. Löwis11437992002-04-12 09:54:03 +000014958cat >>confdefs.h <<_ACEOF
14959#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14960_ACEOF
14961
14962
14963cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014964#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014965_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014966
14967else
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014969fi
14970
Michael W. Hudson54241132001-12-07 15:38:26 +000014971
Martin v. Löwis11437992002-04-12 09:54:03 +000014972
14973echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14974echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14975if test "${ac_cv_header_time_altzone+set}" = set; then
14976 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014977else
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 cat >conftest.$ac_ext <<_ACEOF
14979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014980/* confdefs.h. */
14981_ACEOF
14982cat confdefs.h >>conftest.$ac_ext
14983cat >>conftest.$ac_ext <<_ACEOF
14984/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014985#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014986int
14987main ()
14988{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 ;
14991 return 0;
14992}
14993_ACEOF
14994rm -f conftest.$ac_objext
14995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14996 (eval $ac_compile) 2>&5
14997 ac_status=$?
14998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14999 (exit $ac_status); } &&
15000 { ac_try='test -s conftest.$ac_objext'
15001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15002 (eval $ac_try) 2>&5
15003 ac_status=$?
15004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015006 ac_cv_header_time_altzone=yes
15007else
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015009sed 's/^/| /' conftest.$ac_ext >&5
15010
Martin v. Löwis11437992002-04-12 09:54:03 +000015011ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015013rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015014fi
15015
Martin v. Löwis11437992002-04-12 09:54:03 +000015016echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15017echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015018if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015019
15020cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015021#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015022_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015023
15024fi
15025
Guido van Rossumda88dad1995-01-26 00:46:29 +000015026was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015027echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15028echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15029cat >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. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015036
15037#include <sys/types.h>
15038#include <sys/select.h>
15039#include <sys/time.h>
15040
Martin v. Löwis11437992002-04-12 09:54:03 +000015041int
15042main ()
15043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015044;
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ;
15046 return 0;
15047}
15048_ACEOF
15049rm -f conftest.$ac_objext
15050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15051 (eval $ac_compile) 2>&5
15052 ac_status=$?
15053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15054 (exit $ac_status); } &&
15055 { ac_try='test -s conftest.$ac_objext'
15056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15057 (eval $ac_try) 2>&5
15058 ac_status=$?
15059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060 (exit $ac_status); }; }; then
15061
15062
15063cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015064#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015065_ACEOF
15066
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015067 was_it_defined=yes
15068
Guido van Rossumf78abae1997-01-21 22:02:36 +000015069else
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015071sed 's/^/| /' conftest.$ac_ext >&5
15072
Guido van Rossum7f43da71994-08-01 12:15:30 +000015073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015074rm -f conftest.$ac_objext conftest.$ac_ext
15075echo "$as_me:$LINENO: result: $was_it_defined" >&5
15076echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015077
Martin v. Löwis11437992002-04-12 09:54:03 +000015078echo "$as_me:$LINENO: checking for addrinfo" >&5
15079echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15080if test "${ac_cv_struct_addrinfo+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 <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015092int
15093main ()
15094{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015095struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 ;
15097 return 0;
15098}
15099_ACEOF
15100rm -f conftest.$ac_objext
15101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15102 (eval $ac_compile) 2>&5
15103 ac_status=$?
15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 (exit $ac_status); } &&
15106 { ac_try='test -s conftest.$ac_objext'
15107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15108 (eval $ac_try) 2>&5
15109 ac_status=$?
15110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15111 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015112 ac_cv_struct_addrinfo=yes
15113else
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015115sed 's/^/| /' conftest.$ac_ext >&5
15116
Martin v. Löwis11437992002-04-12 09:54:03 +000015117ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015119rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015120fi
15121
Martin v. Löwis11437992002-04-12 09:54:03 +000015122echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15123echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015124if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015125
15126cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015127#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015128_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015129
15130fi
15131
Martin v. Löwis11437992002-04-12 09:54:03 +000015132echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15133echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15134if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15135 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015136else
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 cat >conftest.$ac_ext <<_ACEOF
15138#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015139/* confdefs.h. */
15140_ACEOF
15141cat confdefs.h >>conftest.$ac_ext
15142cat >>conftest.$ac_ext <<_ACEOF
15143/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015144
15145# include <sys/types.h>
15146# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015147int
15148main ()
15149{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015150struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ;
15152 return 0;
15153}
15154_ACEOF
15155rm -f conftest.$ac_objext
15156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15157 (eval $ac_compile) 2>&5
15158 ac_status=$?
15159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15160 (exit $ac_status); } &&
15161 { ac_try='test -s conftest.$ac_objext'
15162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15163 (eval $ac_try) 2>&5
15164 ac_status=$?
15165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15166 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015167 ac_cv_struct_sockaddr_storage=yes
15168else
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015170sed 's/^/| /' conftest.$ac_ext >&5
15171
Martin v. Löwis11437992002-04-12 09:54:03 +000015172ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015174rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015175fi
15176
Martin v. Löwis11437992002-04-12 09:54:03 +000015177echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15178echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015179if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015180
15181cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015182#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015183_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015184
15185fi
15186
Guido van Rossum627b2d71993-12-24 10:39:16 +000015187# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015188
Michael W. Hudson54241132001-12-07 15:38:26 +000015189
Martin v. Löwis11437992002-04-12 09:54:03 +000015190echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15191echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15192if test "${ac_cv_c_char_unsigned+set}" = set; then
15193 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015194else
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 cat >conftest.$ac_ext <<_ACEOF
15196#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015197/* confdefs.h. */
15198_ACEOF
15199cat confdefs.h >>conftest.$ac_ext
15200cat >>conftest.$ac_ext <<_ACEOF
15201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015202$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015203int
15204main ()
15205{
15206static int test_array [1 - 2 * !(((char) -1) < 0)];
15207test_array [0] = 0
15208
15209 ;
15210 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015211}
Martin v. Löwis11437992002-04-12 09:54:03 +000015212_ACEOF
15213rm -f conftest.$ac_objext
15214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15215 (eval $ac_compile) 2>&5
15216 ac_status=$?
15217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15218 (exit $ac_status); } &&
15219 { ac_try='test -s conftest.$ac_objext'
15220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15221 (eval $ac_try) 2>&5
15222 ac_status=$?
15223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015225 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015226else
15227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015228sed 's/^/| /' conftest.$ac_ext >&5
15229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015232rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015234echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15235echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015238#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015239_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015240
15241fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015242
Martin v. Löwis11437992002-04-12 09:54:03 +000015243echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15244echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15245if test "${ac_cv_c_const+set}" = set; then
15246 echo $ECHO_N "(cached) $ECHO_C" >&6
15247else
15248 cat >conftest.$ac_ext <<_ACEOF
15249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015250/* confdefs.h. */
15251_ACEOF
15252cat confdefs.h >>conftest.$ac_ext
15253cat >>conftest.$ac_ext <<_ACEOF
15254/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015255
Martin v. Löwis11437992002-04-12 09:54:03 +000015256int
15257main ()
15258{
15259/* FIXME: Include the comments suggested by Paul. */
15260#ifndef __cplusplus
15261 /* Ultrix mips cc rejects this. */
15262 typedef int charset[2];
15263 const charset x;
15264 /* SunOS 4.1.1 cc rejects this. */
15265 char const *const *ccp;
15266 char **p;
15267 /* NEC SVR4.0.2 mips cc rejects this. */
15268 struct point {int x, y;};
15269 static struct point const zero = {0,0};
15270 /* AIX XL C 1.02.0.0 rejects this.
15271 It does not let you subtract one const X* pointer from another in
15272 an arm of an if-expression whose if-part is not a constant
15273 expression */
15274 const char *g = "string";
15275 ccp = &g + (g ? g-g : 0);
15276 /* HPUX 7.0 cc rejects these. */
15277 ++ccp;
15278 p = (char**) ccp;
15279 ccp = (char const *const *) p;
15280 { /* SCO 3.2v4 cc rejects this. */
15281 char *t;
15282 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015283
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 *t++ = 0;
15285 }
15286 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15287 int x[] = {25, 17};
15288 const int *foo = &x[0];
15289 ++foo;
15290 }
15291 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15292 typedef const int *iptr;
15293 iptr p = 0;
15294 ++p;
15295 }
15296 { /* AIX XL C 1.02.0.0 rejects this saying
15297 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15298 struct s { int j; const int *ap[3]; };
15299 struct s *b; b->j = 5;
15300 }
15301 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15302 const int foo = 10;
15303 }
15304#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015305
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 ;
15307 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015308}
Martin v. Löwis11437992002-04-12 09:54:03 +000015309_ACEOF
15310rm -f conftest.$ac_objext
15311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15312 (eval $ac_compile) 2>&5
15313 ac_status=$?
15314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15315 (exit $ac_status); } &&
15316 { ac_try='test -s conftest.$ac_objext'
15317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15318 (eval $ac_try) 2>&5
15319 ac_status=$?
15320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15321 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015322 ac_cv_c_const=yes
15323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015325sed 's/^/| /' conftest.$ac_ext >&5
15326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015329rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015331echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15332echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015333if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015334
15335cat >>confdefs.h <<\_ACEOF
15336#define const
15337_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015338
15339fi
15340
Michael W. Hudson54241132001-12-07 15:38:26 +000015341
Guido van Rossumda88dad1995-01-26 00:46:29 +000015342works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015343echo "$as_me:$LINENO: checking for working volatile" >&5
15344echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15345cat >conftest.$ac_ext <<_ACEOF
15346#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015347/* confdefs.h. */
15348_ACEOF
15349cat confdefs.h >>conftest.$ac_ext
15350cat >>conftest.$ac_ext <<_ACEOF
15351/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015352
Martin v. Löwis11437992002-04-12 09:54:03 +000015353int
15354main ()
15355{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015356volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 ;
15358 return 0;
15359}
15360_ACEOF
15361rm -f conftest.$ac_objext
15362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15363 (eval $ac_compile) 2>&5
15364 ac_status=$?
15365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15366 (exit $ac_status); } &&
15367 { ac_try='test -s conftest.$ac_objext'
15368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15369 (eval $ac_try) 2>&5
15370 ac_status=$?
15371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15372 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015373 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015374else
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015376sed 's/^/| /' conftest.$ac_ext >&5
15377
Martin v. Löwis11437992002-04-12 09:54:03 +000015378
15379cat >>confdefs.h <<\_ACEOF
15380#define volatile
15381_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015382
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015383
Guido van Rossum627b2d71993-12-24 10:39:16 +000015384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015385rm -f conftest.$ac_objext conftest.$ac_ext
15386echo "$as_me:$LINENO: result: $works" >&5
15387echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015388
Guido van Rossumda88dad1995-01-26 00:46:29 +000015389works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015390echo "$as_me:$LINENO: checking for working signed char" >&5
15391echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15392cat >conftest.$ac_ext <<_ACEOF
15393#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015394/* confdefs.h. */
15395_ACEOF
15396cat confdefs.h >>conftest.$ac_ext
15397cat >>conftest.$ac_ext <<_ACEOF
15398/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015399
Martin v. Löwis11437992002-04-12 09:54:03 +000015400int
15401main ()
15402{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015403signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ;
15405 return 0;
15406}
15407_ACEOF
15408rm -f conftest.$ac_objext
15409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15410 (eval $ac_compile) 2>&5
15411 ac_status=$?
15412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15413 (exit $ac_status); } &&
15414 { ac_try='test -s conftest.$ac_objext'
15415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15416 (eval $ac_try) 2>&5
15417 ac_status=$?
15418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015420 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000015425
15426cat >>confdefs.h <<\_ACEOF
15427#define signed
15428_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015429
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015430
Guido van Rossum7f43da71994-08-01 12:15:30 +000015431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015432rm -f conftest.$ac_objext conftest.$ac_ext
15433echo "$as_me:$LINENO: result: $works" >&5
15434echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015435
Guido van Rossumda88dad1995-01-26 00:46:29 +000015436have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015437echo "$as_me:$LINENO: checking for prototypes" >&5
15438echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15439cat >conftest.$ac_ext <<_ACEOF
15440#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015441/* confdefs.h. */
15442_ACEOF
15443cat confdefs.h >>conftest.$ac_ext
15444cat >>conftest.$ac_ext <<_ACEOF
15445/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015446int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015447int
15448main ()
15449{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015450return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015451 ;
15452 return 0;
15453}
15454_ACEOF
15455rm -f conftest.$ac_objext
15456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15457 (eval $ac_compile) 2>&5
15458 ac_status=$?
15459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15460 (exit $ac_status); } &&
15461 { ac_try='test -s conftest.$ac_objext'
15462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15463 (eval $ac_try) 2>&5
15464 ac_status=$?
15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466 (exit $ac_status); }; }; then
15467
15468
15469cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015470#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471_ACEOF
15472
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015473 have_prototypes=yes
15474
Guido van Rossumf78abae1997-01-21 22:02:36 +000015475else
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015477sed 's/^/| /' conftest.$ac_ext >&5
15478
Guido van Rossum7f43da71994-08-01 12:15:30 +000015479fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015480rm -f conftest.$ac_objext conftest.$ac_ext
15481echo "$as_me:$LINENO: result: $have_prototypes" >&5
15482echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015483
Guido van Rossumda88dad1995-01-26 00:46:29 +000015484works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015485echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15486echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15487cat >conftest.$ac_ext <<_ACEOF
15488#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015489/* confdefs.h. */
15490_ACEOF
15491cat confdefs.h >>conftest.$ac_ext
15492cat >>conftest.$ac_ext <<_ACEOF
15493/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015494
15495#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015496int foo(int x, ...) {
15497 va_list va;
15498 va_start(va, x);
15499 va_arg(va, int);
15500 va_arg(va, char *);
15501 va_arg(va, double);
15502 return 0;
15503}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015504
Martin v. Löwis11437992002-04-12 09:54:03 +000015505int
15506main ()
15507{
Guido van Rossum90eea071996-08-30 20:58:57 +000015508return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 ;
15510 return 0;
15511}
15512_ACEOF
15513rm -f conftest.$ac_objext
15514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15515 (eval $ac_compile) 2>&5
15516 ac_status=$?
15517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 (exit $ac_status); } &&
15519 { ac_try='test -s conftest.$ac_objext'
15520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521 (eval $ac_try) 2>&5
15522 ac_status=$?
15523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524 (exit $ac_status); }; }; then
15525
15526
15527cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015528#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015529_ACEOF
15530
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015531 works=yes
15532
Guido van Rossumf78abae1997-01-21 22:02:36 +000015533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015535sed 's/^/| /' conftest.$ac_ext >&5
15536
Guido van Rossum627b2d71993-12-24 10:39:16 +000015537fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015538rm -f conftest.$ac_objext conftest.$ac_ext
15539echo "$as_me:$LINENO: result: $works" >&5
15540echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015541
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015542# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015543echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15544echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15545cat >conftest.$ac_ext <<_ACEOF
15546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015547/* confdefs.h. */
15548_ACEOF
15549cat confdefs.h >>conftest.$ac_ext
15550cat >>conftest.$ac_ext <<_ACEOF
15551/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015552#include <sys/types.h>
15553#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015554int
15555main ()
15556{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015557struct sockaddr x;
15558x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015559 ;
15560 return 0;
15561}
15562_ACEOF
15563rm -f conftest.$ac_objext
15564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15565 (eval $ac_compile) 2>&5
15566 ac_status=$?
15567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15568 (exit $ac_status); } &&
15569 { ac_try='test -s conftest.$ac_objext'
15570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15571 (eval $ac_try) 2>&5
15572 ac_status=$?
15573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15574 (exit $ac_status); }; }; then
15575 echo "$as_me:$LINENO: result: yes" >&5
15576echo "${ECHO_T}yes" >&6
15577
15578cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015579#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015580_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015581
15582else
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015584sed 's/^/| /' conftest.$ac_ext >&5
15585
Martin v. Löwis11437992002-04-12 09:54:03 +000015586echo "$as_me:$LINENO: result: no" >&5
15587echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015589rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015590
Guido van Rossumda88dad1995-01-26 00:46:29 +000015591va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015592echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15593echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15594cat >conftest.$ac_ext <<_ACEOF
15595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015596/* confdefs.h. */
15597_ACEOF
15598cat confdefs.h >>conftest.$ac_ext
15599cat >>conftest.$ac_ext <<_ACEOF
15600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015601
15602#ifdef HAVE_STDARG_PROTOTYPES
15603#include <stdarg.h>
15604#else
15605#include <varargs.h>
15606#endif
15607
Martin v. Löwis11437992002-04-12 09:54:03 +000015608int
15609main ()
15610{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015611va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 ;
15613 return 0;
15614}
15615_ACEOF
15616rm -f conftest.$ac_objext
15617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15618 (eval $ac_compile) 2>&5
15619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); } &&
15622 { ac_try='test -s conftest.$ac_objext'
15623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624 (eval $ac_try) 2>&5
15625 ac_status=$?
15626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015628 :
15629else
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015631sed 's/^/| /' conftest.$ac_ext >&5
15632
Martin v. Löwis11437992002-04-12 09:54:03 +000015633
15634
15635cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015636#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015637_ACEOF
15638
Guido van Rossumda88dad1995-01-26 00:46:29 +000015639 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015640
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015642rm -f conftest.$ac_objext conftest.$ac_ext
15643echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15644echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015646# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015647
15648
15649
15650echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15651echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15652if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015654else
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 cat >conftest.$ac_ext <<_ACEOF
15656#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015657/* confdefs.h. */
15658_ACEOF
15659cat confdefs.h >>conftest.$ac_ext
15660cat >>conftest.$ac_ext <<_ACEOF
15661/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015662/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015663 which can conflict with char gethostbyname_r (); below.
15664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015665 <limits.h> exists even on freestanding compilers. Under hpux,
15666 including <limits.h> includes <sys/time.h> and causes problems
15667 checking for functions defined therein. */
15668#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015669# include <limits.h>
15670#else
15671# include <assert.h>
15672#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015673/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015674#ifdef __cplusplus
15675extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015676{
Martin v. Löwis11437992002-04-12 09:54:03 +000015677#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015678/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 builtin and then its argument prototype would still apply. */
15680char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015681/* The GNU C library defines this for functions which it implements
15682 to always fail with ENOSYS. Some functions are actually named
15683 something starting with __ and the normal name is an alias. */
15684#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15685choke me
15686#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015687char (*f) () = gethostbyname_r;
15688#endif
15689#ifdef __cplusplus
15690}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015691#endif
15692
Skip Montanaro6dead952003-09-25 14:50:04 +000015693int
15694main ()
15695{
15696return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015697 ;
15698 return 0;
15699}
15700_ACEOF
15701rm -f conftest.$ac_objext conftest$ac_exeext
15702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15703 (eval $ac_link) 2>&5
15704 ac_status=$?
15705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15706 (exit $ac_status); } &&
15707 { ac_try='test -s conftest$ac_exeext'
15708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15709 (eval $ac_try) 2>&5
15710 ac_status=$?
15711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15712 (exit $ac_status); }; }; then
15713 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015714else
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015716sed 's/^/| /' conftest.$ac_ext >&5
15717
Martin v. Löwis11437992002-04-12 09:54:03 +000015718ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015720rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015722echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15723echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15724if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015725
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015727#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015728_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15731echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015732 OLD_CFLAGS=$CFLAGS
15733 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 cat >conftest.$ac_ext <<_ACEOF
15735#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015736/* confdefs.h. */
15737_ACEOF
15738cat confdefs.h >>conftest.$ac_ext
15739cat >>conftest.$ac_ext <<_ACEOF
15740/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015741
15742# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015743
Martin v. Löwis11437992002-04-12 09:54:03 +000015744int
15745main ()
15746{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015747
15748 char *name;
15749 struct hostent *he, *res;
15750 char buffer[2048];
15751 int buflen = 2048;
15752 int h_errnop;
15753
15754 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015755
15756 ;
15757 return 0;
15758}
15759_ACEOF
15760rm -f conftest.$ac_objext
15761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15762 (eval $ac_compile) 2>&5
15763 ac_status=$?
15764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15765 (exit $ac_status); } &&
15766 { ac_try='test -s conftest.$ac_objext'
15767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15768 (eval $ac_try) 2>&5
15769 ac_status=$?
15770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15771 (exit $ac_status); }; }; then
15772
15773 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015774#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015775_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015776
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015779#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015780_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015781
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 echo "$as_me:$LINENO: result: yes" >&5
15783echo "${ECHO_T}yes" >&6
15784
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015785else
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015787sed 's/^/| /' conftest.$ac_ext >&5
15788
Martin v. Löwis11437992002-04-12 09:54:03 +000015789
15790 echo "$as_me:$LINENO: result: no" >&5
15791echo "${ECHO_T}no" >&6
15792 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15793echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15794 cat >conftest.$ac_ext <<_ACEOF
15795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015796/* confdefs.h. */
15797_ACEOF
15798cat confdefs.h >>conftest.$ac_ext
15799cat >>conftest.$ac_ext <<_ACEOF
15800/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015801
15802# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804int
15805main ()
15806{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015807
15808 char *name;
15809 struct hostent *he;
15810 char buffer[2048];
15811 int buflen = 2048;
15812 int h_errnop;
15813
15814 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015815
15816 ;
15817 return 0;
15818}
15819_ACEOF
15820rm -f conftest.$ac_objext
15821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15822 (eval $ac_compile) 2>&5
15823 ac_status=$?
15824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15825 (exit $ac_status); } &&
15826 { ac_try='test -s conftest.$ac_objext'
15827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15828 (eval $ac_try) 2>&5
15829 ac_status=$?
15830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15831 (exit $ac_status); }; }; then
15832
15833 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015834#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015835_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
15838cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015839#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015840_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015841
Martin v. Löwis11437992002-04-12 09:54:03 +000015842 echo "$as_me:$LINENO: result: yes" >&5
15843echo "${ECHO_T}yes" >&6
15844
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015845else
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015847sed 's/^/| /' conftest.$ac_ext >&5
15848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
15850 echo "$as_me:$LINENO: result: no" >&5
15851echo "${ECHO_T}no" >&6
15852 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15853echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15854 cat >conftest.$ac_ext <<_ACEOF
15855#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015856/* confdefs.h. */
15857_ACEOF
15858cat confdefs.h >>conftest.$ac_ext
15859cat >>conftest.$ac_ext <<_ACEOF
15860/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015861
15862# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864int
15865main ()
15866{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015867
15868 char *name;
15869 struct hostent *he;
15870 struct hostent_data data;
15871
15872 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015873
15874 ;
15875 return 0;
15876}
15877_ACEOF
15878rm -f conftest.$ac_objext
15879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15880 (eval $ac_compile) 2>&5
15881 ac_status=$?
15882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15883 (exit $ac_status); } &&
15884 { ac_try='test -s conftest.$ac_objext'
15885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15886 (eval $ac_try) 2>&5
15887 ac_status=$?
15888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15889 (exit $ac_status); }; }; then
15890
15891 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015892#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015893_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015894
Martin v. Löwis11437992002-04-12 09:54:03 +000015895
15896cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015897#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015898_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015899
Martin v. Löwis11437992002-04-12 09:54:03 +000015900 echo "$as_me:$LINENO: result: yes" >&5
15901echo "${ECHO_T}yes" >&6
15902
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015903else
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015905sed 's/^/| /' conftest.$ac_ext >&5
15906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907
15908 echo "$as_me:$LINENO: result: no" >&5
15909echo "${ECHO_T}no" >&6
15910
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015912rm -f conftest.$ac_objext conftest.$ac_ext
15913
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015915rm -f conftest.$ac_objext conftest.$ac_ext
15916
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015917fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015918rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015919 CFLAGS=$OLD_CFLAGS
15920
15921else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923
15924for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015925do
Martin v. Löwis11437992002-04-12 09:54:03 +000015926as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15927echo "$as_me:$LINENO: checking for $ac_func" >&5
15928echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15929if eval "test \"\${$as_ac_var+set}\" = set"; then
15930 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015931else
Martin v. Löwis11437992002-04-12 09:54:03 +000015932 cat >conftest.$ac_ext <<_ACEOF
15933#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015934/* confdefs.h. */
15935_ACEOF
15936cat confdefs.h >>conftest.$ac_ext
15937cat >>conftest.$ac_ext <<_ACEOF
15938/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015939/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015940 which can conflict with char $ac_func (); below.
15941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015942 <limits.h> exists even on freestanding compilers. Under hpux,
15943 including <limits.h> includes <sys/time.h> and causes problems
15944 checking for functions defined therein. */
15945#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015946# include <limits.h>
15947#else
15948# include <assert.h>
15949#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015950/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015951#ifdef __cplusplus
15952extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015953{
Martin v. Löwis11437992002-04-12 09:54:03 +000015954#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015955/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015956 builtin and then its argument prototype would still apply. */
15957char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015958/* The GNU C library defines this for functions which it implements
15959 to always fail with ENOSYS. Some functions are actually named
15960 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015961#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015962choke me
15963#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015964char (*f) () = $ac_func;
15965#endif
15966#ifdef __cplusplus
15967}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015968#endif
15969
Skip Montanaro6dead952003-09-25 14:50:04 +000015970int
15971main ()
15972{
15973return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015974 ;
15975 return 0;
15976}
15977_ACEOF
15978rm -f conftest.$ac_objext conftest$ac_exeext
15979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15980 (eval $ac_link) 2>&5
15981 ac_status=$?
15982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15983 (exit $ac_status); } &&
15984 { ac_try='test -s conftest$ac_exeext'
15985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15986 (eval $ac_try) 2>&5
15987 ac_status=$?
15988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15989 (exit $ac_status); }; }; then
15990 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015991else
Martin v. Löwis11437992002-04-12 09:54:03 +000015992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015993sed 's/^/| /' conftest.$ac_ext >&5
15994
Martin v. Löwis11437992002-04-12 09:54:03 +000015995eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16000echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16001if test `eval echo '${'$as_ac_var'}'` = yes; then
16002 cat >>confdefs.h <<_ACEOF
16003#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16004_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016005
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016006fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016007done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016008
Michael W. Hudson54241132001-12-07 15:38:26 +000016009
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016010fi
16011
Michael W. Hudson54241132001-12-07 15:38:26 +000016012
16013
16014
16015
16016
16017
Guido van Rossum627b2d71993-12-24 10:39:16 +000016018# checks for system services
16019# (none yet)
16020
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016021# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016022echo "$as_me:$LINENO: checking for __fpu_control" >&5
16023echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16024if test "${ac_cv_func___fpu_control+set}" = set; then
16025 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016026else
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 cat >conftest.$ac_ext <<_ACEOF
16028#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016029/* confdefs.h. */
16030_ACEOF
16031cat confdefs.h >>conftest.$ac_ext
16032cat >>conftest.$ac_ext <<_ACEOF
16033/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016034/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016035 which can conflict with char __fpu_control (); below.
16036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016037 <limits.h> exists even on freestanding compilers. Under hpux,
16038 including <limits.h> includes <sys/time.h> and causes problems
16039 checking for functions defined therein. */
16040#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016041# include <limits.h>
16042#else
16043# include <assert.h>
16044#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016045/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016046#ifdef __cplusplus
16047extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016048{
Martin v. Löwis11437992002-04-12 09:54:03 +000016049#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016050/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 builtin and then its argument prototype would still apply. */
16052char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016053/* The GNU C library defines this for functions which it implements
16054 to always fail with ENOSYS. Some functions are actually named
16055 something starting with __ and the normal name is an alias. */
16056#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16057choke me
16058#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016059char (*f) () = __fpu_control;
16060#endif
16061#ifdef __cplusplus
16062}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016063#endif
16064
Skip Montanaro6dead952003-09-25 14:50:04 +000016065int
16066main ()
16067{
16068return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 ;
16070 return 0;
16071}
16072_ACEOF
16073rm -f conftest.$ac_objext conftest$ac_exeext
16074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16075 (eval $ac_link) 2>&5
16076 ac_status=$?
16077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16078 (exit $ac_status); } &&
16079 { ac_try='test -s conftest$ac_exeext'
16080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16081 (eval $ac_try) 2>&5
16082 ac_status=$?
16083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16084 (exit $ac_status); }; }; then
16085 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016086else
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016088sed 's/^/| /' conftest.$ac_ext >&5
16089
Martin v. Löwis11437992002-04-12 09:54:03 +000016090ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016094echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16095echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16096if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016097 :
16098else
Martin v. Löwis11437992002-04-12 09:54:03 +000016099
16100echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16101echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16102if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016104else
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016106LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016107cat >conftest.$ac_ext <<_ACEOF
16108#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016109/* confdefs.h. */
16110_ACEOF
16111cat confdefs.h >>conftest.$ac_ext
16112cat >>conftest.$ac_ext <<_ACEOF
16113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016115/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016116#ifdef __cplusplus
16117extern "C"
16118#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 builtin and then its argument prototype would still apply. */
16121char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016122int
16123main ()
16124{
16125__fpu_control ();
16126 ;
16127 return 0;
16128}
16129_ACEOF
16130rm -f conftest.$ac_objext conftest$ac_exeext
16131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16132 (eval $ac_link) 2>&5
16133 ac_status=$?
16134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16135 (exit $ac_status); } &&
16136 { ac_try='test -s conftest$ac_exeext'
16137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16138 (eval $ac_try) 2>&5
16139 ac_status=$?
16140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141 (exit $ac_status); }; }; then
16142 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016143else
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016145sed 's/^/| /' conftest.$ac_ext >&5
16146
Martin v. Löwis11437992002-04-12 09:54:03 +000016147ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16150LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016152echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16153echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16154if test $ac_cv_lib_ieee___fpu_control = yes; then
16155 cat >>confdefs.h <<_ACEOF
16156#define HAVE_LIBIEEE 1
16157_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016158
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016159 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016160
Guido van Rossum627b2d71993-12-24 10:39:16 +000016161fi
16162
Michael W. Hudson54241132001-12-07 15:38:26 +000016163
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016164fi
16165
Michael W. Hudson54241132001-12-07 15:38:26 +000016166
Guido van Rossum7f253911997-05-09 02:42:48 +000016167# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016168echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16169echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16170
Guido van Rossum7f253911997-05-09 02:42:48 +000016171# Check whether --with-fpectl or --without-fpectl was given.
16172if test "${with_fpectl+set}" = set; then
16173 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016174
Guido van Rossum7f253911997-05-09 02:42:48 +000016175if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016176then
16177
16178cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016179#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016180_ACEOF
16181
16182 echo "$as_me:$LINENO: result: yes" >&5
16183echo "${ECHO_T}yes" >&6
16184else echo "$as_me:$LINENO: result: no" >&5
16185echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016186fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016187else
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 echo "$as_me:$LINENO: result: no" >&5
16189echo "${ECHO_T}no" >&6
16190fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016191
Guido van Rossum7f43da71994-08-01 12:15:30 +000016192# check for --with-libm=...
16193
Guido van Rossum563e7081996-09-10 18:20:48 +000016194case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016195Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016196BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016197*) LIBM=-lm
16198esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016199echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16200echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16201
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016202# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016203if test "${with_libm+set}" = set; then
16204 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016205
Guido van Rossum7f253911997-05-09 02:42:48 +000016206if test "$withval" = no
16207then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16209echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016210elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016211then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16213echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16214else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16215echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16216 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016217fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016218else
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16220echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16221fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016222
16223# check for --with-libc=...
16224
Martin v. Löwis11437992002-04-12 09:54:03 +000016225echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16226echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16227
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016228# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016229if test "${with_libc+set}" = set; then
16230 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016231
Guido van Rossum7f253911997-05-09 02:42:48 +000016232if test "$withval" = no
16233then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16235echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016236elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016237then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016238 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16239echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16240else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16241echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16242 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016243fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016244else
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16246echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16247fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016248
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016249# check for hypot() in math library
16250LIBS_SAVE=$LIBS
16251LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016252
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016253for ac_func in hypot
16254do
Martin v. Löwis11437992002-04-12 09:54:03 +000016255as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16256echo "$as_me:$LINENO: checking for $ac_func" >&5
16257echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16258if eval "test \"\${$as_ac_var+set}\" = set"; then
16259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016260else
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 cat >conftest.$ac_ext <<_ACEOF
16262#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016263/* confdefs.h. */
16264_ACEOF
16265cat confdefs.h >>conftest.$ac_ext
16266cat >>conftest.$ac_ext <<_ACEOF
16267/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016268/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016269 which can conflict with char $ac_func (); below.
16270 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016271 <limits.h> exists even on freestanding compilers. Under hpux,
16272 including <limits.h> includes <sys/time.h> and causes problems
16273 checking for functions defined therein. */
16274#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016275# include <limits.h>
16276#else
16277# include <assert.h>
16278#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016279/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016280#ifdef __cplusplus
16281extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016282{
Martin v. Löwis11437992002-04-12 09:54:03 +000016283#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016284/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016285 builtin and then its argument prototype would still apply. */
16286char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016287/* The GNU C library defines this for functions which it implements
16288 to always fail with ENOSYS. Some functions are actually named
16289 something starting with __ and the normal name is an alias. */
16290#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16291choke me
16292#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016293char (*f) () = $ac_func;
16294#endif
16295#ifdef __cplusplus
16296}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016297#endif
16298
Skip Montanaro6dead952003-09-25 14:50:04 +000016299int
16300main ()
16301{
16302return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ;
16304 return 0;
16305}
16306_ACEOF
16307rm -f conftest.$ac_objext conftest$ac_exeext
16308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16309 (eval $ac_link) 2>&5
16310 ac_status=$?
16311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16312 (exit $ac_status); } &&
16313 { ac_try='test -s conftest$ac_exeext'
16314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16315 (eval $ac_try) 2>&5
16316 ac_status=$?
16317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16318 (exit $ac_status); }; }; then
16319 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016320else
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016322sed 's/^/| /' conftest.$ac_ext >&5
16323
Martin v. Löwis11437992002-04-12 09:54:03 +000016324eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016326rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016328echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16329echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16330if test `eval echo '${'$as_ac_var'}'` = yes; then
16331 cat >>confdefs.h <<_ACEOF
16332#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16333_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016334
Michael W. Hudson54241132001-12-07 15:38:26 +000016335else
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016337fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016338done
16339
Michael W. Hudson54241132001-12-07 15:38:26 +000016340
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016341LIBS=$LIBS_SAVE
16342
Guido van Rossumef2255b2000-03-10 22:30:29 +000016343# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016344if test "${ac_cv_header_wchar_h+set}" = set; then
16345 echo "$as_me:$LINENO: checking for wchar.h" >&5
16346echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16347if test "${ac_cv_header_wchar_h+set}" = set; then
16348 echo $ECHO_N "(cached) $ECHO_C" >&6
16349fi
16350echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16351echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016352else
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 # Is the header compilable?
16354echo "$as_me:$LINENO: checking wchar.h usability" >&5
16355echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16356cat >conftest.$ac_ext <<_ACEOF
16357#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016358/* confdefs.h. */
16359_ACEOF
16360cat confdefs.h >>conftest.$ac_ext
16361cat >>conftest.$ac_ext <<_ACEOF
16362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016363$ac_includes_default
16364#include <wchar.h>
16365_ACEOF
16366rm -f conftest.$ac_objext
16367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16368 (eval $ac_compile) 2>&5
16369 ac_status=$?
16370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371 (exit $ac_status); } &&
16372 { ac_try='test -s conftest.$ac_objext'
16373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16374 (eval $ac_try) 2>&5
16375 ac_status=$?
16376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16377 (exit $ac_status); }; }; then
16378 ac_header_compiler=yes
16379else
16380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016381sed 's/^/| /' conftest.$ac_ext >&5
16382
Martin v. Löwis11437992002-04-12 09:54:03 +000016383ac_header_compiler=no
16384fi
16385rm -f conftest.$ac_objext conftest.$ac_ext
16386echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16387echo "${ECHO_T}$ac_header_compiler" >&6
16388
16389# Is the header present?
16390echo "$as_me:$LINENO: checking wchar.h presence" >&5
16391echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16392cat >conftest.$ac_ext <<_ACEOF
16393#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016394/* confdefs.h. */
16395_ACEOF
16396cat confdefs.h >>conftest.$ac_ext
16397cat >>conftest.$ac_ext <<_ACEOF
16398/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016399#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016400_ACEOF
16401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16403 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016404 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 rm -f conftest.er1
16406 cat conftest.err >&5
16407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16408 (exit $ac_status); } >/dev/null; then
16409 if test -s conftest.err; then
16410 ac_cpp_err=$ac_c_preproc_warn_flag
16411 else
16412 ac_cpp_err=
16413 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016414else
Martin v. Löwis11437992002-04-12 09:54:03 +000016415 ac_cpp_err=yes
16416fi
16417if test -z "$ac_cpp_err"; then
16418 ac_header_preproc=yes
16419else
16420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016421sed 's/^/| /' conftest.$ac_ext >&5
16422
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016425rm -f conftest.err conftest.$ac_ext
16426echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16427echo "${ECHO_T}$ac_header_preproc" >&6
16428
16429# So? What about this header?
16430case $ac_header_compiler:$ac_header_preproc in
16431 yes:no )
16432 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16433echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16434 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016435echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16436 (
16437 cat <<\_ASBOX
16438## ------------------------------------ ##
16439## Report this to bug-autoconf@gnu.org. ##
16440## ------------------------------------ ##
16441_ASBOX
16442 ) |
16443 sed "s/^/$as_me: WARNING: /" >&2
16444 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 no:yes )
16446 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16447echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16448 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16449echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16450 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016451echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16452 (
16453 cat <<\_ASBOX
16454## ------------------------------------ ##
16455## Report this to bug-autoconf@gnu.org. ##
16456## ------------------------------------ ##
16457_ASBOX
16458 ) |
16459 sed "s/^/$as_me: WARNING: /" >&2
16460 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016461esac
16462echo "$as_me:$LINENO: checking for wchar.h" >&5
16463echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16464if test "${ac_cv_header_wchar_h+set}" = set; then
16465 echo $ECHO_N "(cached) $ECHO_C" >&6
16466else
16467 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016469echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16470echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16471
16472fi
16473if test $ac_cv_header_wchar_h = yes; then
16474
16475
16476cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016477#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016478_ACEOF
16479
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016480 wchar_h="yes"
16481
Guido van Rossumef2255b2000-03-10 22:30:29 +000016482else
Martin v. Löwis11437992002-04-12 09:54:03 +000016483 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016484
16485fi
16486
Michael W. Hudson54241132001-12-07 15:38:26 +000016487
Martin v. Löwis11437992002-04-12 09:54:03 +000016488
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016489# determine wchar_t size
16490if test "$wchar_h" = yes
16491then
Martin v. Löwis11437992002-04-12 09:54:03 +000016492 echo "$as_me:$LINENO: checking for wchar_t" >&5
16493echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16494if test "${ac_cv_type_wchar_t+set}" = set; then
16495 echo $ECHO_N "(cached) $ECHO_C" >&6
16496else
16497 cat >conftest.$ac_ext <<_ACEOF
16498#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016499/* confdefs.h. */
16500_ACEOF
16501cat confdefs.h >>conftest.$ac_ext
16502cat >>conftest.$ac_ext <<_ACEOF
16503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016504#include <wchar.h>
16505
Martin v. Löwis11437992002-04-12 09:54:03 +000016506int
16507main ()
16508{
16509if ((wchar_t *) 0)
16510 return 0;
16511if (sizeof (wchar_t))
16512 return 0;
16513 ;
16514 return 0;
16515}
16516_ACEOF
16517rm -f conftest.$ac_objext
16518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16519 (eval $ac_compile) 2>&5
16520 ac_status=$?
16521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16522 (exit $ac_status); } &&
16523 { ac_try='test -s conftest.$ac_objext'
16524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16525 (eval $ac_try) 2>&5
16526 ac_status=$?
16527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16528 (exit $ac_status); }; }; then
16529 ac_cv_type_wchar_t=yes
16530else
16531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016532sed 's/^/| /' conftest.$ac_ext >&5
16533
Martin v. Löwis11437992002-04-12 09:54:03 +000016534ac_cv_type_wchar_t=no
16535fi
16536rm -f conftest.$ac_objext conftest.$ac_ext
16537fi
16538echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16539echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16540
16541echo "$as_me:$LINENO: checking size of wchar_t" >&5
16542echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16543if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16544 echo $ECHO_N "(cached) $ECHO_C" >&6
16545else
16546 if test "$ac_cv_type_wchar_t" = yes; then
16547 # The cast to unsigned long works around a bug in the HP C Compiler
16548 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16549 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16550 # This bug is HP SR number 8606223364.
16551 if test "$cross_compiling" = yes; then
16552 # Depending upon the size, compute the lo and hi bounds.
16553cat >conftest.$ac_ext <<_ACEOF
16554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016555/* confdefs.h. */
16556_ACEOF
16557cat confdefs.h >>conftest.$ac_ext
16558cat >>conftest.$ac_ext <<_ACEOF
16559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016560#include <wchar.h>
16561
Martin v. Löwis11437992002-04-12 09:54:03 +000016562int
16563main ()
16564{
16565static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16566test_array [0] = 0
16567
16568 ;
16569 return 0;
16570}
16571_ACEOF
16572rm -f conftest.$ac_objext
16573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16574 (eval $ac_compile) 2>&5
16575 ac_status=$?
16576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16577 (exit $ac_status); } &&
16578 { ac_try='test -s conftest.$ac_objext'
16579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16580 (eval $ac_try) 2>&5
16581 ac_status=$?
16582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16583 (exit $ac_status); }; }; then
16584 ac_lo=0 ac_mid=0
16585 while :; do
16586 cat >conftest.$ac_ext <<_ACEOF
16587#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016588/* confdefs.h. */
16589_ACEOF
16590cat confdefs.h >>conftest.$ac_ext
16591cat >>conftest.$ac_ext <<_ACEOF
16592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016593#include <wchar.h>
16594
Martin v. Löwis11437992002-04-12 09:54:03 +000016595int
16596main ()
16597{
16598static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16599test_array [0] = 0
16600
16601 ;
16602 return 0;
16603}
16604_ACEOF
16605rm -f conftest.$ac_objext
16606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16607 (eval $ac_compile) 2>&5
16608 ac_status=$?
16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610 (exit $ac_status); } &&
16611 { ac_try='test -s conftest.$ac_objext'
16612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16613 (eval $ac_try) 2>&5
16614 ac_status=$?
16615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16616 (exit $ac_status); }; }; then
16617 ac_hi=$ac_mid; break
16618else
16619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016620sed 's/^/| /' conftest.$ac_ext >&5
16621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622ac_lo=`expr $ac_mid + 1`
16623 if test $ac_lo -le $ac_mid; then
16624 ac_lo= ac_hi=
16625 break
16626 fi
16627 ac_mid=`expr 2 '*' $ac_mid + 1`
16628fi
16629rm -f conftest.$ac_objext conftest.$ac_ext
16630 done
16631else
16632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016633sed 's/^/| /' conftest.$ac_ext >&5
16634
Martin v. Löwis11437992002-04-12 09:54:03 +000016635cat >conftest.$ac_ext <<_ACEOF
16636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016637/* confdefs.h. */
16638_ACEOF
16639cat confdefs.h >>conftest.$ac_ext
16640cat >>conftest.$ac_ext <<_ACEOF
16641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016642#include <wchar.h>
16643
Martin v. Löwis11437992002-04-12 09:54:03 +000016644int
16645main ()
16646{
16647static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16648test_array [0] = 0
16649
16650 ;
16651 return 0;
16652}
16653_ACEOF
16654rm -f conftest.$ac_objext
16655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16656 (eval $ac_compile) 2>&5
16657 ac_status=$?
16658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16659 (exit $ac_status); } &&
16660 { ac_try='test -s conftest.$ac_objext'
16661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16662 (eval $ac_try) 2>&5
16663 ac_status=$?
16664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16665 (exit $ac_status); }; }; then
16666 ac_hi=-1 ac_mid=-1
16667 while :; do
16668 cat >conftest.$ac_ext <<_ACEOF
16669#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016670/* confdefs.h. */
16671_ACEOF
16672cat confdefs.h >>conftest.$ac_ext
16673cat >>conftest.$ac_ext <<_ACEOF
16674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016675#include <wchar.h>
16676
Martin v. Löwis11437992002-04-12 09:54:03 +000016677int
16678main ()
16679{
16680static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16681test_array [0] = 0
16682
16683 ;
16684 return 0;
16685}
16686_ACEOF
16687rm -f conftest.$ac_objext
16688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16689 (eval $ac_compile) 2>&5
16690 ac_status=$?
16691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16692 (exit $ac_status); } &&
16693 { ac_try='test -s conftest.$ac_objext'
16694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16695 (eval $ac_try) 2>&5
16696 ac_status=$?
16697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698 (exit $ac_status); }; }; then
16699 ac_lo=$ac_mid; break
16700else
16701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016702sed 's/^/| /' conftest.$ac_ext >&5
16703
Martin v. Löwis11437992002-04-12 09:54:03 +000016704ac_hi=`expr '(' $ac_mid ')' - 1`
16705 if test $ac_mid -le $ac_hi; then
16706 ac_lo= ac_hi=
16707 break
16708 fi
16709 ac_mid=`expr 2 '*' $ac_mid`
16710fi
16711rm -f conftest.$ac_objext conftest.$ac_ext
16712 done
16713else
16714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016715sed 's/^/| /' conftest.$ac_ext >&5
16716
Martin v. Löwis11437992002-04-12 09:54:03 +000016717ac_lo= ac_hi=
16718fi
16719rm -f conftest.$ac_objext conftest.$ac_ext
16720fi
16721rm -f conftest.$ac_objext conftest.$ac_ext
16722# Binary search between lo and hi bounds.
16723while test "x$ac_lo" != "x$ac_hi"; do
16724 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16725 cat >conftest.$ac_ext <<_ACEOF
16726#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016727/* confdefs.h. */
16728_ACEOF
16729cat confdefs.h >>conftest.$ac_ext
16730cat >>conftest.$ac_ext <<_ACEOF
16731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016732#include <wchar.h>
16733
Martin v. Löwis11437992002-04-12 09:54:03 +000016734int
16735main ()
16736{
16737static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16738test_array [0] = 0
16739
16740 ;
16741 return 0;
16742}
16743_ACEOF
16744rm -f conftest.$ac_objext
16745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16746 (eval $ac_compile) 2>&5
16747 ac_status=$?
16748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16749 (exit $ac_status); } &&
16750 { ac_try='test -s conftest.$ac_objext'
16751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16752 (eval $ac_try) 2>&5
16753 ac_status=$?
16754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16755 (exit $ac_status); }; }; then
16756 ac_hi=$ac_mid
16757else
16758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016759sed 's/^/| /' conftest.$ac_ext >&5
16760
Martin v. Löwis11437992002-04-12 09:54:03 +000016761ac_lo=`expr '(' $ac_mid ')' + 1`
16762fi
16763rm -f conftest.$ac_objext conftest.$ac_ext
16764done
16765case $ac_lo in
16766?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016767'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16768See \`config.log' for more details." >&5
16769echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16770See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016771 { (exit 1); exit 1; }; } ;;
16772esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016773else
16774 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016775 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16776See \`config.log' for more details." >&5
16777echo "$as_me: error: cannot run test program while cross compiling
16778See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016779 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016780else
Martin v. Löwis11437992002-04-12 09:54:03 +000016781 cat >conftest.$ac_ext <<_ACEOF
16782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016783/* confdefs.h. */
16784_ACEOF
16785cat confdefs.h >>conftest.$ac_ext
16786cat >>conftest.$ac_ext <<_ACEOF
16787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016788#include <wchar.h>
16789
16790long longval () { return (long) (sizeof (wchar_t)); }
16791unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016792#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016793#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016794int
16795main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016796{
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
16798 FILE *f = fopen ("conftest.val", "w");
16799 if (! f)
16800 exit (1);
16801 if (((long) (sizeof (wchar_t))) < 0)
16802 {
16803 long i = longval ();
16804 if (i != ((long) (sizeof (wchar_t))))
16805 exit (1);
16806 fprintf (f, "%ld\n", i);
16807 }
16808 else
16809 {
16810 unsigned long i = ulongval ();
16811 if (i != ((long) (sizeof (wchar_t))))
16812 exit (1);
16813 fprintf (f, "%lu\n", i);
16814 }
16815 exit (ferror (f) || fclose (f) != 0);
16816
16817 ;
16818 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016819}
Martin v. Löwis11437992002-04-12 09:54:03 +000016820_ACEOF
16821rm -f conftest$ac_exeext
16822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16823 (eval $ac_link) 2>&5
16824 ac_status=$?
16825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16828 (eval $ac_try) 2>&5
16829 ac_status=$?
16830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831 (exit $ac_status); }; }; then
16832 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016833else
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 echo "$as_me: program exited with status $ac_status" >&5
16835echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016836sed 's/^/| /' conftest.$ac_ext >&5
16837
Martin v. Löwis11437992002-04-12 09:54:03 +000016838( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016839{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16840See \`config.log' for more details." >&5
16841echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16842See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 { (exit 1); exit 1; }; }
16844fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016845rm -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 +000016846fi
16847fi
16848rm -f conftest.val
16849else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016850 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016851fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016853echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16854echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16855cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016856#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016857_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016858
Michael W. Hudson54241132001-12-07 15:38:26 +000016859
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016860fi
16861
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016862echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16863echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16864have_ucs4_tcl=no
16865cat >conftest.$ac_ext <<_ACEOF
16866#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016867/* confdefs.h. */
16868_ACEOF
16869cat confdefs.h >>conftest.$ac_ext
16870cat >>conftest.$ac_ext <<_ACEOF
16871/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016872
16873#include <tcl.h>
16874#if TCL_UTF_MAX != 6
16875# error "NOT UCS4_TCL"
16876#endif
16877int
16878main ()
16879{
16880
16881 ;
16882 return 0;
16883}
16884_ACEOF
16885rm -f conftest.$ac_objext
16886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16887 (eval $ac_compile) 2>&5
16888 ac_status=$?
16889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16890 (exit $ac_status); } &&
16891 { ac_try='test -s conftest.$ac_objext'
16892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16893 (eval $ac_try) 2>&5
16894 ac_status=$?
16895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16896 (exit $ac_status); }; }; then
16897
16898
16899cat >>confdefs.h <<\_ACEOF
16900#define HAVE_UCS4_TCL 1
16901_ACEOF
16902
16903 have_ucs4_tcl=yes
16904
16905else
16906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016907sed 's/^/| /' conftest.$ac_ext >&5
16908
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016909fi
16910rm -f conftest.$ac_objext conftest.$ac_ext
16911echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16912echo "${ECHO_T}$have_ucs4_tcl" >&6
16913
Skip Montanaro6dead952003-09-25 14:50:04 +000016914# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016915if test "$wchar_h" = yes
16916then
16917 # check whether wchar_t is signed or not
16918 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16919echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16920 if test "${ac_cv_wchar_t_signed+set}" = set; then
16921 echo $ECHO_N "(cached) $ECHO_C" >&6
16922else
16923
16924 if test "$cross_compiling" = yes; then
16925 ac_cv_wchar_t_signed=yes
16926else
16927 cat >conftest.$ac_ext <<_ACEOF
16928#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016929/* confdefs.h. */
16930_ACEOF
16931cat confdefs.h >>conftest.$ac_ext
16932cat >>conftest.$ac_ext <<_ACEOF
16933/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016934
16935 #include <wchar.h>
16936 int main()
16937 {
16938 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16939 }
16940
16941_ACEOF
16942rm -f conftest$ac_exeext
16943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16944 (eval $ac_link) 2>&5
16945 ac_status=$?
16946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16949 (eval $ac_try) 2>&5
16950 ac_status=$?
16951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16952 (exit $ac_status); }; }; then
16953 ac_cv_wchar_t_signed=yes
16954else
16955 echo "$as_me: program exited with status $ac_status" >&5
16956echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016957sed 's/^/| /' conftest.$ac_ext >&5
16958
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016959( exit $ac_status )
16960ac_cv_wchar_t_signed=no
16961fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016962rm -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 +000016963fi
16964fi
16965
16966 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16967echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16968fi
16969
Martin v. Löwis11437992002-04-12 09:54:03 +000016970echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16971echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016972# Check whether --enable-unicode or --disable-unicode was given.
16973if test "${enable_unicode+set}" = set; then
16974 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016975
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016976else
16977 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016978fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016979
16980if test $enable_unicode = yes
16981then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016982 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016983 case "$have_ucs4_tcl" in
16984 yes) enable_unicode="ucs4"
16985 ;;
16986 *) enable_unicode="ucs2"
16987 ;;
16988 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016989fi
16990
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016991
16992
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016993case "$enable_unicode" in
16994ucs2) unicode_size="2"
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_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016997_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016998
16999 ;;
17000ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017001 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017002#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017003_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017004
17005 ;;
17006esac
17007
Michael W. Hudson54241132001-12-07 15:38:26 +000017008
Martin v. Löwis11437992002-04-12 09:54:03 +000017009
17010
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017011
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017012if test "$enable_unicode" = "no"
17013then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017014 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017015 echo "$as_me:$LINENO: result: not used" >&5
17016echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017017else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017018 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017019
17020cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017021#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017022_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017023
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017024
17025 # wchar_t is only usable if it maps to an unsigned type
17026 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17027 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017028 then
17029 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017030
Martin v. Löwis11437992002-04-12 09:54:03 +000017031cat >>confdefs.h <<\_ACEOF
17032#define HAVE_USABLE_WCHAR_T 1
17033_ACEOF
17034
17035 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017036#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017037_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017038
17039 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17040 then
17041 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017042 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017043#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017044_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017045
17046 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17047 then
17048 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017049 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017050#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017051_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017052
17053 else
17054 PY_UNICODE_TYPE="no type found"
17055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017056 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17057echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017058fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017059
17060# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017061echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17062echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17063if test "${ac_cv_c_bigendian+set}" = set; then
17064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017065else
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 # See if sys/param.h defines the BYTE_ORDER macro.
17067cat >conftest.$ac_ext <<_ACEOF
17068#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017069/* confdefs.h. */
17070_ACEOF
17071cat confdefs.h >>conftest.$ac_ext
17072cat >>conftest.$ac_ext <<_ACEOF
17073/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017074#include <sys/types.h>
17075#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017076
Martin v. Löwis11437992002-04-12 09:54:03 +000017077int
17078main ()
17079{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017080#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17081 bogus endian macros
17082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017083
17084 ;
17085 return 0;
17086}
17087_ACEOF
17088rm -f conftest.$ac_objext
17089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17090 (eval $ac_compile) 2>&5
17091 ac_status=$?
17092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17093 (exit $ac_status); } &&
17094 { ac_try='test -s conftest.$ac_objext'
17095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17096 (eval $ac_try) 2>&5
17097 ac_status=$?
17098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17099 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017100 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017101cat >conftest.$ac_ext <<_ACEOF
17102#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017103/* confdefs.h. */
17104_ACEOF
17105cat confdefs.h >>conftest.$ac_ext
17106cat >>conftest.$ac_ext <<_ACEOF
17107/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017108#include <sys/types.h>
17109#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017110
Martin v. Löwis11437992002-04-12 09:54:03 +000017111int
17112main ()
17113{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017114#if BYTE_ORDER != BIG_ENDIAN
17115 not big endian
17116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017117
17118 ;
17119 return 0;
17120}
17121_ACEOF
17122rm -f conftest.$ac_objext
17123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17124 (eval $ac_compile) 2>&5
17125 ac_status=$?
17126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17127 (exit $ac_status); } &&
17128 { ac_try='test -s conftest.$ac_objext'
17129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17130 (eval $ac_try) 2>&5
17131 ac_status=$?
17132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17133 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017134 ac_cv_c_bigendian=yes
17135else
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017137sed 's/^/| /' conftest.$ac_ext >&5
17138
Martin v. Löwis11437992002-04-12 09:54:03 +000017139ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017141rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017142else
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017144sed 's/^/| /' conftest.$ac_ext >&5
17145
Martin v. Löwis11437992002-04-12 09:54:03 +000017146# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017147if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017148 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 ac_cv_c_bigendian=unknown
17150 cat >conftest.$ac_ext <<_ACEOF
17151#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017152/* confdefs.h. */
17153_ACEOF
17154cat confdefs.h >>conftest.$ac_ext
17155cat >>conftest.$ac_ext <<_ACEOF
17156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017157short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17158short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17159void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17160short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17161short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17162void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017163int
17164main ()
17165{
17166 _ascii (); _ebcdic ();
17167 ;
17168 return 0;
17169}
17170_ACEOF
17171rm -f conftest.$ac_objext
17172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17173 (eval $ac_compile) 2>&5
17174 ac_status=$?
17175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176 (exit $ac_status); } &&
17177 { ac_try='test -s conftest.$ac_objext'
17178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17179 (eval $ac_try) 2>&5
17180 ac_status=$?
17181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17182 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017183 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 ac_cv_c_bigendian=yes
17185fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017186if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017187 if test "$ac_cv_c_bigendian" = unknown; then
17188 ac_cv_c_bigendian=no
17189 else
17190 # finding both strings is unlikely to happen, but who knows?
17191 ac_cv_c_bigendian=unknown
17192 fi
17193fi
17194else
17195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017196sed 's/^/| /' conftest.$ac_ext >&5
17197
Martin v. Löwis11437992002-04-12 09:54:03 +000017198fi
17199rm -f conftest.$ac_objext conftest.$ac_ext
17200else
17201 cat >conftest.$ac_ext <<_ACEOF
17202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017203/* confdefs.h. */
17204_ACEOF
17205cat confdefs.h >>conftest.$ac_ext
17206cat >>conftest.$ac_ext <<_ACEOF
17207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017208int
17209main ()
17210{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017211 /* Are we little or big endian? From Harbison&Steele. */
17212 union
17213 {
17214 long l;
17215 char c[sizeof (long)];
17216 } u;
17217 u.l = 1;
17218 exit (u.c[sizeof (long) - 1] == 1);
17219}
Martin v. Löwis11437992002-04-12 09:54:03 +000017220_ACEOF
17221rm -f conftest$ac_exeext
17222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17223 (eval $ac_link) 2>&5
17224 ac_status=$?
17225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17228 (eval $ac_try) 2>&5
17229 ac_status=$?
17230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17231 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017232 ac_cv_c_bigendian=no
17233else
Martin v. Löwis11437992002-04-12 09:54:03 +000017234 echo "$as_me: program exited with status $ac_status" >&5
17235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017236sed 's/^/| /' conftest.$ac_ext >&5
17237
Martin v. Löwis11437992002-04-12 09:54:03 +000017238( exit $ac_status )
17239ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017240fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017241rm -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 +000017242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017243fi
17244rm -f conftest.$ac_objext conftest.$ac_ext
17245fi
17246echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17247echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17248case $ac_cv_c_bigendian in
17249 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017250
Martin v. Löwis11437992002-04-12 09:54:03 +000017251cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017252#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017253_ACEOF
17254 ;;
17255 no)
17256 ;;
17257 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017258 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017259presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017260echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017261presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17262 { (exit 1); exit 1; }; } ;;
17263esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017264
Michael W. Hudson54241132001-12-07 15:38:26 +000017265
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017266# Check whether right shifting a negative integer extends the sign bit
17267# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017268echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17269echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17270if test "${ac_cv_rshift_extends_sign+set}" = set; then
17271 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017272else
Martin v. Löwis11437992002-04-12 09:54:03 +000017273
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017274if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017275 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017276else
Martin v. Löwis11437992002-04-12 09:54:03 +000017277 cat >conftest.$ac_ext <<_ACEOF
17278#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017279/* confdefs.h. */
17280_ACEOF
17281cat confdefs.h >>conftest.$ac_ext
17282cat >>conftest.$ac_ext <<_ACEOF
17283/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017284
17285int main()
17286{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017287 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017288}
17289
Martin v. Löwis11437992002-04-12 09:54:03 +000017290_ACEOF
17291rm -f conftest$ac_exeext
17292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17293 (eval $ac_link) 2>&5
17294 ac_status=$?
17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17298 (eval $ac_try) 2>&5
17299 ac_status=$?
17300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17301 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017302 ac_cv_rshift_extends_sign=yes
17303else
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 echo "$as_me: program exited with status $ac_status" >&5
17305echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017306sed 's/^/| /' conftest.$ac_ext >&5
17307
Martin v. Löwis11437992002-04-12 09:54:03 +000017308( exit $ac_status )
17309ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017310fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017311rm -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 +000017312fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017313fi
17314
Martin v. Löwis11437992002-04-12 09:54:03 +000017315echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17316echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017317if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017318then
Martin v. Löwis11437992002-04-12 09:54:03 +000017319
17320cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017321#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017322_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017323
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017324fi
17325
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017326# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017327echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17328echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17329if test "${ac_cv_have_getc_unlocked+set}" = set; then
17330 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017331else
Martin v. Löwis11437992002-04-12 09:54:03 +000017332
17333cat >conftest.$ac_ext <<_ACEOF
17334#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017335/* confdefs.h. */
17336_ACEOF
17337cat confdefs.h >>conftest.$ac_ext
17338cat >>conftest.$ac_ext <<_ACEOF
17339/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017340#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017341int
17342main ()
17343{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017344
17345 FILE *f = fopen("/dev/null", "r");
17346 flockfile(f);
17347 getc_unlocked(f);
17348 funlockfile(f);
17349
Martin v. Löwis11437992002-04-12 09:54:03 +000017350 ;
17351 return 0;
17352}
17353_ACEOF
17354rm -f conftest.$ac_objext conftest$ac_exeext
17355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17356 (eval $ac_link) 2>&5
17357 ac_status=$?
17358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17359 (exit $ac_status); } &&
17360 { ac_try='test -s conftest$ac_exeext'
17361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17362 (eval $ac_try) 2>&5
17363 ac_status=$?
17364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17365 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017366 ac_cv_have_getc_unlocked=yes
17367else
Martin v. Löwis11437992002-04-12 09:54:03 +000017368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017369sed 's/^/| /' conftest.$ac_ext >&5
17370
Martin v. Löwis11437992002-04-12 09:54:03 +000017371ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017372fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017373rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017374fi
17375
Martin v. Löwis11437992002-04-12 09:54:03 +000017376echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17377echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017378if test "$ac_cv_have_getc_unlocked" = yes
17379then
Martin v. Löwis11437992002-04-12 09:54:03 +000017380
17381cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017382#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017383_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017384
17385fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017386
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017387# check for readline 2.2
17388cat >conftest.$ac_ext <<_ACEOF
17389#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017390/* confdefs.h. */
17391_ACEOF
17392cat confdefs.h >>conftest.$ac_ext
17393cat >>conftest.$ac_ext <<_ACEOF
17394/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017395#include <readline/readline.h>
17396_ACEOF
17397if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17398 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17399 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017400 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017401 rm -f conftest.er1
17402 cat conftest.err >&5
17403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17404 (exit $ac_status); } >/dev/null; then
17405 if test -s conftest.err; then
17406 ac_cpp_err=$ac_c_preproc_warn_flag
17407 else
17408 ac_cpp_err=
17409 fi
17410else
17411 ac_cpp_err=yes
17412fi
17413if test -z "$ac_cpp_err"; then
17414 have_readline=yes
17415else
17416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017417sed 's/^/| /' conftest.$ac_ext >&5
17418
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017419 have_readline=no
17420fi
17421rm -f conftest.err conftest.$ac_ext
17422if test $have_readline = yes
17423then
17424 cat >conftest.$ac_ext <<_ACEOF
17425#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017431#include <readline/readline.h>
17432
17433_ACEOF
17434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017435 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017436
17437cat >>confdefs.h <<\_ACEOF
17438#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17439_ACEOF
17440
17441fi
17442rm -f conftest*
17443
17444fi
17445
Martin v. Löwis0daad592001-09-30 21:09:59 +000017446# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017447echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17448echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17449if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017451else
Martin v. Löwis11437992002-04-12 09:54:03 +000017452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017453LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017454cat >conftest.$ac_ext <<_ACEOF
17455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017456/* confdefs.h. */
17457_ACEOF
17458cat confdefs.h >>conftest.$ac_ext
17459cat >>conftest.$ac_ext <<_ACEOF
17460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017461
Guido van Rossum353ae582001-07-10 16:45:32 +000017462/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017463#ifdef __cplusplus
17464extern "C"
17465#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017466/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 builtin and then its argument prototype would still apply. */
17468char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017469int
17470main ()
17471{
17472rl_pre_input_hook ();
17473 ;
17474 return 0;
17475}
17476_ACEOF
17477rm -f conftest.$ac_objext conftest$ac_exeext
17478if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17479 (eval $ac_link) 2>&5
17480 ac_status=$?
17481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17482 (exit $ac_status); } &&
17483 { ac_try='test -s conftest$ac_exeext'
17484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17485 (eval $ac_try) 2>&5
17486 ac_status=$?
17487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); }; }; then
17489 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017490else
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017492sed 's/^/| /' conftest.$ac_ext >&5
17493
Martin v. Löwis11437992002-04-12 09:54:03 +000017494ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017496rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17497LIBS=$ac_check_lib_save_LIBS
17498fi
17499echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17500echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17501if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017502
Martin v. Löwis11437992002-04-12 09:54:03 +000017503cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017504#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017505_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017506
Martin v. Löwis0daad592001-09-30 21:09:59 +000017507fi
17508
Michael W. Hudson54241132001-12-07 15:38:26 +000017509
Martin v. Löwis0daad592001-09-30 21:09:59 +000017510# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017511echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17512echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17513if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017515else
Martin v. Löwis11437992002-04-12 09:54:03 +000017516 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017517LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017518cat >conftest.$ac_ext <<_ACEOF
17519#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017520/* confdefs.h. */
17521_ACEOF
17522cat confdefs.h >>conftest.$ac_ext
17523cat >>conftest.$ac_ext <<_ACEOF
17524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017525
Martin v. Löwis0daad592001-09-30 21:09:59 +000017526/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017527#ifdef __cplusplus
17528extern "C"
17529#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017530/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 builtin and then its argument prototype would still apply. */
17532char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017533int
17534main ()
17535{
17536rl_completion_matches ();
17537 ;
17538 return 0;
17539}
17540_ACEOF
17541rm -f conftest.$ac_objext conftest$ac_exeext
17542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17543 (eval $ac_link) 2>&5
17544 ac_status=$?
17545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17546 (exit $ac_status); } &&
17547 { ac_try='test -s conftest$ac_exeext'
17548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17549 (eval $ac_try) 2>&5
17550 ac_status=$?
17551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17552 (exit $ac_status); }; }; then
17553 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017554else
Martin v. Löwis11437992002-04-12 09:54:03 +000017555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017556sed 's/^/| /' conftest.$ac_ext >&5
17557
Martin v. Löwis11437992002-04-12 09:54:03 +000017558ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017560rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17561LIBS=$ac_check_lib_save_LIBS
17562fi
17563echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17564echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17565if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017566
Martin v. Löwis11437992002-04-12 09:54:03 +000017567cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017568#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017569_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017570
Guido van Rossum353ae582001-07-10 16:45:32 +000017571fi
17572
Jack Jansendd19cf82001-12-06 22:36:17 +000017573
Martin v. Löwis11437992002-04-12 09:54:03 +000017574echo "$as_me:$LINENO: checking for broken nice()" >&5
17575echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17576if test "${ac_cv_broken_nice+set}" = set; then
17577 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017578else
Martin v. Löwis11437992002-04-12 09:54:03 +000017579
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017580if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017581 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017582else
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 cat >conftest.$ac_ext <<_ACEOF
17584#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017585/* confdefs.h. */
17586_ACEOF
17587cat confdefs.h >>conftest.$ac_ext
17588cat >>conftest.$ac_ext <<_ACEOF
17589/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017590
17591int main()
17592{
17593 int val1 = nice(1);
17594 if (val1 != -1 && val1 == nice(2))
17595 exit(0);
17596 exit(1);
17597}
17598
Martin v. Löwis11437992002-04-12 09:54:03 +000017599_ACEOF
17600rm -f conftest$ac_exeext
17601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17602 (eval $ac_link) 2>&5
17603 ac_status=$?
17604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17605 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17607 (eval $ac_try) 2>&5
17608 ac_status=$?
17609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17610 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017611 ac_cv_broken_nice=yes
17612else
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 echo "$as_me: program exited with status $ac_status" >&5
17614echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017615sed 's/^/| /' conftest.$ac_ext >&5
17616
Martin v. Löwis11437992002-04-12 09:54:03 +000017617( exit $ac_status )
17618ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017619fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017620rm -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 +000017621fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017622fi
17623
Martin v. Löwis11437992002-04-12 09:54:03 +000017624echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17625echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017626if test "$ac_cv_broken_nice" = yes
17627then
Martin v. Löwis11437992002-04-12 09:54:03 +000017628
17629cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017630#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017631_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017632
17633fi
17634
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017635echo "$as_me:$LINENO: checking for broken poll()" >&5
17636echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
17637if test "$cross_compiling" = yes; then
17638 ac_cv_broken_poll=no
17639else
17640 cat >conftest.$ac_ext <<_ACEOF
17641#line $LINENO "configure"
17642/* confdefs.h. */
17643_ACEOF
17644cat confdefs.h >>conftest.$ac_ext
17645cat >>conftest.$ac_ext <<_ACEOF
17646/* end confdefs.h. */
17647
17648#include <poll.h>
17649
17650int main (void)
17651 {
17652 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
17653
17654 close (42);
17655
17656 int poll_test = poll (&poll_struct, 1, 0);
17657
17658 if (poll_test < 0)
17659 {
17660 exit(0);
17661 }
17662 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
17663 {
17664 exit(0);
17665 }
17666 else
17667 {
17668 exit(1);
17669 }
17670 }
17671
17672_ACEOF
17673rm -f conftest$ac_exeext
17674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17675 (eval $ac_link) 2>&5
17676 ac_status=$?
17677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17680 (eval $ac_try) 2>&5
17681 ac_status=$?
17682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683 (exit $ac_status); }; }; then
17684 ac_cv_broken_poll=yes
17685else
17686 echo "$as_me: program exited with status $ac_status" >&5
17687echo "$as_me: failed program was:" >&5
17688sed 's/^/| /' conftest.$ac_ext >&5
17689
17690( exit $ac_status )
17691ac_cv_broken_poll=no
17692fi
17693rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17694fi
17695echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
17696echo "${ECHO_T}$ac_cv_broken_poll" >&6
17697if test "$ac_cv_broken_poll" = yes
17698then
17699
17700cat >>confdefs.h <<\_ACEOF
17701#define HAVE_BROKEN_POLL 1
17702_ACEOF
17703
17704fi
17705
17706
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017707# tzset(3) exists and works like we expect it to
17708echo "$as_me:$LINENO: checking for working tzset()" >&5
17709echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17710if test "${ac_cv_working_tzset+set}" = set; then
17711 echo $ECHO_N "(cached) $ECHO_C" >&6
17712else
17713
17714if test "$cross_compiling" = yes; then
17715 ac_cv_working_tzset=no
17716else
17717 cat >conftest.$ac_ext <<_ACEOF
17718#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017719/* confdefs.h. */
17720_ACEOF
17721cat confdefs.h >>conftest.$ac_ext
17722cat >>conftest.$ac_ext <<_ACEOF
17723/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017724
17725#include <stdlib.h>
17726#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017727#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017728int main()
17729{
Brett Cannon18367812003-09-19 00:59:16 +000017730 /* Note that we need to ensure that not only does tzset(3)
17731 do 'something' with localtime, but it works as documented
17732 in the library reference and as expected by the test suite.
17733
17734 Red Hat 6.2 doesn't understand the southern hemisphere
17735 after New Year's Day; it thinks swaps on that day.
17736 */
17737
17738 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17739 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17740
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017741 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017742 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017743 if (localtime(&groundhogday)->tm_hour != 0)
17744 exit(1);
17745
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017746 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017747 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017748 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017749 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017750
17751 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17752 tzset();
17753 if (localtime(&groundhogday)->tm_hour != 11)
17754 exit(1);
17755 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17756 exit(1);
17757 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17758 exit(1);
17759
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017760 exit(0);
17761}
17762
17763_ACEOF
17764rm -f conftest$ac_exeext
17765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17766 (eval $ac_link) 2>&5
17767 ac_status=$?
17768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17771 (eval $ac_try) 2>&5
17772 ac_status=$?
17773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17774 (exit $ac_status); }; }; then
17775 ac_cv_working_tzset=yes
17776else
17777 echo "$as_me: program exited with status $ac_status" >&5
17778echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017779sed 's/^/| /' conftest.$ac_ext >&5
17780
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017781( exit $ac_status )
17782ac_cv_working_tzset=no
17783fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017784rm -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 +000017785fi
17786fi
17787
17788echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17789echo "${ECHO_T}$ac_cv_working_tzset" >&6
17790if test "$ac_cv_working_tzset" = yes
17791then
17792
17793cat >>confdefs.h <<\_ACEOF
17794#define HAVE_WORKING_TZSET 1
17795_ACEOF
17796
17797fi
17798
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017799# Look for subsecond timestamps in struct stat
17800echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17801echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17802if test "${ac_cv_stat_tv_nsec+set}" = set; then
17803 echo $ECHO_N "(cached) $ECHO_C" >&6
17804else
17805 cat >conftest.$ac_ext <<_ACEOF
17806#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017807/* confdefs.h. */
17808_ACEOF
17809cat confdefs.h >>conftest.$ac_ext
17810cat >>conftest.$ac_ext <<_ACEOF
17811/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017812#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017813int
17814main ()
17815{
17816
17817struct stat st;
17818st.st_mtim.tv_nsec = 1;
17819
17820 ;
17821 return 0;
17822}
17823_ACEOF
17824rm -f conftest.$ac_objext
17825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17826 (eval $ac_compile) 2>&5
17827 ac_status=$?
17828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17829 (exit $ac_status); } &&
17830 { ac_try='test -s conftest.$ac_objext'
17831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17832 (eval $ac_try) 2>&5
17833 ac_status=$?
17834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17835 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017836 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017837else
17838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017839sed 's/^/| /' conftest.$ac_ext >&5
17840
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017841ac_cv_stat_tv_nsec=no
17842fi
17843rm -f conftest.$ac_objext conftest.$ac_ext
17844fi
17845
17846echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17847echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17848if test "$ac_cv_stat_tv_nsec" = yes
17849then
17850
17851cat >>confdefs.h <<\_ACEOF
17852#define HAVE_STAT_TV_NSEC 1
17853_ACEOF
17854
17855fi
17856
Jack Jansen666b1e72001-10-31 12:11:48 +000017857# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017858echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17859echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17860if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17861 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017862else
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 cat >conftest.$ac_ext <<_ACEOF
17864#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017865/* confdefs.h. */
17866_ACEOF
17867cat confdefs.h >>conftest.$ac_ext
17868cat >>conftest.$ac_ext <<_ACEOF
17869/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017870#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017871int
17872main ()
17873{
Jack Jansen666b1e72001-10-31 12:11:48 +000017874
17875 int rtn;
17876 rtn = mvwdelch(0,0,0);
17877
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 ;
17879 return 0;
17880}
17881_ACEOF
17882rm -f conftest.$ac_objext
17883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17884 (eval $ac_compile) 2>&5
17885 ac_status=$?
17886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17887 (exit $ac_status); } &&
17888 { ac_try='test -s conftest.$ac_objext'
17889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17890 (eval $ac_try) 2>&5
17891 ac_status=$?
17892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17893 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017894 ac_cv_mvwdelch_is_expression=yes
17895else
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017897sed 's/^/| /' conftest.$ac_ext >&5
17898
Martin v. Löwis11437992002-04-12 09:54:03 +000017899ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017901rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017902fi
17903
Martin v. Löwis11437992002-04-12 09:54:03 +000017904echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17905echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017906
17907if test "$ac_cv_mvwdelch_is_expression" = yes
17908then
Martin v. Löwis11437992002-04-12 09:54:03 +000017909
17910cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017911#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017912_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017913
17914fi
17915
Martin v. Löwis11437992002-04-12 09:54:03 +000017916echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17917echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17918if test "${ac_cv_window_has_flags+set}" = set; then
17919 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017920else
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 cat >conftest.$ac_ext <<_ACEOF
17922#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017923/* confdefs.h. */
17924_ACEOF
17925cat confdefs.h >>conftest.$ac_ext
17926cat >>conftest.$ac_ext <<_ACEOF
17927/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017928#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017929int
17930main ()
17931{
Jack Jansen666b1e72001-10-31 12:11:48 +000017932
17933 WINDOW *w;
17934 w->_flags = 0;
17935
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 ;
17937 return 0;
17938}
17939_ACEOF
17940rm -f conftest.$ac_objext
17941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17942 (eval $ac_compile) 2>&5
17943 ac_status=$?
17944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17945 (exit $ac_status); } &&
17946 { ac_try='test -s conftest.$ac_objext'
17947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17948 (eval $ac_try) 2>&5
17949 ac_status=$?
17950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17951 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017952 ac_cv_window_has_flags=yes
17953else
Martin v. Löwis11437992002-04-12 09:54:03 +000017954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017955sed 's/^/| /' conftest.$ac_ext >&5
17956
Martin v. Löwis11437992002-04-12 09:54:03 +000017957ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017959rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017960fi
17961
Martin v. Löwis11437992002-04-12 09:54:03 +000017962echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17963echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017964
Jack Jansen666b1e72001-10-31 12:11:48 +000017965
17966if test "$ac_cv_window_has_flags" = yes
17967then
Martin v. Löwis11437992002-04-12 09:54:03 +000017968
17969cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017970#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017971_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017972
17973fi
17974
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017975echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17976echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17977
17978if test -e /dev/ptmx
17979then
17980 echo "$as_me:$LINENO: result: yes" >&5
17981echo "${ECHO_T}yes" >&6
17982
17983cat >>confdefs.h <<\_ACEOF
17984#define HAVE_DEV_PTMX 1
17985_ACEOF
17986
17987else
17988 echo "$as_me:$LINENO: result: no" >&5
17989echo "${ECHO_T}no" >&6
17990fi
17991
Neal Norwitz865400f2003-03-21 01:42:58 +000017992echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17993echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17994
17995if test -e /dev/ptc
17996then
17997 echo "$as_me:$LINENO: result: yes" >&5
17998echo "${ECHO_T}yes" >&6
17999
18000cat >>confdefs.h <<\_ACEOF
18001#define HAVE_DEV_PTC 1
18002_ACEOF
18003
18004else
18005 echo "$as_me:$LINENO: result: no" >&5
18006echo "${ECHO_T}no" >&6
18007fi
18008
Martin v. Löwis11437992002-04-12 09:54:03 +000018009echo "$as_me:$LINENO: checking for socklen_t" >&5
18010echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18011if test "${ac_cv_type_socklen_t+set}" = set; then
18012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018013else
Martin v. Löwis11437992002-04-12 09:54:03 +000018014 cat >conftest.$ac_ext <<_ACEOF
18015#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018016/* confdefs.h. */
18017_ACEOF
18018cat confdefs.h >>conftest.$ac_ext
18019cat >>conftest.$ac_ext <<_ACEOF
18020/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018021
18022#ifdef HAVE_SYS_TYPES_H
18023#include <sys/types.h>
18024#endif
18025#ifdef HAVE_SYS_SOCKET_H
18026#include <sys/socket.h>
18027#endif
18028
18029
Martin v. Löwis11437992002-04-12 09:54:03 +000018030int
18031main ()
18032{
18033if ((socklen_t *) 0)
18034 return 0;
18035if (sizeof (socklen_t))
18036 return 0;
18037 ;
18038 return 0;
18039}
18040_ACEOF
18041rm -f conftest.$ac_objext
18042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18043 (eval $ac_compile) 2>&5
18044 ac_status=$?
18045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18046 (exit $ac_status); } &&
18047 { ac_try='test -s conftest.$ac_objext'
18048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18049 (eval $ac_try) 2>&5
18050 ac_status=$?
18051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18052 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018053 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018054else
Martin v. Löwis11437992002-04-12 09:54:03 +000018055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018056sed 's/^/| /' conftest.$ac_ext >&5
18057
Martin v. Löwis11437992002-04-12 09:54:03 +000018058ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018060rm -f conftest.$ac_objext conftest.$ac_ext
18061fi
18062echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18063echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18064if test $ac_cv_type_socklen_t = yes; then
18065 :
18066else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018067
Martin v. Löwis01c04012002-11-11 14:58:44 +000018068cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018069#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018070_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018071
18072fi
18073
Michael W. Hudson54241132001-12-07 15:38:26 +000018074
Michael W. Hudson54241132001-12-07 15:38:26 +000018075
18076
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018077for h in `(cd $srcdir;echo Python/thread_*.h)`
18078do
18079 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18080done
18081
Michael W. Hudson54241132001-12-07 15:38:26 +000018082
Jack Jansen0b06be72002-06-21 14:48:38 +000018083SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018084echo "$as_me:$LINENO: checking for build directories" >&5
18085echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018086for dir in $SRCDIRS; do
18087 if test ! -d $dir; then
18088 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018089 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018090done
Martin v. Löwis11437992002-04-12 09:54:03 +000018091echo "$as_me:$LINENO: result: done" >&5
18092echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018093
Guido van Rossum627b2d71993-12-24 10:39:16 +000018094# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018095 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018096
Martin v. Löwis11437992002-04-12 09:54:03 +000018097cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018098# This file is a shell script that caches the results of configure
18099# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018100# scripts and configure runs, see configure's option --config-cache.
18101# It is not useful on other systems. If it contains results you don't
18102# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018103#
Martin v. Löwis11437992002-04-12 09:54:03 +000018104# config.status only pays attention to the cache file if you give it
18105# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018106#
Skip Montanaro6dead952003-09-25 14:50:04 +000018107# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018108# loading this file, other *unset* `ac_cv_foo' will be assigned the
18109# following values.
18110
18111_ACEOF
18112
Guido van Rossumf78abae1997-01-21 22:02:36 +000018113# The following way of writing the cache mishandles newlines in values,
18114# but we know of no workaround that is simple, portable, and efficient.
18115# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018116# Ultrix sh set writes to stderr and can't be redirected directly,
18117# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018118{
18119 (set) 2>&1 |
18120 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18121 *ac_space=\ *)
18122 # `set' does not quote correctly, so add quotes (double-quote
18123 # substitution turns \\\\ into \\, and sed turns \\ into \).
18124 sed -n \
18125 "s/'/'\\\\''/g;
18126 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18127 ;;
18128 *)
18129 # `set' quotes correctly as required by POSIX, so do not add quotes.
18130 sed -n \
18131 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18132 ;;
18133 esac;
18134} |
18135 sed '
18136 t clear
18137 : clear
18138 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18139 t end
18140 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18141 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018142if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018143 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18145 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018146 else
18147 echo "not updating unwritable cache $cache_file"
18148 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018149fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018150rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018151
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018152test "x$prefix" = xNONE && prefix=$ac_default_prefix
18153# Let make expand exec_prefix.
18154test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018155
Martin v. Löwis11437992002-04-12 09:54:03 +000018156# VPATH may cause trouble with some makes, so we remove $(srcdir),
18157# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18158# trailing colons and then remove the whole line if VPATH becomes empty
18159# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018160if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018161 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18162s/:*\$(srcdir):*/:/;
18163s/:*\${srcdir}:*/:/;
18164s/:*@srcdir@:*/:/;
18165s/^\([^=]*=[ ]*\):*/\1/;
18166s/:*$//;
18167s/^[^=]*=[ ]*$//;
18168}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018169fi
18170
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018171DEFS=-DHAVE_CONFIG_H
18172
Skip Montanaro6dead952003-09-25 14:50:04 +000018173ac_libobjs=
18174ac_ltlibobjs=
18175for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18176 # 1. Remove the extension, and $U if already installed.
18177 ac_i=`echo "$ac_i" |
18178 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18179 # 2. Add them.
18180 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18181 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18182done
18183LIBOBJS=$ac_libobjs
18184
18185LTLIBOBJS=$ac_ltlibobjs
18186
18187
Martin v. Löwis11437992002-04-12 09:54:03 +000018188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018189: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018190ac_clean_files_save=$ac_clean_files
18191ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18192{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18193echo "$as_me: creating $CONFIG_STATUS" >&6;}
18194cat >$CONFIG_STATUS <<_ACEOF
18195#! $SHELL
18196# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018197# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018198# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018199# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018200
Martin v. Löwis11437992002-04-12 09:54:03 +000018201debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018202ac_cs_recheck=false
18203ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018204SHELL=\${CONFIG_SHELL-$SHELL}
18205_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018206
Martin v. Löwis11437992002-04-12 09:54:03 +000018207cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018208## --------------------- ##
18209## M4sh Initialization. ##
18210## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018211
Martin v. Löwis11437992002-04-12 09:54:03 +000018212# Be Bourne compatible
18213if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18214 emulate sh
18215 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018216 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18217 # is contrary to our usage. Disable this feature.
18218 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018219elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18220 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018221fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018222
Martin v. Löwis11437992002-04-12 09:54:03 +000018223# Support unset when possible.
18224if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18225 as_unset=unset
18226else
18227 as_unset=false
18228fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018229
Skip Montanaro6dead952003-09-25 14:50:04 +000018230
18231# Work around bugs in pre-3.0 UWIN ksh.
18232$as_unset ENV MAIL MAILPATH
18233PS1='$ '
18234PS2='> '
18235PS4='+ '
18236
18237# NLS nuisances.
18238for as_var in \
18239 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18240 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18241 LC_TELEPHONE LC_TIME
18242do
18243 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18244 eval $as_var=C; export $as_var
18245 else
18246 $as_unset $as_var
18247 fi
18248done
18249
18250# Required to use basename.
18251if expr a : '\(a\)' >/dev/null 2>&1; then
18252 as_expr=expr
18253else
18254 as_expr=false
18255fi
18256
18257if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18258 as_basename=basename
18259else
18260 as_basename=false
18261fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018262
18263
18264# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018265as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018266$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18267 X"$0" : 'X\(//\)$' \| \
18268 X"$0" : 'X\(/\)$' \| \
18269 . : '\(.\)' 2>/dev/null ||
18270echo X/"$0" |
18271 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18272 /^X\/\(\/\/\)$/{ s//\1/; q; }
18273 /^X\/\(\/\).*/{ s//\1/; q; }
18274 s/.*/./; q'`
18275
Skip Montanaro6dead952003-09-25 14:50:04 +000018276
Martin v. Löwis11437992002-04-12 09:54:03 +000018277# PATH needs CR, and LINENO needs CR and PATH.
18278# Avoid depending upon Character Ranges.
18279as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18280as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18281as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18282as_cr_digits='0123456789'
18283as_cr_alnum=$as_cr_Letters$as_cr_digits
18284
18285# The user is always right.
18286if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018287 echo "#! /bin/sh" >conf$$.sh
18288 echo "exit 0" >>conf$$.sh
18289 chmod +x conf$$.sh
18290 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018291 PATH_SEPARATOR=';'
18292 else
18293 PATH_SEPARATOR=:
18294 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018295 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018296fi
18297
18298
18299 as_lineno_1=$LINENO
18300 as_lineno_2=$LINENO
18301 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18302 test "x$as_lineno_1" != "x$as_lineno_2" &&
18303 test "x$as_lineno_3" = "x$as_lineno_2" || {
18304 # Find who we are. Look in the path if we contain no path at all
18305 # relative or not.
18306 case $0 in
18307 *[\\/]* ) as_myself=$0 ;;
18308 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18309for as_dir in $PATH
18310do
18311 IFS=$as_save_IFS
18312 test -z "$as_dir" && as_dir=.
18313 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18314done
18315
18316 ;;
18317 esac
18318 # We did not find ourselves, most probably we were run as `sh COMMAND'
18319 # in which case we are not to be found in the path.
18320 if test "x$as_myself" = x; then
18321 as_myself=$0
18322 fi
18323 if test ! -f "$as_myself"; then
18324 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18325echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18326 { (exit 1); exit 1; }; }
18327 fi
18328 case $CONFIG_SHELL in
18329 '')
18330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18331for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18332do
18333 IFS=$as_save_IFS
18334 test -z "$as_dir" && as_dir=.
18335 for as_base in sh bash ksh sh5; do
18336 case $as_dir in
18337 /*)
18338 if ("$as_dir/$as_base" -c '
18339 as_lineno_1=$LINENO
18340 as_lineno_2=$LINENO
18341 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18342 test "x$as_lineno_1" != "x$as_lineno_2" &&
18343 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018344 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18345 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018346 CONFIG_SHELL=$as_dir/$as_base
18347 export CONFIG_SHELL
18348 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18349 fi;;
18350 esac
18351 done
18352done
18353;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018354 esac
18355
Martin v. Löwis11437992002-04-12 09:54:03 +000018356 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18357 # uniformly replaced by the line number. The first 'sed' inserts a
18358 # line-number line before each line; the second 'sed' does the real
18359 # work. The second script uses 'N' to pair each line-number line
18360 # with the numbered line, and appends trailing '-' during
18361 # substitution so that $LINENO is not a special case at line end.
18362 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18363 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18364 sed '=' <$as_myself |
18365 sed '
18366 N
18367 s,$,-,
18368 : loop
18369 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18370 t loop
18371 s,-$,,
18372 s,^['$as_cr_digits']*\n,,
18373 ' >$as_me.lineno &&
18374 chmod +x $as_me.lineno ||
18375 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18376echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18377 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018378
Martin v. Löwis11437992002-04-12 09:54:03 +000018379 # Don't try to exec as it changes $[0], causing all sort of problems
18380 # (the dirname of $[0] is not the place where we might find the
18381 # original and so on. Autoconf is especially sensible to this).
18382 . ./$as_me.lineno
18383 # Exit status is that of the last command.
18384 exit
18385}
18386
18387
18388case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18389 *c*,-n*) ECHO_N= ECHO_C='
18390' ECHO_T=' ' ;;
18391 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18392 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18393esac
18394
18395if expr a : '\(a\)' >/dev/null 2>&1; then
18396 as_expr=expr
18397else
18398 as_expr=false
18399fi
18400
18401rm -f conf$$ conf$$.exe conf$$.file
18402echo >conf$$.file
18403if ln -s conf$$.file conf$$ 2>/dev/null; then
18404 # We could just check for DJGPP; but this test a) works b) is more generic
18405 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18406 if test -f conf$$.exe; then
18407 # Don't use ln at all; we don't have any links
18408 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018409 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018410 as_ln_s='ln -s'
18411 fi
18412elif ln conf$$.file conf$$ 2>/dev/null; then
18413 as_ln_s=ln
18414else
18415 as_ln_s='cp -p'
18416fi
18417rm -f conf$$ conf$$.exe conf$$.file
18418
Skip Montanaro6dead952003-09-25 14:50:04 +000018419if mkdir -p . 2>/dev/null; then
18420 as_mkdir_p=:
18421else
18422 as_mkdir_p=false
18423fi
18424
Martin v. Löwis11437992002-04-12 09:54:03 +000018425as_executable_p="test -f"
18426
18427# Sed expression to map a string onto a valid CPP name.
18428as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18429
18430# Sed expression to map a string onto a valid variable name.
18431as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18432
18433
18434# IFS
18435# We need space, tab and new line, in precisely that order.
18436as_nl='
18437'
18438IFS=" $as_nl"
18439
18440# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018441$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018442
18443exec 6>&1
18444
18445# Open the log real soon, to keep \$[0] and so on meaningful, and to
18446# report actual input values of CONFIG_FILES etc. instead of their
18447# values after options handling. Logging --version etc. is OK.
18448exec 5>>config.log
18449{
18450 echo
18451 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18452## Running $as_me. ##
18453_ASBOX
18454} >&5
18455cat >&5 <<_CSEOF
18456
Fred Drake9bd44622003-07-30 17:39:48 +000018457This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018458generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018459
18460 CONFIG_FILES = $CONFIG_FILES
18461 CONFIG_HEADERS = $CONFIG_HEADERS
18462 CONFIG_LINKS = $CONFIG_LINKS
18463 CONFIG_COMMANDS = $CONFIG_COMMANDS
18464 $ $0 $@
18465
18466_CSEOF
18467echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18468echo >&5
18469_ACEOF
18470
18471# Files that config.status was made for.
18472if test -n "$ac_config_files"; then
18473 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18474fi
18475
18476if test -n "$ac_config_headers"; then
18477 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18478fi
18479
18480if test -n "$ac_config_links"; then
18481 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18482fi
18483
18484if test -n "$ac_config_commands"; then
18485 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18486fi
18487
18488cat >>$CONFIG_STATUS <<\_ACEOF
18489
18490ac_cs_usage="\
18491\`$as_me' instantiates files from templates according to the
18492current configuration.
18493
18494Usage: $0 [OPTIONS] [FILE]...
18495
18496 -h, --help print this help, then exit
18497 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018498 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018499 -d, --debug don't remove temporary files
18500 --recheck update $as_me by reconfiguring in the same conditions
18501 --file=FILE[:TEMPLATE]
18502 instantiate the configuration file FILE
18503 --header=FILE[:TEMPLATE]
18504 instantiate the configuration header FILE
18505
18506Configuration files:
18507$config_files
18508
18509Configuration headers:
18510$config_headers
18511
18512Report bugs to <bug-autoconf@gnu.org>."
18513_ACEOF
18514
18515cat >>$CONFIG_STATUS <<_ACEOF
18516ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018517python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018518configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018519 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18520
18521Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18522Free Software Foundation, Inc.
18523This config.status script is free software; the Free Software Foundation
18524gives unlimited permission to copy, distribute and modify it."
18525srcdir=$srcdir
18526INSTALL="$INSTALL"
18527_ACEOF
18528
18529cat >>$CONFIG_STATUS <<\_ACEOF
18530# If no file are specified by the user, then we need to provide default
18531# value. By we need to know if files were specified by the user.
18532ac_need_defaults=:
18533while test $# != 0
18534do
18535 case $1 in
18536 --*=*)
18537 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18538 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018539 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018540 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018541 -*)
18542 ac_option=$1
18543 ac_optarg=$2
18544 ac_shift=shift
18545 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018546 *) # This is not an option, so the user has probably given explicit
18547 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018548 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018549 ac_need_defaults=false;;
18550 esac
18551
Skip Montanaro6dead952003-09-25 14:50:04 +000018552 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018553 # Handling of the options.
18554_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018555cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018556 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18557 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018558 --version | --vers* | -V )
18559 echo "$ac_cs_version"; exit 0 ;;
18560 --he | --h)
18561 # Conflict between --help and --header
18562 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18563Try \`$0 --help' for more information." >&5
18564echo "$as_me: error: ambiguous option: $1
18565Try \`$0 --help' for more information." >&2;}
18566 { (exit 1); exit 1; }; };;
18567 --help | --hel | -h )
18568 echo "$ac_cs_usage"; exit 0 ;;
18569 --debug | --d* | -d )
18570 debug=: ;;
18571 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018572 $ac_shift
18573 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 ac_need_defaults=false;;
18575 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018576 $ac_shift
18577 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018579 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18580 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18581 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018582
18583 # This is an error.
18584 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18585Try \`$0 --help' for more information." >&5
18586echo "$as_me: error: unrecognized option: $1
18587Try \`$0 --help' for more information." >&2;}
18588 { (exit 1); exit 1; }; } ;;
18589
18590 *) ac_config_targets="$ac_config_targets $1" ;;
18591
18592 esac
18593 shift
18594done
18595
Skip Montanaro6dead952003-09-25 14:50:04 +000018596ac_configure_extra_args=
18597
18598if $ac_cs_silent; then
18599 exec 6>/dev/null
18600 ac_configure_extra_args="$ac_configure_extra_args --silent"
18601fi
18602
18603_ACEOF
18604cat >>$CONFIG_STATUS <<_ACEOF
18605if \$ac_cs_recheck; then
18606 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18607 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18608fi
18609
Martin v. Löwis11437992002-04-12 09:54:03 +000018610_ACEOF
18611
18612
18613
18614
18615
18616cat >>$CONFIG_STATUS <<\_ACEOF
18617for ac_config_target in $ac_config_targets
18618do
18619 case "$ac_config_target" in
18620 # Handling of arguments.
18621 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18622 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18623 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18624 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18625echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18626 { (exit 1); exit 1; }; };;
18627 esac
18628done
18629
18630# If the user did not use the arguments to specify the items to instantiate,
18631# then the envvar interface is used. Set only those that are not.
18632# We use the long form for the default assignment because of an extremely
18633# bizarre bug on SunOS 4.1.3.
18634if $ac_need_defaults; then
18635 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18636 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18637fi
18638
Skip Montanaro6dead952003-09-25 14:50:04 +000018639# Have a temporary directory for convenience. Make it in the build tree
18640# simply because there is no reason to put it here, and in addition,
18641# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018642# Create a temporary directory, and hook for its removal unless debugging.
18643$debug ||
18644{
18645 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18646 trap '{ (exit 1); exit 1; }' 1 2 13 15
18647}
18648
18649# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018650
Martin v. Löwis11437992002-04-12 09:54:03 +000018651{
Skip Montanaro6dead952003-09-25 14:50:04 +000018652 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 test -n "$tmp" && test -d "$tmp"
18654} ||
18655{
Skip Montanaro6dead952003-09-25 14:50:04 +000018656 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018657 (umask 077 && mkdir $tmp)
18658} ||
18659{
Skip Montanaro6dead952003-09-25 14:50:04 +000018660 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018661 { (exit 1); exit 1; }
18662}
18663
18664_ACEOF
18665
18666cat >>$CONFIG_STATUS <<_ACEOF
18667
18668#
18669# CONFIG_FILES section.
18670#
18671
18672# No need to generate the scripts if there are no CONFIG_FILES.
18673# This happens for instance when ./config.status config.h
18674if test -n "\$CONFIG_FILES"; then
18675 # Protect against being on the right side of a sed subst in config.status.
18676 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18677 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18678s,@SHELL@,$SHELL,;t t
18679s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18680s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18681s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18682s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18683s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18684s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18685s,@exec_prefix@,$exec_prefix,;t t
18686s,@prefix@,$prefix,;t t
18687s,@program_transform_name@,$program_transform_name,;t t
18688s,@bindir@,$bindir,;t t
18689s,@sbindir@,$sbindir,;t t
18690s,@libexecdir@,$libexecdir,;t t
18691s,@datadir@,$datadir,;t t
18692s,@sysconfdir@,$sysconfdir,;t t
18693s,@sharedstatedir@,$sharedstatedir,;t t
18694s,@localstatedir@,$localstatedir,;t t
18695s,@libdir@,$libdir,;t t
18696s,@includedir@,$includedir,;t t
18697s,@oldincludedir@,$oldincludedir,;t t
18698s,@infodir@,$infodir,;t t
18699s,@mandir@,$mandir,;t t
18700s,@build_alias@,$build_alias,;t t
18701s,@host_alias@,$host_alias,;t t
18702s,@target_alias@,$target_alias,;t t
18703s,@DEFS@,$DEFS,;t t
18704s,@ECHO_C@,$ECHO_C,;t t
18705s,@ECHO_N@,$ECHO_N,;t t
18706s,@ECHO_T@,$ECHO_T,;t t
18707s,@LIBS@,$LIBS,;t t
18708s,@VERSION@,$VERSION,;t t
18709s,@SOVERSION@,$SOVERSION,;t t
18710s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18711s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18712s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18713s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18714s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18715s,@MACHDEP@,$MACHDEP,;t t
18716s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018717s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018718s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000018719s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018720s,@CXX@,$CXX,;t t
18721s,@MAINOBJ@,$MAINOBJ,;t t
18722s,@EXEEXT@,$EXEEXT,;t t
18723s,@CC@,$CC,;t t
18724s,@CFLAGS@,$CFLAGS,;t t
18725s,@LDFLAGS@,$LDFLAGS,;t t
18726s,@CPPFLAGS@,$CPPFLAGS,;t t
18727s,@ac_ct_CC@,$ac_ct_CC,;t t
18728s,@OBJEXT@,$OBJEXT,;t t
18729s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018730s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018731s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18732s,@LIBRARY@,$LIBRARY,;t t
18733s,@LDLIBRARY@,$LDLIBRARY,;t t
18734s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18735s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18736s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18737s,@INSTSONAME@,$INSTSONAME,;t t
18738s,@RUNSHARED@,$RUNSHARED,;t t
18739s,@LINKCC@,$LINKCC,;t t
18740s,@RANLIB@,$RANLIB,;t t
18741s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18742s,@AR@,$AR,;t t
18743s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18744s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18745s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18746s,@LN@,$LN,;t t
18747s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018748s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018749s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18750s,@SO@,$SO,;t t
18751s,@LDSHARED@,$LDSHARED,;t t
18752s,@BLDSHARED@,$BLDSHARED,;t t
18753s,@CCSHARED@,$CCSHARED,;t t
18754s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18755s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018756s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018757s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18758s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18759s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18760s,@LDLAST@,$LDLAST,;t t
18761s,@THREADOBJ@,$THREADOBJ,;t t
18762s,@DLINCLDIR@,$DLINCLDIR,;t t
18763s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18764s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018765s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018766s,@LIBOBJS@,$LIBOBJS,;t t
18767s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18768s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18769s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18770s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18771s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18772s,@LIBM@,$LIBM,;t t
18773s,@LIBC@,$LIBC,;t t
18774s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18775s,@THREADHEADERS@,$THREADHEADERS,;t t
18776s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018777s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018778CEOF
18779
18780_ACEOF
18781
18782 cat >>$CONFIG_STATUS <<\_ACEOF
18783 # Split the substitutions into bite-sized pieces for seds with
18784 # small command number limits, like on Digital OSF/1 and HP-UX.
18785 ac_max_sed_lines=48
18786 ac_sed_frag=1 # Number of current file.
18787 ac_beg=1 # First line for current file.
18788 ac_end=$ac_max_sed_lines # Line after last line for current file.
18789 ac_more_lines=:
18790 ac_sed_cmds=
18791 while $ac_more_lines; do
18792 if test $ac_beg -gt 1; then
18793 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18794 else
18795 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18796 fi
18797 if test ! -s $tmp/subs.frag; then
18798 ac_more_lines=false
18799 else
18800 # The purpose of the label and of the branching condition is to
18801 # speed up the sed processing (if there are no `@' at all, there
18802 # is no need to browse any of the substitutions).
18803 # These are the two extra sed commands mentioned above.
18804 (echo ':t
18805 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18806 if test -z "$ac_sed_cmds"; then
18807 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18808 else
18809 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18810 fi
18811 ac_sed_frag=`expr $ac_sed_frag + 1`
18812 ac_beg=$ac_end
18813 ac_end=`expr $ac_end + $ac_max_sed_lines`
18814 fi
18815 done
18816 if test -z "$ac_sed_cmds"; then
18817 ac_sed_cmds=cat
18818 fi
18819fi # test -n "$CONFIG_FILES"
18820
18821_ACEOF
18822cat >>$CONFIG_STATUS <<\_ACEOF
18823for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18824 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18825 case $ac_file in
18826 - | *:- | *:-:* ) # input from stdin
18827 cat >$tmp/stdin
18828 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18829 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18830 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18831 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18832 * ) ac_file_in=$ac_file.in ;;
18833 esac
18834
18835 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18836 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18837$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18838 X"$ac_file" : 'X\(//\)[^/]' \| \
18839 X"$ac_file" : 'X\(//\)$' \| \
18840 X"$ac_file" : 'X\(/\)' \| \
18841 . : '\(.\)' 2>/dev/null ||
18842echo X"$ac_file" |
18843 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18844 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18845 /^X\(\/\/\)$/{ s//\1/; q; }
18846 /^X\(\/\).*/{ s//\1/; q; }
18847 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018848 { if $as_mkdir_p; then
18849 mkdir -p "$ac_dir"
18850 else
18851 as_dir="$ac_dir"
18852 as_dirs=
18853 while test ! -d "$as_dir"; do
18854 as_dirs="$as_dir $as_dirs"
18855 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18856$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18857 X"$as_dir" : 'X\(//\)[^/]' \| \
18858 X"$as_dir" : 'X\(//\)$' \| \
18859 X"$as_dir" : 'X\(/\)' \| \
18860 . : '\(.\)' 2>/dev/null ||
18861echo X"$as_dir" |
18862 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18863 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18864 /^X\(\/\/\)$/{ s//\1/; q; }
18865 /^X\(\/\).*/{ s//\1/; q; }
18866 s/.*/./; q'`
18867 done
18868 test ! -n "$as_dirs" || mkdir $as_dirs
18869 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18870echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18871 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018872
18873 ac_builddir=.
18874
18875if test "$ac_dir" != .; then
18876 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18877 # A "../" for each directory in $ac_dir_suffix.
18878 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18879else
18880 ac_dir_suffix= ac_top_builddir=
18881fi
18882
18883case $srcdir in
18884 .) # No --srcdir option. We are building in place.
18885 ac_srcdir=.
18886 if test -z "$ac_top_builddir"; then
18887 ac_top_srcdir=.
18888 else
18889 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18890 fi ;;
18891 [\\/]* | ?:[\\/]* ) # Absolute path.
18892 ac_srcdir=$srcdir$ac_dir_suffix;
18893 ac_top_srcdir=$srcdir ;;
18894 *) # Relative path.
18895 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18896 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18897esac
18898# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18899# absolute.
18900ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018901ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018902ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18903ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18904
18905
18906 case $INSTALL in
18907 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18908 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18909 esac
18910
18911 if test x"$ac_file" != x-; then
18912 { echo "$as_me:$LINENO: creating $ac_file" >&5
18913echo "$as_me: creating $ac_file" >&6;}
18914 rm -f "$ac_file"
18915 fi
18916 # Let's still pretend it is `configure' which instantiates (i.e., don't
18917 # use $as_me), people would be surprised to read:
18918 # /* config.h. Generated by config.status. */
18919 if test x"$ac_file" = x-; then
18920 configure_input=
18921 else
18922 configure_input="$ac_file. "
18923 fi
18924 configure_input=$configure_input"Generated from `echo $ac_file_in |
18925 sed 's,.*/,,'` by configure."
18926
18927 # First look for the input files in the build tree, otherwise in the
18928 # src tree.
18929 ac_file_inputs=`IFS=:
18930 for f in $ac_file_in; do
18931 case $f in
18932 -) echo $tmp/stdin ;;
18933 [\\/$]*)
18934 # Absolute (can't be DOS-style, as IFS=:)
18935 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18936echo "$as_me: error: cannot find input file: $f" >&2;}
18937 { (exit 1); exit 1; }; }
18938 echo $f;;
18939 *) # Relative
18940 if test -f "$f"; then
18941 # Build tree
18942 echo $f
18943 elif test -f "$srcdir/$f"; then
18944 # Source tree
18945 echo $srcdir/$f
18946 else
18947 # /dev/null tree
18948 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18949echo "$as_me: error: cannot find input file: $f" >&2;}
18950 { (exit 1); exit 1; }; }
18951 fi;;
18952 esac
18953 done` || { (exit 1); exit 1; }
18954_ACEOF
18955cat >>$CONFIG_STATUS <<_ACEOF
18956 sed "$ac_vpsub
18957$extrasub
18958_ACEOF
18959cat >>$CONFIG_STATUS <<\_ACEOF
18960:t
18961/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18962s,@configure_input@,$configure_input,;t t
18963s,@srcdir@,$ac_srcdir,;t t
18964s,@abs_srcdir@,$ac_abs_srcdir,;t t
18965s,@top_srcdir@,$ac_top_srcdir,;t t
18966s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18967s,@builddir@,$ac_builddir,;t t
18968s,@abs_builddir@,$ac_abs_builddir,;t t
18969s,@top_builddir@,$ac_top_builddir,;t t
18970s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18971s,@INSTALL@,$ac_INSTALL,;t t
18972" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18973 rm -f $tmp/stdin
18974 if test x"$ac_file" != x-; then
18975 mv $tmp/out $ac_file
18976 else
18977 cat $tmp/out
18978 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018979 fi
18980
Martin v. Löwis11437992002-04-12 09:54:03 +000018981done
18982_ACEOF
18983cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018984
Martin v. Löwis11437992002-04-12 09:54:03 +000018985#
18986# CONFIG_HEADER section.
18987#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018988
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018989# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18990# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018991#
18992# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018993ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18994ac_dB='[ ].*$,\1#\2'
18995ac_dC=' '
18996ac_dD=',;t'
18997# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18998ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18999ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019000ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019001ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019002
Martin v. Löwis11437992002-04-12 09:54:03 +000019003for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019004 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019005 case $ac_file in
19006 - | *:- | *:-:* ) # input from stdin
19007 cat >$tmp/stdin
19008 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19009 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19010 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19011 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19012 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019013 esac
19014
Martin v. Löwis11437992002-04-12 09:54:03 +000019015 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19016echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019017
Martin v. Löwis11437992002-04-12 09:54:03 +000019018 # First look for the input files in the build tree, otherwise in the
19019 # src tree.
19020 ac_file_inputs=`IFS=:
19021 for f in $ac_file_in; do
19022 case $f in
19023 -) echo $tmp/stdin ;;
19024 [\\/$]*)
19025 # Absolute (can't be DOS-style, as IFS=:)
19026 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19027echo "$as_me: error: cannot find input file: $f" >&2;}
19028 { (exit 1); exit 1; }; }
19029 echo $f;;
19030 *) # Relative
19031 if test -f "$f"; then
19032 # Build tree
19033 echo $f
19034 elif test -f "$srcdir/$f"; then
19035 # Source tree
19036 echo $srcdir/$f
19037 else
19038 # /dev/null tree
19039 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19040echo "$as_me: error: cannot find input file: $f" >&2;}
19041 { (exit 1); exit 1; }; }
19042 fi;;
19043 esac
19044 done` || { (exit 1); exit 1; }
19045 # Remove the trailing spaces.
19046 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019047
Martin v. Löwis11437992002-04-12 09:54:03 +000019048_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019049
Martin v. Löwis11437992002-04-12 09:54:03 +000019050# Transform confdefs.h into two sed scripts, `conftest.defines' and
19051# `conftest.undefs', that substitutes the proper values into
19052# config.h.in to produce config.h. The first handles `#define'
19053# templates, and the second `#undef' templates.
19054# And first: Protect against being on the right side of a sed subst in
19055# config.status. Protect against being in an unquoted here document
19056# in config.status.
19057rm -f conftest.defines conftest.undefs
19058# Using a here document instead of a string reduces the quoting nightmare.
19059# Putting comments in sed scripts is not portable.
19060#
19061# `end' is used to avoid that the second main sed command (meant for
19062# 0-ary CPP macros) applies to n-ary macro definitions.
19063# See the Autoconf documentation for `clear'.
19064cat >confdef2sed.sed <<\_ACEOF
19065s/[\\&,]/\\&/g
19066s,[\\$`],\\&,g
19067t clear
19068: clear
19069s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19070t end
19071s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19072: end
19073_ACEOF
19074# If some macros were called several times there might be several times
19075# the same #defines, which is useless. Nevertheless, we may not want to
19076# sort them, since we want the *last* AC-DEFINE to be honored.
19077uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19078sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19079rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019080
19081# This sed command replaces #undef with comments. This is necessary, for
19082# example, in the case of _POSIX_SOURCE, which is predefined and required
19083# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019084cat >>conftest.undefs <<\_ACEOF
19085s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19086_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019087
Martin v. Löwis11437992002-04-12 09:54:03 +000019088# Break up conftest.defines because some shells have a limit on the size
19089# of here documents, and old seds have small limits too (100 cmds).
19090echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019091echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019092echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19093echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019094rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019095while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019096do
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 # Write a limited-size here document to $tmp/defines.sed.
19098 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19099 # Speed up: don't consider the non `#define' lines.
19100 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19101 # Work around the forget-to-reset-the-flag bug.
19102 echo 't clr' >>$CONFIG_STATUS
19103 echo ': clr' >>$CONFIG_STATUS
19104 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019105 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019106 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19107 rm -f $tmp/in
19108 mv $tmp/out $tmp/in
19109' >>$CONFIG_STATUS
19110 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19111 rm -f conftest.defines
19112 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019113done
Martin v. Löwis11437992002-04-12 09:54:03 +000019114rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019115echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019116echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019117
Martin v. Löwis11437992002-04-12 09:54:03 +000019118# Break up conftest.undefs because some shells have a limit on the size
19119# of here documents, and old seds have small limits too (100 cmds).
19120echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19121rm -f conftest.tail
19122while grep . conftest.undefs >/dev/null
19123do
19124 # Write a limited-size here document to $tmp/undefs.sed.
19125 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19126 # Speed up: don't consider the non `#undef'
19127 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19128 # Work around the forget-to-reset-the-flag bug.
19129 echo 't clr' >>$CONFIG_STATUS
19130 echo ': clr' >>$CONFIG_STATUS
19131 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19132 echo 'CEOF
19133 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19134 rm -f $tmp/in
19135 mv $tmp/out $tmp/in
19136' >>$CONFIG_STATUS
19137 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19138 rm -f conftest.undefs
19139 mv conftest.tail conftest.undefs
19140done
19141rm -f conftest.undefs
19142
19143cat >>$CONFIG_STATUS <<\_ACEOF
19144 # Let's still pretend it is `configure' which instantiates (i.e., don't
19145 # use $as_me), people would be surprised to read:
19146 # /* config.h. Generated by config.status. */
19147 if test x"$ac_file" = x-; then
19148 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019149 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019150 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019151 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019152 cat $tmp/in >>$tmp/config.h
19153 rm -f $tmp/in
19154 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019155 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019156 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19157echo "$as_me: $ac_file is unchanged" >&6;}
19158 else
19159 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19160$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19161 X"$ac_file" : 'X\(//\)[^/]' \| \
19162 X"$ac_file" : 'X\(//\)$' \| \
19163 X"$ac_file" : 'X\(/\)' \| \
19164 . : '\(.\)' 2>/dev/null ||
19165echo X"$ac_file" |
19166 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19167 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19168 /^X\(\/\/\)$/{ s//\1/; q; }
19169 /^X\(\/\).*/{ s//\1/; q; }
19170 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019171 { if $as_mkdir_p; then
19172 mkdir -p "$ac_dir"
19173 else
19174 as_dir="$ac_dir"
19175 as_dirs=
19176 while test ! -d "$as_dir"; do
19177 as_dirs="$as_dir $as_dirs"
19178 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19179$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19180 X"$as_dir" : 'X\(//\)[^/]' \| \
19181 X"$as_dir" : 'X\(//\)$' \| \
19182 X"$as_dir" : 'X\(/\)' \| \
19183 . : '\(.\)' 2>/dev/null ||
19184echo X"$as_dir" |
19185 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19186 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19187 /^X\(\/\/\)$/{ s//\1/; q; }
19188 /^X\(\/\).*/{ s//\1/; q; }
19189 s/.*/./; q'`
19190 done
19191 test ! -n "$as_dirs" || mkdir $as_dirs
19192 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19193echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19194 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019195
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 rm -f $ac_file
19197 mv $tmp/config.h $ac_file
19198 fi
19199 else
19200 cat $tmp/config.h
19201 rm -f $tmp/config.h
19202 fi
19203done
19204_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019205
Martin v. Löwis11437992002-04-12 09:54:03 +000019206cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019207
Martin v. Löwis11437992002-04-12 09:54:03 +000019208{ (exit 0); exit 0; }
19209_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019210chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019211ac_clean_files=$ac_clean_files_save
19212
19213
19214# configure is writing to config.log, and then calls config.status.
19215# config.status does its own redirection, appending to config.log.
19216# Unfortunately, on DOS this fails, as config.log is still kept open
19217# by configure, so config.status won't be able to write to it; its
19218# output is simply discarded. So we exec the FD to /dev/null,
19219# effectively closing config.log, so it can be properly (re)opened and
19220# appended to by config.status. When coming back to configure, we
19221# need to make the FD available again.
19222if test "$no_create" != yes; then
19223 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019224 ac_config_status_args=
19225 test "$silent" = yes &&
19226 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019227 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019228 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019229 exec 5>>config.log
19230 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19231 # would make configure fail if this is the last instruction.
19232 $ac_cs_success || { (exit 1); exit 1; }
19233fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019234
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019235
19236echo "creating Setup"
19237if test ! -f Modules/Setup
19238then
19239 cp $srcdir/Modules/Setup.dist Modules/Setup
19240fi
19241
19242echo "creating Setup.local"
19243if test ! -f Modules/Setup.local
19244then
19245 echo "# Edit this file for local setup changes" >Modules/Setup.local
19246fi
19247
19248echo "creating Makefile"
19249$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19250 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019251 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019252mv config.c Modules