blob: 43abaf07eed8be90b7db97d2f0358476633b8f4f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jack Jansenc8607b72003-12-08 01:10:12 +00002# From configure.in Revision: 1.441 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaro6dead952003-09-25 14:50:04 +00004# Generated by GNU Autoconf 2.57 for python 2.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000010## --------------------- ##
11## M4sh Initialization. ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22 set -o posix
23fi
24
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27 as_unset=unset
28else
29 as_unset=false
30fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in \
41 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43 LC_TELEPHONE LC_TIME
44do
45 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
46 eval $as_var=C; export $as_var
47 else
48 $as_unset $as_var
49 fi
50done
51
52# Required to use basename.
53if expr a : '\(a\)' >/dev/null 2>&1; then
54 as_expr=expr
55else
56 as_expr=false
57fi
58
59if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60 as_basename=basename
61else
62 as_basename=false
63fi
Martin v. Löwis11437992002-04-12 09:54:03 +000064
65
66# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000067as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000068$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69 X"$0" : 'X\(//\)$' \| \
70 X"$0" : 'X\(/\)$' \| \
71 . : '\(.\)' 2>/dev/null ||
72echo X/"$0" |
73 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74 /^X\/\(\/\/\)$/{ s//\1/; q; }
75 /^X\/\(\/\).*/{ s//\1/; q; }
76 s/.*/./; q'`
77
Skip Montanaro6dead952003-09-25 14:50:04 +000078
Martin v. Löwis11437992002-04-12 09:54:03 +000079# PATH needs CR, and LINENO needs CR and PATH.
80# Avoid depending upon Character Ranges.
81as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84as_cr_digits='0123456789'
85as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87# The user is always right.
88if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000089 echo "#! /bin/sh" >conf$$.sh
90 echo "exit 0" >>conf$$.sh
91 chmod +x conf$$.sh
92 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000093 PATH_SEPARATOR=';'
94 else
95 PATH_SEPARATOR=:
96 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000097 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000098fi
99
100
101 as_lineno_1=$LINENO
102 as_lineno_2=$LINENO
103 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104 test "x$as_lineno_1" != "x$as_lineno_2" &&
105 test "x$as_lineno_3" = "x$as_lineno_2" || {
106 # Find who we are. Look in the path if we contain no path at all
107 # relative or not.
108 case $0 in
109 *[\\/]* ) as_myself=$0 ;;
110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111for as_dir in $PATH
112do
113 IFS=$as_save_IFS
114 test -z "$as_dir" && as_dir=.
115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116done
117
118 ;;
119 esac
120 # We did not find ourselves, most probably we were run as `sh COMMAND'
121 # in which case we are not to be found in the path.
122 if test "x$as_myself" = x; then
123 as_myself=$0
124 fi
125 if test ! -f "$as_myself"; then
126 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127 { (exit 1); exit 1; }; }
128 fi
129 case $CONFIG_SHELL in
130 '')
131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133do
134 IFS=$as_save_IFS
135 test -z "$as_dir" && as_dir=.
136 for as_base in sh bash ksh sh5; do
137 case $as_dir in
138 /*)
139 if ("$as_dir/$as_base" -c '
140 as_lineno_1=$LINENO
141 as_lineno_2=$LINENO
142 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143 test "x$as_lineno_1" != "x$as_lineno_2" &&
144 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000145 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000147 CONFIG_SHELL=$as_dir/$as_base
148 export CONFIG_SHELL
149 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150 fi;;
151 esac
152 done
153done
154;;
155 esac
156
157 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158 # uniformly replaced by the line number. The first 'sed' inserts a
159 # line-number line before each line; the second 'sed' does the real
160 # work. The second script uses 'N' to pair each line-number line
161 # with the numbered line, and appends trailing '-' during
162 # substitution so that $LINENO is not a special case at line end.
163 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
165 sed '=' <$as_myself |
166 sed '
167 N
168 s,$,-,
169 : loop
170 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171 t loop
172 s,-$,,
173 s,^['$as_cr_digits']*\n,,
174 ' >$as_me.lineno &&
175 chmod +x $as_me.lineno ||
176 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177 { (exit 1); exit 1; }; }
178
179 # Don't try to exec as it changes $[0], causing all sort of problems
180 # (the dirname of $[0] is not the place where we might find the
181 # original and so on. Autoconf is especially sensible to this).
182 . ./$as_me.lineno
183 # Exit status is that of the last command.
184 exit
185}
186
187
188case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189 *c*,-n*) ECHO_N= ECHO_C='
190' ECHO_T=' ' ;;
191 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
193esac
194
195if expr a : '\(a\)' >/dev/null 2>&1; then
196 as_expr=expr
197else
198 as_expr=false
199fi
200
201rm -f conf$$ conf$$.exe conf$$.file
202echo >conf$$.file
203if ln -s conf$$.file conf$$ 2>/dev/null; then
204 # We could just check for DJGPP; but this test a) works b) is more generic
205 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206 if test -f conf$$.exe; then
207 # Don't use ln at all; we don't have any links
208 as_ln_s='cp -p'
209 else
210 as_ln_s='ln -s'
211 fi
212elif ln conf$$.file conf$$ 2>/dev/null; then
213 as_ln_s=ln
214else
215 as_ln_s='cp -p'
216fi
217rm -f conf$$ conf$$.exe conf$$.file
218
Skip Montanaro6dead952003-09-25 14:50:04 +0000219if mkdir -p . 2>/dev/null; then
220 as_mkdir_p=:
221else
222 as_mkdir_p=false
223fi
224
Martin v. Löwis11437992002-04-12 09:54:03 +0000225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000241$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000254ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000255ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000268PACKAGE_NAME='python'
269PACKAGE_TARNAME='python'
Fred Drake9bd44622003-07-30 17:39:48 +0000270PACKAGE_VERSION='2.4'
271PACKAGE_STRING='python 2.4'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000272PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000273
274ac_unique_file="Include/object.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
Skip Montanaro6dead952003-09-25 14:50:04 +0000312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
313ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000314
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000316ac_init_help=
317ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# The variables have the same names as the options, with
319# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000320cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000321exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000322no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000329site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000330srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332x_includes=NONE
333x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353ac_prev=
354for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000355do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
Martin v. Löwis11437992002-04-12 09:54:03 +0000367 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000372 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
374 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000377 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000394
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403
404 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000406 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413 *) ac_optarg=yes ;;
414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000415 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
426 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429
Martin v. Löwis11437992002-04-12 09:54:03 +0000430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436
437 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000440 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000479
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 # Obsolete; use --without-fp.
482 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486 no_create=yes ;;
487
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000500
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000511 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000518 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000535 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000545 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000556 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000557
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000561 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000566 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000574
Guido van Rossum7f43da71994-08-01 12:15:30 +0000575 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000578 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000585
586 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000588 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000592 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 *) ac_optarg=yes ;;
596 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000597 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598
599 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000601 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000607
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000624 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000625
Martin v. Löwis11437992002-04-12 09:54:03 +0000626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000629 ;;
630
Martin v. Löwis11437992002-04-12 09:54:03 +0000631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000641 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000647 ;;
648
649 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000650done
651
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000656fi
657
Martin v. Löwis11437992002-04-12 09:54:03 +0000658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000660do
Martin v. Löwis11437992002-04-12 09:54:03 +0000661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000666 esac
667done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Martin v. Löwis11437992002-04-12 09:54:03 +0000669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
678 esac
679done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000680
Martin v. Löwis11437992002-04-12 09:54:03 +0000681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000687
Martin v. Löwis11437992002-04-12 09:54:03 +0000688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000723 srcdir=..
724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000725else
726 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000727fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000729 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773
Martin v. Löwis11437992002-04-12 09:54:03 +0000774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000781\`configure' configures python 2.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
831
832 cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000837 case $ac_init_help in
Fred Drake9bd44622003-07-30 17:39:48 +0000838 short | recursive ) echo "Configuration of python 2.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000839 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 cat <<\_ACEOF
841
842Optional Features:
843 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
844 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000845 --enable-framework[=INSTALLDIR]
846 Build (MacOSX|Darwin) framework
847 --enable-shared disable/enable building shared python library
848 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
849 --enable-ipv6 Enable ipv6 (with ipv4) support
850 --disable-ipv6 Disable ipv6 support
851 --enable-unicode[=ucs[24]]
852 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853
854Optional Packages:
855 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
856 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000857 --without-gcc never use gcc
858 --with-cxx=<compiler> enable C++ support
859 --with-suffix=.exe set executable suffix
860 --with-pydebug build with Py_DEBUG defined
861 --with-libs='lib1 ...' link against additional libs
862 --with-signal-module disable/enable signal module
863 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
864 --with(out)-threads[=DIRECTORY]
865 disable/enable thread support
866 --with(out)-thread[=DIRECTORY]
867 deprecated; use --with(out)-threads
868 --with-pth use GNU pth threading libraries
869 --with(out)-universal-newlines
870 disable/enable foreign newlines
871 --with(out)-doc-strings disable/enable documentation strings
872 --with(out)-pymalloc disable/enable specialized mallocs
873 --with-wctype-functions use wctype.h functions
874 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
875 --with-dl-dld=DL_DIR GNU dynamic linking
876 --with-fpectl enable SIGFPE catching
877 --with-libm=STRING math library
878 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880Some influential environment variables:
881 CC C compiler command
882 CFLAGS C compiler flags
883 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
884 nonstandard directory <lib dir>
885 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
886 headers in a nonstandard directory <include dir>
887 CPP C preprocessor
888
889Use these variables to override the choices made by `configure' or to help
890it to find libraries and programs with nonstandard names/locations.
891
892_ACEOF
893fi
894
895if test "$ac_init_help" = "recursive"; then
896 # If there are subdirs, report their specific --help.
897 ac_popdir=`pwd`
898 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
899 test -d $ac_dir || continue
900 ac_builddir=.
901
902if test "$ac_dir" != .; then
903 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
904 # A "../" for each directory in $ac_dir_suffix.
905 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
906else
907 ac_dir_suffix= ac_top_builddir=
908fi
909
910case $srcdir in
911 .) # No --srcdir option. We are building in place.
912 ac_srcdir=.
913 if test -z "$ac_top_builddir"; then
914 ac_top_srcdir=.
915 else
916 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
917 fi ;;
918 [\\/]* | ?:[\\/]* ) # Absolute path.
919 ac_srcdir=$srcdir$ac_dir_suffix;
920 ac_top_srcdir=$srcdir ;;
921 *) # Relative path.
922 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
923 ac_top_srcdir=$ac_top_builddir$srcdir ;;
924esac
925# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
926# absolute.
927ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000928ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000929ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
930ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
931
932 cd $ac_dir
933 # Check for guested configure; otherwise get Cygnus style configure.
934 if test -f $ac_srcdir/configure.gnu; then
935 echo
936 $SHELL $ac_srcdir/configure.gnu --help=recursive
937 elif test -f $ac_srcdir/configure; then
938 echo
939 $SHELL $ac_srcdir/configure --help=recursive
940 elif test -f $ac_srcdir/configure.ac ||
941 test -f $ac_srcdir/configure.in; then
942 echo
943 $ac_configure --help
944 else
945 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
946 fi
947 cd $ac_popdir
948 done
949fi
950
951test -n "$ac_init_help" && exit 0
952if $ac_init_version; then
953 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000954python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000955generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000956
957Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
958Free Software Foundation, Inc.
959This configure script is free software; the Free Software Foundation
960gives unlimited permission to copy, distribute and modify it.
961_ACEOF
962 exit 0
963fi
964exec 5>config.log
965cat >&5 <<_ACEOF
966This file contains any messages produced by compilers while
967running configure, to aid debugging if configure makes a mistake.
968
Fred Drake9bd44622003-07-30 17:39:48 +0000969It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000970generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000971
972 $ $0 $@
973
974_ACEOF
975{
976cat <<_ASUNAME
977## --------- ##
978## Platform. ##
979## --------- ##
980
981hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
982uname -m = `(uname -m) 2>/dev/null || echo unknown`
983uname -r = `(uname -r) 2>/dev/null || echo unknown`
984uname -s = `(uname -s) 2>/dev/null || echo unknown`
985uname -v = `(uname -v) 2>/dev/null || echo unknown`
986
987/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
988/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
989
990/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
991/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
992/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
993hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
994/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
995/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
996/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
997
998_ASUNAME
999
1000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1001for as_dir in $PATH
1002do
1003 IFS=$as_save_IFS
1004 test -z "$as_dir" && as_dir=.
1005 echo "PATH: $as_dir"
1006done
1007
1008} >&5
1009
1010cat >&5 <<_ACEOF
1011
1012
1013## ----------- ##
1014## Core tests. ##
1015## ----------- ##
1016
1017_ACEOF
1018
1019
1020# Keep a trace of the command line.
1021# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001024# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001025ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001026ac_configure_args0=
1027ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001028ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001029ac_must_keep_next=false
1030for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001031do
Skip Montanaro6dead952003-09-25 14:50:04 +00001032 for ac_arg
1033 do
1034 case $ac_arg in
1035 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1036 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1037 | -silent | --silent | --silen | --sile | --sil)
1038 continue ;;
1039 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1040 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1041 esac
1042 case $ac_pass in
1043 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1044 2)
1045 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1046 if test $ac_must_keep_next = true; then
1047 ac_must_keep_next=false # Got value, back to normal.
1048 else
1049 case $ac_arg in
1050 *=* | --config-cache | -C | -disable-* | --disable-* \
1051 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1052 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1053 | -with-* | --with-* | -without-* | --without-* | --x)
1054 case "$ac_configure_args0 " in
1055 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1056 esac
1057 ;;
1058 -* ) ac_must_keep_next=true ;;
1059 esac
1060 fi
1061 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1062 # Get rid of the leading space.
1063 ac_sep=" "
1064 ;;
1065 esac
1066 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001067done
Skip Montanaro6dead952003-09-25 14:50:04 +00001068$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1069$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001070
1071# When interrupted or exit'd, cleanup temporary files, and complete
1072# config.log. We remove comments because anyway the quotes in there
1073# would cause problems or look ugly.
1074# WARNING: Be sure not to use single quotes in there, as some shells,
1075# such as our DU 5.0 friend, will then `close' the trap.
1076trap 'exit_status=$?
1077 # Save into config.log some information that might help in debugging.
1078 {
1079 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001080
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 cat <<\_ASBOX
1082## ---------------- ##
1083## Cache variables. ##
1084## ---------------- ##
1085_ASBOX
1086 echo
1087 # The following way of writing the cache mishandles newlines in values,
1088{
1089 (set) 2>&1 |
1090 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1091 *ac_space=\ *)
1092 sed -n \
1093 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1094 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1095 ;;
1096 *)
1097 sed -n \
1098 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1099 ;;
1100 esac;
1101}
1102 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001103
1104 cat <<\_ASBOX
1105## ----------------- ##
1106## Output variables. ##
1107## ----------------- ##
1108_ASBOX
1109 echo
1110 for ac_var in $ac_subst_vars
1111 do
1112 eval ac_val=$`echo $ac_var`
1113 echo "$ac_var='"'"'$ac_val'"'"'"
1114 done | sort
1115 echo
1116
1117 if test -n "$ac_subst_files"; then
1118 cat <<\_ASBOX
1119## ------------- ##
1120## Output files. ##
1121## ------------- ##
1122_ASBOX
1123 echo
1124 for ac_var in $ac_subst_files
1125 do
1126 eval ac_val=$`echo $ac_var`
1127 echo "$ac_var='"'"'$ac_val'"'"'"
1128 done | sort
1129 echo
1130 fi
1131
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 if test -s confdefs.h; then
1133 cat <<\_ASBOX
1134## ----------- ##
1135## confdefs.h. ##
1136## ----------- ##
1137_ASBOX
1138 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001139 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 echo
1141 fi
1142 test "$ac_signal" != 0 &&
1143 echo "$as_me: caught signal $ac_signal"
1144 echo "$as_me: exit $exit_status"
1145 } >&5
1146 rm -f core core.* *.core &&
1147 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1148 exit $exit_status
1149 ' 0
1150for ac_signal in 1 2 13 15; do
1151 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1152done
1153ac_signal=0
1154
1155# confdefs.h avoids OS command line length limits that DEFS can exceed.
1156rm -rf conftest* confdefs.h
1157# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1158echo >confdefs.h
1159
1160# Predefined preprocessor variables.
1161
1162cat >>confdefs.h <<_ACEOF
1163#define PACKAGE_NAME "$PACKAGE_NAME"
1164_ACEOF
1165
1166
1167cat >>confdefs.h <<_ACEOF
1168#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1169_ACEOF
1170
1171
1172cat >>confdefs.h <<_ACEOF
1173#define PACKAGE_VERSION "$PACKAGE_VERSION"
1174_ACEOF
1175
1176
1177cat >>confdefs.h <<_ACEOF
1178#define PACKAGE_STRING "$PACKAGE_STRING"
1179_ACEOF
1180
1181
1182cat >>confdefs.h <<_ACEOF
1183#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1184_ACEOF
1185
1186
1187# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188# Prefer explicitly selected file to automatically selected ones.
1189if test -z "$CONFIG_SITE"; then
1190 if test "x$prefix" != xNONE; then
1191 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1192 else
1193 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1194 fi
1195fi
1196for ac_site_file in $CONFIG_SITE; do
1197 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1199echo "$as_me: loading site script $ac_site_file" >&6;}
1200 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 . "$ac_site_file"
1202 fi
1203done
1204
1205if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 # Some versions of bash will fail to source /dev/null (special
1207 # files actually), so we avoid doing that.
1208 if test -f "$cache_file"; then
1209 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1210echo "$as_me: loading cache $cache_file" >&6;}
1211 case $cache_file in
1212 [\\/]* | ?:[\\/]* ) . $cache_file;;
1213 *) . ./$cache_file;;
1214 esac
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1218echo "$as_me: creating cache $cache_file" >&6;}
1219 >$cache_file
1220fi
1221
1222# Check that the precious variables saved in the cache have kept the same
1223# value.
1224ac_cache_corrupted=false
1225for ac_var in `(set) 2>&1 |
1226 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1227 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1228 eval ac_new_set=\$ac_env_${ac_var}_set
1229 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1230 eval ac_new_val="\$ac_env_${ac_var}_value"
1231 case $ac_old_set,$ac_new_set in
1232 set,)
1233 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1234echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1235 ac_cache_corrupted=: ;;
1236 ,set)
1237 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1238echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1239 ac_cache_corrupted=: ;;
1240 ,);;
1241 *)
1242 if test "x$ac_old_val" != "x$ac_new_val"; then
1243 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1244echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1245 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1246echo "$as_me: former value: $ac_old_val" >&2;}
1247 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1248echo "$as_me: current value: $ac_new_val" >&2;}
1249 ac_cache_corrupted=:
1250 fi;;
1251 esac
1252 # Pass precious variables to config.status.
1253 if test "$ac_new_set" = set; then
1254 case $ac_new_val in
1255 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1256 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1257 *) ac_arg=$ac_var=$ac_new_val ;;
1258 esac
1259 case " $ac_configure_args " in
1260 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1261 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1262 esac
1263 fi
1264done
1265if $ac_cache_corrupted; then
1266 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1267echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1268 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1269echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1270 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271fi
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001275ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1276ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1277ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Michael W. Hudson54241132001-12-07 15:38:26 +00001280
1281
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
Martin v. Löwis88afe662002-10-26 13:47:44 +00001296
1297
1298
1299
1300
1301
1302
1303
1304
Skip Montanaro6dead952003-09-25 14:50:04 +00001305
1306 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309
1310
1311
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001312
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001313
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001314# We don't use PACKAGE_ variables, and they cause conflicts
1315# with other autoconf-based packages that include Python.h
1316grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1317rm confdefs.h
1318mv confdefs.h.new confdefs.h
1319
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001320
Fred Drake9bd44622003-07-30 17:39:48 +00001321VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001322
Martin v. Löwis1142de32002-03-29 16:28:31 +00001323
1324SOVERSION=1.0
1325
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001326# The later defininition of _XOPEN_SOURCE disables certain features
1327# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1328
1329cat >>confdefs.h <<\_ACEOF
1330#define _GNU_SOURCE 1
1331_ACEOF
1332
1333
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001334# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1335# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1336# them.
1337
1338cat >>confdefs.h <<\_ACEOF
1339#define _NETBSD_SOURCE 1
1340_ACEOF
1341
1342
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001343# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1344# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1345# them.
1346
1347cat >>confdefs.h <<\_ACEOF
1348#define __BSD_VISIBLE 1
1349_ACEOF
1350
1351
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001352define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001353
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001354# Arguments passed to configure.
1355
1356CONFIG_ARGS="$ac_configure_args"
1357
Jack Jansene578a632001-08-15 01:27:14 +00001358# Check whether --enable-framework or --disable-framework was given.
1359if test "${enable_framework+set}" = set; then
1360 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
Jack Jansene578a632001-08-15 01:27:14 +00001362 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001364 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001365 esac
1366 case $enableval in
1367 no)
1368 PYTHONFRAMEWORK=
1369 PYTHONFRAMEWORKDIR=no-framework
1370 PYTHONFRAMEWORKPREFIX=
1371 PYTHONFRAMEWORKINSTALLDIR=
1372 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001373 ;;
1374 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001375 PYTHONFRAMEWORK=Python
1376 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001377 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001378 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1379 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001380 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Guido van Rossum563e7081996-09-10 18:20:48 +00001382else
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001385 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001386 PYTHONFRAMEWORKPREFIX=
1387 PYTHONFRAMEWORKINSTALLDIR=
1388 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001391
1392
1393
1394
Jack Jansene578a632001-08-15 01:27:14 +00001395
1396##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397## AC_HELP_STRING(--with-dyld,
1398## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001399##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001400# Set name for machine-dependent library files
1401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402echo "$as_me:$LINENO: checking MACHDEP" >&5
1403echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001404if test -z "$MACHDEP"
1405then
Guido van Rossum563e7081996-09-10 18:20:48 +00001406 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001407 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1408 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001412 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001413 ac_md_system=`echo $ac_sys_system |
1414 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1415 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001416 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001417 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001418
Guido van Rossum07397971997-04-29 21:49:50 +00001419 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001420 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001421 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001422 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001423 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001424 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001425 esac
1426fi
Guido van Rossum91922671997-10-09 20:24:13 +00001427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001428# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1429# disable features if it is defined, without any means to access these
1430# features as extensions. For these systems, we skip the definition of
1431# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1432# some feature, make sure there is no alternative way to access this
1433# feature. Also, when using wildcards, make sure you have verified the
1434# need for not defining _XOPEN_SOURCE on all systems matching the
1435# wildcard, and that the wildcard does not include future systems
1436# (which may remove their limitations).
1437case $ac_sys_system/$ac_sys_release in
1438 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1439 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001440 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1441 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001442 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001443 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1444 # of union __?sigval. Reported by Stuart Bishop.
1445 SunOS/5.6)
1446 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001447 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1448 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1449 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1450 define_xopen_source=no;;
1451 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001453 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001454 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001455 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1456 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1457 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1458 # This should hopefully be fixed in FreeBSD 4.9
1459 FreeBSD/4.8* | Darwin/6* )
1460 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001461 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1462 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1463 # has another value. By not (re)defining it, the defaults come in place.
1464 AIX/4)
1465 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001466esac
1467
1468if test $define_xopen_source = yes
1469then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001470
1471cat >>confdefs.h <<\_ACEOF
1472#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001473_ACEOF
1474
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001475
1476 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1477 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1478 # several APIs are not declared. Since this is also needed in some
1479 # cases for HP-UX, we define it globally.
1480
1481
1482cat >>confdefs.h <<\_ACEOF
1483#define _XOPEN_SOURCE_EXTENDED 1
1484_ACEOF
1485
1486
1487cat >>confdefs.h <<\_ACEOF
1488#define _POSIX_C_SOURCE 200112L
1489_ACEOF
1490
1491
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001492fi
1493
Guido van Rossum91922671997-10-09 20:24:13 +00001494#
1495# SGI compilers allow the specification of the both the ABI and the
1496# ISA on the command line. Depending on the values of these switches,
1497# different and often incompatable code will be generated.
1498#
1499# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1500# thus supply support for various ABI/ISA combinations. The MACHDEP
1501# variable is also adjusted.
1502#
1503
1504if test ! -z "$SGI_ABI"
1505then
1506 CC="cc $SGI_ABI"
1507 LDFLAGS="$SGI_ABI $LDFLAGS"
1508 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001510echo "$as_me:$LINENO: result: $MACHDEP" >&5
1511echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001512
Jack Jansen83f898c2002-12-30 22:23:40 +00001513# And add extra plat-mac for darwin
1514
Jack Jansen7b59b422003-03-17 15:44:10 +00001515
Jack Jansen83f898c2002-12-30 22:23:40 +00001516echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1517echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1518if test -z "$EXTRAPLATDIR"
1519then
1520 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001521 darwin)
1522 EXTRAPLATDIR="\$(PLATMACDIRS)"
1523 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1524 ;;
1525 *)
1526 EXTRAPLATDIR=""
1527 EXTRAMACHDEPPATH=""
1528 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001529 esac
1530fi
1531echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1532echo "${ECHO_T}$EXTRAPLATDIR" >&6
1533
Guido van Rossum627b2d71993-12-24 10:39:16 +00001534# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001535
1536# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1537# for debug/optimization stuff. BASECFLAGS is for flags that are required
1538# just to get things to compile and link. Users are free to override OPT
1539# when running configure or make. The build should not break if they do.
1540# BASECFLAGS should generally not be messed with, however.
1541
1542# XXX shouldn't some/most/all of this code be merged with the stuff later
1543# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001544echo "$as_me:$LINENO: checking for --without-gcc" >&5
1545echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001548if test "${with_gcc+set}" = set; then
1549 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
Guido van Rossum7f43da71994-08-01 12:15:30 +00001551 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001552 no) CC=cc
1553 without_gcc=yes;;
1554 yes) CC=gcc
1555 without_gcc=no;;
1556 *) CC=$withval
1557 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001558 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001559else
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001561 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001562 AIX*) CC=cc_r
1563 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001564 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001565 case $BE_HOST_CPU in
1566 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001567 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001569 BASECFLAGS="$BASECFLAGS -export pragma"
1570 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001572 ;;
1573 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001574 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001576 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001577 ;;
1578 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1580echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1581 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001582 ;;
1583 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001584 AR="\$(srcdir)/Modules/ar_beos"
1585 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001586 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001587 Monterey*)
1588 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001589 without_gcc=;;
1590 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001591 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001592fi;
1593echo "$as_me:$LINENO: result: $without_gcc" >&5
1594echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001595
1596
Guido van Rossum95012191999-12-16 17:50:52 +00001597
Fred Drakea1a84e72001-03-06 05:52:16 +00001598MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001599echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1600echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1601
Guido van Rossum95012191999-12-16 17:50:52 +00001602# Check whether --with-cxx or --without-cxx was given.
1603if test "${with_cxx+set}" = set; then
1604 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001605
Martin v. Löwis22352952000-12-13 17:37:02 +00001606 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001607 case $withval in
1608 no) CXX=
1609 with_cxx=no;;
1610 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001611 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001612 with_cxx=$withval;;
1613 esac
1614else
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
Guido van Rossum95012191999-12-16 17:50:52 +00001616 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001617 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001618
Martin v. Löwis11437992002-04-12 09:54:03 +00001619fi;
1620echo "$as_me:$LINENO: result: $with_cxx" >&5
1621echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001622
1623if test "$with_cxx" = "yes"
1624then
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1626echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1627 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001628fi
1629
1630
1631
1632
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001634then
1635 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1636do
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 # 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 +00001638set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001639echo "$as_me:$LINENO: checking for $ac_word" >&5
1640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641if test "${ac_cv_prog_CXX+set}" = set; then
1642 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001643else
1644 if test -n "$CXX"; then
1645 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1646else
Martin v. Löwis11437992002-04-12 09:54:03 +00001647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1648for as_dir in $PATH
1649do
1650 IFS=$as_save_IFS
1651 test -z "$as_dir" && as_dir=.
1652 for ac_exec_ext in '' $ac_executable_extensions; do
1653 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1654 ac_cv_prog_CXX="$ac_prog"
1655 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1656 break 2
1657 fi
1658done
1659done
1660
Martin v. Löwis22352952000-12-13 17:37:02 +00001661fi
1662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001663CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001664if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 echo "$as_me:$LINENO: result: $CXX" >&5
1666echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001667else
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 echo "$as_me:$LINENO: result: no" >&5
1669echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001670fi
1671
Martin v. Löwis11437992002-04-12 09:54:03 +00001672 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001673done
1674test -n "$CXX" || CXX="notfound"
1675
1676 if test "$CXX" = "notfound"
1677 then
1678 CXX=
1679 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001680 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001681ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1685 cat >conftest.$ac_ext <<_ACEOF
1686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001687/* confdefs.h. */
1688_ACEOF
1689cat confdefs.h >>conftest.$ac_ext
1690cat >>conftest.$ac_ext <<_ACEOF
1691/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693int
1694main ()
1695{
Michael W. Hudson54241132001-12-07 15:38:26 +00001696
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 ;
1698 return 0;
1699}
1700_ACEOF
1701ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001702ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001703# Try to create an executable without -o first, disregard a.out.
1704# It will help us diagnose broken compilers, and finding out an intuition
1705# of exeext.
1706echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1707echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1708ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1709if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1710 (eval $ac_link_default) 2>&5
1711 ac_status=$?
1712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1713 (exit $ac_status); }; then
1714 # Find the output, starting from the most likely. This scheme is
1715# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1716# resort.
1717
1718# Be careful to initialize this variable, since it used to be cached.
1719# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1720ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001721# b.out is created by i960 compilers.
1722for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1723do
1724 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001726 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1727 ;;
1728 conftest.$ac_ext )
1729 # This is the source file.
1730 ;;
1731 [ab].out )
1732 # We found the default executable, but exeext='' is most
1733 # certainly right.
1734 break;;
1735 *.* )
1736 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1737 # FIXME: I believe we export ac_cv_exeext for Libtool,
1738 # but it would be cool to find out if it's true. Does anybody
1739 # maintain Libtool? --akim.
1740 export ac_cv_exeext
1741 break;;
1742 * )
1743 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 esac
1745done
1746else
1747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1751See \`config.log' for more details." >&5
1752echo "$as_me: error: C++ compiler cannot create executables
1753See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001756
1757ac_exeext=$ac_cv_exeext
1758echo "$as_me:$LINENO: result: $ac_file" >&5
1759echo "${ECHO_T}$ac_file" >&6
1760
1761# Check the compiler produces executables we can run. If not, either
1762# the compiler is broken, or we cross compile.
1763echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1764echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1765# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1766# If not cross compiling, check that we can run a simple program.
1767if test "$cross_compiling" != yes; then
1768 if { ac_try='./$ac_file'
1769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1770 (eval $ac_try) 2>&5
1771 ac_status=$?
1772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1773 (exit $ac_status); }; }; then
1774 cross_compiling=no
1775 else
1776 if test "$cross_compiling" = maybe; then
1777 cross_compiling=yes
1778 else
1779 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001780If you meant to cross compile, use \`--host'.
1781See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001782echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001783If you meant to cross compile, use \`--host'.
1784See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001785 { (exit 1); exit 1; }; }
1786 fi
1787 fi
1788fi
1789echo "$as_me:$LINENO: result: yes" >&5
1790echo "${ECHO_T}yes" >&6
1791
Skip Montanaro6dead952003-09-25 14:50:04 +00001792rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_clean_files=$ac_clean_files_save
1794# Check the compiler produces executables we can run. If not, either
1795# the compiler is broken, or we cross compile.
1796echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1797echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1798echo "$as_me:$LINENO: result: $cross_compiling" >&5
1799echo "${ECHO_T}$cross_compiling" >&6
1800
1801echo "$as_me:$LINENO: checking for suffix of executables" >&5
1802echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1804 (eval $ac_link) 2>&5
1805 ac_status=$?
1806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1807 (exit $ac_status); }; then
1808 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1809# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1810# work properly (i.e., refer to `conftest.exe'), while it won't with
1811# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001812for ac_file in conftest.exe conftest conftest.*; do
1813 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001814 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001816 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1817 export ac_cv_exeext
1818 break;;
1819 * ) break;;
1820 esac
1821done
1822else
Skip Montanaro6dead952003-09-25 14:50:04 +00001823 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1824See \`config.log' for more details." >&5
1825echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1826See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 { (exit 1); exit 1; }; }
1828fi
1829
1830rm -f conftest$ac_cv_exeext
1831echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1832echo "${ECHO_T}$ac_cv_exeext" >&6
1833
1834rm -f conftest.$ac_ext
1835EXEEXT=$ac_cv_exeext
1836ac_exeext=$EXEEXT
1837
1838 ac_ext=c
1839ac_cpp='$CPP $CPPFLAGS'
1840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1842ac_compiler_gnu=$ac_cv_c_compiler_gnu
1843
1844
Martin v. Löwis22352952000-12-13 17:37:02 +00001845
1846 fi
1847fi
1848
Guido van Rossum8b131c51995-03-09 14:10:13 +00001849# If the user switches compilers, we can't believe the cache
1850if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1851then
Martin v. Löwis11437992002-04-12 09:54:03 +00001852 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1853(it is also a good idea to do 'make clean' before compiling)" >&5
1854echo "$as_me: error: cached CC is different -- throw away $cache_file
1855(it is also a good idea to do 'make clean' before compiling)" >&2;}
1856 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001857fi
1858
Martin v. Löwis11437992002-04-12 09:54:03 +00001859ac_ext=c
1860ac_cpp='$CPP $CPPFLAGS'
1861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1863ac_compiler_gnu=$ac_cv_c_compiler_gnu
1864if test -n "$ac_tool_prefix"; then
1865 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1866set dummy ${ac_tool_prefix}gcc; ac_word=$2
1867echo "$as_me:$LINENO: checking for $ac_word" >&5
1868echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1869if test "${ac_cv_prog_CC+set}" = set; then
1870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001871else
1872 if test -n "$CC"; then
1873 ac_cv_prog_CC="$CC" # Let the user override the test.
1874else
Martin v. Löwis11437992002-04-12 09:54:03 +00001875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1876for as_dir in $PATH
1877do
1878 IFS=$as_save_IFS
1879 test -z "$as_dir" && as_dir=.
1880 for ac_exec_ext in '' $ac_executable_extensions; do
1881 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1882 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
Jack Jansendd19cf82001-12-06 22:36:17 +00001889fi
1890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001891CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001892if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001893 echo "$as_me:$LINENO: result: $CC" >&5
1894echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001895else
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 echo "$as_me:$LINENO: result: no" >&5
1897echo "${ECHO_T}no" >&6
1898fi
1899
1900fi
1901if test -z "$ac_cv_prog_CC"; then
1902 ac_ct_CC=$CC
1903 # Extract the first word of "gcc", so it can be a program name with args.
1904set dummy gcc; ac_word=$2
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920 ac_cv_prog_ac_ct_CC="gcc"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
1923 fi
1924done
1925done
1926
1927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
1933else
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
1936fi
1937
1938 CC=$ac_ct_CC
1939else
1940 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001941fi
1942
Jack Jansendd19cf82001-12-06 22:36:17 +00001943if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001944 if test -n "$ac_tool_prefix"; then
1945 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1946set dummy ${ac_tool_prefix}cc; ac_word=$2
1947echo "$as_me:$LINENO: checking for $ac_word" >&5
1948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1949if test "${ac_cv_prog_CC+set}" = set; then
1950 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001951else
1952 if test -n "$CC"; then
1953 ac_cv_prog_CC="$CC" # Let the user override the test.
1954else
Martin v. Löwis11437992002-04-12 09:54:03 +00001955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1956for as_dir in $PATH
1957do
1958 IFS=$as_save_IFS
1959 test -z "$as_dir" && as_dir=.
1960 for ac_exec_ext in '' $ac_executable_extensions; do
1961 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1962 ac_cv_prog_CC="${ac_tool_prefix}cc"
1963 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1964 break 2
1965 fi
1966done
1967done
1968
1969fi
1970fi
1971CC=$ac_cv_prog_CC
1972if test -n "$CC"; then
1973 echo "$as_me:$LINENO: result: $CC" >&5
1974echo "${ECHO_T}$CC" >&6
1975else
1976 echo "$as_me:$LINENO: result: no" >&5
1977echo "${ECHO_T}no" >&6
1978fi
1979
1980fi
1981if test -z "$ac_cv_prog_CC"; then
1982 ac_ct_CC=$CC
1983 # Extract the first word of "cc", so it can be a program name with args.
1984set dummy cc; ac_word=$2
1985echo "$as_me:$LINENO: checking for $ac_word" >&5
1986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1988 echo $ECHO_N "(cached) $ECHO_C" >&6
1989else
1990 if test -n "$ac_ct_CC"; then
1991 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1992else
1993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994for as_dir in $PATH
1995do
1996 IFS=$as_save_IFS
1997 test -z "$as_dir" && as_dir=.
1998 for ac_exec_ext in '' $ac_executable_extensions; do
1999 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000 ac_cv_prog_ac_ct_CC="cc"
2001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2002 break 2
2003 fi
2004done
2005done
2006
2007fi
2008fi
2009ac_ct_CC=$ac_cv_prog_ac_ct_CC
2010if test -n "$ac_ct_CC"; then
2011 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2012echo "${ECHO_T}$ac_ct_CC" >&6
2013else
2014 echo "$as_me:$LINENO: result: no" >&5
2015echo "${ECHO_T}no" >&6
2016fi
2017
2018 CC=$ac_ct_CC
2019else
2020 CC="$ac_cv_prog_CC"
2021fi
2022
2023fi
2024if test -z "$CC"; then
2025 # Extract the first word of "cc", so it can be a program name with args.
2026set dummy cc; ac_word=$2
2027echo "$as_me:$LINENO: checking for $ac_word" >&5
2028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2029if test "${ac_cv_prog_CC+set}" = set; then
2030 echo $ECHO_N "(cached) $ECHO_C" >&6
2031else
2032 if test -n "$CC"; then
2033 ac_cv_prog_CC="$CC" # Let the user override the test.
2034else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002035 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037for as_dir in $PATH
2038do
2039 IFS=$as_save_IFS
2040 test -z "$as_dir" && as_dir=.
2041 for ac_exec_ext in '' $ac_executable_extensions; do
2042 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2043 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2044 ac_prog_rejected=yes
2045 continue
2046 fi
2047 ac_cv_prog_CC="cc"
2048 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2049 break 2
2050 fi
2051done
2052done
2053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054if test $ac_prog_rejected = yes; then
2055 # We found a bogon in the path, so make sure we never use it.
2056 set dummy $ac_cv_prog_CC
2057 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002058 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002059 # We chose a different compiler from the bogus one.
2060 # However, it has the same basename, so the bogon will be chosen
2061 # first if we set CC to just the basename; use the full file name.
2062 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002063 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064 fi
2065fi
2066fi
2067fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002068CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002069if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002070 echo "$as_me:$LINENO: result: $CC" >&5
2071echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002072else
Martin v. Löwis11437992002-04-12 09:54:03 +00002073 echo "$as_me:$LINENO: result: no" >&5
2074echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002075fi
2076
Martin v. Löwis11437992002-04-12 09:54:03 +00002077fi
2078if test -z "$CC"; then
2079 if test -n "$ac_tool_prefix"; then
2080 for ac_prog in cl
2081 do
2082 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2084echo "$as_me:$LINENO: checking for $ac_word" >&5
2085echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2086if test "${ac_cv_prog_CC+set}" = set; then
2087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002088else
2089 if test -n "$CC"; then
2090 ac_cv_prog_CC="$CC" # Let the user override the test.
2091else
Martin v. Löwis11437992002-04-12 09:54:03 +00002092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2093for as_dir in $PATH
2094do
2095 IFS=$as_save_IFS
2096 test -z "$as_dir" && as_dir=.
2097 for ac_exec_ext in '' $ac_executable_extensions; do
2098 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2099 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2100 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2101 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002102 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002103done
2104done
2105
2106fi
2107fi
2108CC=$ac_cv_prog_CC
2109if test -n "$CC"; then
2110 echo "$as_me:$LINENO: result: $CC" >&5
2111echo "${ECHO_T}$CC" >&6
2112else
2113 echo "$as_me:$LINENO: result: no" >&5
2114echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002115fi
2116
Martin v. Löwis11437992002-04-12 09:54:03 +00002117 test -n "$CC" && break
2118 done
2119fi
2120if test -z "$CC"; then
2121 ac_ct_CC=$CC
2122 for ac_prog in cl
2123do
2124 # Extract the first word of "$ac_prog", so it can be a program name with args.
2125set dummy $ac_prog; ac_word=$2
2126echo "$as_me:$LINENO: checking for $ac_word" >&5
2127echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2128if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2129 echo $ECHO_N "(cached) $ECHO_C" >&6
2130else
2131 if test -n "$ac_ct_CC"; then
2132 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2133else
2134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2135for as_dir in $PATH
2136do
2137 IFS=$as_save_IFS
2138 test -z "$as_dir" && as_dir=.
2139 for ac_exec_ext in '' $ac_executable_extensions; do
2140 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2141 ac_cv_prog_ac_ct_CC="$ac_prog"
2142 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2143 break 2
2144 fi
2145done
2146done
Jack Jansendd19cf82001-12-06 22:36:17 +00002147
Martin v. Löwis11437992002-04-12 09:54:03 +00002148fi
2149fi
2150ac_ct_CC=$ac_cv_prog_ac_ct_CC
2151if test -n "$ac_ct_CC"; then
2152 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2153echo "${ECHO_T}$ac_ct_CC" >&6
2154else
2155 echo "$as_me:$LINENO: result: no" >&5
2156echo "${ECHO_T}no" >&6
2157fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002158
Martin v. Löwis11437992002-04-12 09:54:03 +00002159 test -n "$ac_ct_CC" && break
2160done
Michael W. Hudson54241132001-12-07 15:38:26 +00002161
Martin v. Löwis11437992002-04-12 09:54:03 +00002162 CC=$ac_ct_CC
2163fi
2164
2165fi
2166
2167
Skip Montanaro6dead952003-09-25 14:50:04 +00002168test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&5
2170echo "$as_me: error: no acceptable C compiler found in \$PATH
2171See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002172 { (exit 1); exit 1; }; }
2173
2174# Provide some information about the compiler.
2175echo "$as_me:$LINENO:" \
2176 "checking for C compiler version" >&5
2177ac_compiler=`set X $ac_compile; echo $2`
2178{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2179 (eval $ac_compiler --version </dev/null >&5) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }
2183{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2184 (eval $ac_compiler -v </dev/null >&5) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); }
2188{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2189 (eval $ac_compiler -V </dev/null >&5) 2>&5
2190 ac_status=$?
2191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2192 (exit $ac_status); }
2193
2194cat >conftest.$ac_ext <<_ACEOF
2195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002196/* confdefs.h. */
2197_ACEOF
2198cat confdefs.h >>conftest.$ac_ext
2199cat >>conftest.$ac_ext <<_ACEOF
2200/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002201
Martin v. Löwis11437992002-04-12 09:54:03 +00002202int
2203main ()
2204{
2205
2206 ;
2207 return 0;
2208}
2209_ACEOF
2210ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002211ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002212# Try to create an executable without -o first, disregard a.out.
2213# It will help us diagnose broken compilers, and finding out an intuition
2214# of exeext.
2215echo "$as_me:$LINENO: checking for C compiler default output" >&5
2216echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2217ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2218if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2219 (eval $ac_link_default) 2>&5
2220 ac_status=$?
2221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222 (exit $ac_status); }; then
2223 # Find the output, starting from the most likely. This scheme is
2224# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2225# resort.
2226
2227# Be careful to initialize this variable, since it used to be cached.
2228# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2229ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002230# b.out is created by i960 compilers.
2231for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2232do
2233 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002234 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002235 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2236 ;;
2237 conftest.$ac_ext )
2238 # This is the source file.
2239 ;;
2240 [ab].out )
2241 # We found the default executable, but exeext='' is most
2242 # certainly right.
2243 break;;
2244 *.* )
2245 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2246 # FIXME: I believe we export ac_cv_exeext for Libtool,
2247 # but it would be cool to find out if it's true. Does anybody
2248 # maintain Libtool? --akim.
2249 export ac_cv_exeext
2250 break;;
2251 * )
2252 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 esac
2254done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002255else
Martin v. Löwis11437992002-04-12 09:54:03 +00002256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2260See \`config.log' for more details." >&5
2261echo "$as_me: error: C compiler cannot create executables
2262See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002263 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002264fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002265
Martin v. Löwis11437992002-04-12 09:54:03 +00002266ac_exeext=$ac_cv_exeext
2267echo "$as_me:$LINENO: result: $ac_file" >&5
2268echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270# Check the compiler produces executables we can run. If not, either
2271# the compiler is broken, or we cross compile.
2272echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2273echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2274# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2275# If not cross compiling, check that we can run a simple program.
2276if test "$cross_compiling" != yes; then
2277 if { ac_try='./$ac_file'
2278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2279 (eval $ac_try) 2>&5
2280 ac_status=$?
2281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2282 (exit $ac_status); }; }; then
2283 cross_compiling=no
2284 else
2285 if test "$cross_compiling" = maybe; then
2286 cross_compiling=yes
2287 else
2288 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002289If you meant to cross compile, use \`--host'.
2290See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002291echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002292If you meant to cross compile, use \`--host'.
2293See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002294 { (exit 1); exit 1; }; }
2295 fi
2296 fi
2297fi
2298echo "$as_me:$LINENO: result: yes" >&5
2299echo "${ECHO_T}yes" >&6
2300
Skip Montanaro6dead952003-09-25 14:50:04 +00002301rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002302ac_clean_files=$ac_clean_files_save
2303# Check the compiler produces executables we can run. If not, either
2304# the compiler is broken, or we cross compile.
2305echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2306echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2307echo "$as_me:$LINENO: result: $cross_compiling" >&5
2308echo "${ECHO_T}$cross_compiling" >&6
2309
2310echo "$as_me:$LINENO: checking for suffix of executables" >&5
2311echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2313 (eval $ac_link) 2>&5
2314 ac_status=$?
2315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2316 (exit $ac_status); }; then
2317 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2318# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2319# work properly (i.e., refer to `conftest.exe'), while it won't with
2320# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002321for ac_file in conftest.exe conftest conftest.*; do
2322 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002323 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002324 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2326 export ac_cv_exeext
2327 break;;
2328 * ) break;;
2329 esac
2330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002331else
Skip Montanaro6dead952003-09-25 14:50:04 +00002332 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2333See \`config.log' for more details." >&5
2334echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2335See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002336 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002337fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339rm -f conftest$ac_cv_exeext
2340echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2341echo "${ECHO_T}$ac_cv_exeext" >&6
2342
2343rm -f conftest.$ac_ext
2344EXEEXT=$ac_cv_exeext
2345ac_exeext=$EXEEXT
2346echo "$as_me:$LINENO: checking for suffix of object files" >&5
2347echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2348if test "${ac_cv_objext+set}" = set; then
2349 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002350else
Martin v. Löwis11437992002-04-12 09:54:03 +00002351 cat >conftest.$ac_ext <<_ACEOF
2352#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002353/* confdefs.h. */
2354_ACEOF
2355cat confdefs.h >>conftest.$ac_ext
2356cat >>conftest.$ac_ext <<_ACEOF
2357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002358
Martin v. Löwis11437992002-04-12 09:54:03 +00002359int
2360main ()
2361{
2362
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367rm -f conftest.o conftest.obj
2368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2369 (eval $ac_compile) 2>&5
2370 ac_status=$?
2371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2372 (exit $ac_status); }; then
2373 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2374 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002375 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002376 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2377 break;;
2378 esac
2379done
2380else
2381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002382sed 's/^/| /' conftest.$ac_ext >&5
2383
2384{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2385See \`config.log' for more details." >&5
2386echo "$as_me: error: cannot compute suffix of object files: cannot compile
2387See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002388 { (exit 1); exit 1; }; }
2389fi
2390
2391rm -f conftest.$ac_cv_objext conftest.$ac_ext
2392fi
2393echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2394echo "${ECHO_T}$ac_cv_objext" >&6
2395OBJEXT=$ac_cv_objext
2396ac_objext=$OBJEXT
2397echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2398echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2399if test "${ac_cv_c_compiler_gnu+set}" = set; then
2400 echo $ECHO_N "(cached) $ECHO_C" >&6
2401else
2402 cat >conftest.$ac_ext <<_ACEOF
2403#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002404/* confdefs.h. */
2405_ACEOF
2406cat confdefs.h >>conftest.$ac_ext
2407cat >>conftest.$ac_ext <<_ACEOF
2408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
Martin v. Löwis11437992002-04-12 09:54:03 +00002410int
2411main ()
2412{
2413#ifndef __GNUC__
2414 choke me
2415#endif
2416
2417 ;
2418 return 0;
2419}
2420_ACEOF
2421rm -f conftest.$ac_objext
2422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2423 (eval $ac_compile) 2>&5
2424 ac_status=$?
2425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2426 (exit $ac_status); } &&
2427 { ac_try='test -s conftest.$ac_objext'
2428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2429 (eval $ac_try) 2>&5
2430 ac_status=$?
2431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2432 (exit $ac_status); }; }; then
2433 ac_compiler_gnu=yes
2434else
2435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002436sed 's/^/| /' conftest.$ac_ext >&5
2437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438ac_compiler_gnu=no
2439fi
2440rm -f conftest.$ac_objext conftest.$ac_ext
2441ac_cv_c_compiler_gnu=$ac_compiler_gnu
2442
2443fi
2444echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2445echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2446GCC=`test $ac_compiler_gnu = yes && echo yes`
2447ac_test_CFLAGS=${CFLAGS+set}
2448ac_save_CFLAGS=$CFLAGS
2449CFLAGS="-g"
2450echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2451echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2452if test "${ac_cv_prog_cc_g+set}" = set; then
2453 echo $ECHO_N "(cached) $ECHO_C" >&6
2454else
2455 cat >conftest.$ac_ext <<_ACEOF
2456#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002457/* confdefs.h. */
2458_ACEOF
2459cat confdefs.h >>conftest.$ac_ext
2460cat >>conftest.$ac_ext <<_ACEOF
2461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
Martin v. Löwis11437992002-04-12 09:54:03 +00002463int
2464main ()
2465{
2466
2467 ;
2468 return 0;
2469}
2470_ACEOF
2471rm -f conftest.$ac_objext
2472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2473 (eval $ac_compile) 2>&5
2474 ac_status=$?
2475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2476 (exit $ac_status); } &&
2477 { ac_try='test -s conftest.$ac_objext'
2478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2479 (eval $ac_try) 2>&5
2480 ac_status=$?
2481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2482 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002483 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002484else
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002486sed 's/^/| /' conftest.$ac_ext >&5
2487
Martin v. Löwis11437992002-04-12 09:54:03 +00002488ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002490rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002492echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2493echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002494if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002496elif test $ac_cv_prog_cc_g = yes; then
2497 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498 CFLAGS="-g -O2"
2499 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002500 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002501 fi
2502else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002503 if test "$GCC" = yes; then
2504 CFLAGS="-O2"
2505 else
2506 CFLAGS=
2507 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002508fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002509echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2510echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2511if test "${ac_cv_prog_cc_stdc+set}" = set; then
2512 echo $ECHO_N "(cached) $ECHO_C" >&6
2513else
2514 ac_cv_prog_cc_stdc=no
2515ac_save_CC=$CC
2516cat >conftest.$ac_ext <<_ACEOF
2517#line $LINENO "configure"
2518/* confdefs.h. */
2519_ACEOF
2520cat confdefs.h >>conftest.$ac_ext
2521cat >>conftest.$ac_ext <<_ACEOF
2522/* end confdefs.h. */
2523#include <stdarg.h>
2524#include <stdio.h>
2525#include <sys/types.h>
2526#include <sys/stat.h>
2527/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2528struct buf { int x; };
2529FILE * (*rcsopen) (struct buf *, struct stat *, int);
2530static char *e (p, i)
2531 char **p;
2532 int i;
2533{
2534 return p[i];
2535}
2536static char *f (char * (*g) (char **, int), char **p, ...)
2537{
2538 char *s;
2539 va_list v;
2540 va_start (v,p);
2541 s = g (p, va_arg (v,int));
2542 va_end (v);
2543 return s;
2544}
2545int test (int i, double x);
2546struct s1 {int (*f) (int a);};
2547struct s2 {int (*f) (double a);};
2548int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2549int argc;
2550char **argv;
2551int
2552main ()
2553{
2554return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2555 ;
2556 return 0;
2557}
2558_ACEOF
2559# Don't try gcc -ansi; that turns off useful extensions and
2560# breaks some systems' header files.
2561# AIX -qlanglvl=ansi
2562# Ultrix and OSF/1 -std1
2563# HP-UX 10.20 and later -Ae
2564# HP-UX older versions -Aa -D_HPUX_SOURCE
2565# SVR4 -Xc -D__EXTENSIONS__
2566for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2567do
2568 CC="$ac_save_CC $ac_arg"
2569 rm -f conftest.$ac_objext
2570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2571 (eval $ac_compile) 2>&5
2572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); } &&
2575 { ac_try='test -s conftest.$ac_objext'
2576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2577 (eval $ac_try) 2>&5
2578 ac_status=$?
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); }; }; then
2581 ac_cv_prog_cc_stdc=$ac_arg
2582break
2583else
2584 echo "$as_me: failed program was:" >&5
2585sed 's/^/| /' conftest.$ac_ext >&5
2586
2587fi
2588rm -f conftest.$ac_objext
2589done
2590rm -f conftest.$ac_ext conftest.$ac_objext
2591CC=$ac_save_CC
2592
2593fi
2594
2595case "x$ac_cv_prog_cc_stdc" in
2596 x|xno)
2597 echo "$as_me:$LINENO: result: none needed" >&5
2598echo "${ECHO_T}none needed" >&6 ;;
2599 *)
2600 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2601echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2602 CC="$CC $ac_cv_prog_cc_stdc" ;;
2603esac
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605# Some people use a C++ compiler to compile C. Since we use `exit',
2606# in C++ we need to declare it. In case someone uses the same compiler
2607# for both compiling C and C++ we need to have the C++ compiler decide
2608# the declaration of exit, since it's the most demanding environment.
2609cat >conftest.$ac_ext <<_ACEOF
2610#ifndef __cplusplus
2611 choke me
2612#endif
2613_ACEOF
2614rm -f conftest.$ac_objext
2615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2616 (eval $ac_compile) 2>&5
2617 ac_status=$?
2618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2619 (exit $ac_status); } &&
2620 { ac_try='test -s conftest.$ac_objext'
2621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2622 (eval $ac_try) 2>&5
2623 ac_status=$?
2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); }; }; then
2626 for ac_declaration in \
2627 ''\
2628 '#include <stdlib.h>' \
2629 'extern "C" void std::exit (int) throw (); using std::exit;' \
2630 'extern "C" void std::exit (int); using std::exit;' \
2631 'extern "C" void exit (int) throw ();' \
2632 'extern "C" void exit (int);' \
2633 'void exit (int);'
2634do
2635 cat >conftest.$ac_ext <<_ACEOF
2636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002637/* confdefs.h. */
2638_ACEOF
2639cat confdefs.h >>conftest.$ac_ext
2640cat >>conftest.$ac_ext <<_ACEOF
2641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002642#include <stdlib.h>
2643$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002644int
2645main ()
2646{
2647exit (42);
2648 ;
2649 return 0;
2650}
2651_ACEOF
2652rm -f conftest.$ac_objext
2653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2654 (eval $ac_compile) 2>&5
2655 ac_status=$?
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); } &&
2658 { ac_try='test -s conftest.$ac_objext'
2659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2660 (eval $ac_try) 2>&5
2661 ac_status=$?
2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2663 (exit $ac_status); }; }; then
2664 :
2665else
2666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002667sed 's/^/| /' conftest.$ac_ext >&5
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669continue
2670fi
2671rm -f conftest.$ac_objext conftest.$ac_ext
2672 cat >conftest.$ac_ext <<_ACEOF
2673#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002674/* confdefs.h. */
2675_ACEOF
2676cat confdefs.h >>conftest.$ac_ext
2677cat >>conftest.$ac_ext <<_ACEOF
2678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002679$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002680int
2681main ()
2682{
2683exit (42);
2684 ;
2685 return 0;
2686}
2687_ACEOF
2688rm -f conftest.$ac_objext
2689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2690 (eval $ac_compile) 2>&5
2691 ac_status=$?
2692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693 (exit $ac_status); } &&
2694 { ac_try='test -s conftest.$ac_objext'
2695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2696 (eval $ac_try) 2>&5
2697 ac_status=$?
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); }; }; then
2700 break
2701else
2702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002703sed 's/^/| /' conftest.$ac_ext >&5
2704
Martin v. Löwis11437992002-04-12 09:54:03 +00002705fi
2706rm -f conftest.$ac_objext conftest.$ac_ext
2707done
2708rm -f conftest*
2709if test -n "$ac_declaration"; then
2710 echo '#ifdef __cplusplus' >>confdefs.h
2711 echo $ac_declaration >>confdefs.h
2712 echo '#endif' >>confdefs.h
2713fi
2714
2715else
2716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002717sed 's/^/| /' conftest.$ac_ext >&5
2718
Martin v. Löwis11437992002-04-12 09:54:03 +00002719fi
2720rm -f conftest.$ac_objext conftest.$ac_ext
2721ac_ext=c
2722ac_cpp='$CPP $CPPFLAGS'
2723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002727
2728# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002729
2730ac_ext=c
2731ac_cpp='$CPP $CPPFLAGS'
2732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2734ac_compiler_gnu=$ac_cv_c_compiler_gnu
2735echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2736echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002737# On Suns, sometimes $CPP names a directory.
2738if test -n "$CPP" && test -d "$CPP"; then
2739 CPP=
2740fi
2741if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 if test "${ac_cv_prog_CPP+set}" = set; then
2743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002744else
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 # Double quotes because CPP needs to be expanded
2746 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2747 do
2748 ac_preproc_ok=false
2749for ac_c_preproc_warn_flag in '' yes
2750do
2751 # Use a header file that comes with gcc, so configuring glibc
2752 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002753 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2754 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002755 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 # not just through cpp. "Syntax error" is here to catch this case.
2757 cat >conftest.$ac_ext <<_ACEOF
2758#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002759/* confdefs.h. */
2760_ACEOF
2761cat confdefs.h >>conftest.$ac_ext
2762cat >>conftest.$ac_ext <<_ACEOF
2763/* end confdefs.h. */
2764#ifdef __STDC__
2765# include <limits.h>
2766#else
2767# include <assert.h>
2768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 Syntax error
2770_ACEOF
2771if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2772 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2773 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002774 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 rm -f conftest.er1
2776 cat conftest.err >&5
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); } >/dev/null; then
2779 if test -s conftest.err; then
2780 ac_cpp_err=$ac_c_preproc_warn_flag
2781 else
2782 ac_cpp_err=
2783 fi
2784else
2785 ac_cpp_err=yes
2786fi
2787if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002788 :
2789else
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002791sed 's/^/| /' conftest.$ac_ext >&5
2792
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 # Broken: fails on valid input.
2794continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002796rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002797
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 # OK, works on sane cases. Now check whether non-existent headers
2799 # can be detected and how.
2800 cat >conftest.$ac_ext <<_ACEOF
2801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002802/* confdefs.h. */
2803_ACEOF
2804cat confdefs.h >>conftest.$ac_ext
2805cat >>conftest.$ac_ext <<_ACEOF
2806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002807#include <ac_nonexistent.h>
2808_ACEOF
2809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2811 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002812 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002813 rm -f conftest.er1
2814 cat conftest.err >&5
2815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2816 (exit $ac_status); } >/dev/null; then
2817 if test -s conftest.err; then
2818 ac_cpp_err=$ac_c_preproc_warn_flag
2819 else
2820 ac_cpp_err=
2821 fi
2822else
2823 ac_cpp_err=yes
2824fi
2825if test -z "$ac_cpp_err"; then
2826 # Broken: success on invalid input.
2827continue
2828else
2829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002830sed 's/^/| /' conftest.$ac_ext >&5
2831
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 # Passes both tests.
2833ac_preproc_ok=:
2834break
2835fi
2836rm -f conftest.err conftest.$ac_ext
2837
2838done
2839# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2840rm -f conftest.err conftest.$ac_ext
2841if $ac_preproc_ok; then
2842 break
2843fi
2844
2845 done
2846 ac_cv_prog_CPP=$CPP
2847
2848fi
2849 CPP=$ac_cv_prog_CPP
2850else
2851 ac_cv_prog_CPP=$CPP
2852fi
2853echo "$as_me:$LINENO: result: $CPP" >&5
2854echo "${ECHO_T}$CPP" >&6
2855ac_preproc_ok=false
2856for ac_c_preproc_warn_flag in '' yes
2857do
2858 # Use a header file that comes with gcc, so configuring glibc
2859 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002860 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2861 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 # On the NeXT, cc -E runs the code through the compiler's parser,
2863 # not just through cpp. "Syntax error" is here to catch this case.
2864 cat >conftest.$ac_ext <<_ACEOF
2865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002866/* confdefs.h. */
2867_ACEOF
2868cat confdefs.h >>conftest.$ac_ext
2869cat >>conftest.$ac_ext <<_ACEOF
2870/* end confdefs.h. */
2871#ifdef __STDC__
2872# include <limits.h>
2873#else
2874# include <assert.h>
2875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 Syntax error
2877_ACEOF
2878if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2879 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2880 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002881 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 rm -f conftest.er1
2883 cat conftest.err >&5
2884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2885 (exit $ac_status); } >/dev/null; then
2886 if test -s conftest.err; then
2887 ac_cpp_err=$ac_c_preproc_warn_flag
2888 else
2889 ac_cpp_err=
2890 fi
2891else
2892 ac_cpp_err=yes
2893fi
2894if test -z "$ac_cpp_err"; then
2895 :
2896else
2897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002898sed 's/^/| /' conftest.$ac_ext >&5
2899
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 # Broken: fails on valid input.
2901continue
2902fi
2903rm -f conftest.err conftest.$ac_ext
2904
2905 # OK, works on sane cases. Now check whether non-existent headers
2906 # can be detected and how.
2907 cat >conftest.$ac_ext <<_ACEOF
2908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002909/* confdefs.h. */
2910_ACEOF
2911cat confdefs.h >>conftest.$ac_ext
2912cat >>conftest.$ac_ext <<_ACEOF
2913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002914#include <ac_nonexistent.h>
2915_ACEOF
2916if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2918 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002919 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002920 rm -f conftest.er1
2921 cat conftest.err >&5
2922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923 (exit $ac_status); } >/dev/null; then
2924 if test -s conftest.err; then
2925 ac_cpp_err=$ac_c_preproc_warn_flag
2926 else
2927 ac_cpp_err=
2928 fi
2929else
2930 ac_cpp_err=yes
2931fi
2932if test -z "$ac_cpp_err"; then
2933 # Broken: success on invalid input.
2934continue
2935else
2936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002937sed 's/^/| /' conftest.$ac_ext >&5
2938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 # Passes both tests.
2940ac_preproc_ok=:
2941break
2942fi
2943rm -f conftest.err conftest.$ac_ext
2944
2945done
2946# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2947rm -f conftest.err conftest.$ac_ext
2948if $ac_preproc_ok; then
2949 :
2950else
Skip Montanaro6dead952003-09-25 14:50:04 +00002951 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2952See \`config.log' for more details." >&5
2953echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2954See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 { (exit 1); exit 1; }; }
2956fi
2957
2958ac_ext=c
2959ac_cpp='$CPP $CPPFLAGS'
2960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2962ac_compiler_gnu=$ac_cv_c_compiler_gnu
2963
2964
Skip Montanaro6dead952003-09-25 14:50:04 +00002965echo "$as_me:$LINENO: checking for egrep" >&5
2966echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2967if test "${ac_cv_prog_egrep+set}" = set; then
2968 echo $ECHO_N "(cached) $ECHO_C" >&6
2969else
2970 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2971 then ac_cv_prog_egrep='grep -E'
2972 else ac_cv_prog_egrep='egrep'
2973 fi
2974fi
2975echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2976echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2977 EGREP=$ac_cv_prog_egrep
2978
2979
Martin v. Löwis11437992002-04-12 09:54:03 +00002980
2981echo "$as_me:$LINENO: checking for AIX" >&5
2982echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2983cat >conftest.$ac_ext <<_ACEOF
2984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002990#ifdef _AIX
2991 yes
2992#endif
2993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002996 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 echo "$as_me:$LINENO: result: yes" >&5
2998echo "${ECHO_T}yes" >&6
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002
3003else
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 echo "$as_me:$LINENO: result: no" >&5
3005echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006fi
3007rm -f conftest*
3008
Michael W. Hudson54241132001-12-07 15:38:26 +00003009
Martin v. Löwis11437992002-04-12 09:54:03 +00003010echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3011echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3012if test "${ac_cv_header_stdc+set}" = set; then
3013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003014else
Martin v. Löwis11437992002-04-12 09:54:03 +00003015 cat >conftest.$ac_ext <<_ACEOF
3016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003017/* confdefs.h. */
3018_ACEOF
3019cat confdefs.h >>conftest.$ac_ext
3020cat >>conftest.$ac_ext <<_ACEOF
3021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003022#include <stdlib.h>
3023#include <stdarg.h>
3024#include <string.h>
3025#include <float.h>
3026
Skip Montanaro6dead952003-09-25 14:50:04 +00003027int
3028main ()
3029{
3030
3031 ;
3032 return 0;
3033}
Martin v. Löwis11437992002-04-12 09:54:03 +00003034_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003035rm -f conftest.$ac_objext
3036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3037 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003038 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00003039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003040 (exit $ac_status); } &&
3041 { ac_try='test -s conftest.$ac_objext'
3042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3043 (eval $ac_try) 2>&5
3044 ac_status=$?
3045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3046 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 ac_cv_header_stdc=yes
3048else
3049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003050sed 's/^/| /' conftest.$ac_ext >&5
3051
3052ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003053fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003054rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003055
3056if test $ac_cv_header_stdc = yes; then
3057 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3058 cat >conftest.$ac_ext <<_ACEOF
3059#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003060/* confdefs.h. */
3061_ACEOF
3062cat confdefs.h >>conftest.$ac_ext
3063cat >>conftest.$ac_ext <<_ACEOF
3064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003065#include <string.h>
3066
3067_ACEOF
3068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003069 $EGREP "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003070 :
3071else
3072 ac_cv_header_stdc=no
3073fi
3074rm -f conftest*
3075
3076fi
3077
3078if test $ac_cv_header_stdc = yes; then
3079 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3080 cat >conftest.$ac_ext <<_ACEOF
3081#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003082/* confdefs.h. */
3083_ACEOF
3084cat confdefs.h >>conftest.$ac_ext
3085cat >>conftest.$ac_ext <<_ACEOF
3086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003087#include <stdlib.h>
3088
3089_ACEOF
3090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003091 $EGREP "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003092 :
3093else
3094 ac_cv_header_stdc=no
3095fi
3096rm -f conftest*
3097
3098fi
3099
3100if test $ac_cv_header_stdc = yes; then
3101 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3102 if test "$cross_compiling" = yes; then
3103 :
3104else
3105 cat >conftest.$ac_ext <<_ACEOF
3106#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003107/* confdefs.h. */
3108_ACEOF
3109cat confdefs.h >>conftest.$ac_ext
3110cat >>conftest.$ac_ext <<_ACEOF
3111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003112#include <ctype.h>
3113#if ((' ' & 0x0FF) == 0x020)
3114# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3115# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3116#else
Skip Montanaro6dead952003-09-25 14:50:04 +00003117# define ISLOWER(c) \
3118 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00003119 || ('j' <= (c) && (c) <= 'r') \
3120 || ('s' <= (c) && (c) <= 'z'))
3121# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3122#endif
3123
3124#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3125int
3126main ()
3127{
3128 int i;
3129 for (i = 0; i < 256; i++)
3130 if (XOR (islower (i), ISLOWER (i))
3131 || toupper (i) != TOUPPER (i))
3132 exit(2);
3133 exit (0);
3134}
3135_ACEOF
3136rm -f conftest$ac_exeext
3137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3138 (eval $ac_link) 2>&5
3139 ac_status=$?
3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3143 (eval $ac_try) 2>&5
3144 ac_status=$?
3145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3146 (exit $ac_status); }; }; then
3147 :
3148else
3149 echo "$as_me: program exited with status $ac_status" >&5
3150echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003151sed 's/^/| /' conftest.$ac_ext >&5
3152
Martin v. Löwis11437992002-04-12 09:54:03 +00003153( exit $ac_status )
3154ac_cv_header_stdc=no
3155fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003156rm -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 +00003157fi
3158fi
3159fi
3160echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3161echo "${ECHO_T}$ac_cv_header_stdc" >&6
3162if test $ac_cv_header_stdc = yes; then
3163
3164cat >>confdefs.h <<\_ACEOF
3165#define STDC_HEADERS 1
3166_ACEOF
3167
3168fi
3169
3170# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3181 inttypes.h stdint.h unistd.h
3182do
3183as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3184echo "$as_me:$LINENO: checking for $ac_header" >&5
3185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3186if eval "test \"\${$as_ac_Header+set}\" = set"; then
3187 echo $ECHO_N "(cached) $ECHO_C" >&6
3188else
3189 cat >conftest.$ac_ext <<_ACEOF
3190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003191/* confdefs.h. */
3192_ACEOF
3193cat confdefs.h >>conftest.$ac_ext
3194cat >>conftest.$ac_ext <<_ACEOF
3195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003196$ac_includes_default
3197
3198#include <$ac_header>
3199_ACEOF
3200rm -f conftest.$ac_objext
3201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3202 (eval $ac_compile) 2>&5
3203 ac_status=$?
3204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3205 (exit $ac_status); } &&
3206 { ac_try='test -s conftest.$ac_objext'
3207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3208 (eval $ac_try) 2>&5
3209 ac_status=$?
3210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3211 (exit $ac_status); }; }; then
3212 eval "$as_ac_Header=yes"
3213else
3214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003215sed 's/^/| /' conftest.$ac_ext >&5
3216
Martin v. Löwis11437992002-04-12 09:54:03 +00003217eval "$as_ac_Header=no"
3218fi
3219rm -f conftest.$ac_objext conftest.$ac_ext
3220fi
3221echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3222echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3223if test `eval echo '${'$as_ac_Header'}'` = yes; then
3224 cat >>confdefs.h <<_ACEOF
3225#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3226_ACEOF
3227
3228fi
3229
3230done
3231
3232
3233if test "${ac_cv_header_minix_config_h+set}" = set; then
3234 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3235echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3236if test "${ac_cv_header_minix_config_h+set}" = set; then
3237 echo $ECHO_N "(cached) $ECHO_C" >&6
3238fi
3239echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3240echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3241else
3242 # Is the header compilable?
3243echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3244echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3245cat >conftest.$ac_ext <<_ACEOF
3246#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003247/* confdefs.h. */
3248_ACEOF
3249cat confdefs.h >>conftest.$ac_ext
3250cat >>conftest.$ac_ext <<_ACEOF
3251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003252$ac_includes_default
3253#include <minix/config.h>
3254_ACEOF
3255rm -f conftest.$ac_objext
3256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3257 (eval $ac_compile) 2>&5
3258 ac_status=$?
3259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3260 (exit $ac_status); } &&
3261 { ac_try='test -s conftest.$ac_objext'
3262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3263 (eval $ac_try) 2>&5
3264 ac_status=$?
3265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3266 (exit $ac_status); }; }; then
3267 ac_header_compiler=yes
3268else
3269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003270sed 's/^/| /' conftest.$ac_ext >&5
3271
Martin v. Löwis11437992002-04-12 09:54:03 +00003272ac_header_compiler=no
3273fi
3274rm -f conftest.$ac_objext conftest.$ac_ext
3275echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3276echo "${ECHO_T}$ac_header_compiler" >&6
3277
3278# Is the header present?
3279echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3280echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3281cat >conftest.$ac_ext <<_ACEOF
3282#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003283/* confdefs.h. */
3284_ACEOF
3285cat confdefs.h >>conftest.$ac_ext
3286cat >>conftest.$ac_ext <<_ACEOF
3287/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003288#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003289_ACEOF
3290if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3291 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3292 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003293 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 rm -f conftest.er1
3295 cat conftest.err >&5
3296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3297 (exit $ac_status); } >/dev/null; then
3298 if test -s conftest.err; then
3299 ac_cpp_err=$ac_c_preproc_warn_flag
3300 else
3301 ac_cpp_err=
3302 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003303else
Martin v. Löwis11437992002-04-12 09:54:03 +00003304 ac_cpp_err=yes
3305fi
3306if test -z "$ac_cpp_err"; then
3307 ac_header_preproc=yes
3308else
3309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003310sed 's/^/| /' conftest.$ac_ext >&5
3311
Martin v. Löwis11437992002-04-12 09:54:03 +00003312 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003314rm -f conftest.err conftest.$ac_ext
3315echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3316echo "${ECHO_T}$ac_header_preproc" >&6
3317
3318# So? What about this header?
3319case $ac_header_compiler:$ac_header_preproc in
3320 yes:no )
3321 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3322echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3323 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003324echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3325 (
3326 cat <<\_ASBOX
3327## ------------------------------------ ##
3328## Report this to bug-autoconf@gnu.org. ##
3329## ------------------------------------ ##
3330_ASBOX
3331 ) |
3332 sed "s/^/$as_me: WARNING: /" >&2
3333 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003334 no:yes )
3335 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3336echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3337 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3338echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3339 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003340echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3341 (
3342 cat <<\_ASBOX
3343## ------------------------------------ ##
3344## Report this to bug-autoconf@gnu.org. ##
3345## ------------------------------------ ##
3346_ASBOX
3347 ) |
3348 sed "s/^/$as_me: WARNING: /" >&2
3349 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003350esac
3351echo "$as_me:$LINENO: checking for minix/config.h" >&5
3352echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3353if test "${ac_cv_header_minix_config_h+set}" = set; then
3354 echo $ECHO_N "(cached) $ECHO_C" >&6
3355else
3356 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003358echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3359echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3360
3361fi
3362if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003363 MINIX=yes
3364else
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003366fi
3367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003369if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003370
3371cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003372#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003373_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375
3376cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003377#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003378_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003379
Martin v. Löwis11437992002-04-12 09:54:03 +00003380
3381cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003382#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003383_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003384
3385fi
3386
3387
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003388# Check for unsupported systems
3389case $ac_sys_system/$ac_sys_release in
3390SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3391 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3392 echo See README for details.
3393 exit 1;;
3394esac
3395
3396if test "$MINIX" = yes; then
3397 echo This system \(MINIX\) is no longer supported.
3398 echo Read README for details.
3399 exit 1
3400fi
3401
Michael W. Hudson54241132001-12-07 15:38:26 +00003402
Martin v. Löwis11437992002-04-12 09:54:03 +00003403echo "$as_me:$LINENO: checking for --with-suffix" >&5
3404echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003405
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003406# Check whether --with-suffix or --without-suffix was given.
3407if test "${with_suffix+set}" = set; then
3408 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003409
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003410 case $withval in
3411 no) EXEEXT=;;
3412 yes) EXEEXT=.exe;;
3413 *) EXEEXT=$withval;;
3414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003415fi;
3416echo "$as_me:$LINENO: result: $EXEEXT" >&5
3417echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003418
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003419# Test whether we're running on a non-case-sensitive system, in which
3420# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003421
Martin v. Löwis11437992002-04-12 09:54:03 +00003422echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3423echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003424if test ! -d CaseSensitiveTestDir; then
3425mkdir CaseSensitiveTestDir
3426fi
3427
3428if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003429then
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 echo "$as_me:$LINENO: result: yes" >&5
3431echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003432 BUILDEXEEXT=.exe
3433else
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 echo "$as_me:$LINENO: result: no" >&5
3435echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003436 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003437fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003438rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003439
Guido van Rossumdd997f71998-10-07 19:58:26 +00003440case $MACHDEP in
3441bsdos*)
3442 case $CC in
3443 gcc) CC="$CC -D_HAVE_BSDI";;
3444 esac;;
3445esac
3446
Guido van Rossum24b1e751997-08-21 02:29:16 +00003447case $ac_sys_system in
3448hp*|HP*)
3449 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003450 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003451 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003452Monterey*)
3453 case $CC in
3454 cc) CC="$CC -Wl,-Bexport";;
3455 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003456SunOS*)
3457 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
3459cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003460#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003461_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003462
3463 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003464esac
3465
Michael W. Hudson54241132001-12-07 15:38:26 +00003466
3467
Martin v. Löwis11437992002-04-12 09:54:03 +00003468echo "$as_me:$LINENO: checking LIBRARY" >&5
3469echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003470if test -z "$LIBRARY"
3471then
3472 LIBRARY='libpython$(VERSION).a'
3473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003474echo "$as_me:$LINENO: result: $LIBRARY" >&5
3475echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003476
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003477# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003478# name of the library into which to insert object files). BLDLIBRARY is also
3479# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3480# is blank as the main program is not linked directly against LDLIBRARY.
3481# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3482# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3483# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3484# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003485#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003486# RUNSHARED is used to run shared python without installed libraries
3487#
3488# INSTSONAME is the name of the shared library that will be use to install
3489# on the system - some systems like version suffix, others don't
3490
3491
Michael W. Hudson54241132001-12-07 15:38:26 +00003492
3493
3494
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003495
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003496LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003497BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003498INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003499DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003500LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003501RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003502
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003503# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003504# If CXX is set, and if it is needed to link a main function that was
3505# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3506# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003507# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003508# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510echo "$as_me:$LINENO: checking LINKCC" >&5
3511echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003512if test -z "$LINKCC"
3513then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003514 if test -z "$CXX"; then
3515 LINKCC="\$(PURIFY) \$(CC)"
3516 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003517 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003518 $CXX -c conftest.$ac_ext 2>&5
3519 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3520 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3521 then
3522 LINKCC="\$(PURIFY) \$(CC)"
3523 else
3524 LINKCC="\$(PURIFY) \$(CXX)"
3525 fi
3526 rm -fr conftest*
3527 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003528 case $ac_sys_system in
3529 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003530 exp_extra="\"\""
3531 if test $ac_sys_release -ge 5 -o \
3532 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3533 exp_extra="."
3534 fi
3535 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003536 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003537 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003538 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003539 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003540 esac
3541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003542echo "$as_me:$LINENO: result: $LINKCC" >&5
3543echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003544
Martin v. Löwis11437992002-04-12 09:54:03 +00003545echo "$as_me:$LINENO: checking for --enable-shared" >&5
3546echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003547# Check whether --enable-shared or --disable-shared was given.
3548if test "${enable_shared+set}" = set; then
3549 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003552
3553if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003554then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003555 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003556 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003557 enable_shared="yes";;
3558 *)
3559 enable_shared="no";;
3560 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562echo "$as_me:$LINENO: result: $enable_shared" >&5
3563echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003564
3565
Martin v. Löwis11437992002-04-12 09:54:03 +00003566echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3567echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003568
Guido van Rossumb8552162001-09-05 14:58:11 +00003569# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3570# library that we build, but we do not want to link against it (we
3571# will find it with a -framework option). For this reason there is an
3572# extra variable BLDLIBRARY against which Python and the extension
3573# modules are linked, BLDLIBRARY. This is normally the same as
3574# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003575if test "$enable_framework"
3576then
3577 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003578 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003579 BLDLIBRARY=''
3580else
3581 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003582fi
Jack Jansene578a632001-08-15 01:27:14 +00003583
Martin v. Löwis1142de32002-03-29 16:28:31 +00003584# Other platforms follow
3585if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003586
3587cat >>confdefs.h <<\_ACEOF
3588#define Py_ENABLE_SHARED 1
3589_ACEOF
3590
Martin v. Löwis1142de32002-03-29 16:28:31 +00003591 case $ac_sys_system in
3592 BeOS*)
3593 LDLIBRARY='libpython$(VERSION).so'
3594 ;;
3595 CYGWIN*)
3596 LDLIBRARY='libpython$(VERSION).dll.a'
3597 DLLLIBRARY='libpython$(VERSION).dll'
3598 ;;
3599 SunOS*)
3600 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003601 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003602 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003603 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003604 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003605 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003606 LDLIBRARY='libpython$(VERSION).so'
3607 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003608 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003609 INSTSONAME="$LDLIBRARY".$SOVERSION
3610 ;;
3611 hp*|HP*)
3612 LDLIBRARY='libpython$(VERSION).sl'
3613 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003614 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003615 ;;
3616 OSF*)
3617 LDLIBRARY='libpython$(VERSION).so'
3618 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003619 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003620 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003621 atheos*)
3622 LDLIBRARY='libpython$(VERSION).so'
3623 BLDLIBRARY='-L. -lpython$(VERSION)'
3624 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3625 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003626 esac
3627 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3628 case $MACHDEP in
3629 dguxR4)
3630 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003631 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003632 ;;
3633 esac
Jason Tishler30765592003-09-04 11:04:06 +00003634else # shared is disabled
3635 case $ac_sys_system in
3636 CYGWIN*)
3637 BLDLIBRARY='$(LIBRARY)'
3638 LDLIBRARY='libpython$(VERSION).dll.a'
3639 ;;
3640 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003641fi
3642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3644echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646if test -n "$ac_tool_prefix"; then
3647 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3648set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3649echo "$as_me:$LINENO: checking for $ac_word" >&5
3650echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3651if test "${ac_cv_prog_RANLIB+set}" = set; then
3652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653else
3654 if test -n "$RANLIB"; then
3655 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3656else
Martin v. Löwis11437992002-04-12 09:54:03 +00003657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_exec_ext in '' $ac_executable_extensions; do
3663 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3664 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3665 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3666 break 2
3667 fi
3668done
3669done
3670
Guido van Rossum627b2d71993-12-24 10:39:16 +00003671fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003673RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003674if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 echo "$as_me:$LINENO: result: $RANLIB" >&5
3676echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 echo "$as_me:$LINENO: result: no" >&5
3679echo "${ECHO_T}no" >&6
3680fi
3681
3682fi
3683if test -z "$ac_cv_prog_RANLIB"; then
3684 ac_ct_RANLIB=$RANLIB
3685 # Extract the first word of "ranlib", so it can be a program name with args.
3686set dummy ranlib; ac_word=$2
3687echo "$as_me:$LINENO: checking for $ac_word" >&5
3688echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3689if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3690 echo $ECHO_N "(cached) $ECHO_C" >&6
3691else
3692 if test -n "$ac_ct_RANLIB"; then
3693 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3694else
3695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3696for as_dir in $PATH
3697do
3698 IFS=$as_save_IFS
3699 test -z "$as_dir" && as_dir=.
3700 for ac_exec_ext in '' $ac_executable_extensions; do
3701 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3702 ac_cv_prog_ac_ct_RANLIB="ranlib"
3703 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3704 break 2
3705 fi
3706done
3707done
3708
3709 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3710fi
3711fi
3712ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3713if test -n "$ac_ct_RANLIB"; then
3714 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3715echo "${ECHO_T}$ac_ct_RANLIB" >&6
3716else
3717 echo "$as_me:$LINENO: result: no" >&5
3718echo "${ECHO_T}no" >&6
3719fi
3720
3721 RANLIB=$ac_ct_RANLIB
3722else
3723 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003725
3726
Guido van Rossum7f43da71994-08-01 12:15:30 +00003727for ac_prog in ar aal
3728do
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003730set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003731echo "$as_me:$LINENO: checking for $ac_word" >&5
3732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3733if test "${ac_cv_prog_AR+set}" = set; then
3734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003735else
3736 if test -n "$AR"; then
3737 ac_cv_prog_AR="$AR" # Let the user override the test.
3738else
Martin v. Löwis11437992002-04-12 09:54:03 +00003739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740for as_dir in $PATH
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
3744 for ac_exec_ext in '' $ac_executable_extensions; do
3745 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3746 ac_cv_prog_AR="$ac_prog"
3747 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3748 break 2
3749 fi
3750done
3751done
3752
Guido van Rossum7f43da71994-08-01 12:15:30 +00003753fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003756if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me:$LINENO: result: $AR" >&5
3758echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759else
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 echo "$as_me:$LINENO: result: no" >&5
3761echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003762fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003765done
3766test -n "$AR" || AR="ar"
3767
Michael W. Hudson54241132001-12-07 15:38:26 +00003768
Neil Schemenauera42c8272001-03-31 00:01:55 +00003769case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003770bsdos*|hp*|HP*)
3771 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003772 if test -z "$INSTALL"
3773 then
3774 INSTALL="${srcdir}/install-sh -c"
3775 fi
3776esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003777ac_aux_dir=
3778for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3779 if test -f $ac_dir/install-sh; then
3780 ac_aux_dir=$ac_dir
3781 ac_install_sh="$ac_aux_dir/install-sh -c"
3782 break
3783 elif test -f $ac_dir/install.sh; then
3784 ac_aux_dir=$ac_dir
3785 ac_install_sh="$ac_aux_dir/install.sh -c"
3786 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 elif test -f $ac_dir/shtool; then
3788 ac_aux_dir=$ac_dir
3789 ac_install_sh="$ac_aux_dir/shtool install -c"
3790 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003791 fi
3792done
3793if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3795echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3796 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003797fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003798ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3799ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3800ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003801
3802# Find a good install program. We prefer a C program (faster),
3803# so one script is as good as another. But avoid the broken or
3804# incompatible versions:
3805# SysV /etc/install, /usr/sbin/install
3806# SunOS /usr/etc/install
3807# IRIX /sbin/install
3808# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003809# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003810# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3811# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3812# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3813# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003814echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3815echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003816if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003817if test "${ac_cv_path_install+set}" = set; then
3818 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003819else
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821for as_dir in $PATH
3822do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
3825 # Account for people who put trailing slashes in PATH elements.
3826case $as_dir/ in
3827 ./ | .// | /cC/* | \
3828 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3829 /usr/ucb/* ) ;;
3830 *)
3831 # OSF1 and SCO ODT 3.0 have their own names for install.
3832 # Don't use installbsd from OSF since it installs stuff as root
3833 # by default.
3834 for ac_prog in ginstall scoinst install; do
3835 for ac_exec_ext in '' $ac_executable_extensions; do
3836 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3837 if test $ac_prog = install &&
3838 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3839 # AIX install. It has an incompatible calling convention.
3840 :
3841 elif test $ac_prog = install &&
3842 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3843 # program-specific install script used by HP pwplus--don't use.
3844 :
3845 else
3846 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3847 break 3
3848 fi
3849 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003850 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 done
3852 ;;
3853esac
3854done
3855
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003856
3857fi
3858 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003860 else
3861 # As a last resort, use the slow shell script. We don't cache a
3862 # path for INSTALL within a source directory, because that will
3863 # break other packages using the cache if that directory is
3864 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003866 fi
3867fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003868echo "$as_me:$LINENO: result: $INSTALL" >&5
3869echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003870
3871# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3872# It thinks the first close brace ends the variable substitution.
3873test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3874
Martin v. Löwis11437992002-04-12 09:54:03 +00003875test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003876
3877test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3878
Michael W. Hudson54241132001-12-07 15:38:26 +00003879
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003880# Not every filesystem supports hard links
3881
3882if test -z "$LN" ; then
3883 case $ac_sys_system in
3884 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003885 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003886 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003887 *) LN=ln;;
3888 esac
3889fi
3890
Fred Drake109d9862001-07-11 06:27:56 +00003891# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003892echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3893echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3894
Fred Drake109d9862001-07-11 06:27:56 +00003895# Check whether --with-pydebug or --without-pydebug was given.
3896if test "${with_pydebug+set}" = set; then
3897 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003898
Fred Drake109d9862001-07-11 06:27:56 +00003899if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003900then
3901
3902cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003903#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003904_ACEOF
3905
3906 echo "$as_me:$LINENO: result: yes" >&5
3907echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003908 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003909else echo "$as_me:$LINENO: result: no" >&5
3910echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003911fi
3912else
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 echo "$as_me:$LINENO: result: no" >&5
3914echo "${ECHO_T}no" >&6
3915fi;
Fred Drake109d9862001-07-11 06:27:56 +00003916
Skip Montanarodecc6a42003-01-01 20:07:49 +00003917# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3918# merged with this chunk of code?
3919
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003920# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003921# ------------------------
3922# (The following bit of code is complicated enough - please keep things
3923# indented properly. Just pretend you're editing Python code. ;-)
3924
3925# There are two parallel sets of case statements below, one that checks to
3926# see if OPT was set and one that does BASECFLAGS setting based upon
3927# compiler and platform. BASECFLAGS tweaks need to be made even if the
3928# user set OPT.
3929
3930# tweak OPT based on compiler and platform, only if the user didn't set
3931# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003932
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003933if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003934then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003935 case $GCC in
3936 yes)
3937 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003938 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003939 if test "$Py_DEBUG" = 'true' ; then
3940 # Optimization messes up debuggers, so turn it off for
3941 # debug builds.
3942 OPT="-g -Wall -Wstrict-prototypes"
3943 else
3944 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003945 fi
3946 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003947 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003948 OPT="-O3 -Wall -Wstrict-prototypes"
3949 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003950 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003951 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003952 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3953 ;;
3954 esac
Fred Drake109d9862001-07-11 06:27:56 +00003955 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003956
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003957 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003958 OPT="-O"
3959 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003960 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003961
3962 # The current (beta) Monterey compiler dies with optimizations
3963 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003964 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003965 Monterey*)
3966 OPT=""
3967 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003968 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003969
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003970fi
3971
Skip Montanarodecc6a42003-01-01 20:07:49 +00003972
3973# tweak BASECFLAGS based on compiler and platform
3974case $GCC in
3975yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003976 # Python violates C99 rules, by casting between incompatible
3977 # pointer types. GCC may generate bad code as a result of that,
3978 # so use -fno-strict-aliasing if supported.
3979 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3980echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3981 ac_save_cc="$CC"
3982 CC="$CC -fno-strict-aliasing"
3983 if test "$cross_compiling" = yes; then
3984 ac_cv_no_strict_aliasing_ok=no
3985else
3986 cat >conftest.$ac_ext <<_ACEOF
3987#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003993int main() { return 0; }
3994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3997 (eval $ac_link) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4002 (eval $ac_try) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); }; }; then
4006 ac_cv_no_strict_aliasing_ok=yes
4007else
4008 echo "$as_me: program exited with status $ac_status" >&5
4009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004010sed 's/^/| /' conftest.$ac_ext >&5
4011
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004012( exit $ac_status )
4013ac_cv_no_strict_aliasing_ok=no
4014fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004015rm -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 +00004016fi
4017 CC="$ac_save_cc"
4018 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4019echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
4020 if test $ac_cv_no_strict_aliasing_ok = yes
4021 then
4022 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4023 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004024 case $ac_sys_system in
4025 SCO_SV*)
4026 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4027 ;;
4028 # is there any other compiler on Darwin besides gcc?
4029 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004030 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004031 ;;
4032 esac
4033 ;;
4034
4035*)
4036 case $ac_sys_system in
4037 OpenUNIX*|UnixWare*)
4038 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4039 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004040 OSF*)
4041 BASECFLAGS="$BASECFLAGS -ieee -std"
4042 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004043 SCO_SV*)
4044 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4045 ;;
4046 esac
4047 ;;
4048esac
4049
Fred Drakee1ceaa02001-12-04 20:55:47 +00004050if test "$Py_DEBUG" = 'true'; then
4051 :
4052else
4053 OPT="-DNDEBUG $OPT"
4054fi
4055
Guido van Rossum563e7081996-09-10 18:20:48 +00004056if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004057then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004058 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004059fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004060
Martin v. Löwis11437992002-04-12 09:54:03 +00004061echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4062echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
4063if test "${ac_cv_opt_olimit_ok+set}" = set; then
4064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004065else
4066 ac_save_cc="$CC"
4067CC="$CC -OPT:Olimit=0"
4068if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004069 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004070else
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 cat >conftest.$ac_ext <<_ACEOF
4072#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004073/* confdefs.h. */
4074_ACEOF
4075cat confdefs.h >>conftest.$ac_ext
4076cat >>conftest.$ac_ext <<_ACEOF
4077/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004078int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004079_ACEOF
4080rm -f conftest$ac_exeext
4081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4082 (eval $ac_link) 2>&5
4083 ac_status=$?
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4087 (eval $ac_try) 2>&5
4088 ac_status=$?
4089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4090 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004091 ac_cv_opt_olimit_ok=yes
4092else
Martin v. Löwis11437992002-04-12 09:54:03 +00004093 echo "$as_me: program exited with status $ac_status" >&5
4094echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004095sed 's/^/| /' conftest.$ac_ext >&5
4096
Martin v. Löwis11437992002-04-12 09:54:03 +00004097( exit $ac_status )
4098ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004099fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004100rm -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 +00004101fi
Guido van Rossum91922671997-10-09 20:24:13 +00004102CC="$ac_save_cc"
4103fi
4104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4106echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004107if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004108 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004109 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4110 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4111 # environment?
4112 Darwin*)
4113 ;;
4114 *)
4115 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4116 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004117 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004118else
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4120echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
4121 if test "${ac_cv_olimit_ok+set}" = set; then
4122 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004123else
4124 ac_save_cc="$CC"
4125 CC="$CC -Olimit 1500"
4126 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004127 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004128else
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 cat >conftest.$ac_ext <<_ACEOF
4130#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004131/* confdefs.h. */
4132_ACEOF
4133cat confdefs.h >>conftest.$ac_ext
4134cat >>conftest.$ac_ext <<_ACEOF
4135/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004136int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004137_ACEOF
4138rm -f conftest$ac_exeext
4139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4140 (eval $ac_link) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4145 (eval $ac_try) 2>&5
4146 ac_status=$?
4147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4148 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004149 ac_cv_olimit_ok=yes
4150else
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 echo "$as_me: program exited with status $ac_status" >&5
4152echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004153sed 's/^/| /' conftest.$ac_ext >&5
4154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155( exit $ac_status )
4156ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004157fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004158rm -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 +00004159fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004160 CC="$ac_save_cc"
4161fi
4162
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4164echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004165 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004166 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004167 fi
4168fi
4169
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004170# On some compilers, pthreads are available without further options
4171# (e.g. MacOS X). On some of these systems, the compiler will not
4172# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4173# So we have to see first whether pthreads are available without
4174# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004175echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4176echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4177if test "${ac_cv_pthread_is_default+set}" = set; then
4178 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004179else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004180 if test "$cross_compiling" = yes; then
4181 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004182else
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 cat >conftest.$ac_ext <<_ACEOF
4184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* confdefs.h. */
4186_ACEOF
4187cat confdefs.h >>conftest.$ac_ext
4188cat >>conftest.$ac_ext <<_ACEOF
4189/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004190
Martin v. Löwis130fb172001-07-19 11:00:41 +00004191#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004192
4193void* routine(void* p){return NULL;}
4194
4195int main(){
4196 pthread_t p;
4197 if(pthread_create(&p,NULL,routine,NULL)!=0)
4198 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004199 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004200 return 0;
4201}
4202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203_ACEOF
4204rm -f conftest$ac_exeext
4205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4206 (eval $ac_link) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4211 (eval $ac_try) 2>&5
4212 ac_status=$?
4213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4214 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004215
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004216 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004217 ac_cv_kthread=no
4218 ac_cv_pthread=no
4219
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004220else
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 echo "$as_me: program exited with status $ac_status" >&5
4222echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004223sed 's/^/| /' conftest.$ac_ext >&5
4224
Martin v. Löwis11437992002-04-12 09:54:03 +00004225( exit $ac_status )
4226ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004227fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004228rm -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 +00004229fi
4230
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004231fi
4232
Martin v. Löwis11437992002-04-12 09:54:03 +00004233echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4234echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004235
Michael W. Hudson54241132001-12-07 15:38:26 +00004236
Martin v. Löwis11437992002-04-12 09:54:03 +00004237if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004238then
4239 ac_cv_kpthread=no
4240else
4241# -Kpthread, if available, provides the right #defines
4242# and linker options to make pthread_create available
4243# Some compilers won't report that they do not support -Kpthread,
4244# so we need to run a program to see whether it really made the
4245# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004246echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4247echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4248if test "${ac_cv_kpthread+set}" = set; then
4249 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004250else
4251 ac_save_cc="$CC"
4252CC="$CC -Kpthread"
4253if test "$cross_compiling" = yes; then
4254 ac_cv_kpthread=no
4255else
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 cat >conftest.$ac_ext <<_ACEOF
4257#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004258/* confdefs.h. */
4259_ACEOF
4260cat confdefs.h >>conftest.$ac_ext
4261cat >>conftest.$ac_ext <<_ACEOF
4262/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004263
4264#include <pthread.h>
4265
4266void* routine(void* p){return NULL;}
4267
4268int main(){
4269 pthread_t p;
4270 if(pthread_create(&p,NULL,routine,NULL)!=0)
4271 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004272 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004273 return 0;
4274}
4275
Martin v. Löwis11437992002-04-12 09:54:03 +00004276_ACEOF
4277rm -f conftest$ac_exeext
4278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4279 (eval $ac_link) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4284 (eval $ac_try) 2>&5
4285 ac_status=$?
4286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4287 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004288 ac_cv_kpthread=yes
4289else
Martin v. Löwis11437992002-04-12 09:54:03 +00004290 echo "$as_me: program exited with status $ac_status" >&5
4291echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004292sed 's/^/| /' conftest.$ac_ext >&5
4293
Martin v. Löwis11437992002-04-12 09:54:03 +00004294( exit $ac_status )
4295ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004296fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004297rm -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 +00004298fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004299CC="$ac_save_cc"
4300fi
4301
Martin v. Löwis11437992002-04-12 09:54:03 +00004302echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4303echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004304fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004305
Skip Montanarod8d39a02003-07-10 20:44:10 +00004306if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004307then
4308# -Kthread, if available, provides the right #defines
4309# and linker options to make pthread_create available
4310# Some compilers won't report that they do not support -Kthread,
4311# so we need to run a program to see whether it really made the
4312# function available.
4313echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4314echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4315if test "${ac_cv_kthread+set}" = set; then
4316 echo $ECHO_N "(cached) $ECHO_C" >&6
4317else
4318 ac_save_cc="$CC"
4319CC="$CC -Kthread"
4320if test "$cross_compiling" = yes; then
4321 ac_cv_kthread=no
4322else
4323 cat >conftest.$ac_ext <<_ACEOF
4324#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004325/* confdefs.h. */
4326_ACEOF
4327cat confdefs.h >>conftest.$ac_ext
4328cat >>conftest.$ac_ext <<_ACEOF
4329/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004330
4331#include <pthread.h>
4332
4333void* routine(void* p){return NULL;}
4334
4335int main(){
4336 pthread_t p;
4337 if(pthread_create(&p,NULL,routine,NULL)!=0)
4338 return 1;
4339 (void)pthread_detach(p);
4340 return 0;
4341}
4342
4343_ACEOF
4344rm -f conftest$ac_exeext
4345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4346 (eval $ac_link) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); }; }; then
4355 ac_cv_kthread=yes
4356else
4357 echo "$as_me: program exited with status $ac_status" >&5
4358echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004359sed 's/^/| /' conftest.$ac_ext >&5
4360
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004361( exit $ac_status )
4362ac_cv_kthread=no
4363fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004364rm -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 +00004365fi
4366CC="$ac_save_cc"
4367fi
4368
4369echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4370echo "${ECHO_T}$ac_cv_kthread" >&6
4371fi
4372
Skip Montanarod8d39a02003-07-10 20:44:10 +00004373if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004374then
4375# -pthread, if available, provides the right #defines
4376# and linker options to make pthread_create available
4377# Some compilers won't report that they do not support -pthread,
4378# so we need to run a program to see whether it really made the
4379# function available.
4380echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4381echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4382if test "${ac_cv_thread+set}" = set; then
4383 echo $ECHO_N "(cached) $ECHO_C" >&6
4384else
4385 ac_save_cc="$CC"
4386CC="$CC -pthread"
4387if test "$cross_compiling" = yes; then
4388 ac_cv_pthread=no
4389else
4390 cat >conftest.$ac_ext <<_ACEOF
4391#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004392/* confdefs.h. */
4393_ACEOF
4394cat confdefs.h >>conftest.$ac_ext
4395cat >>conftest.$ac_ext <<_ACEOF
4396/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004397
4398#include <pthread.h>
4399
4400void* routine(void* p){return NULL;}
4401
4402int main(){
4403 pthread_t p;
4404 if(pthread_create(&p,NULL,routine,NULL)!=0)
4405 return 1;
4406 (void)pthread_detach(p);
4407 return 0;
4408}
4409
4410_ACEOF
4411rm -f conftest$ac_exeext
4412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4413 (eval $ac_link) 2>&5
4414 ac_status=$?
4415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4416 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4418 (eval $ac_try) 2>&5
4419 ac_status=$?
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); }; }; then
4422 ac_cv_pthread=yes
4423else
4424 echo "$as_me: program exited with status $ac_status" >&5
4425echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004426sed 's/^/| /' conftest.$ac_ext >&5
4427
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004428( exit $ac_status )
4429ac_cv_pthread=no
4430fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004431rm -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 +00004432fi
4433CC="$ac_save_cc"
4434fi
4435
4436echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4437echo "${ECHO_T}$ac_cv_pthread" >&6
4438fi
4439
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004440# If we have set a CC compiler flag for thread support then
4441# check if it works for CXX, too.
4442ac_cv_cxx_thread=no
4443if test ! -z "$CXX"
4444then
4445echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4446echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4447ac_save_cxx="$CXX"
4448
4449if test "$ac_cv_kpthread" = "yes"
4450then
4451 CXX="$CXX -Kpthread"
4452 ac_cv_cxx_thread=yes
4453elif test "$ac_cv_kthread" = "yes"
4454then
4455 CXX="$CXX -Kthread"
4456 ac_cv_cxx_thread=yes
4457elif test "$ac_cv_pthread" = "yes"
4458then
4459 CXX="$CXX -pthread"
4460 ac_cv_cxx_thread=yes
4461fi
4462
4463if test $ac_cv_cxx_thread = yes
4464then
4465 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4466 $CXX -c conftest.$ac_ext 2>&5
4467 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4468 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4469 then
4470 ac_cv_cxx_thread=yes
4471 else
4472 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004473 fi
4474 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004475fi
4476fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004477CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004478echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4479echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4480
Michael W. Hudson54241132001-12-07 15:38:26 +00004481
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004482# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004483echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4484echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4485if test "${ac_cv_header_stdc+set}" = set; then
4486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487else
Martin v. Löwis11437992002-04-12 09:54:03 +00004488 cat >conftest.$ac_ext <<_ACEOF
4489#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004490/* confdefs.h. */
4491_ACEOF
4492cat confdefs.h >>conftest.$ac_ext
4493cat >>conftest.$ac_ext <<_ACEOF
4494/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004495#include <stdlib.h>
4496#include <stdarg.h>
4497#include <string.h>
4498#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004499
Skip Montanaro6dead952003-09-25 14:50:04 +00004500int
4501main ()
4502{
4503
4504 ;
4505 return 0;
4506}
Martin v. Löwis11437992002-04-12 09:54:03 +00004507_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004508rm -f conftest.$ac_objext
4509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4510 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004511 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004513 (exit $ac_status); } &&
4514 { ac_try='test -s conftest.$ac_objext'
4515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4516 (eval $ac_try) 2>&5
4517 ac_status=$?
4518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004520 ac_cv_header_stdc=yes
4521else
Martin v. Löwis11437992002-04-12 09:54:03 +00004522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004523sed 's/^/| /' conftest.$ac_ext >&5
4524
4525ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004526fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004527rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004528
4529if test $ac_cv_header_stdc = yes; then
4530 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004531 cat >conftest.$ac_ext <<_ACEOF
4532#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004533/* confdefs.h. */
4534_ACEOF
4535cat confdefs.h >>conftest.$ac_ext
4536cat >>conftest.$ac_ext <<_ACEOF
4537/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004539
4540_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004542 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543 :
4544else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545 ac_cv_header_stdc=no
4546fi
4547rm -f conftest*
4548
4549fi
4550
4551if test $ac_cv_header_stdc = yes; then
4552 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004553 cat >conftest.$ac_ext <<_ACEOF
4554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004555/* confdefs.h. */
4556_ACEOF
4557cat confdefs.h >>conftest.$ac_ext
4558cat >>conftest.$ac_ext <<_ACEOF
4559/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004561
4562_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004564 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565 :
4566else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004567 ac_cv_header_stdc=no
4568fi
4569rm -f conftest*
4570
4571fi
4572
4573if test $ac_cv_header_stdc = yes; then
4574 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004575 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004576 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004577else
Martin v. Löwis11437992002-04-12 09:54:03 +00004578 cat >conftest.$ac_ext <<_ACEOF
4579#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004580/* confdefs.h. */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004585#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004586#if ((' ' & 0x0FF) == 0x020)
4587# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4588# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4589#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004590# define ISLOWER(c) \
4591 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004592 || ('j' <= (c) && (c) <= 'r') \
4593 || ('s' <= (c) && (c) <= 'z'))
4594# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4595#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004596
Martin v. Löwis11437992002-04-12 09:54:03 +00004597#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4598int
4599main ()
4600{
4601 int i;
4602 for (i = 0; i < 256; i++)
4603 if (XOR (islower (i), ISLOWER (i))
4604 || toupper (i) != TOUPPER (i))
4605 exit(2);
4606 exit (0);
4607}
4608_ACEOF
4609rm -f conftest$ac_exeext
4610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4611 (eval $ac_link) 2>&5
4612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4616 (eval $ac_try) 2>&5
4617 ac_status=$?
4618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4619 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004620 :
4621else
Martin v. Löwis11437992002-04-12 09:54:03 +00004622 echo "$as_me: program exited with status $ac_status" >&5
4623echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004624sed 's/^/| /' conftest.$ac_ext >&5
4625
Martin v. Löwis11437992002-04-12 09:54:03 +00004626( exit $ac_status )
4627ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004628fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004629rm -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 +00004630fi
4631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004632fi
4633echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4634echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004635if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004636
4637cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004638#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004639_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004640
4641fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004642
Martin v. Löwis11437992002-04-12 09:54:03 +00004643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004680
Barry Warsawfe33b792003-01-07 22:42:49 +00004681
Neal Norwitz82251032003-05-23 14:35:24 +00004682
Martin v. Löwis11437992002-04-12 09:54:03 +00004683for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004684libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004685signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4686unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004687sys/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 +00004688sys/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 +00004689sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004690sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004691do
Martin v. Löwis11437992002-04-12 09:54:03 +00004692as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4693if eval "test \"\${$as_ac_Header+set}\" = set"; then
4694 echo "$as_me:$LINENO: checking for $ac_header" >&5
4695echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4696if eval "test \"\${$as_ac_Header+set}\" = set"; then
4697 echo $ECHO_N "(cached) $ECHO_C" >&6
4698fi
4699echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4700echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004701else
Martin v. Löwis11437992002-04-12 09:54:03 +00004702 # Is the header compilable?
4703echo "$as_me:$LINENO: checking $ac_header usability" >&5
4704echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4705cat >conftest.$ac_ext <<_ACEOF
4706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004707/* confdefs.h. */
4708_ACEOF
4709cat confdefs.h >>conftest.$ac_ext
4710cat >>conftest.$ac_ext <<_ACEOF
4711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004712$ac_includes_default
4713#include <$ac_header>
4714_ACEOF
4715rm -f conftest.$ac_objext
4716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4717 (eval $ac_compile) 2>&5
4718 ac_status=$?
4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 (exit $ac_status); } &&
4721 { ac_try='test -s conftest.$ac_objext'
4722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4723 (eval $ac_try) 2>&5
4724 ac_status=$?
4725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726 (exit $ac_status); }; }; then
4727 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004728else
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004730sed 's/^/| /' conftest.$ac_ext >&5
4731
Martin v. Löwis11437992002-04-12 09:54:03 +00004732ac_header_compiler=no
4733fi
4734rm -f conftest.$ac_objext conftest.$ac_ext
4735echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4736echo "${ECHO_T}$ac_header_compiler" >&6
4737
4738# Is the header present?
4739echo "$as_me:$LINENO: checking $ac_header presence" >&5
4740echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4741cat >conftest.$ac_ext <<_ACEOF
4742#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004743/* confdefs.h. */
4744_ACEOF
4745cat confdefs.h >>conftest.$ac_ext
4746cat >>conftest.$ac_ext <<_ACEOF
4747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004748#include <$ac_header>
4749_ACEOF
4750if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4751 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4752 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004753 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 rm -f conftest.er1
4755 cat conftest.err >&5
4756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4757 (exit $ac_status); } >/dev/null; then
4758 if test -s conftest.err; then
4759 ac_cpp_err=$ac_c_preproc_warn_flag
4760 else
4761 ac_cpp_err=
4762 fi
4763else
4764 ac_cpp_err=yes
4765fi
4766if test -z "$ac_cpp_err"; then
4767 ac_header_preproc=yes
4768else
4769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004770sed 's/^/| /' conftest.$ac_ext >&5
4771
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004774rm -f conftest.err conftest.$ac_ext
4775echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4776echo "${ECHO_T}$ac_header_preproc" >&6
4777
4778# So? What about this header?
4779case $ac_header_compiler:$ac_header_preproc in
4780 yes:no )
4781 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4782echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4783 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004784echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4785 (
4786 cat <<\_ASBOX
4787## ------------------------------------ ##
4788## Report this to bug-autoconf@gnu.org. ##
4789## ------------------------------------ ##
4790_ASBOX
4791 ) |
4792 sed "s/^/$as_me: WARNING: /" >&2
4793 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 no:yes )
4795 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4796echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4797 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4798echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4799 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004800echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4801 (
4802 cat <<\_ASBOX
4803## ------------------------------------ ##
4804## Report this to bug-autoconf@gnu.org. ##
4805## ------------------------------------ ##
4806_ASBOX
4807 ) |
4808 sed "s/^/$as_me: WARNING: /" >&2
4809 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004810esac
4811echo "$as_me:$LINENO: checking for $ac_header" >&5
4812echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4813if eval "test \"\${$as_ac_Header+set}\" = set"; then
4814 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004815else
Martin v. Löwis11437992002-04-12 09:54:03 +00004816 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004818echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4819echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4820
4821fi
4822if test `eval echo '${'$as_ac_Header'}'` = yes; then
4823 cat >>confdefs.h <<_ACEOF
4824#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4825_ACEOF
4826
4827fi
4828
Guido van Rossum627b2d71993-12-24 10:39:16 +00004829done
4830
Martin v. Löwis11437992002-04-12 09:54:03 +00004831
4832
4833
4834
4835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004836ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004837for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4838 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4839echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4840echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4841if eval "test \"\${$as_ac_Header+set}\" = set"; then
4842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004843else
Martin v. Löwis11437992002-04-12 09:54:03 +00004844 cat >conftest.$ac_ext <<_ACEOF
4845#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004846/* confdefs.h. */
4847_ACEOF
4848cat confdefs.h >>conftest.$ac_ext
4849cat >>conftest.$ac_ext <<_ACEOF
4850/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851#include <sys/types.h>
4852#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004853
Martin v. Löwis11437992002-04-12 09:54:03 +00004854int
4855main ()
4856{
4857if ((DIR *) 0)
4858return 0;
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863rm -f conftest.$ac_objext
4864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4865 (eval $ac_compile) 2>&5
4866 ac_status=$?
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); } &&
4869 { ac_try='test -s conftest.$ac_objext'
4870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4871 (eval $ac_try) 2>&5
4872 ac_status=$?
4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874 (exit $ac_status); }; }; then
4875 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004876else
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004878sed 's/^/| /' conftest.$ac_ext >&5
4879
Martin v. Löwis11437992002-04-12 09:54:03 +00004880eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004882rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004884echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4885echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4886if test `eval echo '${'$as_ac_Header'}'` = yes; then
4887 cat >>confdefs.h <<_ACEOF
4888#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4889_ACEOF
4890
4891ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004894done
4895# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4896if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4898echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4899if test "${ac_cv_search_opendir+set}" = set; then
4900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901else
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 ac_func_search_save_LIBS=$LIBS
4903ac_cv_search_opendir=no
4904cat >conftest.$ac_ext <<_ACEOF
4905#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004912/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004913#ifdef __cplusplus
4914extern "C"
4915#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004916/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004917 builtin and then its argument prototype would still apply. */
4918char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004919int
4920main ()
4921{
4922opendir ();
4923 ;
4924 return 0;
4925}
4926_ACEOF
4927rm -f conftest.$ac_objext conftest$ac_exeext
4928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4929 (eval $ac_link) 2>&5
4930 ac_status=$?
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); } &&
4933 { ac_try='test -s conftest$ac_exeext'
4934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4935 (eval $ac_try) 2>&5
4936 ac_status=$?
4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); }; }; then
4939 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004940else
Martin v. Löwis11437992002-04-12 09:54:03 +00004941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004942sed 's/^/| /' conftest.$ac_ext >&5
4943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4946if test "$ac_cv_search_opendir" = no; then
4947 for ac_lib in dir; do
4948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4949 cat >conftest.$ac_ext <<_ACEOF
4950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004951/* confdefs.h. */
4952_ACEOF
4953cat confdefs.h >>conftest.$ac_ext
4954cat >>conftest.$ac_ext <<_ACEOF
4955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004956
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004958#ifdef __cplusplus
4959extern "C"
4960#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004962 builtin and then its argument prototype would still apply. */
4963char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004964int
4965main ()
4966{
4967opendir ();
4968 ;
4969 return 0;
4970}
4971_ACEOF
4972rm -f conftest.$ac_objext conftest$ac_exeext
4973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4974 (eval $ac_link) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); } &&
4978 { ac_try='test -s conftest$ac_exeext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4984 ac_cv_search_opendir="-l$ac_lib"
4985break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004986else
Martin v. Löwis11437992002-04-12 09:54:03 +00004987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004988sed 's/^/| /' conftest.$ac_ext >&5
4989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004990fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4992 done
4993fi
4994LIBS=$ac_func_search_save_LIBS
4995fi
4996echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4997echo "${ECHO_T}$ac_cv_search_opendir" >&6
4998if test "$ac_cv_search_opendir" != no; then
4999 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005002
Michael W. Hudson54241132001-12-07 15:38:26 +00005003else
Martin v. Löwis11437992002-04-12 09:54:03 +00005004 echo "$as_me:$LINENO: checking for library containing opendir" >&5
5005echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
5006if test "${ac_cv_search_opendir+set}" = set; then
5007 echo $ECHO_N "(cached) $ECHO_C" >&6
5008else
5009 ac_func_search_save_LIBS=$LIBS
5010ac_cv_search_opendir=no
5011cat >conftest.$ac_ext <<_ACEOF
5012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005013/* confdefs.h. */
5014_ACEOF
5015cat confdefs.h >>conftest.$ac_ext
5016cat >>conftest.$ac_ext <<_ACEOF
5017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005018
5019/* Override any gcc2 internal prototype to avoid an error. */
5020#ifdef __cplusplus
5021extern "C"
5022#endif
5023/* We use char because int might match the return type of a gcc2
5024 builtin and then its argument prototype would still apply. */
5025char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005026int
5027main ()
5028{
5029opendir ();
5030 ;
5031 return 0;
5032}
5033_ACEOF
5034rm -f conftest.$ac_objext conftest$ac_exeext
5035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5036 (eval $ac_link) 2>&5
5037 ac_status=$?
5038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039 (exit $ac_status); } &&
5040 { ac_try='test -s conftest$ac_exeext'
5041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5042 (eval $ac_try) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); }; }; then
5046 ac_cv_search_opendir="none required"
5047else
5048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005049sed 's/^/| /' conftest.$ac_ext >&5
5050
Martin v. Löwis11437992002-04-12 09:54:03 +00005051fi
5052rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5053if test "$ac_cv_search_opendir" = no; then
5054 for ac_lib in x; do
5055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5056 cat >conftest.$ac_ext <<_ACEOF
5057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005058/* confdefs.h. */
5059_ACEOF
5060cat confdefs.h >>conftest.$ac_ext
5061cat >>conftest.$ac_ext <<_ACEOF
5062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005063
5064/* Override any gcc2 internal prototype to avoid an error. */
5065#ifdef __cplusplus
5066extern "C"
5067#endif
5068/* We use char because int might match the return type of a gcc2
5069 builtin and then its argument prototype would still apply. */
5070char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005071int
5072main ()
5073{
5074opendir ();
5075 ;
5076 return 0;
5077}
5078_ACEOF
5079rm -f conftest.$ac_objext conftest$ac_exeext
5080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5081 (eval $ac_link) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); } &&
5085 { ac_try='test -s conftest$ac_exeext'
5086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5087 (eval $ac_try) 2>&5
5088 ac_status=$?
5089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5090 (exit $ac_status); }; }; then
5091 ac_cv_search_opendir="-l$ac_lib"
5092break
5093else
5094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005095sed 's/^/| /' conftest.$ac_ext >&5
5096
Martin v. Löwis11437992002-04-12 09:54:03 +00005097fi
5098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5099 done
5100fi
5101LIBS=$ac_func_search_save_LIBS
5102fi
5103echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5104echo "${ECHO_T}$ac_cv_search_opendir" >&6
5105if test "$ac_cv_search_opendir" != no; then
5106 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005108fi
5109
5110fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005112echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5113echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5114if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5115 echo $ECHO_N "(cached) $ECHO_C" >&6
5116else
5117 cat >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. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005124#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005125int
5126main ()
5127{
5128return makedev(0, 0);
5129 ;
5130 return 0;
5131}
5132_ACEOF
5133rm -f conftest.$ac_objext conftest$ac_exeext
5134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5135 (eval $ac_link) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); } &&
5139 { ac_try='test -s conftest$ac_exeext'
5140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5141 (eval $ac_try) 2>&5
5142 ac_status=$?
5143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5144 (exit $ac_status); }; }; then
5145 ac_cv_header_sys_types_h_makedev=yes
5146else
5147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005148sed 's/^/| /' conftest.$ac_ext >&5
5149
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005150ac_cv_header_sys_types_h_makedev=no
5151fi
5152rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5153
5154fi
5155echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5156echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5157
5158if test $ac_cv_header_sys_types_h_makedev = no; then
5159if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5160 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5161echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5162if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5163 echo $ECHO_N "(cached) $ECHO_C" >&6
5164fi
5165echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5166echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5167else
5168 # Is the header compilable?
5169echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5170echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5171cat >conftest.$ac_ext <<_ACEOF
5172#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005173/* confdefs.h. */
5174_ACEOF
5175cat confdefs.h >>conftest.$ac_ext
5176cat >>conftest.$ac_ext <<_ACEOF
5177/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005178$ac_includes_default
5179#include <sys/mkdev.h>
5180_ACEOF
5181rm -f conftest.$ac_objext
5182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5183 (eval $ac_compile) 2>&5
5184 ac_status=$?
5185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); } &&
5187 { ac_try='test -s conftest.$ac_objext'
5188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5189 (eval $ac_try) 2>&5
5190 ac_status=$?
5191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5192 (exit $ac_status); }; }; then
5193 ac_header_compiler=yes
5194else
5195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005196sed 's/^/| /' conftest.$ac_ext >&5
5197
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005198ac_header_compiler=no
5199fi
5200rm -f conftest.$ac_objext conftest.$ac_ext
5201echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5202echo "${ECHO_T}$ac_header_compiler" >&6
5203
5204# Is the header present?
5205echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5206echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5207cat >conftest.$ac_ext <<_ACEOF
5208#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005209/* confdefs.h. */
5210_ACEOF
5211cat confdefs.h >>conftest.$ac_ext
5212cat >>conftest.$ac_ext <<_ACEOF
5213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005214#include <sys/mkdev.h>
5215_ACEOF
5216if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5217 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5218 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005219 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005220 rm -f conftest.er1
5221 cat conftest.err >&5
5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223 (exit $ac_status); } >/dev/null; then
5224 if test -s conftest.err; then
5225 ac_cpp_err=$ac_c_preproc_warn_flag
5226 else
5227 ac_cpp_err=
5228 fi
5229else
5230 ac_cpp_err=yes
5231fi
5232if test -z "$ac_cpp_err"; then
5233 ac_header_preproc=yes
5234else
5235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005236sed 's/^/| /' conftest.$ac_ext >&5
5237
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005238 ac_header_preproc=no
5239fi
5240rm -f conftest.err conftest.$ac_ext
5241echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5242echo "${ECHO_T}$ac_header_preproc" >&6
5243
5244# So? What about this header?
5245case $ac_header_compiler:$ac_header_preproc in
5246 yes:no )
5247 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5248echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5249 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005250echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5251 (
5252 cat <<\_ASBOX
5253## ------------------------------------ ##
5254## Report this to bug-autoconf@gnu.org. ##
5255## ------------------------------------ ##
5256_ASBOX
5257 ) |
5258 sed "s/^/$as_me: WARNING: /" >&2
5259 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005260 no:yes )
5261 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5262echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
5263 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5264echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5265 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005266echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5267 (
5268 cat <<\_ASBOX
5269## ------------------------------------ ##
5270## Report this to bug-autoconf@gnu.org. ##
5271## ------------------------------------ ##
5272_ASBOX
5273 ) |
5274 sed "s/^/$as_me: WARNING: /" >&2
5275 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005276esac
5277echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5278echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5279if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5280 echo $ECHO_N "(cached) $ECHO_C" >&6
5281else
5282 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5283fi
5284echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5285echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5286
5287fi
5288if test $ac_cv_header_sys_mkdev_h = yes; then
5289
5290cat >>confdefs.h <<\_ACEOF
5291#define MAJOR_IN_MKDEV 1
5292_ACEOF
5293
5294fi
5295
5296
5297
5298 if test $ac_cv_header_sys_mkdev_h = no; then
5299 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5300 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5301echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5302if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5303 echo $ECHO_N "(cached) $ECHO_C" >&6
5304fi
5305echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5306echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5307else
5308 # Is the header compilable?
5309echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5310echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5311cat >conftest.$ac_ext <<_ACEOF
5312#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005313/* confdefs.h. */
5314_ACEOF
5315cat confdefs.h >>conftest.$ac_ext
5316cat >>conftest.$ac_ext <<_ACEOF
5317/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005318$ac_includes_default
5319#include <sys/sysmacros.h>
5320_ACEOF
5321rm -f conftest.$ac_objext
5322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5323 (eval $ac_compile) 2>&5
5324 ac_status=$?
5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326 (exit $ac_status); } &&
5327 { ac_try='test -s conftest.$ac_objext'
5328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329 (eval $ac_try) 2>&5
5330 ac_status=$?
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332 (exit $ac_status); }; }; then
5333 ac_header_compiler=yes
5334else
5335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005336sed 's/^/| /' conftest.$ac_ext >&5
5337
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005338ac_header_compiler=no
5339fi
5340rm -f conftest.$ac_objext conftest.$ac_ext
5341echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5342echo "${ECHO_T}$ac_header_compiler" >&6
5343
5344# Is the header present?
5345echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5346echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5347cat >conftest.$ac_ext <<_ACEOF
5348#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005354#include <sys/sysmacros.h>
5355_ACEOF
5356if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5357 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5358 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005359 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005360 rm -f conftest.er1
5361 cat conftest.err >&5
5362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363 (exit $ac_status); } >/dev/null; then
5364 if test -s conftest.err; then
5365 ac_cpp_err=$ac_c_preproc_warn_flag
5366 else
5367 ac_cpp_err=
5368 fi
5369else
5370 ac_cpp_err=yes
5371fi
5372if test -z "$ac_cpp_err"; then
5373 ac_header_preproc=yes
5374else
5375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005376sed 's/^/| /' conftest.$ac_ext >&5
5377
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005378 ac_header_preproc=no
5379fi
5380rm -f conftest.err conftest.$ac_ext
5381echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5382echo "${ECHO_T}$ac_header_preproc" >&6
5383
5384# So? What about this header?
5385case $ac_header_compiler:$ac_header_preproc in
5386 yes:no )
5387 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5388echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5389 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005390echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5391 (
5392 cat <<\_ASBOX
5393## ------------------------------------ ##
5394## Report this to bug-autoconf@gnu.org. ##
5395## ------------------------------------ ##
5396_ASBOX
5397 ) |
5398 sed "s/^/$as_me: WARNING: /" >&2
5399 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005400 no:yes )
5401 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5402echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5403 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5404echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5405 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005406echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5407 (
5408 cat <<\_ASBOX
5409## ------------------------------------ ##
5410## Report this to bug-autoconf@gnu.org. ##
5411## ------------------------------------ ##
5412_ASBOX
5413 ) |
5414 sed "s/^/$as_me: WARNING: /" >&2
5415 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005416esac
5417echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5418echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5419if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5420 echo $ECHO_N "(cached) $ECHO_C" >&6
5421else
5422 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5423fi
5424echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5425echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5426
5427fi
5428if test $ac_cv_header_sys_sysmacros_h = yes; then
5429
5430cat >>confdefs.h <<\_ACEOF
5431#define MAJOR_IN_SYSMACROS 1
5432_ACEOF
5433
5434fi
5435
5436
5437 fi
5438fi
5439
Michael W. Hudson54241132001-12-07 15:38:26 +00005440
Guido van Rossum627b2d71993-12-24 10:39:16 +00005441# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005442was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005443echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5444echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5445cat >conftest.$ac_ext <<_ACEOF
5446#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005447/* confdefs.h. */
5448_ACEOF
5449cat confdefs.h >>conftest.$ac_ext
5450cat >>conftest.$ac_ext <<_ACEOF
5451/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005452#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005453
5454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005456 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005457 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005458else
Martin v. Löwis11437992002-04-12 09:54:03 +00005459
5460
5461cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005463_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005464
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005465
Guido van Rossum627b2d71993-12-24 10:39:16 +00005466fi
5467rm -f conftest*
5468
Martin v. Löwis11437992002-04-12 09:54:03 +00005469echo "$as_me:$LINENO: result: $was_it_defined" >&5
5470echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005471
Neal Norwitz11690112002-07-30 01:08:28 +00005472# Check whether using makedev requires defining _OSF_SOURCE
5473echo "$as_me:$LINENO: checking for makedev" >&5
5474echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5475cat >conftest.$ac_ext <<_ACEOF
5476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005477/* confdefs.h. */
5478_ACEOF
5479cat confdefs.h >>conftest.$ac_ext
5480cat >>conftest.$ac_ext <<_ACEOF
5481/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005482#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005483int
5484main ()
5485{
5486 makedev(0, 0)
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491rm -f conftest.$ac_objext conftest$ac_exeext
5492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5493 (eval $ac_link) 2>&5
5494 ac_status=$?
5495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496 (exit $ac_status); } &&
5497 { ac_try='test -s conftest$ac_exeext'
5498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5499 (eval $ac_try) 2>&5
5500 ac_status=$?
5501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502 (exit $ac_status); }; }; then
5503 ac_cv_has_makedev=yes
5504else
5505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005506sed 's/^/| /' conftest.$ac_ext >&5
5507
Neal Norwitz11690112002-07-30 01:08:28 +00005508ac_cv_has_makedev=no
5509fi
5510rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5511if test "$ac_cv_has_makedev" = "no"; then
5512 # we didn't link, try if _OSF_SOURCE will allow us to link
5513 cat >conftest.$ac_ext <<_ACEOF
5514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005515/* confdefs.h. */
5516_ACEOF
5517cat confdefs.h >>conftest.$ac_ext
5518cat >>conftest.$ac_ext <<_ACEOF
5519/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005520
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005521#define _OSF_SOURCE 1
5522#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005523
Neal Norwitz11690112002-07-30 01:08:28 +00005524int
5525main ()
5526{
5527 makedev(0, 0)
5528 ;
5529 return 0;
5530}
5531_ACEOF
5532rm -f conftest.$ac_objext conftest$ac_exeext
5533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5534 (eval $ac_link) 2>&5
5535 ac_status=$?
5536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5537 (exit $ac_status); } &&
5538 { ac_try='test -s conftest$ac_exeext'
5539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5540 (eval $ac_try) 2>&5
5541 ac_status=$?
5542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5543 (exit $ac_status); }; }; then
5544 ac_cv_has_makedev=yes
5545else
5546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005547sed 's/^/| /' conftest.$ac_ext >&5
5548
Neal Norwitz11690112002-07-30 01:08:28 +00005549ac_cv_has_makedev=no
5550fi
5551rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5552 if test "$ac_cv_has_makedev" = "yes"; then
5553
5554cat >>confdefs.h <<\_ACEOF
5555#define _OSF_SOURCE 1
5556_ACEOF
5557
5558 fi
5559fi
5560echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5561echo "${ECHO_T}$ac_cv_has_makedev" >&6
5562if test "$ac_cv_has_makedev" = "yes"; then
5563
5564cat >>confdefs.h <<\_ACEOF
5565#define HAVE_MAKEDEV 1
5566_ACEOF
5567
5568fi
5569
Martin v. Löwis399a6892002-10-04 10:22:02 +00005570# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5571# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5572# defined, but the compiler does not support pragma redefine_extname,
5573# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5574# structures (such as rlimit64) without declaring them. As a
5575# work-around, disable LFS on such configurations
5576
5577use_lfs=yes
5578echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5579echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5580cat >conftest.$ac_ext <<_ACEOF
5581#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005582/* confdefs.h. */
5583_ACEOF
5584cat confdefs.h >>conftest.$ac_ext
5585cat >>conftest.$ac_ext <<_ACEOF
5586/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005587
5588#define _LARGEFILE_SOURCE 1
5589#define _FILE_OFFSET_BITS 64
5590#include <sys/resource.h>
5591
Martin v. Löwis399a6892002-10-04 10:22:02 +00005592int
5593main ()
5594{
5595struct rlimit foo;
5596 ;
5597 return 0;
5598}
5599_ACEOF
5600rm -f conftest.$ac_objext
5601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5602 (eval $ac_compile) 2>&5
5603 ac_status=$?
5604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5605 (exit $ac_status); } &&
5606 { ac_try='test -s conftest.$ac_objext'
5607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5608 (eval $ac_try) 2>&5
5609 ac_status=$?
5610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611 (exit $ac_status); }; }; then
5612 sol_lfs_bug=no
5613else
5614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005615sed 's/^/| /' conftest.$ac_ext >&5
5616
Martin v. Löwis399a6892002-10-04 10:22:02 +00005617sol_lfs_bug=yes
5618fi
5619rm -f conftest.$ac_objext conftest.$ac_ext
5620echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5621echo "${ECHO_T}$sol_lfs_bug" >&6
5622if test "$sol_lfs_bug" = "yes"; then
5623 use_lfs=no
5624fi
5625
5626if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005627# Two defines needed to enable largefile support on various platforms
5628# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005629
Martin v. Löwis11437992002-04-12 09:54:03 +00005630cat >>confdefs.h <<\_ACEOF
5631#define _LARGEFILE_SOURCE 1
5632_ACEOF
5633
5634
5635cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005636#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005637_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005638
Martin v. Löwis399a6892002-10-04 10:22:02 +00005639fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005640
Guido van Rossum84e7b241996-08-19 21:59:00 +00005641# Add some code to confdefs.h so that the test for off_t works on SCO
5642cat >> confdefs.h <<\EOF
5643#if defined(SCO_DS)
5644#undef _OFF_T
5645#endif
5646EOF
5647
Guido van Rossumef2255b2000-03-10 22:30:29 +00005648# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005649echo "$as_me:$LINENO: checking for mode_t" >&5
5650echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5651if test "${ac_cv_type_mode_t+set}" = set; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005653else
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 cat >conftest.$ac_ext <<_ACEOF
5655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
5665if ((mode_t *) 0)
5666 return 0;
5667if (sizeof (mode_t))
5668 return 0;
5669 ;
5670 return 0;
5671}
5672_ACEOF
5673rm -f conftest.$ac_objext
5674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5675 (eval $ac_compile) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); } &&
5679 { ac_try='test -s conftest.$ac_objext'
5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681 (eval $ac_try) 2>&5
5682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005685 ac_cv_type_mode_t=yes
5686else
Martin v. Löwis11437992002-04-12 09:54:03 +00005687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005688sed 's/^/| /' conftest.$ac_ext >&5
5689
Martin v. Löwis11437992002-04-12 09:54:03 +00005690ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005691fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005692rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005694echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5695echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5696if test $ac_cv_type_mode_t = yes; then
5697 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005698else
Martin v. Löwis11437992002-04-12 09:54:03 +00005699
5700cat >>confdefs.h <<_ACEOF
5701#define mode_t int
5702_ACEOF
5703
5704fi
5705
5706echo "$as_me:$LINENO: checking for off_t" >&5
5707echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5708if test "${ac_cv_type_off_t+set}" = set; then
5709 echo $ECHO_N "(cached) $ECHO_C" >&6
5710else
5711 cat >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{
5722if ((off_t *) 0)
5723 return 0;
5724if (sizeof (off_t))
5725 return 0;
5726 ;
5727 return 0;
5728}
5729_ACEOF
5730rm -f conftest.$ac_objext
5731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5732 (eval $ac_compile) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); } &&
5736 { ac_try='test -s conftest.$ac_objext'
5737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5738 (eval $ac_try) 2>&5
5739 ac_status=$?
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005742 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005743else
Martin v. Löwis11437992002-04-12 09:54:03 +00005744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005745sed 's/^/| /' conftest.$ac_ext >&5
5746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005749rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005751echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5752echo "${ECHO_T}$ac_cv_type_off_t" >&6
5753if test $ac_cv_type_off_t = yes; then
5754 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005755else
Martin v. Löwis11437992002-04-12 09:54:03 +00005756
5757cat >>confdefs.h <<_ACEOF
5758#define off_t long
5759_ACEOF
5760
5761fi
5762
5763echo "$as_me:$LINENO: checking for pid_t" >&5
5764echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5765if test "${ac_cv_type_pid_t+set}" = set; then
5766 echo $ECHO_N "(cached) $ECHO_C" >&6
5767else
5768 cat >conftest.$ac_ext <<_ACEOF
5769#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005770/* confdefs.h. */
5771_ACEOF
5772cat confdefs.h >>conftest.$ac_ext
5773cat >>conftest.$ac_ext <<_ACEOF
5774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005775$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005776int
5777main ()
5778{
5779if ((pid_t *) 0)
5780 return 0;
5781if (sizeof (pid_t))
5782 return 0;
5783 ;
5784 return 0;
5785}
5786_ACEOF
5787rm -f conftest.$ac_objext
5788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5789 (eval $ac_compile) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } &&
5793 { ac_try='test -s conftest.$ac_objext'
5794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005799 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800else
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005802sed 's/^/| /' conftest.$ac_ext >&5
5803
Martin v. Löwis11437992002-04-12 09:54:03 +00005804ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005806rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005808echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5809echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5810if test $ac_cv_type_pid_t = yes; then
5811 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812else
Martin v. Löwis11437992002-04-12 09:54:03 +00005813
5814cat >>confdefs.h <<_ACEOF
5815#define pid_t int
5816_ACEOF
5817
5818fi
5819
5820echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5821echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5822if test "${ac_cv_type_signal+set}" = set; then
5823 echo $ECHO_N "(cached) $ECHO_C" >&6
5824else
5825 cat >conftest.$ac_ext <<_ACEOF
5826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005827/* confdefs.h. */
5828_ACEOF
5829cat confdefs.h >>conftest.$ac_ext
5830cat >>conftest.$ac_ext <<_ACEOF
5831/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005832#include <sys/types.h>
5833#include <signal.h>
5834#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005835# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005836#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005837#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005838extern "C" void (*signal (int, void (*)(int)))(int);
5839#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005840void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005841#endif
5842
Martin v. Löwis11437992002-04-12 09:54:03 +00005843int
5844main ()
5845{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005846int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 ;
5848 return 0;
5849}
5850_ACEOF
5851rm -f conftest.$ac_objext
5852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5853 (eval $ac_compile) 2>&5
5854 ac_status=$?
5855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856 (exit $ac_status); } &&
5857 { ac_try='test -s conftest.$ac_objext'
5858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
5861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864else
Martin v. Löwis11437992002-04-12 09:54:03 +00005865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005866sed 's/^/| /' conftest.$ac_ext >&5
5867
Martin v. Löwis11437992002-04-12 09:54:03 +00005868ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005869fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005870rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005872echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5873echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005874
Martin v. Löwis11437992002-04-12 09:54:03 +00005875cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005877_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005878
Michael W. Hudson54241132001-12-07 15:38:26 +00005879
Martin v. Löwis11437992002-04-12 09:54:03 +00005880echo "$as_me:$LINENO: checking for size_t" >&5
5881echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5882if test "${ac_cv_type_size_t+set}" = set; then
5883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005884else
Martin v. Löwis11437992002-04-12 09:54:03 +00005885 cat >conftest.$ac_ext <<_ACEOF
5886#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005892$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005893int
5894main ()
5895{
5896if ((size_t *) 0)
5897 return 0;
5898if (sizeof (size_t))
5899 return 0;
5900 ;
5901 return 0;
5902}
5903_ACEOF
5904rm -f conftest.$ac_objext
5905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5906 (eval $ac_compile) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); } &&
5910 { ac_try='test -s conftest.$ac_objext'
5911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5912 (eval $ac_try) 2>&5
5913 ac_status=$?
5914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5915 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005916 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005917else
Martin v. Löwis11437992002-04-12 09:54:03 +00005918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005919sed 's/^/| /' conftest.$ac_ext >&5
5920
Martin v. Löwis11437992002-04-12 09:54:03 +00005921ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005922fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005923rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005924fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005925echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5926echo "${ECHO_T}$ac_cv_type_size_t" >&6
5927if test $ac_cv_type_size_t = yes; then
5928 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929else
Martin v. Löwis11437992002-04-12 09:54:03 +00005930
5931cat >>confdefs.h <<_ACEOF
5932#define size_t unsigned
5933_ACEOF
5934
5935fi
5936
5937echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5938echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5939if test "${ac_cv_type_uid_t+set}" = set; then
5940 echo $ECHO_N "(cached) $ECHO_C" >&6
5941else
5942 cat >conftest.$ac_ext <<_ACEOF
5943#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005944/* confdefs.h. */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005949#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005950
5951_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005953 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005954 ac_cv_type_uid_t=yes
5955else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956 ac_cv_type_uid_t=no
5957fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005958rm -f conftest*
5959
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005961echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5962echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005963if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005964
Martin v. Löwis11437992002-04-12 09:54:03 +00005965cat >>confdefs.h <<\_ACEOF
5966#define uid_t int
5967_ACEOF
5968
5969
5970cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005972_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973
5974fi
5975
Jack Jansendd19cf82001-12-06 22:36:17 +00005976
Michael W. Hudson54241132001-12-07 15:38:26 +00005977# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005978echo "$as_me:$LINENO: checking for int" >&5
5979echo $ECHO_N "checking for int... $ECHO_C" >&6
5980if test "${ac_cv_type_int+set}" = set; then
5981 echo $ECHO_N "(cached) $ECHO_C" >&6
5982else
5983 cat >conftest.$ac_ext <<_ACEOF
5984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005985/* confdefs.h. */
5986_ACEOF
5987cat confdefs.h >>conftest.$ac_ext
5988cat >>conftest.$ac_ext <<_ACEOF
5989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005991int
5992main ()
5993{
5994if ((int *) 0)
5995 return 0;
5996if (sizeof (int))
5997 return 0;
5998 ;
5999 return 0;
6000}
6001_ACEOF
6002rm -f conftest.$ac_objext
6003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6004 (eval $ac_compile) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); } &&
6008 { ac_try='test -s conftest.$ac_objext'
6009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6010 (eval $ac_try) 2>&5
6011 ac_status=$?
6012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013 (exit $ac_status); }; }; then
6014 ac_cv_type_int=yes
6015else
6016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006017sed 's/^/| /' conftest.$ac_ext >&5
6018
Martin v. Löwis11437992002-04-12 09:54:03 +00006019ac_cv_type_int=no
6020fi
6021rm -f conftest.$ac_objext conftest.$ac_ext
6022fi
6023echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6024echo "${ECHO_T}$ac_cv_type_int" >&6
6025
6026echo "$as_me:$LINENO: checking size of int" >&5
6027echo $ECHO_N "checking size of int... $ECHO_C" >&6
6028if test "${ac_cv_sizeof_int+set}" = set; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6
6030else
6031 if test "$ac_cv_type_int" = yes; then
6032 # The cast to unsigned long works around a bug in the HP C Compiler
6033 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6034 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6035 # This bug is HP SR number 8606223364.
6036 if test "$cross_compiling" = yes; then
6037 # Depending upon the size, compute the lo and hi bounds.
6038cat >conftest.$ac_ext <<_ACEOF
6039#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006045$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006046int
6047main ()
6048{
6049static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6050test_array [0] = 0
6051
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest.$ac_objext
6057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6058 (eval $ac_compile) 2>&5
6059 ac_status=$?
6060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6061 (exit $ac_status); } &&
6062 { ac_try='test -s conftest.$ac_objext'
6063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6064 (eval $ac_try) 2>&5
6065 ac_status=$?
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067 (exit $ac_status); }; }; then
6068 ac_lo=0 ac_mid=0
6069 while :; do
6070 cat >conftest.$ac_ext <<_ACEOF
6071#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006078int
6079main ()
6080{
6081static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6082test_array [0] = 0
6083
6084 ;
6085 return 0;
6086}
6087_ACEOF
6088rm -f conftest.$ac_objext
6089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6090 (eval $ac_compile) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); } &&
6094 { ac_try='test -s conftest.$ac_objext'
6095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096 (eval $ac_try) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); }; }; then
6100 ac_hi=$ac_mid; break
6101else
6102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006103sed 's/^/| /' conftest.$ac_ext >&5
6104
Martin v. Löwis11437992002-04-12 09:54:03 +00006105ac_lo=`expr $ac_mid + 1`
6106 if test $ac_lo -le $ac_mid; then
6107 ac_lo= ac_hi=
6108 break
6109 fi
6110 ac_mid=`expr 2 '*' $ac_mid + 1`
6111fi
6112rm -f conftest.$ac_objext conftest.$ac_ext
6113 done
6114else
6115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006116sed 's/^/| /' conftest.$ac_ext >&5
6117
Martin v. Löwis11437992002-04-12 09:54:03 +00006118cat >conftest.$ac_ext <<_ACEOF
6119#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006120/* confdefs.h. */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006125$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006126int
6127main ()
6128{
6129static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6130test_array [0] = 0
6131
6132 ;
6133 return 0;
6134}
6135_ACEOF
6136rm -f conftest.$ac_objext
6137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6138 (eval $ac_compile) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); } &&
6142 { ac_try='test -s conftest.$ac_objext'
6143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6144 (eval $ac_try) 2>&5
6145 ac_status=$?
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); }; }; then
6148 ac_hi=-1 ac_mid=-1
6149 while :; do
6150 cat >conftest.$ac_ext <<_ACEOF
6151#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006152/* confdefs.h. */
6153_ACEOF
6154cat confdefs.h >>conftest.$ac_ext
6155cat >>conftest.$ac_ext <<_ACEOF
6156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006158int
6159main ()
6160{
6161static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6162test_array [0] = 0
6163
6164 ;
6165 return 0;
6166}
6167_ACEOF
6168rm -f conftest.$ac_objext
6169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6170 (eval $ac_compile) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); } &&
6174 { ac_try='test -s conftest.$ac_objext'
6175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6176 (eval $ac_try) 2>&5
6177 ac_status=$?
6178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179 (exit $ac_status); }; }; then
6180 ac_lo=$ac_mid; break
6181else
6182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006183sed 's/^/| /' conftest.$ac_ext >&5
6184
Martin v. Löwis11437992002-04-12 09:54:03 +00006185ac_hi=`expr '(' $ac_mid ')' - 1`
6186 if test $ac_mid -le $ac_hi; then
6187 ac_lo= ac_hi=
6188 break
6189 fi
6190 ac_mid=`expr 2 '*' $ac_mid`
6191fi
6192rm -f conftest.$ac_objext conftest.$ac_ext
6193 done
6194else
6195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006196sed 's/^/| /' conftest.$ac_ext >&5
6197
Martin v. Löwis11437992002-04-12 09:54:03 +00006198ac_lo= ac_hi=
6199fi
6200rm -f conftest.$ac_objext conftest.$ac_ext
6201fi
6202rm -f conftest.$ac_objext conftest.$ac_ext
6203# Binary search between lo and hi bounds.
6204while test "x$ac_lo" != "x$ac_hi"; do
6205 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6206 cat >conftest.$ac_ext <<_ACEOF
6207#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006208/* confdefs.h. */
6209_ACEOF
6210cat confdefs.h >>conftest.$ac_ext
6211cat >>conftest.$ac_ext <<_ACEOF
6212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006213$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006214int
6215main ()
6216{
6217static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6218test_array [0] = 0
6219
6220 ;
6221 return 0;
6222}
6223_ACEOF
6224rm -f conftest.$ac_objext
6225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6226 (eval $ac_compile) 2>&5
6227 ac_status=$?
6228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6229 (exit $ac_status); } &&
6230 { ac_try='test -s conftest.$ac_objext'
6231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6232 (eval $ac_try) 2>&5
6233 ac_status=$?
6234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235 (exit $ac_status); }; }; then
6236 ac_hi=$ac_mid
6237else
6238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006239sed 's/^/| /' conftest.$ac_ext >&5
6240
Martin v. Löwis11437992002-04-12 09:54:03 +00006241ac_lo=`expr '(' $ac_mid ')' + 1`
6242fi
6243rm -f conftest.$ac_objext conftest.$ac_ext
6244done
6245case $ac_lo in
6246?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006247'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6248See \`config.log' for more details." >&5
6249echo "$as_me: error: cannot compute sizeof (int), 77
6250See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006251 { (exit 1); exit 1; }; } ;;
6252esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006253else
6254 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006255 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6256See \`config.log' for more details." >&5
6257echo "$as_me: error: cannot run test program while cross compiling
6258See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006259 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006260else
Martin v. Löwis11437992002-04-12 09:54:03 +00006261 cat >conftest.$ac_ext <<_ACEOF
6262#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006263/* confdefs.h. */
6264_ACEOF
6265cat confdefs.h >>conftest.$ac_ext
6266cat >>conftest.$ac_ext <<_ACEOF
6267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006268$ac_includes_default
6269long longval () { return (long) (sizeof (int)); }
6270unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006271#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006272#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006273int
6274main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006275{
Martin v. Löwis11437992002-04-12 09:54:03 +00006276
6277 FILE *f = fopen ("conftest.val", "w");
6278 if (! f)
6279 exit (1);
6280 if (((long) (sizeof (int))) < 0)
6281 {
6282 long i = longval ();
6283 if (i != ((long) (sizeof (int))))
6284 exit (1);
6285 fprintf (f, "%ld\n", i);
6286 }
6287 else
6288 {
6289 unsigned long i = ulongval ();
6290 if (i != ((long) (sizeof (int))))
6291 exit (1);
6292 fprintf (f, "%lu\n", i);
6293 }
6294 exit (ferror (f) || fclose (f) != 0);
6295
6296 ;
6297 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006298}
Martin v. Löwis11437992002-04-12 09:54:03 +00006299_ACEOF
6300rm -f conftest$ac_exeext
6301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6302 (eval $ac_link) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); }; }; then
6311 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006312else
Martin v. Löwis11437992002-04-12 09:54:03 +00006313 echo "$as_me: program exited with status $ac_status" >&5
6314echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006315sed 's/^/| /' conftest.$ac_ext >&5
6316
Martin v. Löwis11437992002-04-12 09:54:03 +00006317( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006318{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6319See \`config.log' for more details." >&5
6320echo "$as_me: error: cannot compute sizeof (int), 77
6321See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 { (exit 1); exit 1; }; }
6323fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006324rm -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 +00006325fi
6326fi
6327rm -f conftest.val
6328else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006329 ac_cv_sizeof_int=0
6330fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006332echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6333echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6334cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006335#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006336_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006337
6338
Martin v. Löwis11437992002-04-12 09:54:03 +00006339echo "$as_me:$LINENO: checking for long" >&5
6340echo $ECHO_N "checking for long... $ECHO_C" >&6
6341if test "${ac_cv_type_long+set}" = set; then
6342 echo $ECHO_N "(cached) $ECHO_C" >&6
6343else
6344 cat >conftest.$ac_ext <<_ACEOF
6345#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006346/* confdefs.h. */
6347_ACEOF
6348cat confdefs.h >>conftest.$ac_ext
6349cat >>conftest.$ac_ext <<_ACEOF
6350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006351$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006352int
6353main ()
6354{
6355if ((long *) 0)
6356 return 0;
6357if (sizeof (long))
6358 return 0;
6359 ;
6360 return 0;
6361}
6362_ACEOF
6363rm -f conftest.$ac_objext
6364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6365 (eval $ac_compile) 2>&5
6366 ac_status=$?
6367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368 (exit $ac_status); } &&
6369 { ac_try='test -s conftest.$ac_objext'
6370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6371 (eval $ac_try) 2>&5
6372 ac_status=$?
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); }; }; then
6375 ac_cv_type_long=yes
6376else
6377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006378sed 's/^/| /' conftest.$ac_ext >&5
6379
Martin v. Löwis11437992002-04-12 09:54:03 +00006380ac_cv_type_long=no
6381fi
6382rm -f conftest.$ac_objext conftest.$ac_ext
6383fi
6384echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6385echo "${ECHO_T}$ac_cv_type_long" >&6
6386
6387echo "$as_me:$LINENO: checking size of long" >&5
6388echo $ECHO_N "checking size of long... $ECHO_C" >&6
6389if test "${ac_cv_sizeof_long+set}" = set; then
6390 echo $ECHO_N "(cached) $ECHO_C" >&6
6391else
6392 if test "$ac_cv_type_long" = yes; then
6393 # The cast to unsigned long works around a bug in the HP C Compiler
6394 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6395 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6396 # This bug is HP SR number 8606223364.
6397 if test "$cross_compiling" = yes; then
6398 # Depending upon the size, compute the lo and hi bounds.
6399cat >conftest.$ac_ext <<_ACEOF
6400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006401/* confdefs.h. */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006406$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006407int
6408main ()
6409{
6410static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6411test_array [0] = 0
6412
6413 ;
6414 return 0;
6415}
6416_ACEOF
6417rm -f conftest.$ac_objext
6418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6419 (eval $ac_compile) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); } &&
6423 { ac_try='test -s conftest.$ac_objext'
6424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6425 (eval $ac_try) 2>&5
6426 ac_status=$?
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); }; }; then
6429 ac_lo=0 ac_mid=0
6430 while :; do
6431 cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006433/* confdefs.h. */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006439int
6440main ()
6441{
6442static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6443test_array [0] = 0
6444
6445 ;
6446 return 0;
6447}
6448_ACEOF
6449rm -f conftest.$ac_objext
6450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6451 (eval $ac_compile) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); } &&
6455 { ac_try='test -s conftest.$ac_objext'
6456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6457 (eval $ac_try) 2>&5
6458 ac_status=$?
6459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460 (exit $ac_status); }; }; then
6461 ac_hi=$ac_mid; break
6462else
6463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006464sed 's/^/| /' conftest.$ac_ext >&5
6465
Martin v. Löwis11437992002-04-12 09:54:03 +00006466ac_lo=`expr $ac_mid + 1`
6467 if test $ac_lo -le $ac_mid; then
6468 ac_lo= ac_hi=
6469 break
6470 fi
6471 ac_mid=`expr 2 '*' $ac_mid + 1`
6472fi
6473rm -f conftest.$ac_objext conftest.$ac_ext
6474 done
6475else
6476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006477sed 's/^/| /' conftest.$ac_ext >&5
6478
Martin v. Löwis11437992002-04-12 09:54:03 +00006479cat >conftest.$ac_ext <<_ACEOF
6480#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006486$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006487int
6488main ()
6489{
6490static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6491test_array [0] = 0
6492
6493 ;
6494 return 0;
6495}
6496_ACEOF
6497rm -f conftest.$ac_objext
6498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6499 (eval $ac_compile) 2>&5
6500 ac_status=$?
6501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502 (exit $ac_status); } &&
6503 { ac_try='test -s conftest.$ac_objext'
6504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6505 (eval $ac_try) 2>&5
6506 ac_status=$?
6507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508 (exit $ac_status); }; }; then
6509 ac_hi=-1 ac_mid=-1
6510 while :; do
6511 cat >conftest.$ac_ext <<_ACEOF
6512#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006513/* confdefs.h. */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006518$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006519int
6520main ()
6521{
6522static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6523test_array [0] = 0
6524
6525 ;
6526 return 0;
6527}
6528_ACEOF
6529rm -f conftest.$ac_objext
6530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6531 (eval $ac_compile) 2>&5
6532 ac_status=$?
6533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534 (exit $ac_status); } &&
6535 { ac_try='test -s conftest.$ac_objext'
6536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6537 (eval $ac_try) 2>&5
6538 ac_status=$?
6539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540 (exit $ac_status); }; }; then
6541 ac_lo=$ac_mid; break
6542else
6543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006544sed 's/^/| /' conftest.$ac_ext >&5
6545
Martin v. Löwis11437992002-04-12 09:54:03 +00006546ac_hi=`expr '(' $ac_mid ')' - 1`
6547 if test $ac_mid -le $ac_hi; then
6548 ac_lo= ac_hi=
6549 break
6550 fi
6551 ac_mid=`expr 2 '*' $ac_mid`
6552fi
6553rm -f conftest.$ac_objext conftest.$ac_ext
6554 done
6555else
6556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006557sed 's/^/| /' conftest.$ac_ext >&5
6558
Martin v. Löwis11437992002-04-12 09:54:03 +00006559ac_lo= ac_hi=
6560fi
6561rm -f conftest.$ac_objext conftest.$ac_ext
6562fi
6563rm -f conftest.$ac_objext conftest.$ac_ext
6564# Binary search between lo and hi bounds.
6565while test "x$ac_lo" != "x$ac_hi"; do
6566 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6567 cat >conftest.$ac_ext <<_ACEOF
6568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006569/* confdefs.h. */
6570_ACEOF
6571cat confdefs.h >>conftest.$ac_ext
6572cat >>conftest.$ac_ext <<_ACEOF
6573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006574$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006575int
6576main ()
6577{
6578static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6579test_array [0] = 0
6580
6581 ;
6582 return 0;
6583}
6584_ACEOF
6585rm -f conftest.$ac_objext
6586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6587 (eval $ac_compile) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); } &&
6591 { ac_try='test -s conftest.$ac_objext'
6592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6593 (eval $ac_try) 2>&5
6594 ac_status=$?
6595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6596 (exit $ac_status); }; }; then
6597 ac_hi=$ac_mid
6598else
6599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006600sed 's/^/| /' conftest.$ac_ext >&5
6601
Martin v. Löwis11437992002-04-12 09:54:03 +00006602ac_lo=`expr '(' $ac_mid ')' + 1`
6603fi
6604rm -f conftest.$ac_objext conftest.$ac_ext
6605done
6606case $ac_lo in
6607?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006608'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6609See \`config.log' for more details." >&5
6610echo "$as_me: error: cannot compute sizeof (long), 77
6611See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006612 { (exit 1); exit 1; }; } ;;
6613esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006614else
6615 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006616 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6617See \`config.log' for more details." >&5
6618echo "$as_me: error: cannot run test program while cross compiling
6619See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006620 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006621else
Martin v. Löwis11437992002-04-12 09:54:03 +00006622 cat >conftest.$ac_ext <<_ACEOF
6623#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006624/* confdefs.h. */
6625_ACEOF
6626cat confdefs.h >>conftest.$ac_ext
6627cat >>conftest.$ac_ext <<_ACEOF
6628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006629$ac_includes_default
6630long longval () { return (long) (sizeof (long)); }
6631unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006632#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006633#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006634int
6635main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006636{
Martin v. Löwis11437992002-04-12 09:54:03 +00006637
6638 FILE *f = fopen ("conftest.val", "w");
6639 if (! f)
6640 exit (1);
6641 if (((long) (sizeof (long))) < 0)
6642 {
6643 long i = longval ();
6644 if (i != ((long) (sizeof (long))))
6645 exit (1);
6646 fprintf (f, "%ld\n", i);
6647 }
6648 else
6649 {
6650 unsigned long i = ulongval ();
6651 if (i != ((long) (sizeof (long))))
6652 exit (1);
6653 fprintf (f, "%lu\n", i);
6654 }
6655 exit (ferror (f) || fclose (f) != 0);
6656
6657 ;
6658 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006659}
Martin v. Löwis11437992002-04-12 09:54:03 +00006660_ACEOF
6661rm -f conftest$ac_exeext
6662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6663 (eval $ac_link) 2>&5
6664 ac_status=$?
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6668 (eval $ac_try) 2>&5
6669 ac_status=$?
6670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6671 (exit $ac_status); }; }; then
6672 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006673else
Martin v. Löwis11437992002-04-12 09:54:03 +00006674 echo "$as_me: program exited with status $ac_status" >&5
6675echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006676sed 's/^/| /' conftest.$ac_ext >&5
6677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006679{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6680See \`config.log' for more details." >&5
6681echo "$as_me: error: cannot compute sizeof (long), 77
6682See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006683 { (exit 1); exit 1; }; }
6684fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006685rm -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 +00006686fi
6687fi
6688rm -f conftest.val
6689else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006690 ac_cv_sizeof_long=0
6691fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006692fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006693echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6694echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6695cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006696#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006698
6699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700echo "$as_me:$LINENO: checking for void *" >&5
6701echo $ECHO_N "checking for void *... $ECHO_C" >&6
6702if test "${ac_cv_type_void_p+set}" = set; then
6703 echo $ECHO_N "(cached) $ECHO_C" >&6
6704else
6705 cat >conftest.$ac_ext <<_ACEOF
6706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006707/* confdefs.h. */
6708_ACEOF
6709cat confdefs.h >>conftest.$ac_ext
6710cat >>conftest.$ac_ext <<_ACEOF
6711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006712$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006713int
6714main ()
6715{
6716if ((void * *) 0)
6717 return 0;
6718if (sizeof (void *))
6719 return 0;
6720 ;
6721 return 0;
6722}
6723_ACEOF
6724rm -f conftest.$ac_objext
6725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6726 (eval $ac_compile) 2>&5
6727 ac_status=$?
6728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6729 (exit $ac_status); } &&
6730 { ac_try='test -s conftest.$ac_objext'
6731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6732 (eval $ac_try) 2>&5
6733 ac_status=$?
6734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6735 (exit $ac_status); }; }; then
6736 ac_cv_type_void_p=yes
6737else
6738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006739sed 's/^/| /' conftest.$ac_ext >&5
6740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741ac_cv_type_void_p=no
6742fi
6743rm -f conftest.$ac_objext conftest.$ac_ext
6744fi
6745echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6746echo "${ECHO_T}$ac_cv_type_void_p" >&6
6747
6748echo "$as_me:$LINENO: checking size of void *" >&5
6749echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6750if test "${ac_cv_sizeof_void_p+set}" = set; then
6751 echo $ECHO_N "(cached) $ECHO_C" >&6
6752else
6753 if test "$ac_cv_type_void_p" = yes; then
6754 # The cast to unsigned long works around a bug in the HP C Compiler
6755 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6756 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6757 # This bug is HP SR number 8606223364.
6758 if test "$cross_compiling" = yes; then
6759 # Depending upon the size, compute the lo and hi bounds.
6760cat >conftest.$ac_ext <<_ACEOF
6761#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006762/* confdefs.h. */
6763_ACEOF
6764cat confdefs.h >>conftest.$ac_ext
6765cat >>conftest.$ac_ext <<_ACEOF
6766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006768int
6769main ()
6770{
6771static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6772test_array [0] = 0
6773
6774 ;
6775 return 0;
6776}
6777_ACEOF
6778rm -f conftest.$ac_objext
6779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6780 (eval $ac_compile) 2>&5
6781 ac_status=$?
6782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6783 (exit $ac_status); } &&
6784 { ac_try='test -s conftest.$ac_objext'
6785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6786 (eval $ac_try) 2>&5
6787 ac_status=$?
6788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6789 (exit $ac_status); }; }; then
6790 ac_lo=0 ac_mid=0
6791 while :; do
6792 cat >conftest.$ac_ext <<_ACEOF
6793#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006800int
6801main ()
6802{
6803static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6804test_array [0] = 0
6805
6806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
6811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6812 (eval $ac_compile) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); } &&
6816 { ac_try='test -s conftest.$ac_objext'
6817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6818 (eval $ac_try) 2>&5
6819 ac_status=$?
6820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821 (exit $ac_status); }; }; then
6822 ac_hi=$ac_mid; break
6823else
6824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006825sed 's/^/| /' conftest.$ac_ext >&5
6826
Martin v. Löwis11437992002-04-12 09:54:03 +00006827ac_lo=`expr $ac_mid + 1`
6828 if test $ac_lo -le $ac_mid; then
6829 ac_lo= ac_hi=
6830 break
6831 fi
6832 ac_mid=`expr 2 '*' $ac_mid + 1`
6833fi
6834rm -f conftest.$ac_objext conftest.$ac_ext
6835 done
6836else
6837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Martin v. Löwis11437992002-04-12 09:54:03 +00006840cat >conftest.$ac_ext <<_ACEOF
6841#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006842/* confdefs.h. */
6843_ACEOF
6844cat confdefs.h >>conftest.$ac_ext
6845cat >>conftest.$ac_ext <<_ACEOF
6846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006847$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006848int
6849main ()
6850{
6851static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6852test_array [0] = 0
6853
6854 ;
6855 return 0;
6856}
6857_ACEOF
6858rm -f conftest.$ac_objext
6859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6860 (eval $ac_compile) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); } &&
6864 { ac_try='test -s conftest.$ac_objext'
6865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6866 (eval $ac_try) 2>&5
6867 ac_status=$?
6868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6869 (exit $ac_status); }; }; then
6870 ac_hi=-1 ac_mid=-1
6871 while :; do
6872 cat >conftest.$ac_ext <<_ACEOF
6873#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006874/* confdefs.h. */
6875_ACEOF
6876cat confdefs.h >>conftest.$ac_ext
6877cat >>conftest.$ac_ext <<_ACEOF
6878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006879$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006880int
6881main ()
6882{
6883static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6884test_array [0] = 0
6885
6886 ;
6887 return 0;
6888}
6889_ACEOF
6890rm -f conftest.$ac_objext
6891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6892 (eval $ac_compile) 2>&5
6893 ac_status=$?
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895 (exit $ac_status); } &&
6896 { ac_try='test -s conftest.$ac_objext'
6897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6898 (eval $ac_try) 2>&5
6899 ac_status=$?
6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901 (exit $ac_status); }; }; then
6902 ac_lo=$ac_mid; break
6903else
6904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006905sed 's/^/| /' conftest.$ac_ext >&5
6906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907ac_hi=`expr '(' $ac_mid ')' - 1`
6908 if test $ac_mid -le $ac_hi; then
6909 ac_lo= ac_hi=
6910 break
6911 fi
6912 ac_mid=`expr 2 '*' $ac_mid`
6913fi
6914rm -f conftest.$ac_objext conftest.$ac_ext
6915 done
6916else
6917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006918sed 's/^/| /' conftest.$ac_ext >&5
6919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920ac_lo= ac_hi=
6921fi
6922rm -f conftest.$ac_objext conftest.$ac_ext
6923fi
6924rm -f conftest.$ac_objext conftest.$ac_ext
6925# Binary search between lo and hi bounds.
6926while test "x$ac_lo" != "x$ac_hi"; do
6927 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6928 cat >conftest.$ac_ext <<_ACEOF
6929#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006935$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006936int
6937main ()
6938{
6939static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6940test_array [0] = 0
6941
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
6947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6948 (eval $ac_compile) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); } &&
6952 { ac_try='test -s conftest.$ac_objext'
6953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6954 (eval $ac_try) 2>&5
6955 ac_status=$?
6956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957 (exit $ac_status); }; }; then
6958 ac_hi=$ac_mid
6959else
6960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006961sed 's/^/| /' conftest.$ac_ext >&5
6962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963ac_lo=`expr '(' $ac_mid ')' + 1`
6964fi
6965rm -f conftest.$ac_objext conftest.$ac_ext
6966done
6967case $ac_lo in
6968?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006969'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6970See \`config.log' for more details." >&5
6971echo "$as_me: error: cannot compute sizeof (void *), 77
6972See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 { (exit 1); exit 1; }; } ;;
6974esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006975else
6976 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006977 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6978See \`config.log' for more details." >&5
6979echo "$as_me: error: cannot run test program while cross compiling
6980See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006981 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006982else
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 cat >conftest.$ac_ext <<_ACEOF
6984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006985/* confdefs.h. */
6986_ACEOF
6987cat confdefs.h >>conftest.$ac_ext
6988cat >>conftest.$ac_ext <<_ACEOF
6989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006990$ac_includes_default
6991long longval () { return (long) (sizeof (void *)); }
6992unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006994#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006995int
6996main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006997{
Martin v. Löwis11437992002-04-12 09:54:03 +00006998
6999 FILE *f = fopen ("conftest.val", "w");
7000 if (! f)
7001 exit (1);
7002 if (((long) (sizeof (void *))) < 0)
7003 {
7004 long i = longval ();
7005 if (i != ((long) (sizeof (void *))))
7006 exit (1);
7007 fprintf (f, "%ld\n", i);
7008 }
7009 else
7010 {
7011 unsigned long i = ulongval ();
7012 if (i != ((long) (sizeof (void *))))
7013 exit (1);
7014 fprintf (f, "%lu\n", i);
7015 }
7016 exit (ferror (f) || fclose (f) != 0);
7017
7018 ;
7019 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007020}
Martin v. Löwis11437992002-04-12 09:54:03 +00007021_ACEOF
7022rm -f conftest$ac_exeext
7023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7024 (eval $ac_link) 2>&5
7025 ac_status=$?
7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7029 (eval $ac_try) 2>&5
7030 ac_status=$?
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); }; }; then
7033 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007034else
Martin v. Löwis11437992002-04-12 09:54:03 +00007035 echo "$as_me: program exited with status $ac_status" >&5
7036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007037sed 's/^/| /' conftest.$ac_ext >&5
7038
Martin v. Löwis11437992002-04-12 09:54:03 +00007039( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007040{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7041See \`config.log' for more details." >&5
7042echo "$as_me: error: cannot compute sizeof (void *), 77
7043See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007044 { (exit 1); exit 1; }; }
7045fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007046rm -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 +00007047fi
7048fi
7049rm -f conftest.val
7050else
Guido van Rossumad678af1998-10-02 14:42:15 +00007051 ac_cv_sizeof_void_p=0
7052fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007053fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007054echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7055echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7056cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007057#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007058_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007059
7060
Martin v. Löwis11437992002-04-12 09:54:03 +00007061echo "$as_me:$LINENO: checking for char" >&5
7062echo $ECHO_N "checking for char... $ECHO_C" >&6
7063if test "${ac_cv_type_char+set}" = set; then
7064 echo $ECHO_N "(cached) $ECHO_C" >&6
7065else
7066 cat >conftest.$ac_ext <<_ACEOF
7067#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007068/* confdefs.h. */
7069_ACEOF
7070cat confdefs.h >>conftest.$ac_ext
7071cat >>conftest.$ac_ext <<_ACEOF
7072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007074int
7075main ()
7076{
7077if ((char *) 0)
7078 return 0;
7079if (sizeof (char))
7080 return 0;
7081 ;
7082 return 0;
7083}
7084_ACEOF
7085rm -f conftest.$ac_objext
7086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7087 (eval $ac_compile) 2>&5
7088 ac_status=$?
7089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7090 (exit $ac_status); } &&
7091 { ac_try='test -s conftest.$ac_objext'
7092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7093 (eval $ac_try) 2>&5
7094 ac_status=$?
7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096 (exit $ac_status); }; }; then
7097 ac_cv_type_char=yes
7098else
7099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007100sed 's/^/| /' conftest.$ac_ext >&5
7101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102ac_cv_type_char=no
7103fi
7104rm -f conftest.$ac_objext conftest.$ac_ext
7105fi
7106echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
7107echo "${ECHO_T}$ac_cv_type_char" >&6
7108
7109echo "$as_me:$LINENO: checking size of char" >&5
7110echo $ECHO_N "checking size of char... $ECHO_C" >&6
7111if test "${ac_cv_sizeof_char+set}" = set; then
7112 echo $ECHO_N "(cached) $ECHO_C" >&6
7113else
7114 if test "$ac_cv_type_char" = yes; then
7115 # The cast to unsigned long works around a bug in the HP C Compiler
7116 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7117 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7118 # This bug is HP SR number 8606223364.
7119 if test "$cross_compiling" = yes; then
7120 # Depending upon the size, compute the lo and hi bounds.
7121cat >conftest.$ac_ext <<_ACEOF
7122#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007123/* confdefs.h. */
7124_ACEOF
7125cat confdefs.h >>conftest.$ac_ext
7126cat >>conftest.$ac_ext <<_ACEOF
7127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007128$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007129int
7130main ()
7131{
7132static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
7133test_array [0] = 0
7134
7135 ;
7136 return 0;
7137}
7138_ACEOF
7139rm -f conftest.$ac_objext
7140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7141 (eval $ac_compile) 2>&5
7142 ac_status=$?
7143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144 (exit $ac_status); } &&
7145 { ac_try='test -s conftest.$ac_objext'
7146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7147 (eval $ac_try) 2>&5
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); }; }; then
7151 ac_lo=0 ac_mid=0
7152 while :; do
7153 cat >conftest.$ac_ext <<_ACEOF
7154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007155/* confdefs.h. */
7156_ACEOF
7157cat confdefs.h >>conftest.$ac_ext
7158cat >>conftest.$ac_ext <<_ACEOF
7159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007160$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007161int
7162main ()
7163{
7164static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7165test_array [0] = 0
7166
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext
7172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7173 (eval $ac_compile) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); } &&
7177 { ac_try='test -s conftest.$ac_objext'
7178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7179 (eval $ac_try) 2>&5
7180 ac_status=$?
7181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182 (exit $ac_status); }; }; then
7183 ac_hi=$ac_mid; break
7184else
7185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007186sed 's/^/| /' conftest.$ac_ext >&5
7187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188ac_lo=`expr $ac_mid + 1`
7189 if test $ac_lo -le $ac_mid; then
7190 ac_lo= ac_hi=
7191 break
7192 fi
7193 ac_mid=`expr 2 '*' $ac_mid + 1`
7194fi
7195rm -f conftest.$ac_objext conftest.$ac_ext
7196 done
7197else
7198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007199sed 's/^/| /' conftest.$ac_ext >&5
7200
Martin v. Löwis11437992002-04-12 09:54:03 +00007201cat >conftest.$ac_ext <<_ACEOF
7202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007208$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007209int
7210main ()
7211{
7212static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
7213test_array [0] = 0
7214
7215 ;
7216 return 0;
7217}
7218_ACEOF
7219rm -f conftest.$ac_objext
7220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7221 (eval $ac_compile) 2>&5
7222 ac_status=$?
7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224 (exit $ac_status); } &&
7225 { ac_try='test -s conftest.$ac_objext'
7226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7227 (eval $ac_try) 2>&5
7228 ac_status=$?
7229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7230 (exit $ac_status); }; }; then
7231 ac_hi=-1 ac_mid=-1
7232 while :; do
7233 cat >conftest.$ac_ext <<_ACEOF
7234#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007240$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007241int
7242main ()
7243{
7244static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
7245test_array [0] = 0
7246
7247 ;
7248 return 0;
7249}
7250_ACEOF
7251rm -f conftest.$ac_objext
7252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7253 (eval $ac_compile) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } &&
7257 { ac_try='test -s conftest.$ac_objext'
7258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7259 (eval $ac_try) 2>&5
7260 ac_status=$?
7261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7262 (exit $ac_status); }; }; then
7263 ac_lo=$ac_mid; break
7264else
7265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007266sed 's/^/| /' conftest.$ac_ext >&5
7267
Martin v. Löwis11437992002-04-12 09:54:03 +00007268ac_hi=`expr '(' $ac_mid ')' - 1`
7269 if test $ac_mid -le $ac_hi; then
7270 ac_lo= ac_hi=
7271 break
7272 fi
7273 ac_mid=`expr 2 '*' $ac_mid`
7274fi
7275rm -f conftest.$ac_objext conftest.$ac_ext
7276 done
7277else
7278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007279sed 's/^/| /' conftest.$ac_ext >&5
7280
Martin v. Löwis11437992002-04-12 09:54:03 +00007281ac_lo= ac_hi=
7282fi
7283rm -f conftest.$ac_objext conftest.$ac_ext
7284fi
7285rm -f conftest.$ac_objext conftest.$ac_ext
7286# Binary search between lo and hi bounds.
7287while test "x$ac_lo" != "x$ac_hi"; do
7288 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7289 cat >conftest.$ac_ext <<_ACEOF
7290#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007291/* confdefs.h. */
7292_ACEOF
7293cat confdefs.h >>conftest.$ac_ext
7294cat >>conftest.$ac_ext <<_ACEOF
7295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007296$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007297int
7298main ()
7299{
7300static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7301test_array [0] = 0
7302
7303 ;
7304 return 0;
7305}
7306_ACEOF
7307rm -f conftest.$ac_objext
7308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7309 (eval $ac_compile) 2>&5
7310 ac_status=$?
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); } &&
7313 { ac_try='test -s conftest.$ac_objext'
7314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7315 (eval $ac_try) 2>&5
7316 ac_status=$?
7317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318 (exit $ac_status); }; }; then
7319 ac_hi=$ac_mid
7320else
7321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007322sed 's/^/| /' conftest.$ac_ext >&5
7323
Martin v. Löwis11437992002-04-12 09:54:03 +00007324ac_lo=`expr '(' $ac_mid ')' + 1`
7325fi
7326rm -f conftest.$ac_objext conftest.$ac_ext
7327done
7328case $ac_lo in
7329?*) ac_cv_sizeof_char=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007330'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7331See \`config.log' for more details." >&5
7332echo "$as_me: error: cannot compute sizeof (char), 77
7333See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007334 { (exit 1); exit 1; }; } ;;
7335esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007336else
7337 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007338 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7339See \`config.log' for more details." >&5
7340echo "$as_me: error: cannot run test program while cross compiling
7341See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007342 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007343else
Martin v. Löwis11437992002-04-12 09:54:03 +00007344 cat >conftest.$ac_ext <<_ACEOF
7345#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007346/* confdefs.h. */
7347_ACEOF
7348cat confdefs.h >>conftest.$ac_ext
7349cat >>conftest.$ac_ext <<_ACEOF
7350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007351$ac_includes_default
7352long longval () { return (long) (sizeof (char)); }
7353unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007354#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007355#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007356int
7357main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007358{
Martin v. Löwis11437992002-04-12 09:54:03 +00007359
7360 FILE *f = fopen ("conftest.val", "w");
7361 if (! f)
7362 exit (1);
7363 if (((long) (sizeof (char))) < 0)
7364 {
7365 long i = longval ();
7366 if (i != ((long) (sizeof (char))))
7367 exit (1);
7368 fprintf (f, "%ld\n", i);
7369 }
7370 else
7371 {
7372 unsigned long i = ulongval ();
7373 if (i != ((long) (sizeof (char))))
7374 exit (1);
7375 fprintf (f, "%lu\n", i);
7376 }
7377 exit (ferror (f) || fclose (f) != 0);
7378
7379 ;
7380 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007381}
Martin v. Löwis11437992002-04-12 09:54:03 +00007382_ACEOF
7383rm -f conftest$ac_exeext
7384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7385 (eval $ac_link) 2>&5
7386 ac_status=$?
7387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390 (eval $ac_try) 2>&5
7391 ac_status=$?
7392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393 (exit $ac_status); }; }; then
7394 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007395else
Martin v. Löwis11437992002-04-12 09:54:03 +00007396 echo "$as_me: program exited with status $ac_status" >&5
7397echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007398sed 's/^/| /' conftest.$ac_ext >&5
7399
Martin v. Löwis11437992002-04-12 09:54:03 +00007400( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007401{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7402See \`config.log' for more details." >&5
7403echo "$as_me: error: cannot compute sizeof (char), 77
7404See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007405 { (exit 1); exit 1; }; }
7406fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007407rm -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 +00007408fi
7409fi
7410rm -f conftest.val
7411else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412 ac_cv_sizeof_char=0
7413fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007415echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
7416echo "${ECHO_T}$ac_cv_sizeof_char" >&6
7417cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007418#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00007419_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007420
7421
Martin v. Löwis11437992002-04-12 09:54:03 +00007422echo "$as_me:$LINENO: checking for short" >&5
7423echo $ECHO_N "checking for short... $ECHO_C" >&6
7424if test "${ac_cv_type_short+set}" = set; then
7425 echo $ECHO_N "(cached) $ECHO_C" >&6
7426else
7427 cat >conftest.$ac_ext <<_ACEOF
7428#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007429/* confdefs.h. */
7430_ACEOF
7431cat confdefs.h >>conftest.$ac_ext
7432cat >>conftest.$ac_ext <<_ACEOF
7433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007434$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007435int
7436main ()
7437{
7438if ((short *) 0)
7439 return 0;
7440if (sizeof (short))
7441 return 0;
7442 ;
7443 return 0;
7444}
7445_ACEOF
7446rm -f conftest.$ac_objext
7447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7448 (eval $ac_compile) 2>&5
7449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
7452 { ac_try='test -s conftest.$ac_objext'
7453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7454 (eval $ac_try) 2>&5
7455 ac_status=$?
7456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7457 (exit $ac_status); }; }; then
7458 ac_cv_type_short=yes
7459else
7460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007461sed 's/^/| /' conftest.$ac_ext >&5
7462
Martin v. Löwis11437992002-04-12 09:54:03 +00007463ac_cv_type_short=no
7464fi
7465rm -f conftest.$ac_objext conftest.$ac_ext
7466fi
7467echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7468echo "${ECHO_T}$ac_cv_type_short" >&6
7469
7470echo "$as_me:$LINENO: checking size of short" >&5
7471echo $ECHO_N "checking size of short... $ECHO_C" >&6
7472if test "${ac_cv_sizeof_short+set}" = set; then
7473 echo $ECHO_N "(cached) $ECHO_C" >&6
7474else
7475 if test "$ac_cv_type_short" = yes; then
7476 # The cast to unsigned long works around a bug in the HP C Compiler
7477 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7478 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7479 # This bug is HP SR number 8606223364.
7480 if test "$cross_compiling" = yes; then
7481 # Depending upon the size, compute the lo and hi bounds.
7482cat >conftest.$ac_ext <<_ACEOF
7483#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007489$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007490int
7491main ()
7492{
7493static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7494test_array [0] = 0
7495
7496 ;
7497 return 0;
7498}
7499_ACEOF
7500rm -f conftest.$ac_objext
7501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7502 (eval $ac_compile) 2>&5
7503 ac_status=$?
7504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7505 (exit $ac_status); } &&
7506 { ac_try='test -s conftest.$ac_objext'
7507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7508 (eval $ac_try) 2>&5
7509 ac_status=$?
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511 (exit $ac_status); }; }; then
7512 ac_lo=0 ac_mid=0
7513 while :; do
7514 cat >conftest.$ac_ext <<_ACEOF
7515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007516/* confdefs.h. */
7517_ACEOF
7518cat confdefs.h >>conftest.$ac_ext
7519cat >>conftest.$ac_ext <<_ACEOF
7520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007521$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007522int
7523main ()
7524{
7525static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7526test_array [0] = 0
7527
7528 ;
7529 return 0;
7530}
7531_ACEOF
7532rm -f conftest.$ac_objext
7533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7534 (eval $ac_compile) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); } &&
7538 { ac_try='test -s conftest.$ac_objext'
7539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7540 (eval $ac_try) 2>&5
7541 ac_status=$?
7542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); }; }; then
7544 ac_hi=$ac_mid; break
7545else
7546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007547sed 's/^/| /' conftest.$ac_ext >&5
7548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549ac_lo=`expr $ac_mid + 1`
7550 if test $ac_lo -le $ac_mid; then
7551 ac_lo= ac_hi=
7552 break
7553 fi
7554 ac_mid=`expr 2 '*' $ac_mid + 1`
7555fi
7556rm -f conftest.$ac_objext conftest.$ac_ext
7557 done
7558else
7559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007560sed 's/^/| /' conftest.$ac_ext >&5
7561
Martin v. Löwis11437992002-04-12 09:54:03 +00007562cat >conftest.$ac_ext <<_ACEOF
7563#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007564/* confdefs.h. */
7565_ACEOF
7566cat confdefs.h >>conftest.$ac_ext
7567cat >>conftest.$ac_ext <<_ACEOF
7568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007569$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007570int
7571main ()
7572{
7573static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7574test_array [0] = 0
7575
7576 ;
7577 return 0;
7578}
7579_ACEOF
7580rm -f conftest.$ac_objext
7581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7582 (eval $ac_compile) 2>&5
7583 ac_status=$?
7584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585 (exit $ac_status); } &&
7586 { ac_try='test -s conftest.$ac_objext'
7587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7588 (eval $ac_try) 2>&5
7589 ac_status=$?
7590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591 (exit $ac_status); }; }; then
7592 ac_hi=-1 ac_mid=-1
7593 while :; do
7594 cat >conftest.$ac_ext <<_ACEOF
7595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007596/* confdefs.h. */
7597_ACEOF
7598cat confdefs.h >>conftest.$ac_ext
7599cat >>conftest.$ac_ext <<_ACEOF
7600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007601$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007602int
7603main ()
7604{
7605static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7606test_array [0] = 0
7607
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext
7613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7614 (eval $ac_compile) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); } &&
7618 { ac_try='test -s conftest.$ac_objext'
7619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); }; }; then
7624 ac_lo=$ac_mid; break
7625else
7626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007627sed 's/^/| /' conftest.$ac_ext >&5
7628
Martin v. Löwis11437992002-04-12 09:54:03 +00007629ac_hi=`expr '(' $ac_mid ')' - 1`
7630 if test $ac_mid -le $ac_hi; then
7631 ac_lo= ac_hi=
7632 break
7633 fi
7634 ac_mid=`expr 2 '*' $ac_mid`
7635fi
7636rm -f conftest.$ac_objext conftest.$ac_ext
7637 done
7638else
7639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007640sed 's/^/| /' conftest.$ac_ext >&5
7641
Martin v. Löwis11437992002-04-12 09:54:03 +00007642ac_lo= ac_hi=
7643fi
7644rm -f conftest.$ac_objext conftest.$ac_ext
7645fi
7646rm -f conftest.$ac_objext conftest.$ac_ext
7647# Binary search between lo and hi bounds.
7648while test "x$ac_lo" != "x$ac_hi"; do
7649 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7650 cat >conftest.$ac_ext <<_ACEOF
7651#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007652/* confdefs.h. */
7653_ACEOF
7654cat confdefs.h >>conftest.$ac_ext
7655cat >>conftest.$ac_ext <<_ACEOF
7656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007658int
7659main ()
7660{
7661static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7662test_array [0] = 0
7663
7664 ;
7665 return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext
7669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7670 (eval $ac_compile) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } &&
7674 { ac_try='test -s conftest.$ac_objext'
7675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; }; then
7680 ac_hi=$ac_mid
7681else
7682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007683sed 's/^/| /' conftest.$ac_ext >&5
7684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685ac_lo=`expr '(' $ac_mid ')' + 1`
7686fi
7687rm -f conftest.$ac_objext conftest.$ac_ext
7688done
7689case $ac_lo in
7690?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007691'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7692See \`config.log' for more details." >&5
7693echo "$as_me: error: cannot compute sizeof (short), 77
7694See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 { (exit 1); exit 1; }; } ;;
7696esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007697else
7698 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007699 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7700See \`config.log' for more details." >&5
7701echo "$as_me: error: cannot run test program while cross compiling
7702See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007704else
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 cat >conftest.$ac_ext <<_ACEOF
7706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007707/* confdefs.h. */
7708_ACEOF
7709cat confdefs.h >>conftest.$ac_ext
7710cat >>conftest.$ac_ext <<_ACEOF
7711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007712$ac_includes_default
7713long longval () { return (long) (sizeof (short)); }
7714unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007715#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007716#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007717int
7718main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007719{
Martin v. Löwis11437992002-04-12 09:54:03 +00007720
7721 FILE *f = fopen ("conftest.val", "w");
7722 if (! f)
7723 exit (1);
7724 if (((long) (sizeof (short))) < 0)
7725 {
7726 long i = longval ();
7727 if (i != ((long) (sizeof (short))))
7728 exit (1);
7729 fprintf (f, "%ld\n", i);
7730 }
7731 else
7732 {
7733 unsigned long i = ulongval ();
7734 if (i != ((long) (sizeof (short))))
7735 exit (1);
7736 fprintf (f, "%lu\n", i);
7737 }
7738 exit (ferror (f) || fclose (f) != 0);
7739
7740 ;
7741 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007742}
Martin v. Löwis11437992002-04-12 09:54:03 +00007743_ACEOF
7744rm -f conftest$ac_exeext
7745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7746 (eval $ac_link) 2>&5
7747 ac_status=$?
7748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7751 (eval $ac_try) 2>&5
7752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); }; }; then
7755 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007756else
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 echo "$as_me: program exited with status $ac_status" >&5
7758echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Martin v. Löwis11437992002-04-12 09:54:03 +00007761( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007762{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7763See \`config.log' for more details." >&5
7764echo "$as_me: error: cannot compute sizeof (short), 77
7765See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 { (exit 1); exit 1; }; }
7767fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007768rm -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 +00007769fi
7770fi
7771rm -f conftest.val
7772else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007773 ac_cv_sizeof_short=0
7774fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007775fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007776echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7777echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7778cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007779#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007780_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007781
7782
Martin v. Löwis11437992002-04-12 09:54:03 +00007783echo "$as_me:$LINENO: checking for float" >&5
7784echo $ECHO_N "checking for float... $ECHO_C" >&6
7785if test "${ac_cv_type_float+set}" = set; then
7786 echo $ECHO_N "(cached) $ECHO_C" >&6
7787else
7788 cat >conftest.$ac_ext <<_ACEOF
7789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* confdefs.h. */
7791_ACEOF
7792cat confdefs.h >>conftest.$ac_ext
7793cat >>conftest.$ac_ext <<_ACEOF
7794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007796int
7797main ()
7798{
7799if ((float *) 0)
7800 return 0;
7801if (sizeof (float))
7802 return 0;
7803 ;
7804 return 0;
7805}
7806_ACEOF
7807rm -f conftest.$ac_objext
7808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7809 (eval $ac_compile) 2>&5
7810 ac_status=$?
7811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7812 (exit $ac_status); } &&
7813 { ac_try='test -s conftest.$ac_objext'
7814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7815 (eval $ac_try) 2>&5
7816 ac_status=$?
7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818 (exit $ac_status); }; }; then
7819 ac_cv_type_float=yes
7820else
7821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007822sed 's/^/| /' conftest.$ac_ext >&5
7823
Martin v. Löwis11437992002-04-12 09:54:03 +00007824ac_cv_type_float=no
7825fi
7826rm -f conftest.$ac_objext conftest.$ac_ext
7827fi
7828echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7829echo "${ECHO_T}$ac_cv_type_float" >&6
7830
7831echo "$as_me:$LINENO: checking size of float" >&5
7832echo $ECHO_N "checking size of float... $ECHO_C" >&6
7833if test "${ac_cv_sizeof_float+set}" = set; then
7834 echo $ECHO_N "(cached) $ECHO_C" >&6
7835else
7836 if test "$ac_cv_type_float" = yes; then
7837 # The cast to unsigned long works around a bug in the HP C Compiler
7838 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7839 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7840 # This bug is HP SR number 8606223364.
7841 if test "$cross_compiling" = yes; then
7842 # Depending upon the size, compute the lo and hi bounds.
7843cat >conftest.$ac_ext <<_ACEOF
7844#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* confdefs.h. */
7846_ACEOF
7847cat confdefs.h >>conftest.$ac_ext
7848cat >>conftest.$ac_ext <<_ACEOF
7849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007851int
7852main ()
7853{
7854static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7855test_array [0] = 0
7856
7857 ;
7858 return 0;
7859}
7860_ACEOF
7861rm -f conftest.$ac_objext
7862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7863 (eval $ac_compile) 2>&5
7864 ac_status=$?
7865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866 (exit $ac_status); } &&
7867 { ac_try='test -s conftest.$ac_objext'
7868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7869 (eval $ac_try) 2>&5
7870 ac_status=$?
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); }; }; then
7873 ac_lo=0 ac_mid=0
7874 while :; do
7875 cat >conftest.$ac_ext <<_ACEOF
7876#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007877/* confdefs.h. */
7878_ACEOF
7879cat confdefs.h >>conftest.$ac_ext
7880cat >>conftest.$ac_ext <<_ACEOF
7881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007882$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
7886static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7895 (eval $ac_compile) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
7899 { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_hi=$ac_mid; break
7906else
7907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007908sed 's/^/| /' conftest.$ac_ext >&5
7909
Martin v. Löwis11437992002-04-12 09:54:03 +00007910ac_lo=`expr $ac_mid + 1`
7911 if test $ac_lo -le $ac_mid; then
7912 ac_lo= ac_hi=
7913 break
7914 fi
7915 ac_mid=`expr 2 '*' $ac_mid + 1`
7916fi
7917rm -f conftest.$ac_objext conftest.$ac_ext
7918 done
7919else
7920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007921sed 's/^/| /' conftest.$ac_ext >&5
7922
Martin v. Löwis11437992002-04-12 09:54:03 +00007923cat >conftest.$ac_ext <<_ACEOF
7924#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007925/* confdefs.h. */
7926_ACEOF
7927cat confdefs.h >>conftest.$ac_ext
7928cat >>conftest.$ac_ext <<_ACEOF
7929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007930$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
7934static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7935test_array [0] = 0
7936
7937 ;
7938 return 0;
7939}
7940_ACEOF
7941rm -f conftest.$ac_objext
7942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7943 (eval $ac_compile) 2>&5
7944 ac_status=$?
7945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7946 (exit $ac_status); } &&
7947 { ac_try='test -s conftest.$ac_objext'
7948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7949 (eval $ac_try) 2>&5
7950 ac_status=$?
7951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7952 (exit $ac_status); }; }; then
7953 ac_hi=-1 ac_mid=-1
7954 while :; do
7955 cat >conftest.$ac_ext <<_ACEOF
7956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
7966static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7967test_array [0] = 0
7968
7969 ;
7970 return 0;
7971}
7972_ACEOF
7973rm -f conftest.$ac_objext
7974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7975 (eval $ac_compile) 2>&5
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } &&
7979 { ac_try='test -s conftest.$ac_objext'
7980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); }; }; then
7985 ac_lo=$ac_mid; break
7986else
7987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007988sed 's/^/| /' conftest.$ac_ext >&5
7989
Martin v. Löwis11437992002-04-12 09:54:03 +00007990ac_hi=`expr '(' $ac_mid ')' - 1`
7991 if test $ac_mid -le $ac_hi; then
7992 ac_lo= ac_hi=
7993 break
7994 fi
7995 ac_mid=`expr 2 '*' $ac_mid`
7996fi
7997rm -f conftest.$ac_objext conftest.$ac_ext
7998 done
7999else
8000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008001sed 's/^/| /' conftest.$ac_ext >&5
8002
Martin v. Löwis11437992002-04-12 09:54:03 +00008003ac_lo= ac_hi=
8004fi
8005rm -f conftest.$ac_objext conftest.$ac_ext
8006fi
8007rm -f conftest.$ac_objext conftest.$ac_ext
8008# Binary search between lo and hi bounds.
8009while test "x$ac_lo" != "x$ac_hi"; do
8010 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8011 cat >conftest.$ac_ext <<_ACEOF
8012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008019int
8020main ()
8021{
8022static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8023test_array [0] = 0
8024
8025 ;
8026 return 0;
8027}
8028_ACEOF
8029rm -f conftest.$ac_objext
8030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8031 (eval $ac_compile) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); } &&
8035 { ac_try='test -s conftest.$ac_objext'
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; }; then
8041 ac_hi=$ac_mid
8042else
8043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008044sed 's/^/| /' conftest.$ac_ext >&5
8045
Martin v. Löwis11437992002-04-12 09:54:03 +00008046ac_lo=`expr '(' $ac_mid ')' + 1`
8047fi
8048rm -f conftest.$ac_objext conftest.$ac_ext
8049done
8050case $ac_lo in
8051?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008052'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8053See \`config.log' for more details." >&5
8054echo "$as_me: error: cannot compute sizeof (float), 77
8055See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 { (exit 1); exit 1; }; } ;;
8057esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008058else
8059 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008060 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8061See \`config.log' for more details." >&5
8062echo "$as_me: error: cannot run test program while cross compiling
8063See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008065else
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 cat >conftest.$ac_ext <<_ACEOF
8067#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073$ac_includes_default
8074long longval () { return (long) (sizeof (float)); }
8075unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008076#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008077#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008078int
8079main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008080{
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
8082 FILE *f = fopen ("conftest.val", "w");
8083 if (! f)
8084 exit (1);
8085 if (((long) (sizeof (float))) < 0)
8086 {
8087 long i = longval ();
8088 if (i != ((long) (sizeof (float))))
8089 exit (1);
8090 fprintf (f, "%ld\n", i);
8091 }
8092 else
8093 {
8094 unsigned long i = ulongval ();
8095 if (i != ((long) (sizeof (float))))
8096 exit (1);
8097 fprintf (f, "%lu\n", i);
8098 }
8099 exit (ferror (f) || fclose (f) != 0);
8100
8101 ;
8102 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008103}
Martin v. Löwis11437992002-04-12 09:54:03 +00008104_ACEOF
8105rm -f conftest$ac_exeext
8106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8107 (eval $ac_link) 2>&5
8108 ac_status=$?
8109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8112 (eval $ac_try) 2>&5
8113 ac_status=$?
8114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8115 (exit $ac_status); }; }; then
8116 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008117else
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 echo "$as_me: program exited with status $ac_status" >&5
8119echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008120sed 's/^/| /' conftest.$ac_ext >&5
8121
Martin v. Löwis11437992002-04-12 09:54:03 +00008122( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008123{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8124See \`config.log' for more details." >&5
8125echo "$as_me: error: cannot compute sizeof (float), 77
8126See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 { (exit 1); exit 1; }; }
8128fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008129rm -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 +00008130fi
8131fi
8132rm -f conftest.val
8133else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008134 ac_cv_sizeof_float=0
8135fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008137echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8138echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8139cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008140#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008141_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008142
8143
Martin v. Löwis11437992002-04-12 09:54:03 +00008144echo "$as_me:$LINENO: checking for double" >&5
8145echo $ECHO_N "checking for double... $ECHO_C" >&6
8146if test "${ac_cv_type_double+set}" = set; then
8147 echo $ECHO_N "(cached) $ECHO_C" >&6
8148else
8149 cat >conftest.$ac_ext <<_ACEOF
8150#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008151/* confdefs.h. */
8152_ACEOF
8153cat confdefs.h >>conftest.$ac_ext
8154cat >>conftest.$ac_ext <<_ACEOF
8155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008156$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008157int
8158main ()
8159{
8160if ((double *) 0)
8161 return 0;
8162if (sizeof (double))
8163 return 0;
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168rm -f conftest.$ac_objext
8169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8170 (eval $ac_compile) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); } &&
8174 { ac_try='test -s conftest.$ac_objext'
8175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8176 (eval $ac_try) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); }; }; then
8180 ac_cv_type_double=yes
8181else
8182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008183sed 's/^/| /' conftest.$ac_ext >&5
8184
Martin v. Löwis11437992002-04-12 09:54:03 +00008185ac_cv_type_double=no
8186fi
8187rm -f conftest.$ac_objext conftest.$ac_ext
8188fi
8189echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8190echo "${ECHO_T}$ac_cv_type_double" >&6
8191
8192echo "$as_me:$LINENO: checking size of double" >&5
8193echo $ECHO_N "checking size of double... $ECHO_C" >&6
8194if test "${ac_cv_sizeof_double+set}" = set; then
8195 echo $ECHO_N "(cached) $ECHO_C" >&6
8196else
8197 if test "$ac_cv_type_double" = yes; then
8198 # The cast to unsigned long works around a bug in the HP C Compiler
8199 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8200 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8201 # This bug is HP SR number 8606223364.
8202 if test "$cross_compiling" = yes; then
8203 # Depending upon the size, compute the lo and hi bounds.
8204cat >conftest.$ac_ext <<_ACEOF
8205#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008206/* confdefs.h. */
8207_ACEOF
8208cat confdefs.h >>conftest.$ac_ext
8209cat >>conftest.$ac_ext <<_ACEOF
8210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008211$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008212int
8213main ()
8214{
8215static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8216test_array [0] = 0
8217
8218 ;
8219 return 0;
8220}
8221_ACEOF
8222rm -f conftest.$ac_objext
8223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8224 (eval $ac_compile) 2>&5
8225 ac_status=$?
8226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8227 (exit $ac_status); } &&
8228 { ac_try='test -s conftest.$ac_objext'
8229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8230 (eval $ac_try) 2>&5
8231 ac_status=$?
8232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8233 (exit $ac_status); }; }; then
8234 ac_lo=0 ac_mid=0
8235 while :; do
8236 cat >conftest.$ac_ext <<_ACEOF
8237#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008238/* confdefs.h. */
8239_ACEOF
8240cat confdefs.h >>conftest.$ac_ext
8241cat >>conftest.$ac_ext <<_ACEOF
8242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008243$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008244int
8245main ()
8246{
8247static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8248test_array [0] = 0
8249
8250 ;
8251 return 0;
8252}
8253_ACEOF
8254rm -f conftest.$ac_objext
8255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8256 (eval $ac_compile) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); } &&
8260 { ac_try='test -s conftest.$ac_objext'
8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8262 (eval $ac_try) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); }; }; then
8266 ac_hi=$ac_mid; break
8267else
8268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008269sed 's/^/| /' conftest.$ac_ext >&5
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271ac_lo=`expr $ac_mid + 1`
8272 if test $ac_lo -le $ac_mid; then
8273 ac_lo= ac_hi=
8274 break
8275 fi
8276 ac_mid=`expr 2 '*' $ac_mid + 1`
8277fi
8278rm -f conftest.$ac_objext conftest.$ac_ext
8279 done
8280else
8281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008282sed 's/^/| /' conftest.$ac_ext >&5
8283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284cat >conftest.$ac_ext <<_ACEOF
8285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008286/* confdefs.h. */
8287_ACEOF
8288cat confdefs.h >>conftest.$ac_ext
8289cat >>conftest.$ac_ext <<_ACEOF
8290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008291$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008292int
8293main ()
8294{
8295static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8296test_array [0] = 0
8297
8298 ;
8299 return 0;
8300}
8301_ACEOF
8302rm -f conftest.$ac_objext
8303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8304 (eval $ac_compile) 2>&5
8305 ac_status=$?
8306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8307 (exit $ac_status); } &&
8308 { ac_try='test -s conftest.$ac_objext'
8309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8310 (eval $ac_try) 2>&5
8311 ac_status=$?
8312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313 (exit $ac_status); }; }; then
8314 ac_hi=-1 ac_mid=-1
8315 while :; do
8316 cat >conftest.$ac_ext <<_ACEOF
8317#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* confdefs.h. */
8319_ACEOF
8320cat confdefs.h >>conftest.$ac_ext
8321cat >>conftest.$ac_ext <<_ACEOF
8322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008323$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008324int
8325main ()
8326{
8327static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8328test_array [0] = 0
8329
8330 ;
8331 return 0;
8332}
8333_ACEOF
8334rm -f conftest.$ac_objext
8335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8336 (eval $ac_compile) 2>&5
8337 ac_status=$?
8338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339 (exit $ac_status); } &&
8340 { ac_try='test -s conftest.$ac_objext'
8341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8342 (eval $ac_try) 2>&5
8343 ac_status=$?
8344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345 (exit $ac_status); }; }; then
8346 ac_lo=$ac_mid; break
8347else
8348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008349sed 's/^/| /' conftest.$ac_ext >&5
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351ac_hi=`expr '(' $ac_mid ')' - 1`
8352 if test $ac_mid -le $ac_hi; then
8353 ac_lo= ac_hi=
8354 break
8355 fi
8356 ac_mid=`expr 2 '*' $ac_mid`
8357fi
8358rm -f conftest.$ac_objext conftest.$ac_ext
8359 done
8360else
8361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008362sed 's/^/| /' conftest.$ac_ext >&5
8363
Martin v. Löwis11437992002-04-12 09:54:03 +00008364ac_lo= ac_hi=
8365fi
8366rm -f conftest.$ac_objext conftest.$ac_ext
8367fi
8368rm -f conftest.$ac_objext conftest.$ac_ext
8369# Binary search between lo and hi bounds.
8370while test "x$ac_lo" != "x$ac_hi"; do
8371 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8372 cat >conftest.$ac_ext <<_ACEOF
8373#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008374/* confdefs.h. */
8375_ACEOF
8376cat confdefs.h >>conftest.$ac_ext
8377cat >>conftest.$ac_ext <<_ACEOF
8378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008379$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008380int
8381main ()
8382{
8383static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8384test_array [0] = 0
8385
8386 ;
8387 return 0;
8388}
8389_ACEOF
8390rm -f conftest.$ac_objext
8391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8392 (eval $ac_compile) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); } &&
8396 { ac_try='test -s conftest.$ac_objext'
8397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398 (eval $ac_try) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); }; }; then
8402 ac_hi=$ac_mid
8403else
8404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008405sed 's/^/| /' conftest.$ac_ext >&5
8406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407ac_lo=`expr '(' $ac_mid ')' + 1`
8408fi
8409rm -f conftest.$ac_objext conftest.$ac_ext
8410done
8411case $ac_lo in
8412?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008413'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8414See \`config.log' for more details." >&5
8415echo "$as_me: error: cannot compute sizeof (double), 77
8416See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 { (exit 1); exit 1; }; } ;;
8418esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008419else
8420 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008421 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8422See \`config.log' for more details." >&5
8423echo "$as_me: error: cannot run test program while cross compiling
8424See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 cat >conftest.$ac_ext <<_ACEOF
8428#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008429/* confdefs.h. */
8430_ACEOF
8431cat confdefs.h >>conftest.$ac_ext
8432cat >>conftest.$ac_ext <<_ACEOF
8433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008434$ac_includes_default
8435long longval () { return (long) (sizeof (double)); }
8436unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008437#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008438#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008439int
8440main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008441{
Martin v. Löwis11437992002-04-12 09:54:03 +00008442
8443 FILE *f = fopen ("conftest.val", "w");
8444 if (! f)
8445 exit (1);
8446 if (((long) (sizeof (double))) < 0)
8447 {
8448 long i = longval ();
8449 if (i != ((long) (sizeof (double))))
8450 exit (1);
8451 fprintf (f, "%ld\n", i);
8452 }
8453 else
8454 {
8455 unsigned long i = ulongval ();
8456 if (i != ((long) (sizeof (double))))
8457 exit (1);
8458 fprintf (f, "%lu\n", i);
8459 }
8460 exit (ferror (f) || fclose (f) != 0);
8461
8462 ;
8463 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008464}
Martin v. Löwis11437992002-04-12 09:54:03 +00008465_ACEOF
8466rm -f conftest$ac_exeext
8467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8468 (eval $ac_link) 2>&5
8469 ac_status=$?
8470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8473 (eval $ac_try) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); }; }; then
8477 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008478else
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 echo "$as_me: program exited with status $ac_status" >&5
8480echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008481sed 's/^/| /' conftest.$ac_ext >&5
8482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008484{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8485See \`config.log' for more details." >&5
8486echo "$as_me: error: cannot compute sizeof (double), 77
8487See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 { (exit 1); exit 1; }; }
8489fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008490rm -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 +00008491fi
8492fi
8493rm -f conftest.val
8494else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008495 ac_cv_sizeof_double=0
8496fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008497fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008498echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8499echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8500cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008501#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008502_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008503
8504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505echo "$as_me:$LINENO: checking for fpos_t" >&5
8506echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8507if test "${ac_cv_type_fpos_t+set}" = set; then
8508 echo $ECHO_N "(cached) $ECHO_C" >&6
8509else
8510 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
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
8521if ((fpos_t *) 0)
8522 return 0;
8523if (sizeof (fpos_t))
8524 return 0;
8525 ;
8526 return 0;
8527}
8528_ACEOF
8529rm -f conftest.$ac_objext
8530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8531 (eval $ac_compile) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } &&
8535 { ac_try='test -s conftest.$ac_objext'
8536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8537 (eval $ac_try) 2>&5
8538 ac_status=$?
8539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540 (exit $ac_status); }; }; then
8541 ac_cv_type_fpos_t=yes
8542else
8543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008544sed 's/^/| /' conftest.$ac_ext >&5
8545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546ac_cv_type_fpos_t=no
8547fi
8548rm -f conftest.$ac_objext conftest.$ac_ext
8549fi
8550echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8551echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8552
8553echo "$as_me:$LINENO: checking size of fpos_t" >&5
8554echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8555if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8556 echo $ECHO_N "(cached) $ECHO_C" >&6
8557else
8558 if test "$ac_cv_type_fpos_t" = yes; then
8559 # The cast to unsigned long works around a bug in the HP C Compiler
8560 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8561 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8562 # This bug is HP SR number 8606223364.
8563 if test "$cross_compiling" = yes; then
8564 # Depending upon the size, compute the lo and hi bounds.
8565cat >conftest.$ac_ext <<_ACEOF
8566#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008567/* confdefs.h. */
8568_ACEOF
8569cat confdefs.h >>conftest.$ac_ext
8570cat >>conftest.$ac_ext <<_ACEOF
8571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008573int
8574main ()
8575{
8576static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8577test_array [0] = 0
8578
8579 ;
8580 return 0;
8581}
8582_ACEOF
8583rm -f conftest.$ac_objext
8584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8585 (eval $ac_compile) 2>&5
8586 ac_status=$?
8587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588 (exit $ac_status); } &&
8589 { ac_try='test -s conftest.$ac_objext'
8590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8591 (eval $ac_try) 2>&5
8592 ac_status=$?
8593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594 (exit $ac_status); }; }; then
8595 ac_lo=0 ac_mid=0
8596 while :; do
8597 cat >conftest.$ac_ext <<_ACEOF
8598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008599/* confdefs.h. */
8600_ACEOF
8601cat confdefs.h >>conftest.$ac_ext
8602cat >>conftest.$ac_ext <<_ACEOF
8603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008604$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008605int
8606main ()
8607{
8608static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8609test_array [0] = 0
8610
8611 ;
8612 return 0;
8613}
8614_ACEOF
8615rm -f conftest.$ac_objext
8616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8617 (eval $ac_compile) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); } &&
8621 { ac_try='test -s conftest.$ac_objext'
8622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8623 (eval $ac_try) 2>&5
8624 ac_status=$?
8625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626 (exit $ac_status); }; }; then
8627 ac_hi=$ac_mid; break
8628else
8629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008630sed 's/^/| /' conftest.$ac_ext >&5
8631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632ac_lo=`expr $ac_mid + 1`
8633 if test $ac_lo -le $ac_mid; then
8634 ac_lo= ac_hi=
8635 break
8636 fi
8637 ac_mid=`expr 2 '*' $ac_mid + 1`
8638fi
8639rm -f conftest.$ac_objext conftest.$ac_ext
8640 done
8641else
8642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008643sed 's/^/| /' conftest.$ac_ext >&5
8644
Martin v. Löwis11437992002-04-12 09:54:03 +00008645cat >conftest.$ac_ext <<_ACEOF
8646#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008647/* confdefs.h. */
8648_ACEOF
8649cat confdefs.h >>conftest.$ac_ext
8650cat >>conftest.$ac_ext <<_ACEOF
8651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008653int
8654main ()
8655{
8656static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8657test_array [0] = 0
8658
8659 ;
8660 return 0;
8661}
8662_ACEOF
8663rm -f conftest.$ac_objext
8664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8665 (eval $ac_compile) 2>&5
8666 ac_status=$?
8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668 (exit $ac_status); } &&
8669 { ac_try='test -s conftest.$ac_objext'
8670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8671 (eval $ac_try) 2>&5
8672 ac_status=$?
8673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8674 (exit $ac_status); }; }; then
8675 ac_hi=-1 ac_mid=-1
8676 while :; do
8677 cat >conftest.$ac_ext <<_ACEOF
8678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008679/* confdefs.h. */
8680_ACEOF
8681cat confdefs.h >>conftest.$ac_ext
8682cat >>conftest.$ac_ext <<_ACEOF
8683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008684$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008685int
8686main ()
8687{
8688static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8689test_array [0] = 0
8690
8691 ;
8692 return 0;
8693}
8694_ACEOF
8695rm -f conftest.$ac_objext
8696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8697 (eval $ac_compile) 2>&5
8698 ac_status=$?
8699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8700 (exit $ac_status); } &&
8701 { ac_try='test -s conftest.$ac_objext'
8702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8703 (eval $ac_try) 2>&5
8704 ac_status=$?
8705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8706 (exit $ac_status); }; }; then
8707 ac_lo=$ac_mid; break
8708else
8709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712ac_hi=`expr '(' $ac_mid ')' - 1`
8713 if test $ac_mid -le $ac_hi; then
8714 ac_lo= ac_hi=
8715 break
8716 fi
8717 ac_mid=`expr 2 '*' $ac_mid`
8718fi
8719rm -f conftest.$ac_objext conftest.$ac_ext
8720 done
8721else
8722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008723sed 's/^/| /' conftest.$ac_ext >&5
8724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725ac_lo= ac_hi=
8726fi
8727rm -f conftest.$ac_objext conftest.$ac_ext
8728fi
8729rm -f conftest.$ac_objext conftest.$ac_ext
8730# Binary search between lo and hi bounds.
8731while test "x$ac_lo" != "x$ac_hi"; do
8732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8733 cat >conftest.$ac_ext <<_ACEOF
8734#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008735/* confdefs.h. */
8736_ACEOF
8737cat confdefs.h >>conftest.$ac_ext
8738cat >>conftest.$ac_ext <<_ACEOF
8739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008740$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
8744static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8745test_array [0] = 0
8746
8747 ;
8748 return 0;
8749}
8750_ACEOF
8751rm -f conftest.$ac_objext
8752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8753 (eval $ac_compile) 2>&5
8754 ac_status=$?
8755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756 (exit $ac_status); } &&
8757 { ac_try='test -s conftest.$ac_objext'
8758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8759 (eval $ac_try) 2>&5
8760 ac_status=$?
8761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8762 (exit $ac_status); }; }; then
8763 ac_hi=$ac_mid
8764else
8765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008766sed 's/^/| /' conftest.$ac_ext >&5
8767
Martin v. Löwis11437992002-04-12 09:54:03 +00008768ac_lo=`expr '(' $ac_mid ')' + 1`
8769fi
8770rm -f conftest.$ac_objext conftest.$ac_ext
8771done
8772case $ac_lo in
8773?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008774'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8775See \`config.log' for more details." >&5
8776echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8777See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 { (exit 1); exit 1; }; } ;;
8779esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008780else
8781 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008782 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8783See \`config.log' for more details." >&5
8784echo "$as_me: error: cannot run test program while cross compiling
8785See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008787else
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 cat >conftest.$ac_ext <<_ACEOF
8789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008790/* confdefs.h. */
8791_ACEOF
8792cat confdefs.h >>conftest.$ac_ext
8793cat >>conftest.$ac_ext <<_ACEOF
8794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008795$ac_includes_default
8796long longval () { return (long) (sizeof (fpos_t)); }
8797unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008798#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008799#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008800int
8801main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008802{
Martin v. Löwis11437992002-04-12 09:54:03 +00008803
8804 FILE *f = fopen ("conftest.val", "w");
8805 if (! f)
8806 exit (1);
8807 if (((long) (sizeof (fpos_t))) < 0)
8808 {
8809 long i = longval ();
8810 if (i != ((long) (sizeof (fpos_t))))
8811 exit (1);
8812 fprintf (f, "%ld\n", i);
8813 }
8814 else
8815 {
8816 unsigned long i = ulongval ();
8817 if (i != ((long) (sizeof (fpos_t))))
8818 exit (1);
8819 fprintf (f, "%lu\n", i);
8820 }
8821 exit (ferror (f) || fclose (f) != 0);
8822
8823 ;
8824 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008825}
Martin v. Löwis11437992002-04-12 09:54:03 +00008826_ACEOF
8827rm -f conftest$ac_exeext
8828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8829 (eval $ac_link) 2>&5
8830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8834 (eval $ac_try) 2>&5
8835 ac_status=$?
8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8837 (exit $ac_status); }; }; then
8838 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008839else
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 echo "$as_me: program exited with status $ac_status" >&5
8841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008842sed 's/^/| /' conftest.$ac_ext >&5
8843
Martin v. Löwis11437992002-04-12 09:54:03 +00008844( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008845{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8846See \`config.log' for more details." >&5
8847echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8848See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 { (exit 1); exit 1; }; }
8850fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008851rm -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 +00008852fi
8853fi
8854rm -f conftest.val
8855else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008856 ac_cv_sizeof_fpos_t=0
8857fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008859echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8860echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8861cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008862#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008863_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008864
Michael W. Hudson54241132001-12-07 15:38:26 +00008865
8866
Martin v. Löwis11437992002-04-12 09:54:03 +00008867echo "$as_me:$LINENO: checking for long long support" >&5
8868echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008869have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008870cat >conftest.$ac_ext <<_ACEOF
8871#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008872/* confdefs.h. */
8873_ACEOF
8874cat confdefs.h >>conftest.$ac_ext
8875cat >>conftest.$ac_ext <<_ACEOF
8876/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008877
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008881long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ;
8883 return 0;
8884}
8885_ACEOF
8886rm -f conftest.$ac_objext
8887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8888 (eval $ac_compile) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); } &&
8892 { ac_try='test -s conftest.$ac_objext'
8893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8894 (eval $ac_try) 2>&5
8895 ac_status=$?
8896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8897 (exit $ac_status); }; }; then
8898
8899
8900cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008901#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008902_ACEOF
8903
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008904 have_long_long=yes
8905
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008906else
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008908sed 's/^/| /' conftest.$ac_ext >&5
8909
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008910fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008911rm -f conftest.$ac_objext conftest.$ac_ext
8912echo "$as_me:$LINENO: result: $have_long_long" >&5
8913echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008914if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008915echo "$as_me:$LINENO: checking for long long" >&5
8916echo $ECHO_N "checking for long long... $ECHO_C" >&6
8917if test "${ac_cv_type_long_long+set}" = set; then
8918 echo $ECHO_N "(cached) $ECHO_C" >&6
8919else
8920 cat >conftest.$ac_ext <<_ACEOF
8921#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008928int
8929main ()
8930{
8931if ((long long *) 0)
8932 return 0;
8933if (sizeof (long long))
8934 return 0;
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939rm -f conftest.$ac_objext
8940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8941 (eval $ac_compile) 2>&5
8942 ac_status=$?
8943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8944 (exit $ac_status); } &&
8945 { ac_try='test -s conftest.$ac_objext'
8946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8947 (eval $ac_try) 2>&5
8948 ac_status=$?
8949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); }; }; then
8951 ac_cv_type_long_long=yes
8952else
8953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008954sed 's/^/| /' conftest.$ac_ext >&5
8955
Martin v. Löwis11437992002-04-12 09:54:03 +00008956ac_cv_type_long_long=no
8957fi
8958rm -f conftest.$ac_objext conftest.$ac_ext
8959fi
8960echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8961echo "${ECHO_T}$ac_cv_type_long_long" >&6
8962
8963echo "$as_me:$LINENO: checking size of long long" >&5
8964echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8965if test "${ac_cv_sizeof_long_long+set}" = set; then
8966 echo $ECHO_N "(cached) $ECHO_C" >&6
8967else
8968 if test "$ac_cv_type_long_long" = yes; then
8969 # The cast to unsigned long works around a bug in the HP C Compiler
8970 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8971 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8972 # This bug is HP SR number 8606223364.
8973 if test "$cross_compiling" = yes; then
8974 # Depending upon the size, compute the lo and hi bounds.
8975cat >conftest.$ac_ext <<_ACEOF
8976#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* confdefs.h. */
8978_ACEOF
8979cat confdefs.h >>conftest.$ac_ext
8980cat >>conftest.$ac_ext <<_ACEOF
8981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008982$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008983int
8984main ()
8985{
8986static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8987test_array [0] = 0
8988
8989 ;
8990 return 0;
8991}
8992_ACEOF
8993rm -f conftest.$ac_objext
8994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8995 (eval $ac_compile) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); } &&
8999 { ac_try='test -s conftest.$ac_objext'
9000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9001 (eval $ac_try) 2>&5
9002 ac_status=$?
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); }; }; then
9005 ac_lo=0 ac_mid=0
9006 while :; do
9007 cat >conftest.$ac_ext <<_ACEOF
9008#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009009/* confdefs.h. */
9010_ACEOF
9011cat confdefs.h >>conftest.$ac_ext
9012cat >>conftest.$ac_ext <<_ACEOF
9013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009014$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009015int
9016main ()
9017{
9018static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9019test_array [0] = 0
9020
9021 ;
9022 return 0;
9023}
9024_ACEOF
9025rm -f conftest.$ac_objext
9026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9027 (eval $ac_compile) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } &&
9031 { ac_try='test -s conftest.$ac_objext'
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; }; then
9037 ac_hi=$ac_mid; break
9038else
9039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009040sed 's/^/| /' conftest.$ac_ext >&5
9041
Martin v. Löwis11437992002-04-12 09:54:03 +00009042ac_lo=`expr $ac_mid + 1`
9043 if test $ac_lo -le $ac_mid; then
9044 ac_lo= ac_hi=
9045 break
9046 fi
9047 ac_mid=`expr 2 '*' $ac_mid + 1`
9048fi
9049rm -f conftest.$ac_objext conftest.$ac_ext
9050 done
9051else
9052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009053sed 's/^/| /' conftest.$ac_ext >&5
9054
Martin v. Löwis11437992002-04-12 09:54:03 +00009055cat >conftest.$ac_ext <<_ACEOF
9056#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* confdefs.h. */
9058_ACEOF
9059cat confdefs.h >>conftest.$ac_ext
9060cat >>conftest.$ac_ext <<_ACEOF
9061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009063int
9064main ()
9065{
9066static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9067test_array [0] = 0
9068
9069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext
9074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9075 (eval $ac_compile) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); } &&
9079 { ac_try='test -s conftest.$ac_objext'
9080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081 (eval $ac_try) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); }; }; then
9085 ac_hi=-1 ac_mid=-1
9086 while :; do
9087 cat >conftest.$ac_ext <<_ACEOF
9088#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009089/* confdefs.h. */
9090_ACEOF
9091cat confdefs.h >>conftest.$ac_ext
9092cat >>conftest.$ac_ext <<_ACEOF
9093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009094$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009095int
9096main ()
9097{
9098static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9099test_array [0] = 0
9100
9101 ;
9102 return 0;
9103}
9104_ACEOF
9105rm -f conftest.$ac_objext
9106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9107 (eval $ac_compile) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); } &&
9111 { ac_try='test -s conftest.$ac_objext'
9112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9113 (eval $ac_try) 2>&5
9114 ac_status=$?
9115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9116 (exit $ac_status); }; }; then
9117 ac_lo=$ac_mid; break
9118else
9119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009120sed 's/^/| /' conftest.$ac_ext >&5
9121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122ac_hi=`expr '(' $ac_mid ')' - 1`
9123 if test $ac_mid -le $ac_hi; then
9124 ac_lo= ac_hi=
9125 break
9126 fi
9127 ac_mid=`expr 2 '*' $ac_mid`
9128fi
9129rm -f conftest.$ac_objext conftest.$ac_ext
9130 done
9131else
9132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009133sed 's/^/| /' conftest.$ac_ext >&5
9134
Martin v. Löwis11437992002-04-12 09:54:03 +00009135ac_lo= ac_hi=
9136fi
9137rm -f conftest.$ac_objext conftest.$ac_ext
9138fi
9139rm -f conftest.$ac_objext conftest.$ac_ext
9140# Binary search between lo and hi bounds.
9141while test "x$ac_lo" != "x$ac_hi"; do
9142 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9143 cat >conftest.$ac_ext <<_ACEOF
9144#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009145/* confdefs.h. */
9146_ACEOF
9147cat confdefs.h >>conftest.$ac_ext
9148cat >>conftest.$ac_ext <<_ACEOF
9149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009150$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009151int
9152main ()
9153{
9154static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9155test_array [0] = 0
9156
9157 ;
9158 return 0;
9159}
9160_ACEOF
9161rm -f conftest.$ac_objext
9162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9163 (eval $ac_compile) 2>&5
9164 ac_status=$?
9165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166 (exit $ac_status); } &&
9167 { ac_try='test -s conftest.$ac_objext'
9168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9169 (eval $ac_try) 2>&5
9170 ac_status=$?
9171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9172 (exit $ac_status); }; }; then
9173 ac_hi=$ac_mid
9174else
9175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009176sed 's/^/| /' conftest.$ac_ext >&5
9177
Martin v. Löwis11437992002-04-12 09:54:03 +00009178ac_lo=`expr '(' $ac_mid ')' + 1`
9179fi
9180rm -f conftest.$ac_objext conftest.$ac_ext
9181done
9182case $ac_lo in
9183?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009184'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9185See \`config.log' for more details." >&5
9186echo "$as_me: error: cannot compute sizeof (long long), 77
9187See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 { (exit 1); exit 1; }; } ;;
9189esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009190else
9191 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009192 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9193See \`config.log' for more details." >&5
9194echo "$as_me: error: cannot run test program while cross compiling
9195See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009197else
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 cat >conftest.$ac_ext <<_ACEOF
9199#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009200/* confdefs.h. */
9201_ACEOF
9202cat confdefs.h >>conftest.$ac_ext
9203cat >>conftest.$ac_ext <<_ACEOF
9204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009205$ac_includes_default
9206long longval () { return (long) (sizeof (long long)); }
9207unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009208#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009210int
9211main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009212{
Martin v. Löwis11437992002-04-12 09:54:03 +00009213
9214 FILE *f = fopen ("conftest.val", "w");
9215 if (! f)
9216 exit (1);
9217 if (((long) (sizeof (long long))) < 0)
9218 {
9219 long i = longval ();
9220 if (i != ((long) (sizeof (long long))))
9221 exit (1);
9222 fprintf (f, "%ld\n", i);
9223 }
9224 else
9225 {
9226 unsigned long i = ulongval ();
9227 if (i != ((long) (sizeof (long long))))
9228 exit (1);
9229 fprintf (f, "%lu\n", i);
9230 }
9231 exit (ferror (f) || fclose (f) != 0);
9232
9233 ;
9234 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009235}
Martin v. Löwis11437992002-04-12 09:54:03 +00009236_ACEOF
9237rm -f conftest$ac_exeext
9238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9239 (eval $ac_link) 2>&5
9240 ac_status=$?
9241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9242 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9244 (eval $ac_try) 2>&5
9245 ac_status=$?
9246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247 (exit $ac_status); }; }; then
9248 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009249else
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 echo "$as_me: program exited with status $ac_status" >&5
9251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009252sed 's/^/| /' conftest.$ac_ext >&5
9253
Martin v. Löwis11437992002-04-12 09:54:03 +00009254( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009255{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9256See \`config.log' for more details." >&5
9257echo "$as_me: error: cannot compute sizeof (long long), 77
9258See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 { (exit 1); exit 1; }; }
9260fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009261rm -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 +00009262fi
9263fi
9264rm -f conftest.val
9265else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009266 ac_cv_sizeof_long_long=0
9267fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009268fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009269echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9270echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9271cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009272#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009274
Michael W. Hudson54241132001-12-07 15:38:26 +00009275
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009276fi
9277
Martin v. Löwis11437992002-04-12 09:54:03 +00009278echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9279echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009280have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009281cat >conftest.$ac_ext <<_ACEOF
9282#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009283/* confdefs.h. */
9284_ACEOF
9285cat confdefs.h >>conftest.$ac_ext
9286cat >>conftest.$ac_ext <<_ACEOF
9287/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009288
Martin v. Löwis11437992002-04-12 09:54:03 +00009289int
9290main ()
9291{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009292uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 ;
9294 return 0;
9295}
9296_ACEOF
9297rm -f conftest.$ac_objext
9298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9299 (eval $ac_compile) 2>&5
9300 ac_status=$?
9301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9302 (exit $ac_status); } &&
9303 { ac_try='test -s conftest.$ac_objext'
9304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9305 (eval $ac_try) 2>&5
9306 ac_status=$?
9307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9308 (exit $ac_status); }; }; then
9309
9310
9311cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009312#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009313_ACEOF
9314
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009315 have_uintptr_t=yes
9316
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009317else
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009319sed 's/^/| /' conftest.$ac_ext >&5
9320
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009322rm -f conftest.$ac_objext conftest.$ac_ext
9323echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9324echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009325if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009326echo "$as_me:$LINENO: checking for uintptr_t" >&5
9327echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9328if test "${ac_cv_type_uintptr_t+set}" = set; then
9329 echo $ECHO_N "(cached) $ECHO_C" >&6
9330else
9331 cat >conftest.$ac_ext <<_ACEOF
9332#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009333/* confdefs.h. */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009338$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009339int
9340main ()
9341{
9342if ((uintptr_t *) 0)
9343 return 0;
9344if (sizeof (uintptr_t))
9345 return 0;
9346 ;
9347 return 0;
9348}
9349_ACEOF
9350rm -f conftest.$ac_objext
9351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9352 (eval $ac_compile) 2>&5
9353 ac_status=$?
9354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355 (exit $ac_status); } &&
9356 { ac_try='test -s conftest.$ac_objext'
9357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9358 (eval $ac_try) 2>&5
9359 ac_status=$?
9360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9361 (exit $ac_status); }; }; then
9362 ac_cv_type_uintptr_t=yes
9363else
9364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009365sed 's/^/| /' conftest.$ac_ext >&5
9366
Martin v. Löwis11437992002-04-12 09:54:03 +00009367ac_cv_type_uintptr_t=no
9368fi
9369rm -f conftest.$ac_objext conftest.$ac_ext
9370fi
9371echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9372echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9373
9374echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9375echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9376if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9377 echo $ECHO_N "(cached) $ECHO_C" >&6
9378else
9379 if test "$ac_cv_type_uintptr_t" = yes; then
9380 # The cast to unsigned long works around a bug in the HP C Compiler
9381 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9382 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9383 # This bug is HP SR number 8606223364.
9384 if test "$cross_compiling" = yes; then
9385 # Depending upon the size, compute the lo and hi bounds.
9386cat >conftest.$ac_ext <<_ACEOF
9387#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* confdefs.h. */
9389_ACEOF
9390cat confdefs.h >>conftest.$ac_ext
9391cat >>conftest.$ac_ext <<_ACEOF
9392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009394int
9395main ()
9396{
9397static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9398test_array [0] = 0
9399
9400 ;
9401 return 0;
9402}
9403_ACEOF
9404rm -f conftest.$ac_objext
9405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9406 (eval $ac_compile) 2>&5
9407 ac_status=$?
9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409 (exit $ac_status); } &&
9410 { ac_try='test -s conftest.$ac_objext'
9411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9412 (eval $ac_try) 2>&5
9413 ac_status=$?
9414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415 (exit $ac_status); }; }; then
9416 ac_lo=0 ac_mid=0
9417 while :; do
9418 cat >conftest.$ac_ext <<_ACEOF
9419#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* confdefs.h. */
9421_ACEOF
9422cat confdefs.h >>conftest.$ac_ext
9423cat >>conftest.$ac_ext <<_ACEOF
9424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009426int
9427main ()
9428{
9429static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9430test_array [0] = 0
9431
9432 ;
9433 return 0;
9434}
9435_ACEOF
9436rm -f conftest.$ac_objext
9437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9438 (eval $ac_compile) 2>&5
9439 ac_status=$?
9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441 (exit $ac_status); } &&
9442 { ac_try='test -s conftest.$ac_objext'
9443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9444 (eval $ac_try) 2>&5
9445 ac_status=$?
9446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447 (exit $ac_status); }; }; then
9448 ac_hi=$ac_mid; break
9449else
9450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwis11437992002-04-12 09:54:03 +00009453ac_lo=`expr $ac_mid + 1`
9454 if test $ac_lo -le $ac_mid; then
9455 ac_lo= ac_hi=
9456 break
9457 fi
9458 ac_mid=`expr 2 '*' $ac_mid + 1`
9459fi
9460rm -f conftest.$ac_objext conftest.$ac_ext
9461 done
9462else
9463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009464sed 's/^/| /' conftest.$ac_ext >&5
9465
Martin v. Löwis11437992002-04-12 09:54:03 +00009466cat >conftest.$ac_ext <<_ACEOF
9467#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009468/* confdefs.h. */
9469_ACEOF
9470cat confdefs.h >>conftest.$ac_ext
9471cat >>conftest.$ac_ext <<_ACEOF
9472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009473$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
9476{
9477static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9478test_array [0] = 0
9479
9480 ;
9481 return 0;
9482}
9483_ACEOF
9484rm -f conftest.$ac_objext
9485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9486 (eval $ac_compile) 2>&5
9487 ac_status=$?
9488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9489 (exit $ac_status); } &&
9490 { ac_try='test -s conftest.$ac_objext'
9491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9492 (eval $ac_try) 2>&5
9493 ac_status=$?
9494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9495 (exit $ac_status); }; }; then
9496 ac_hi=-1 ac_mid=-1
9497 while :; do
9498 cat >conftest.$ac_ext <<_ACEOF
9499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* confdefs.h. */
9501_ACEOF
9502cat confdefs.h >>conftest.$ac_ext
9503cat >>conftest.$ac_ext <<_ACEOF
9504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009506int
9507main ()
9508{
9509static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9510test_array [0] = 0
9511
9512 ;
9513 return 0;
9514}
9515_ACEOF
9516rm -f conftest.$ac_objext
9517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9518 (eval $ac_compile) 2>&5
9519 ac_status=$?
9520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9521 (exit $ac_status); } &&
9522 { ac_try='test -s conftest.$ac_objext'
9523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9524 (eval $ac_try) 2>&5
9525 ac_status=$?
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); }; }; then
9528 ac_lo=$ac_mid; break
9529else
9530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009531sed 's/^/| /' conftest.$ac_ext >&5
9532
Martin v. Löwis11437992002-04-12 09:54:03 +00009533ac_hi=`expr '(' $ac_mid ')' - 1`
9534 if test $ac_mid -le $ac_hi; then
9535 ac_lo= ac_hi=
9536 break
9537 fi
9538 ac_mid=`expr 2 '*' $ac_mid`
9539fi
9540rm -f conftest.$ac_objext conftest.$ac_ext
9541 done
9542else
9543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009544sed 's/^/| /' conftest.$ac_ext >&5
9545
Martin v. Löwis11437992002-04-12 09:54:03 +00009546ac_lo= ac_hi=
9547fi
9548rm -f conftest.$ac_objext conftest.$ac_ext
9549fi
9550rm -f conftest.$ac_objext conftest.$ac_ext
9551# Binary search between lo and hi bounds.
9552while test "x$ac_lo" != "x$ac_hi"; do
9553 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9554 cat >conftest.$ac_ext <<_ACEOF
9555#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* confdefs.h. */
9557_ACEOF
9558cat confdefs.h >>conftest.$ac_ext
9559cat >>conftest.$ac_ext <<_ACEOF
9560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
9565static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9566test_array [0] = 0
9567
9568 ;
9569 return 0;
9570}
9571_ACEOF
9572rm -f conftest.$ac_objext
9573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9574 (eval $ac_compile) 2>&5
9575 ac_status=$?
9576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9577 (exit $ac_status); } &&
9578 { ac_try='test -s conftest.$ac_objext'
9579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9580 (eval $ac_try) 2>&5
9581 ac_status=$?
9582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9583 (exit $ac_status); }; }; then
9584 ac_hi=$ac_mid
9585else
9586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009587sed 's/^/| /' conftest.$ac_ext >&5
9588
Martin v. Löwis11437992002-04-12 09:54:03 +00009589ac_lo=`expr '(' $ac_mid ')' + 1`
9590fi
9591rm -f conftest.$ac_objext conftest.$ac_ext
9592done
9593case $ac_lo in
9594?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009595'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9596See \`config.log' for more details." >&5
9597echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9598See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 { (exit 1); exit 1; }; } ;;
9600esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009601else
9602 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009603 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9604See \`config.log' for more details." >&5
9605echo "$as_me: error: cannot run test program while cross compiling
9606See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009608else
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 cat >conftest.$ac_ext <<_ACEOF
9610#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616$ac_includes_default
9617long longval () { return (long) (sizeof (uintptr_t)); }
9618unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009619#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009620#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009621int
9622main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009623{
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
9625 FILE *f = fopen ("conftest.val", "w");
9626 if (! f)
9627 exit (1);
9628 if (((long) (sizeof (uintptr_t))) < 0)
9629 {
9630 long i = longval ();
9631 if (i != ((long) (sizeof (uintptr_t))))
9632 exit (1);
9633 fprintf (f, "%ld\n", i);
9634 }
9635 else
9636 {
9637 unsigned long i = ulongval ();
9638 if (i != ((long) (sizeof (uintptr_t))))
9639 exit (1);
9640 fprintf (f, "%lu\n", i);
9641 }
9642 exit (ferror (f) || fclose (f) != 0);
9643
9644 ;
9645 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009646}
Martin v. Löwis11437992002-04-12 09:54:03 +00009647_ACEOF
9648rm -f conftest$ac_exeext
9649if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9650 (eval $ac_link) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9655 (eval $ac_try) 2>&5
9656 ac_status=$?
9657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9658 (exit $ac_status); }; }; then
9659 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009660else
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 echo "$as_me: program exited with status $ac_status" >&5
9662echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009663sed 's/^/| /' conftest.$ac_ext >&5
9664
Martin v. Löwis11437992002-04-12 09:54:03 +00009665( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009666{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9667See \`config.log' for more details." >&5
9668echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9669See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 { (exit 1); exit 1; }; }
9671fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009672rm -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 +00009673fi
9674fi
9675rm -f conftest.val
9676else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009677 ac_cv_sizeof_uintptr_t=0
9678fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009679fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009680echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9681echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9682cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009683#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009684_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009685
Michael W. Hudson54241132001-12-07 15:38:26 +00009686
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009687fi
9688
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009689# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009690echo "$as_me:$LINENO: checking size of off_t" >&5
9691echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9692if test "${ac_cv_sizeof_off_t+set}" = set; then
9693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009694else
9695 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009696 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009697else
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 cat >conftest.$ac_ext <<_ACEOF
9699#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009700/* confdefs.h. */
9701_ACEOF
9702cat confdefs.h >>conftest.$ac_ext
9703cat >>conftest.$ac_ext <<_ACEOF
9704/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009705#include <stdio.h>
9706#include <sys/types.h>
9707main()
9708{
9709 FILE *f=fopen("conftestval", "w");
9710 if (!f) exit(1);
9711 fprintf(f, "%d\n", sizeof(off_t));
9712 exit(0);
9713}
Martin v. Löwis11437992002-04-12 09:54:03 +00009714_ACEOF
9715rm -f conftest$ac_exeext
9716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9717 (eval $ac_link) 2>&5
9718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9722 (eval $ac_try) 2>&5
9723 ac_status=$?
9724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9725 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009726 ac_cv_sizeof_off_t=`cat conftestval`
9727else
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 echo "$as_me: program exited with status $ac_status" >&5
9729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009730sed 's/^/| /' conftest.$ac_ext >&5
9731
Martin v. Löwis11437992002-04-12 09:54:03 +00009732( exit $ac_status )
9733ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009734fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009735rm -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 +00009736fi
9737
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009738fi
9739
Martin v. Löwis11437992002-04-12 09:54:03 +00009740echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9741echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9742
9743cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009744#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009745_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009746
Michael W. Hudson54241132001-12-07 15:38:26 +00009747
Martin v. Löwis11437992002-04-12 09:54:03 +00009748echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9749echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009750if test "$have_long_long" = yes -a \
9751 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9752 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009753
Martin v. Löwis11437992002-04-12 09:54:03 +00009754cat >>confdefs.h <<\_ACEOF
9755#define HAVE_LARGEFILE_SUPPORT 1
9756_ACEOF
9757
9758 echo "$as_me:$LINENO: result: yes" >&5
9759echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009760else
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 echo "$as_me:$LINENO: result: no" >&5
9762echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009763fi
9764
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009765# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009766echo "$as_me:$LINENO: checking size of time_t" >&5
9767echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9768if test "${ac_cv_sizeof_time_t+set}" = set; then
9769 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009770else
9771 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009772 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009773else
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 cat >conftest.$ac_ext <<_ACEOF
9775#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009776/* confdefs.h. */
9777_ACEOF
9778cat confdefs.h >>conftest.$ac_ext
9779cat >>conftest.$ac_ext <<_ACEOF
9780/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009781#include <stdio.h>
9782#include <time.h>
9783main()
9784{
9785 FILE *f=fopen("conftestval", "w");
9786 if (!f) exit(1);
9787 fprintf(f, "%d\n", sizeof(time_t));
9788 exit(0);
9789}
Martin v. Löwis11437992002-04-12 09:54:03 +00009790_ACEOF
9791rm -f conftest$ac_exeext
9792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9793 (eval $ac_link) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009802 ac_cv_sizeof_time_t=`cat conftestval`
9803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 echo "$as_me: program exited with status $ac_status" >&5
9805echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009806sed 's/^/| /' conftest.$ac_ext >&5
9807
Martin v. Löwis11437992002-04-12 09:54:03 +00009808( exit $ac_status )
9809ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009810fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009811rm -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 +00009812fi
9813
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009814fi
9815
Martin v. Löwis11437992002-04-12 09:54:03 +00009816echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9817echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9818
9819cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009820#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009821_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009822
Michael W. Hudson54241132001-12-07 15:38:26 +00009823
9824
Trent Mick635f6fb2000-08-23 21:33:05 +00009825# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009826ac_save_cc="$CC"
9827if test "$ac_cv_kpthread" = "yes"
9828then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009829elif test "$ac_cv_kthread" = "yes"
9830then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009831elif test "$ac_cv_pthread" = "yes"
9832then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009833fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009834echo "$as_me:$LINENO: checking for pthread_t" >&5
9835echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009836have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009837cat >conftest.$ac_ext <<_ACEOF
9838#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* confdefs.h. */
9840_ACEOF
9841cat confdefs.h >>conftest.$ac_ext
9842cat >>conftest.$ac_ext <<_ACEOF
9843/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009844#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Guido van Rossum12580492000-09-24 16:47:19 +00009848pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
9853rm -f conftest.$ac_objext
9854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9855 (eval $ac_compile) 2>&5
9856 ac_status=$?
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 (exit $ac_status); } &&
9859 { ac_try='test -s conftest.$ac_objext'
9860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9861 (eval $ac_try) 2>&5
9862 ac_status=$?
9863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9864 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009865 have_pthread_t=yes
9866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009868sed 's/^/| /' conftest.$ac_ext >&5
9869
Trent Mick635f6fb2000-08-23 21:33:05 +00009870fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009871rm -f conftest.$ac_objext conftest.$ac_ext
9872echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9873echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009874if test "$have_pthread_t" = yes ; then
9875 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9877echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9878 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9879 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009880else
9881 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009882 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009883else
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 cat >conftest.$ac_ext <<_ACEOF
9885#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009886/* confdefs.h. */
9887_ACEOF
9888cat confdefs.h >>conftest.$ac_ext
9889cat >>conftest.$ac_ext <<_ACEOF
9890/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009891#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009892#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009893 main()
9894 {
9895 FILE *f=fopen("conftestval", "w");
9896 if (!f) exit(1);
9897 fprintf(f, "%d\n", sizeof(pthread_t));
9898 exit(0);
9899 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
9901rm -f conftest$ac_exeext
9902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9903 (eval $ac_link) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9908 (eval $ac_try) 2>&5
9909 ac_status=$?
9910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9911 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009912 ac_cv_sizeof_pthread_t=`cat conftestval`
9913else
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 echo "$as_me: program exited with status $ac_status" >&5
9915echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009916sed 's/^/| /' conftest.$ac_ext >&5
9917
Martin v. Löwis11437992002-04-12 09:54:03 +00009918( exit $ac_status )
9919ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009920fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009921rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009922fi
9923
Trent Mick635f6fb2000-08-23 21:33:05 +00009924fi
9925
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9927echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9928
9929cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009930#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009931_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009932
9933fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009934CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009935
Martin v. Löwis11437992002-04-12 09:54:03 +00009936echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9937echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009938# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9939if test "${enable_toolbox_glue+set}" = set; then
9940 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942fi;
Jack Jansene578a632001-08-15 01:27:14 +00009943
9944if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009945then
Jack Jansene578a632001-08-15 01:27:14 +00009946 case $ac_sys_system/$ac_sys_release in
9947 Darwin/*)
9948 enable_toolbox_glue="yes";;
9949 *)
9950 enable_toolbox_glue="no";;
9951 esac
9952fi
9953case "$enable_toolbox_glue" in
9954yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009955 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009956 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009957 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009958
9959cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009960#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009961_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009962
9963 ;;
9964*)
9965 extra_frameworks=""
9966 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009967 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009968 ;;
9969esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009970echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9971echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009972
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009973
9974case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009975 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009976 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009977 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009978 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009979 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009980 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009981 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009982 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009983 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009984 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009985esac
9986
Martin v. Löwis11437992002-04-12 09:54:03 +00009987echo "$as_me:$LINENO: checking for --enable-framework" >&5
9988echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009989if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009990then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009991 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009993 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009994
Martin v. Löwis11437992002-04-12 09:54:03 +00009995cat >>confdefs.h <<\_ACEOF
9996#define WITH_NEXT_FRAMEWORK 1
9997_ACEOF
9998
9999 echo "$as_me:$LINENO: result: yes" >&5
10000echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010001else
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 echo "$as_me:$LINENO: result: no" >&5
10003echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010004fi
10005
Martin v. Löwis11437992002-04-12 09:54:03 +000010006echo "$as_me:$LINENO: checking for dyld" >&5
10007echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010008case $ac_sys_system/$ac_sys_release in
10009 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010010
Martin v. Löwis11437992002-04-12 09:54:03 +000010011cat >>confdefs.h <<\_ACEOF
10012#define WITH_DYLD 1
10013_ACEOF
10014
10015 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10016echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010017 ;;
10018 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 echo "$as_me:$LINENO: result: no" >&5
10020echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010021 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010022esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010023
Guido van Rossum0a516c91994-09-12 10:58:40 +000010024# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010025
Michael W. Hudson54241132001-12-07 15:38:26 +000010026
10027
10028
10029
Guido van Rossum0a516c91994-09-12 10:58:40 +000010030# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010031# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010032echo "$as_me:$LINENO: checking SO" >&5
10033echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010034if test -z "$SO"
10035then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010036 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010037 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010038 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010039 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010040 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010041else
10042 # this might also be a termcap variable, see #610332
10043 echo
10044 echo '====================================================================='
10045 echo '+ +'
10046 echo '+ WARNING: You have set SO in your environment. +'
10047 echo '+ Do you really mean to change the extension for shared libraries? +'
10048 echo '+ Continuing in 10 seconds to let you to ponder. +'
10049 echo '+ +'
10050 echo '====================================================================='
10051 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010053echo "$as_me:$LINENO: result: $SO" >&5
10054echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010055# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +000010056# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010057# (Shared libraries in this instance are shared modules to be loaded into
10058# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010059echo "$as_me:$LINENO: checking LDSHARED" >&5
10060echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010061if test -z "$LDSHARED"
10062then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010063 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010064 AIX*)
10065 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010066 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010067 ;;
10068 BeOS*)
10069 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010070 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010071 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010072 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010073 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010074 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010076 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010077 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010078 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010079 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010080 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010081 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
10082 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010083 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010084 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10085 if test "$enable_framework" ; then
10086 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +000010087 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10088 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010089 else
10090 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010091 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010092 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +000010093 Darwin/*)
10094 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10095 if test "$enable_framework" ; then
10096 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +000010097 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10098 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010099 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010100 # No framework, use the Python app as bundle-loader
10101 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010102 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010103 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010104 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +000010105 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010106 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010107 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010108 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010109 then
10110 LDSHARED="cc -shared ${LDFLAGS}"
10111 else
10112 LDSHARED="ld -Bshareable ${LDFLAGS}"
10113 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010114 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010115 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010116 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010117 then LDSHARED='$(CC) -shared'
10118 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010119 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010120 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010121 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010122 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010123 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010124 *) LDSHARED="ld";;
10125 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010127echo "$as_me:$LINENO: result: $LDSHARED" >&5
10128echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010129BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010130# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010131# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010132echo "$as_me:$LINENO: checking CCSHARED" >&5
10133echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010134if test -z "$CCSHARED"
10135then
Guido van Rossum07397971997-04-29 21:49:50 +000010136 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010137 SunOS*) if test "$GCC" = yes;
10138 then CCSHARED="-fPIC";
10139 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010140 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010141 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010142 else CCSHARED="+z";
10143 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010144 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010145 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010146 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010147 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010148 if test "$GCC" = "yes"
10149 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010150 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010151 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010152 SCO_SV*)
10153 if test "$GCC" = "yes"
10154 then CCSHARED="-fPIC"
10155 else CCSHARED="-Kpic -belf"
10156 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010157 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010158 IRIX*/6*) case $CC in
10159 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010160 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010161 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010162 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010163 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010165echo "$as_me:$LINENO: result: $CCSHARED" >&5
10166echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010167# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010168# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010169echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10170echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010171if test -z "$LINKFORSHARED"
10172then
Guido van Rossum07397971997-04-29 21:49:50 +000010173 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010174 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010175 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010176 LINKFORSHARED="-Wl,-E -Wl,+s";;
10177# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010178 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010179 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010180 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +000010182 # -u __dummy makes the linker aware of the objc runtime
10183 # in System.framework; otherwise, __objcInit (referenced in
10184 # crt1.o) gets erroneously defined as common, which breaks dynamic
10185 # loading of any modules which reference it in System.framework.
10186 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
10187 # not used by the core itself but which needs to be in the core so
10188 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010189 # -prebind is no longer used, because it actually seems to give a
10190 # slowdown in stead of a speedup, maybe due to the large number of
10191 # dynamic loads Python does.
10192 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +000010193 if test "$enable_framework"
10194 then
Jack Jansenc8607b72003-12-08 01:10:12 +000010195 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +000010196 fi
10197 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010198 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010199 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010200 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010202 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10203 then
10204 LINKFORSHARED="-Wl,--export-dynamic"
10205 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010206 SunOS/5*) case $CC in
10207 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010208 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010209 then
10210 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010211 fi;;
10212 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010213 CYGWIN*)
10214 if test $enable_shared = "no"
10215 then
10216 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10217 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010218 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010220echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10221echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010222
Michael W. Hudson54241132001-12-07 15:38:26 +000010223
Martin v. Löwis11437992002-04-12 09:54:03 +000010224echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10225echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010226if test ! "$LIBRARY" = "$LDLIBRARY"
10227then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010228 case $ac_sys_system in
10229 CYGWIN*)
10230 # Cygwin needs CCSHARED when building extension DLLs
10231 # but not when building the interpreter DLL.
10232 CFLAGSFORSHARED='';;
10233 *)
10234 CFLAGSFORSHARED='$(CCSHARED)'
10235 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010237echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10238echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010239
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010240# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10241# library (with --enable-shared).
10242# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010243# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10244# if it is not required, since it creates a dependency of the shared library
10245# to LIBS. This, in turn, means that applications linking the shared libpython
10246# don't need to link LIBS explicitly. The default should be only changed
10247# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010248
10249echo "$as_me:$LINENO: checking SHLIBS" >&5
10250echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10251case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010252 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010253 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010254esac
10255echo "$as_me:$LINENO: result: $SHLIBS" >&5
10256echo "${ECHO_T}$SHLIBS" >&6
10257
10258
Guido van Rossum627b2d71993-12-24 10:39:16 +000010259# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010260
10261echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10262echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10263if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010265else
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010267LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010268cat >conftest.$ac_ext <<_ACEOF
10269#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* confdefs.h. */
10271_ACEOF
10272cat confdefs.h >>conftest.$ac_ext
10273cat >>conftest.$ac_ext <<_ACEOF
10274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010276/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010277#ifdef __cplusplus
10278extern "C"
10279#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010280/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 builtin and then its argument prototype would still apply. */
10282char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010283int
10284main ()
10285{
10286dlopen ();
10287 ;
10288 return 0;
10289}
10290_ACEOF
10291rm -f conftest.$ac_objext conftest$ac_exeext
10292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10293 (eval $ac_link) 2>&5
10294 ac_status=$?
10295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10296 (exit $ac_status); } &&
10297 { ac_try='test -s conftest$ac_exeext'
10298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10299 (eval $ac_try) 2>&5
10300 ac_status=$?
10301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10302 (exit $ac_status); }; }; then
10303 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010304else
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010306sed 's/^/| /' conftest.$ac_ext >&5
10307
Martin v. Löwis11437992002-04-12 09:54:03 +000010308ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010313echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10314echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10315if test $ac_cv_lib_dl_dlopen = yes; then
10316 cat >>confdefs.h <<_ACEOF
10317#define HAVE_LIBDL 1
10318_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010319
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010320 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010321
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010322fi
10323 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010324
10325echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10326echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10327if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010329else
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010331LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010332cat >conftest.$ac_ext <<_ACEOF
10333#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* confdefs.h. */
10335_ACEOF
10336cat confdefs.h >>conftest.$ac_ext
10337cat >>conftest.$ac_ext <<_ACEOF
10338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010340/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010341#ifdef __cplusplus
10342extern "C"
10343#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010344/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 builtin and then its argument prototype would still apply. */
10346char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010347int
10348main ()
10349{
10350shl_load ();
10351 ;
10352 return 0;
10353}
10354_ACEOF
10355rm -f conftest.$ac_objext conftest$ac_exeext
10356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10357 (eval $ac_link) 2>&5
10358 ac_status=$?
10359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10360 (exit $ac_status); } &&
10361 { ac_try='test -s conftest$ac_exeext'
10362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10363 (eval $ac_try) 2>&5
10364 ac_status=$?
10365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10366 (exit $ac_status); }; }; then
10367 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010368else
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010370sed 's/^/| /' conftest.$ac_ext >&5
10371
Martin v. Löwis11437992002-04-12 09:54:03 +000010372ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010374rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10375LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010377echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10378echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10379if test $ac_cv_lib_dld_shl_load = yes; then
10380 cat >>confdefs.h <<_ACEOF
10381#define HAVE_LIBDLD 1
10382_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010383
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010384 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010385
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010386fi
10387 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010388
10389# only check for sem_ini if thread support is requested
10390if test "$with_threads" = "yes" -o -z "$with_threads"; then
10391 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010392echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10393if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010395else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010396 ac_func_search_save_LIBS=$LIBS
10397ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010398cat >conftest.$ac_ext <<_ACEOF
10399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010400/* confdefs.h. */
10401_ACEOF
10402cat confdefs.h >>conftest.$ac_ext
10403cat >>conftest.$ac_ext <<_ACEOF
10404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010406/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407#ifdef __cplusplus
10408extern "C"
10409#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010410/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 builtin and then its argument prototype would still apply. */
10412char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413int
10414main ()
10415{
10416sem_init ();
10417 ;
10418 return 0;
10419}
10420_ACEOF
10421rm -f conftest.$ac_objext conftest$ac_exeext
10422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10423 (eval $ac_link) 2>&5
10424 ac_status=$?
10425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426 (exit $ac_status); } &&
10427 { ac_try='test -s conftest$ac_exeext'
10428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10429 (eval $ac_try) 2>&5
10430 ac_status=$?
10431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10432 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010433 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010434else
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010436sed 's/^/| /' conftest.$ac_ext >&5
10437
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010438fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010439rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010440if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010441 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010442 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10443 cat >conftest.$ac_ext <<_ACEOF
10444#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010445/* confdefs.h. */
10446_ACEOF
10447cat confdefs.h >>conftest.$ac_ext
10448cat >>conftest.$ac_ext <<_ACEOF
10449/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010450
10451/* Override any gcc2 internal prototype to avoid an error. */
10452#ifdef __cplusplus
10453extern "C"
10454#endif
10455/* We use char because int might match the return type of a gcc2
10456 builtin and then its argument prototype would still apply. */
10457char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010458int
10459main ()
10460{
10461sem_init ();
10462 ;
10463 return 0;
10464}
Martin v. Löwis11437992002-04-12 09:54:03 +000010465_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010466rm -f conftest.$ac_objext conftest$ac_exeext
10467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10468 (eval $ac_link) 2>&5
10469 ac_status=$?
10470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10471 (exit $ac_status); } &&
10472 { ac_try='test -s conftest$ac_exeext'
10473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10474 (eval $ac_try) 2>&5
10475 ac_status=$?
10476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10477 (exit $ac_status); }; }; then
10478 ac_cv_search_sem_init="-l$ac_lib"
10479break
10480else
10481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010482sed 's/^/| /' conftest.$ac_ext >&5
10483
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010484fi
10485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10486 done
10487fi
10488LIBS=$ac_func_search_save_LIBS
10489fi
10490echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10491echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10492if test "$ac_cv_search_sem_init" != no; then
10493 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010494
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010495fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010496 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010497 # posix4 on Solaris 2.6
10498 # pthread (first!) on Linux
10499fi
10500
Martin v. Löwis19d17342003-06-14 21:03:05 +000010501# check if we need libintl for locale functions
10502echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10503echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10504if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10505 echo $ECHO_N "(cached) $ECHO_C" >&6
10506else
10507 ac_check_lib_save_LIBS=$LIBS
10508LIBS="-lintl $LIBS"
10509cat >conftest.$ac_ext <<_ACEOF
10510#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* confdefs.h. */
10512_ACEOF
10513cat confdefs.h >>conftest.$ac_ext
10514cat >>conftest.$ac_ext <<_ACEOF
10515/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010516
10517/* Override any gcc2 internal prototype to avoid an error. */
10518#ifdef __cplusplus
10519extern "C"
10520#endif
10521/* We use char because int might match the return type of a gcc2
10522 builtin and then its argument prototype would still apply. */
10523char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010524int
10525main ()
10526{
10527textdomain ();
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext conftest$ac_exeext
10533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10534 (eval $ac_link) 2>&5
10535 ac_status=$?
10536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10537 (exit $ac_status); } &&
10538 { ac_try='test -s conftest$ac_exeext'
10539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10540 (eval $ac_try) 2>&5
10541 ac_status=$?
10542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10543 (exit $ac_status); }; }; then
10544 ac_cv_lib_intl_textdomain=yes
10545else
10546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010547sed 's/^/| /' conftest.$ac_ext >&5
10548
Martin v. Löwis19d17342003-06-14 21:03:05 +000010549ac_cv_lib_intl_textdomain=no
10550fi
10551rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10552LIBS=$ac_check_lib_save_LIBS
10553fi
10554echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10555echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10556if test $ac_cv_lib_intl_textdomain = yes; then
10557
10558cat >>confdefs.h <<\_ACEOF
10559#define WITH_LIBINTL 1
10560_ACEOF
10561
10562fi
10563
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010564
10565# checks for system dependent C++ extensions support
10566case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10568echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10569 cat >conftest.$ac_ext <<_ACEOF
10570#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010571/* confdefs.h. */
10572_ACEOF
10573cat confdefs.h >>conftest.$ac_ext
10574cat >>conftest.$ac_ext <<_ACEOF
10575/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010576#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010577int
10578main ()
10579{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010580loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 ;
10582 return 0;
10583}
10584_ACEOF
10585rm -f conftest.$ac_objext conftest$ac_exeext
10586if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10587 (eval $ac_link) 2>&5
10588 ac_status=$?
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); } &&
10591 { ac_try='test -s conftest$ac_exeext'
10592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10593 (eval $ac_try) 2>&5
10594 ac_status=$?
10595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010597
Martin v. Löwis11437992002-04-12 09:54:03 +000010598cat >>confdefs.h <<\_ACEOF
10599#define AIX_GENUINE_CPLUSPLUS 1
10600_ACEOF
10601
10602 echo "$as_me:$LINENO: result: yes" >&5
10603echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010604else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010606sed 's/^/| /' conftest.$ac_ext >&5
10607
Martin v. Löwis11437992002-04-12 09:54:03 +000010608echo "$as_me:$LINENO: result: no" >&5
10609echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010610fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010611rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010612 *) ;;
10613esac
10614
Guido van Rossum70c7f481998-03-26 18:44:10 +000010615# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010616# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010617# BeOS' sockets are stashed in libnet.
10618case "$ac_sys_system" in
10619IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010620*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010621echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10622echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10623if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10624 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010625else
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010627LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010628cat >conftest.$ac_ext <<_ACEOF
10629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010630/* confdefs.h. */
10631_ACEOF
10632cat confdefs.h >>conftest.$ac_ext
10633cat >>conftest.$ac_ext <<_ACEOF
10634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010635
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010636/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010637#ifdef __cplusplus
10638extern "C"
10639#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010640/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 builtin and then its argument prototype would still apply. */
10642char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010643int
10644main ()
10645{
10646t_open ();
10647 ;
10648 return 0;
10649}
10650_ACEOF
10651rm -f conftest.$ac_objext conftest$ac_exeext
10652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10653 (eval $ac_link) 2>&5
10654 ac_status=$?
10655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10656 (exit $ac_status); } &&
10657 { ac_try='test -s conftest$ac_exeext'
10658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10659 (eval $ac_try) 2>&5
10660 ac_status=$?
10661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10662 (exit $ac_status); }; }; then
10663 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010664else
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010666sed 's/^/| /' conftest.$ac_ext >&5
10667
Martin v. Löwis11437992002-04-12 09:54:03 +000010668ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010669fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10671LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010673echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10674echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10675if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010676 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010677fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010678 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010679echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10680echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10681if test "${ac_cv_lib_socket_socket+set}" = set; then
10682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683else
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010685LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010686cat >conftest.$ac_ext <<_ACEOF
10687#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010688/* confdefs.h. */
10689_ACEOF
10690cat confdefs.h >>conftest.$ac_ext
10691cat >>conftest.$ac_ext <<_ACEOF
10692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010694/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010695#ifdef __cplusplus
10696extern "C"
10697#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010698/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 builtin and then its argument prototype would still apply. */
10700char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010701int
10702main ()
10703{
10704socket ();
10705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest.$ac_objext conftest$ac_exeext
10710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10711 (eval $ac_link) 2>&5
10712 ac_status=$?
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); } &&
10715 { ac_try='test -s conftest$ac_exeext'
10716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10717 (eval $ac_try) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); }; }; then
10721 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010722else
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010724sed 's/^/| /' conftest.$ac_ext >&5
10725
Martin v. Löwis11437992002-04-12 09:54:03 +000010726ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010728rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10729LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010731echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10732echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10733if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010734 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010735fi
10736 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010737;;
10738esac
10739case "$ac_sys_system" in
10740BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010741echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10742echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10743if test "${ac_cv_lib_net_socket+set}" = set; then
10744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010745else
Martin v. Löwis11437992002-04-12 09:54:03 +000010746 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010747LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010748cat >conftest.$ac_ext <<_ACEOF
10749#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* confdefs.h. */
10751_ACEOF
10752cat confdefs.h >>conftest.$ac_ext
10753cat >>conftest.$ac_ext <<_ACEOF
10754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010755
Guido van Rossumad678af1998-10-02 14:42:15 +000010756/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010757#ifdef __cplusplus
10758extern "C"
10759#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010760/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 builtin and then its argument prototype would still apply. */
10762char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010763int
10764main ()
10765{
10766socket ();
10767 ;
10768 return 0;
10769}
10770_ACEOF
10771rm -f conftest.$ac_objext conftest$ac_exeext
10772if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10773 (eval $ac_link) 2>&5
10774 ac_status=$?
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); } &&
10777 { ac_try='test -s conftest$ac_exeext'
10778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10779 (eval $ac_try) 2>&5
10780 ac_status=$?
10781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782 (exit $ac_status); }; }; then
10783 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010784else
Martin v. Löwis11437992002-04-12 09:54:03 +000010785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010786sed 's/^/| /' conftest.$ac_ext >&5
10787
Martin v. Löwis11437992002-04-12 09:54:03 +000010788ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010789fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010790rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10791LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010793echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10794echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10795if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010796 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010797fi
10798 # BeOS
10799;;
10800esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010801
Martin v. Löwis11437992002-04-12 09:54:03 +000010802echo "$as_me:$LINENO: checking for --with-libs" >&5
10803echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10804
Guido van Rossuma68acba1996-07-31 17:36:39 +000010805# Check whether --with-libs or --without-libs was given.
10806if test "${with_libs+set}" = set; then
10807 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010808
10809echo "$as_me:$LINENO: result: $withval" >&5
10810echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010811LIBS="$withval $LIBS"
10812
10813else
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 echo "$as_me:$LINENO: result: no" >&5
10815echo "${ECHO_T}no" >&6
10816fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010817
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010818# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010819
10820
Martin v. Löwis11437992002-04-12 09:54:03 +000010821echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10822echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10823
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010824# Check whether --with-signal-module or --without-signal-module was given.
10825if test "${with_signal_module+set}" = set; then
10826 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010827
Martin v. Löwis11437992002-04-12 09:54:03 +000010828fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010829
10830if test -z "$with_signal_module"
10831then with_signal_module="yes"
10832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010833echo "$as_me:$LINENO: result: $with_signal_module" >&5
10834echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010835
10836if test "${with_signal_module}" = "yes"; then
10837 USE_SIGNAL_MODULE=""
10838 SIGNAL_OBJS=""
10839else
10840 USE_SIGNAL_MODULE="#"
10841 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10842fi
10843
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010844# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010845
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010846USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010847
Martin v. Löwis11437992002-04-12 09:54:03 +000010848echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10849echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10850
Guido van Rossumec2f0731997-01-22 20:54:01 +000010851
10852# Check whether --with-dec-threads or --without-dec-threads was given.
10853if test "${with_dec_threads+set}" = set; then
10854 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
10856echo "$as_me:$LINENO: result: $withval" >&5
10857echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010858LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010859if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010860 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010861fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010862else
Martin v. Löwis11437992002-04-12 09:54:03 +000010863 echo "$as_me:$LINENO: result: no" >&5
10864echo "${ECHO_T}no" >&6
10865fi;
10866
10867# Templates for things AC_DEFINEd more than once.
10868# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010869
10870
Martin v. Löwis11437992002-04-12 09:54:03 +000010871
10872
10873
10874
10875
10876echo "$as_me:$LINENO: checking for --with-threads" >&5
10877echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10878
Guido van Rossumec2f0731997-01-22 20:54:01 +000010879# Check whether --with-threads or --without-threads was given.
10880if test "${with_threads+set}" = set; then
10881 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010882
Martin v. Löwis11437992002-04-12 09:54:03 +000010883fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010884
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010885# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010888if test "${with_thread+set}" = set; then
10889 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010890 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010891fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010892
10893if test -z "$with_threads"
10894then with_threads="yes"
10895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010896echo "$as_me:$LINENO: result: $with_threads" >&5
10897echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010898
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010899
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010900if test "$with_threads" = "no"
10901then
10902 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010903elif test "$ac_cv_pthread_is_default" = yes
10904then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010906#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010907_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010908
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010909 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010911#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010912_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010913
10914 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010916elif test "$ac_cv_kpthread" = "yes"
10917then
10918 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010919 if test "$ac_cv_cxx_thread" = "yes"; then
10920 CXX="$CXX -Kpthread"
10921 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010923#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010924_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010925
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010926 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010927 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010928elif test "$ac_cv_kthread" = "yes"
10929then
10930 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010931 if test "$ac_cv_cxx_thread" = "yes"; then
10932 CXX="$CXX -Kthread"
10933 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010934 cat >>confdefs.h <<\_ACEOF
10935#define WITH_THREAD 1
10936_ACEOF
10937
10938 posix_threads=yes
10939 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010940elif test "$ac_cv_pthread" = "yes"
10941then
10942 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010943 if test "$ac_cv_cxx_thread" = "yes"; then
10944 CXX="$CXX -pthread"
10945 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010946 cat >>confdefs.h <<\_ACEOF
10947#define WITH_THREAD 1
10948_ACEOF
10949
10950 posix_threads=yes
10951 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010952else
10953 if test ! -z "$with_threads" -a -d "$with_threads"
10954 then LDFLAGS="$LDFLAGS -L$with_threads"
10955 fi
10956 if test ! -z "$withval" -a -d "$withval"
10957 then LDFLAGS="$LDFLAGS -L$withval"
10958 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010959
10960 # According to the POSIX spec, a pthreads implementation must
10961 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10963echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10964 cat >conftest.$ac_ext <<_ACEOF
10965#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010966/* confdefs.h. */
10967_ACEOF
10968cat confdefs.h >>conftest.$ac_ext
10969cat >>conftest.$ac_ext <<_ACEOF
10970/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010971
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010972#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010973#ifdef _POSIX_THREADS
10974yes
10975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
10977_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010979 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010980 unistd_defines_pthreads=yes
10981else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010982 unistd_defines_pthreads=no
10983fi
10984rm -f conftest*
10985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10987echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010988
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010990#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010991_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010992
Martin v. Löwis11437992002-04-12 09:54:03 +000010993 if test "${ac_cv_header_cthreads_h+set}" = set; then
10994 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10995echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10996if test "${ac_cv_header_cthreads_h+set}" = set; then
10997 echo $ECHO_N "(cached) $ECHO_C" >&6
10998fi
10999echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11000echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 # Is the header compilable?
11003echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11004echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11005cat >conftest.$ac_ext <<_ACEOF
11006#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011007/* confdefs.h. */
11008_ACEOF
11009cat confdefs.h >>conftest.$ac_ext
11010cat >>conftest.$ac_ext <<_ACEOF
11011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011012$ac_includes_default
11013#include <cthreads.h>
11014_ACEOF
11015rm -f conftest.$ac_objext
11016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11017 (eval $ac_compile) 2>&5
11018 ac_status=$?
11019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11020 (exit $ac_status); } &&
11021 { ac_try='test -s conftest.$ac_objext'
11022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11023 (eval $ac_try) 2>&5
11024 ac_status=$?
11025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11026 (exit $ac_status); }; }; then
11027 ac_header_compiler=yes
11028else
11029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011030sed 's/^/| /' conftest.$ac_ext >&5
11031
Martin v. Löwis11437992002-04-12 09:54:03 +000011032ac_header_compiler=no
11033fi
11034rm -f conftest.$ac_objext conftest.$ac_ext
11035echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11036echo "${ECHO_T}$ac_header_compiler" >&6
11037
11038# Is the header present?
11039echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11040echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11041cat >conftest.$ac_ext <<_ACEOF
11042#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011043/* confdefs.h. */
11044_ACEOF
11045cat confdefs.h >>conftest.$ac_ext
11046cat >>conftest.$ac_ext <<_ACEOF
11047/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011048#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011049_ACEOF
11050if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11051 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11052 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011053 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 rm -f conftest.er1
11055 cat conftest.err >&5
11056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11057 (exit $ac_status); } >/dev/null; then
11058 if test -s conftest.err; then
11059 ac_cpp_err=$ac_c_preproc_warn_flag
11060 else
11061 ac_cpp_err=
11062 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011063else
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 ac_cpp_err=yes
11065fi
11066if test -z "$ac_cpp_err"; then
11067 ac_header_preproc=yes
11068else
11069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011070sed 's/^/| /' conftest.$ac_ext >&5
11071
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011074rm -f conftest.err conftest.$ac_ext
11075echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11076echo "${ECHO_T}$ac_header_preproc" >&6
11077
11078# So? What about this header?
11079case $ac_header_compiler:$ac_header_preproc in
11080 yes:no )
11081 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11082echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11083 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011084echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11085 (
11086 cat <<\_ASBOX
11087## ------------------------------------ ##
11088## Report this to bug-autoconf@gnu.org. ##
11089## ------------------------------------ ##
11090_ASBOX
11091 ) |
11092 sed "s/^/$as_me: WARNING: /" >&2
11093 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 no:yes )
11095 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11096echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
11097 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11098echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11099 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011100echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11101 (
11102 cat <<\_ASBOX
11103## ------------------------------------ ##
11104## Report this to bug-autoconf@gnu.org. ##
11105## ------------------------------------ ##
11106_ASBOX
11107 ) |
11108 sed "s/^/$as_me: WARNING: /" >&2
11109 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011110esac
11111echo "$as_me:$LINENO: checking for cthreads.h" >&5
11112echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11113if test "${ac_cv_header_cthreads_h+set}" = set; then
11114 echo $ECHO_N "(cached) $ECHO_C" >&6
11115else
11116 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011118echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11119echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11120
11121fi
11122if test $ac_cv_header_cthreads_h = yes; then
11123 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011124#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011125_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011126
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011128#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011129_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011130
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
11132cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011133#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011134_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011135
11136 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011137 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011138else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011139
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11141 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11142echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11143if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11144 echo $ECHO_N "(cached) $ECHO_C" >&6
11145fi
11146echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11147echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011148else
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 # Is the header compilable?
11150echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11151echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11152cat >conftest.$ac_ext <<_ACEOF
11153#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* confdefs.h. */
11155_ACEOF
11156cat confdefs.h >>conftest.$ac_ext
11157cat >>conftest.$ac_ext <<_ACEOF
11158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011159$ac_includes_default
11160#include <mach/cthreads.h>
11161_ACEOF
11162rm -f conftest.$ac_objext
11163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11164 (eval $ac_compile) 2>&5
11165 ac_status=$?
11166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11167 (exit $ac_status); } &&
11168 { ac_try='test -s conftest.$ac_objext'
11169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11170 (eval $ac_try) 2>&5
11171 ac_status=$?
11172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11173 (exit $ac_status); }; }; then
11174 ac_header_compiler=yes
11175else
11176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011177sed 's/^/| /' conftest.$ac_ext >&5
11178
Martin v. Löwis11437992002-04-12 09:54:03 +000011179ac_header_compiler=no
11180fi
11181rm -f conftest.$ac_objext conftest.$ac_ext
11182echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11183echo "${ECHO_T}$ac_header_compiler" >&6
11184
11185# Is the header present?
11186echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11187echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11188cat >conftest.$ac_ext <<_ACEOF
11189#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011190/* confdefs.h. */
11191_ACEOF
11192cat confdefs.h >>conftest.$ac_ext
11193cat >>conftest.$ac_ext <<_ACEOF
11194/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011195#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011196_ACEOF
11197if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11198 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11199 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011200 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 rm -f conftest.er1
11202 cat conftest.err >&5
11203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11204 (exit $ac_status); } >/dev/null; then
11205 if test -s conftest.err; then
11206 ac_cpp_err=$ac_c_preproc_warn_flag
11207 else
11208 ac_cpp_err=
11209 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011210else
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 ac_cpp_err=yes
11212fi
11213if test -z "$ac_cpp_err"; then
11214 ac_header_preproc=yes
11215else
11216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011217sed 's/^/| /' conftest.$ac_ext >&5
11218
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011221rm -f conftest.err conftest.$ac_ext
11222echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11223echo "${ECHO_T}$ac_header_preproc" >&6
11224
11225# So? What about this header?
11226case $ac_header_compiler:$ac_header_preproc in
11227 yes:no )
11228 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11229echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11230 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011231echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11232 (
11233 cat <<\_ASBOX
11234## ------------------------------------ ##
11235## Report this to bug-autoconf@gnu.org. ##
11236## ------------------------------------ ##
11237_ASBOX
11238 ) |
11239 sed "s/^/$as_me: WARNING: /" >&2
11240 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 no:yes )
11242 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11243echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
11244 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11245echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11246 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011247echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11248 (
11249 cat <<\_ASBOX
11250## ------------------------------------ ##
11251## Report this to bug-autoconf@gnu.org. ##
11252## ------------------------------------ ##
11253_ASBOX
11254 ) |
11255 sed "s/^/$as_me: WARNING: /" >&2
11256 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011257esac
11258echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11259echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11260if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11261 echo $ECHO_N "(cached) $ECHO_C" >&6
11262else
11263 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011265echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11266echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11267
11268fi
11269if test $ac_cv_header_mach_cthreads_h = yes; then
11270 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011271#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011272_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011273
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011275#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011276_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011277
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
11279cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011280#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011281_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011282
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011283 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011284else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 echo "$as_me:$LINENO: checking for --with-pth" >&5
11287echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11288
11289# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011290if test "${with_pth+set}" = set; then
11291 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011292 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011293echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011294 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011295#define WITH_THREAD 1
11296_ACEOF
11297
11298
11299cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011300#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011301_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011302
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011303 LIBS="-lpth $LIBS"
11304 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011305else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011306 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011307echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011308
11309 # Just looking for pthread_create in libpthread is not enough:
11310 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11311 # So we really have to include pthread.h, and then link.
11312 _libs=$LIBS
11313 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11315echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11316 cat >conftest.$ac_ext <<_ACEOF
11317#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* confdefs.h. */
11319_ACEOF
11320cat confdefs.h >>conftest.$ac_ext
11321cat >>conftest.$ac_ext <<_ACEOF
11322/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011323#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011324
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011325void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011329
11330pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 ;
11332 return 0;
11333}
11334_ACEOF
11335rm -f conftest.$ac_objext conftest$ac_exeext
11336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11337 (eval $ac_link) 2>&5
11338 ac_status=$?
11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340 (exit $ac_status); } &&
11341 { ac_try='test -s conftest$ac_exeext'
11342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11343 (eval $ac_try) 2>&5
11344 ac_status=$?
11345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11346 (exit $ac_status); }; }; then
11347
11348 echo "$as_me:$LINENO: result: yes" >&5
11349echo "${ECHO_T}yes" >&6
11350 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011351#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011352_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011353
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011354 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011355 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011356else
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011358sed 's/^/| /' conftest.$ac_ext >&5
11359
Martin v. Löwis11437992002-04-12 09:54:03 +000011360
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011361 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11363echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11364if test "${ac_cv_func_pthread_detach+set}" = set; then
11365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011366else
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 cat >conftest.$ac_ext <<_ACEOF
11368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* confdefs.h. */
11370_ACEOF
11371cat confdefs.h >>conftest.$ac_ext
11372cat >>conftest.$ac_ext <<_ACEOF
11373/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011374/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011375 which can conflict with char pthread_detach (); below.
11376 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011377 <limits.h> exists even on freestanding compilers. Under hpux,
11378 including <limits.h> includes <sys/time.h> and causes problems
11379 checking for functions defined therein. */
11380#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011381# include <limits.h>
11382#else
11383# include <assert.h>
11384#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011385/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011386#ifdef __cplusplus
11387extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011388{
Martin v. Löwis11437992002-04-12 09:54:03 +000011389#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011390/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 builtin and then its argument prototype would still apply. */
11392char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011393/* The GNU C library defines this for functions which it implements
11394 to always fail with ENOSYS. Some functions are actually named
11395 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011396#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011397choke me
11398#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011399char (*f) () = pthread_detach;
11400#endif
11401#ifdef __cplusplus
11402}
Guido van Rossumad678af1998-10-02 14:42:15 +000011403#endif
11404
Skip Montanaro6dead952003-09-25 14:50:04 +000011405int
11406main ()
11407{
11408return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ;
11410 return 0;
11411}
11412_ACEOF
11413rm -f conftest.$ac_objext conftest$ac_exeext
11414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11415 (eval $ac_link) 2>&5
11416 ac_status=$?
11417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); } &&
11419 { ac_try='test -s conftest$ac_exeext'
11420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11421 (eval $ac_try) 2>&5
11422 ac_status=$?
11423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424 (exit $ac_status); }; }; then
11425 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011426else
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011428sed 's/^/| /' conftest.$ac_ext >&5
11429
Martin v. Löwis11437992002-04-12 09:54:03 +000011430ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011434echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11435echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11436if test $ac_cv_func_pthread_detach = yes; then
11437 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011438#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011439_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011440
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011441 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011442 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011443else
Guido van Rossumad678af1998-10-02 14:42:15 +000011444
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011445 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11446 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11447echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11448if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11449 echo $ECHO_N "(cached) $ECHO_C" >&6
11450fi
11451echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11452echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11453else
11454 # Is the header compilable?
11455echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11456echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11457cat >conftest.$ac_ext <<_ACEOF
11458#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011459/* confdefs.h. */
11460_ACEOF
11461cat confdefs.h >>conftest.$ac_ext
11462cat >>conftest.$ac_ext <<_ACEOF
11463/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011464$ac_includes_default
11465#include <atheos/threads.h>
11466_ACEOF
11467rm -f conftest.$ac_objext
11468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11469 (eval $ac_compile) 2>&5
11470 ac_status=$?
11471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472 (exit $ac_status); } &&
11473 { ac_try='test -s conftest.$ac_objext'
11474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11475 (eval $ac_try) 2>&5
11476 ac_status=$?
11477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11478 (exit $ac_status); }; }; then
11479 ac_header_compiler=yes
11480else
11481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011482sed 's/^/| /' conftest.$ac_ext >&5
11483
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011484ac_header_compiler=no
11485fi
11486rm -f conftest.$ac_objext conftest.$ac_ext
11487echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11488echo "${ECHO_T}$ac_header_compiler" >&6
11489
11490# Is the header present?
11491echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11492echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11493cat >conftest.$ac_ext <<_ACEOF
11494#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011495/* confdefs.h. */
11496_ACEOF
11497cat confdefs.h >>conftest.$ac_ext
11498cat >>conftest.$ac_ext <<_ACEOF
11499/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011500#include <atheos/threads.h>
11501_ACEOF
11502if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11503 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11504 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011505 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011506 rm -f conftest.er1
11507 cat conftest.err >&5
11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509 (exit $ac_status); } >/dev/null; then
11510 if test -s conftest.err; then
11511 ac_cpp_err=$ac_c_preproc_warn_flag
11512 else
11513 ac_cpp_err=
11514 fi
11515else
11516 ac_cpp_err=yes
11517fi
11518if test -z "$ac_cpp_err"; then
11519 ac_header_preproc=yes
11520else
11521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011522sed 's/^/| /' conftest.$ac_ext >&5
11523
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011524 ac_header_preproc=no
11525fi
11526rm -f conftest.err conftest.$ac_ext
11527echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11528echo "${ECHO_T}$ac_header_preproc" >&6
11529
11530# So? What about this header?
11531case $ac_header_compiler:$ac_header_preproc in
11532 yes:no )
11533 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11534echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11535 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011536echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11537 (
11538 cat <<\_ASBOX
11539## ------------------------------------ ##
11540## Report this to bug-autoconf@gnu.org. ##
11541## ------------------------------------ ##
11542_ASBOX
11543 ) |
11544 sed "s/^/$as_me: WARNING: /" >&2
11545 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011546 no:yes )
11547 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11548echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
11549 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11550echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11551 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011552echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11553 (
11554 cat <<\_ASBOX
11555## ------------------------------------ ##
11556## Report this to bug-autoconf@gnu.org. ##
11557## ------------------------------------ ##
11558_ASBOX
11559 ) |
11560 sed "s/^/$as_me: WARNING: /" >&2
11561 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011562esac
11563echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11564echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11565if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11566 echo $ECHO_N "(cached) $ECHO_C" >&6
11567else
11568 ac_cv_header_atheos_threads_h=$ac_header_preproc
11569fi
11570echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11571echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11572
11573fi
11574if test $ac_cv_header_atheos_threads_h = yes; then
11575 cat >>confdefs.h <<\_ACEOF
11576#define WITH_THREAD 1
11577_ACEOF
11578
11579
11580cat >>confdefs.h <<\_ACEOF
11581#define ATHEOS_THREADS 1
11582_ACEOF
11583
11584 THREADOBJ="Python/thread.o"
11585else
11586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11588 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11589echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11590if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11591 echo $ECHO_N "(cached) $ECHO_C" >&6
11592fi
11593echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11594echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011595else
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 # Is the header compilable?
11597echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11598echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11599cat >conftest.$ac_ext <<_ACEOF
11600#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011601/* confdefs.h. */
11602_ACEOF
11603cat confdefs.h >>conftest.$ac_ext
11604cat >>conftest.$ac_ext <<_ACEOF
11605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011606$ac_includes_default
11607#include <kernel/OS.h>
11608_ACEOF
11609rm -f conftest.$ac_objext
11610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11611 (eval $ac_compile) 2>&5
11612 ac_status=$?
11613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11614 (exit $ac_status); } &&
11615 { ac_try='test -s conftest.$ac_objext'
11616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617 (eval $ac_try) 2>&5
11618 ac_status=$?
11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620 (exit $ac_status); }; }; then
11621 ac_header_compiler=yes
11622else
11623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011624sed 's/^/| /' conftest.$ac_ext >&5
11625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626ac_header_compiler=no
11627fi
11628rm -f conftest.$ac_objext conftest.$ac_ext
11629echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11630echo "${ECHO_T}$ac_header_compiler" >&6
11631
11632# Is the header present?
11633echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11634echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11635cat >conftest.$ac_ext <<_ACEOF
11636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011642#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011643_ACEOF
11644if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11645 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11646 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011647 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 rm -f conftest.er1
11649 cat conftest.err >&5
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); } >/dev/null; then
11652 if test -s conftest.err; then
11653 ac_cpp_err=$ac_c_preproc_warn_flag
11654 else
11655 ac_cpp_err=
11656 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011657else
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 ac_cpp_err=yes
11659fi
11660if test -z "$ac_cpp_err"; then
11661 ac_header_preproc=yes
11662else
11663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011664sed 's/^/| /' conftest.$ac_ext >&5
11665
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011667fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011668rm -f conftest.err conftest.$ac_ext
11669echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11670echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672# So? What about this header?
11673case $ac_header_compiler:$ac_header_preproc in
11674 yes:no )
11675 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11676echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11677 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011678echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11679 (
11680 cat <<\_ASBOX
11681## ------------------------------------ ##
11682## Report this to bug-autoconf@gnu.org. ##
11683## ------------------------------------ ##
11684_ASBOX
11685 ) |
11686 sed "s/^/$as_me: WARNING: /" >&2
11687 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 no:yes )
11689 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11690echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11691 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11692echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11693 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011694echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11695 (
11696 cat <<\_ASBOX
11697## ------------------------------------ ##
11698## Report this to bug-autoconf@gnu.org. ##
11699## ------------------------------------ ##
11700_ASBOX
11701 ) |
11702 sed "s/^/$as_me: WARNING: /" >&2
11703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011704esac
11705echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11706echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11707if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11708 echo $ECHO_N "(cached) $ECHO_C" >&6
11709else
11710 ac_cv_header_kernel_OS_h=$ac_header_preproc
11711fi
11712echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11713echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11714
11715fi
11716if test $ac_cv_header_kernel_OS_h = yes; then
11717 cat >>confdefs.h <<\_ACEOF
11718#define WITH_THREAD 1
11719_ACEOF
11720
11721
11722cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011723#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011724_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011725
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011726 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011727else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011728
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11730echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11731if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011733else
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011735LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011736cat >conftest.$ac_ext <<_ACEOF
11737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011738/* confdefs.h. */
11739_ACEOF
11740cat confdefs.h >>conftest.$ac_ext
11741cat >>conftest.$ac_ext <<_ACEOF
11742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011743
Greg Steinadf63d62000-07-05 10:38:09 +000011744/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011745#ifdef __cplusplus
11746extern "C"
11747#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011748/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 builtin and then its argument prototype would still apply. */
11750char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011751int
11752main ()
11753{
11754pthread_create ();
11755 ;
11756 return 0;
11757}
11758_ACEOF
11759rm -f conftest.$ac_objext conftest$ac_exeext
11760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11761 (eval $ac_link) 2>&5
11762 ac_status=$?
11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764 (exit $ac_status); } &&
11765 { ac_try='test -s conftest$ac_exeext'
11766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11767 (eval $ac_try) 2>&5
11768 ac_status=$?
11769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11770 (exit $ac_status); }; }; then
11771 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011772else
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011774sed 's/^/| /' conftest.$ac_ext >&5
11775
Martin v. Löwis11437992002-04-12 09:54:03 +000011776ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011778rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11779LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011781echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11782echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11783if test $ac_cv_lib_pthreads_pthread_create = yes; then
11784 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011785#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011786_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011788 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011789 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011790 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011791else
Greg Steinadf63d62000-07-05 10:38:09 +000011792
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11794echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11795if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11796 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011797else
Martin v. Löwis11437992002-04-12 09:54:03 +000011798 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011799LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011800cat >conftest.$ac_ext <<_ACEOF
11801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* confdefs.h. */
11803_ACEOF
11804cat confdefs.h >>conftest.$ac_ext
11805cat >>conftest.$ac_ext <<_ACEOF
11806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011807
Guido van Rossum49545951997-12-02 19:28:29 +000011808/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011809#ifdef __cplusplus
11810extern "C"
11811#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011812/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011813 builtin and then its argument prototype would still apply. */
11814char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011815int
11816main ()
11817{
11818pthread_create ();
11819 ;
11820 return 0;
11821}
11822_ACEOF
11823rm -f conftest.$ac_objext conftest$ac_exeext
11824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11825 (eval $ac_link) 2>&5
11826 ac_status=$?
11827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828 (exit $ac_status); } &&
11829 { ac_try='test -s conftest$ac_exeext'
11830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11831 (eval $ac_try) 2>&5
11832 ac_status=$?
11833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834 (exit $ac_status); }; }; then
11835 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011836else
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011838sed 's/^/| /' conftest.$ac_ext >&5
11839
Martin v. Löwis11437992002-04-12 09:54:03 +000011840ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011842rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11843LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011845echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11846echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11847if test $ac_cv_lib_c_r_pthread_create = yes; then
11848 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011849#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011850_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011851
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011852 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011853 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011854 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011855else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011856
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11858echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11859if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011861else
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011863LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011864cat >conftest.$ac_ext <<_ACEOF
11865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011866/* confdefs.h. */
11867_ACEOF
11868cat confdefs.h >>conftest.$ac_ext
11869cat >>conftest.$ac_ext <<_ACEOF
11870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011872/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011873#ifdef __cplusplus
11874extern "C"
11875#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011876/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 builtin and then its argument prototype would still apply. */
11878char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011879int
11880main ()
11881{
11882__d6_pthread_create ();
11883 ;
11884 return 0;
11885}
11886_ACEOF
11887rm -f conftest.$ac_objext conftest$ac_exeext
11888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11889 (eval $ac_link) 2>&5
11890 ac_status=$?
11891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11892 (exit $ac_status); } &&
11893 { ac_try='test -s conftest$ac_exeext'
11894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11895 (eval $ac_try) 2>&5
11896 ac_status=$?
11897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898 (exit $ac_status); }; }; then
11899 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011900else
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011902sed 's/^/| /' conftest.$ac_ext >&5
11903
Martin v. Löwis11437992002-04-12 09:54:03 +000011904ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011906rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011908fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011909echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11910echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11911if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11912 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011913#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011914_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011915
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011916 echo Systems with __d6_pthread_create are not supported anymore.
11917 echo See README
11918 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011919 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011920 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011921 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011922else
Guido van Rossum49545951997-12-02 19:28:29 +000011923
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11925echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11926if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011928else
Martin v. Löwis11437992002-04-12 09:54:03 +000011929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011930LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011931cat >conftest.$ac_ext <<_ACEOF
11932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011933/* confdefs.h. */
11934_ACEOF
11935cat confdefs.h >>conftest.$ac_ext
11936cat >>conftest.$ac_ext <<_ACEOF
11937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011940#ifdef __cplusplus
11941extern "C"
11942#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 builtin and then its argument prototype would still apply. */
11945char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011946int
11947main ()
11948{
11949__pthread_create_system ();
11950 ;
11951 return 0;
11952}
11953_ACEOF
11954rm -f conftest.$ac_objext conftest$ac_exeext
11955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11956 (eval $ac_link) 2>&5
11957 ac_status=$?
11958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959 (exit $ac_status); } &&
11960 { ac_try='test -s conftest$ac_exeext'
11961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11962 (eval $ac_try) 2>&5
11963 ac_status=$?
11964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11965 (exit $ac_status); }; }; then
11966 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011967else
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011969sed 's/^/| /' conftest.$ac_ext >&5
11970
Martin v. Löwis11437992002-04-12 09:54:03 +000011971ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11974LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011976echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11977echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11978if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11979 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011980#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011981_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011982
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011983 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011984 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011985 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011986else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011987
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11989echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11990if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11991 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011992else
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011994LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011995cat >conftest.$ac_ext <<_ACEOF
11996#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011997/* confdefs.h. */
11998_ACEOF
11999cat confdefs.h >>conftest.$ac_ext
12000cat >>conftest.$ac_ext <<_ACEOF
12001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012002
Guido van Rossumb93a8621998-05-07 13:27:32 +000012003/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012004#ifdef __cplusplus
12005extern "C"
12006#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012007/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 builtin and then its argument prototype would still apply. */
12009char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012010int
12011main ()
12012{
12013pthread_create ();
12014 ;
12015 return 0;
12016}
12017_ACEOF
12018rm -f conftest.$ac_objext conftest$ac_exeext
12019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12020 (eval $ac_link) 2>&5
12021 ac_status=$?
12022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12023 (exit $ac_status); } &&
12024 { ac_try='test -s conftest$ac_exeext'
12025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12026 (eval $ac_try) 2>&5
12027 ac_status=$?
12028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029 (exit $ac_status); }; }; then
12030 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012031else
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012033sed 's/^/| /' conftest.$ac_ext >&5
12034
Martin v. Löwis11437992002-04-12 09:54:03 +000012035ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012037rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12038LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012040echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12041echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12042if test $ac_cv_lib_cma_pthread_create = yes; then
12043 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012044#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012045_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012047 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012048 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012049 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012050else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012051
Martin v. Löwis130fb172001-07-19 11:00:41 +000012052 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012053fi
12054
Guido van Rossum627b2d71993-12-24 10:39:16 +000012055
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012056fi
12057
Guido van Rossum0be3e491997-05-22 20:33:33 +000012058fi
12059
Guido van Rossum49545951997-12-02 19:28:29 +000012060fi
12061
Guido van Rossumb93a8621998-05-07 13:27:32 +000012062fi
12063
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012064fi
12065
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012066
Michael W. Hudson54241132001-12-07 15:38:26 +000012067fi
12068
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012069
12070fi
12071
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12074fi;
12075fi
12076
12077
12078fi
12079
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012080
Michael W. Hudson54241132001-12-07 15:38:26 +000012081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12083echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12084if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012086else
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012088LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012089cat >conftest.$ac_ext <<_ACEOF
12090#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012091/* confdefs.h. */
12092_ACEOF
12093cat confdefs.h >>conftest.$ac_ext
12094cat >>conftest.$ac_ext <<_ACEOF
12095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012097/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012098#ifdef __cplusplus
12099extern "C"
12100#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012101/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 builtin and then its argument prototype would still apply. */
12103char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012104int
12105main ()
12106{
12107usconfig ();
12108 ;
12109 return 0;
12110}
12111_ACEOF
12112rm -f conftest.$ac_objext conftest$ac_exeext
12113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12114 (eval $ac_link) 2>&5
12115 ac_status=$?
12116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117 (exit $ac_status); } &&
12118 { ac_try='test -s conftest$ac_exeext'
12119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12120 (eval $ac_try) 2>&5
12121 ac_status=$?
12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123 (exit $ac_status); }; }; then
12124 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125else
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012127sed 's/^/| /' conftest.$ac_ext >&5
12128
Martin v. Löwis11437992002-04-12 09:54:03 +000012129ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012130fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012131rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12132LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012134echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12135echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12136if test $ac_cv_lib_mpc_usconfig = yes; then
12137 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012138#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012139_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012140
Martin v. Löwis130fb172001-07-19 11:00:41 +000012141 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012142 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012143 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012144fi
12145
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012146
Neal Norwitza978ab02002-11-02 16:58:05 +000012147 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12149echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12150if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152else
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012154LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012155cat >conftest.$ac_ext <<_ACEOF
12156#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012157/* confdefs.h. */
12158_ACEOF
12159cat confdefs.h >>conftest.$ac_ext
12160cat >>conftest.$ac_ext <<_ACEOF
12161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012163/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012164#ifdef __cplusplus
12165extern "C"
12166#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012167/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 builtin and then its argument prototype would still apply. */
12169char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012170int
12171main ()
12172{
12173thr_create ();
12174 ;
12175 return 0;
12176}
12177_ACEOF
12178rm -f conftest.$ac_objext conftest$ac_exeext
12179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12180 (eval $ac_link) 2>&5
12181 ac_status=$?
12182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183 (exit $ac_status); } &&
12184 { ac_try='test -s conftest$ac_exeext'
12185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12186 (eval $ac_try) 2>&5
12187 ac_status=$?
12188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12189 (exit $ac_status); }; }; then
12190 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012191else
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012193sed 's/^/| /' conftest.$ac_ext >&5
12194
Martin v. Löwis11437992002-04-12 09:54:03 +000012195ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012197rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12198LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012200echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12201echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12202if test $ac_cv_lib_thread_thr_create = yes; then
12203 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012205_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012206
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012207 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012208 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012209 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012210fi
12211
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012212 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012213
Martin v. Löwis130fb172001-07-19 11:00:41 +000012214 if test "$USE_THREAD_MODULE" != "#"
12215 then
12216 # If the above checks didn't disable threads, (at least) OSF1
12217 # needs this '-threads' argument during linking.
12218 case $ac_sys_system in
12219 OSF1) LDLAST=-threads;;
12220 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012221 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012222fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012223
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012224if test "$posix_threads" = "yes"; then
12225 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012226
12227cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012228#define _POSIX_THREADS 1
12229_ACEOF
12230
12231 fi
12232
12233 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12234 case $ac_sys_system/$ac_sys_release in
12235 SunOS/5.6)
12236cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012237#define HAVE_PTHREAD_DESTRUCTOR 1
12238_ACEOF
12239
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012240 ;;
12241 SunOS/5.8)
12242cat >>confdefs.h <<\_ACEOF
12243#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12244_ACEOF
12245
12246 ;;
12247 esac
12248
12249 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12250echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12251 if test "${ac_cv_pthread_system_supported+set}" = set; then
12252 echo $ECHO_N "(cached) $ECHO_C" >&6
12253else
12254 if test "$cross_compiling" = yes; then
12255 ac_cv_pthread_system_supported=no
12256else
12257 cat >conftest.$ac_ext <<_ACEOF
12258#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012259/* confdefs.h. */
12260_ACEOF
12261cat confdefs.h >>conftest.$ac_ext
12262cat >>conftest.$ac_ext <<_ACEOF
12263/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012264#include <pthread.h>
12265 void *foo(void *parm) {
12266 return NULL;
12267 }
12268 main() {
12269 pthread_attr_t attr;
12270 pthread_t id;
12271 if (pthread_attr_init(&attr)) exit(-1);
12272 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12273 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12274 exit(0);
12275 }
12276_ACEOF
12277rm -f conftest$ac_exeext
12278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12279 (eval $ac_link) 2>&5
12280 ac_status=$?
12281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12284 (eval $ac_try) 2>&5
12285 ac_status=$?
12286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12287 (exit $ac_status); }; }; then
12288 ac_cv_pthread_system_supported=yes
12289else
12290 echo "$as_me: program exited with status $ac_status" >&5
12291echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012292sed 's/^/| /' conftest.$ac_ext >&5
12293
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012294( exit $ac_status )
12295ac_cv_pthread_system_supported=no
12296fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012297rm -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 +000012298fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012299
Guido van Rossum627b2d71993-12-24 10:39:16 +000012300fi
12301
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012302 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12303echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12304 if test "$ac_cv_pthread_system_supported" = "yes"; then
12305
12306cat >>confdefs.h <<\_ACEOF
12307#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12308_ACEOF
12309
12310 fi
12311
12312for ac_func in pthread_sigmask
12313do
12314as_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
12319else
12320 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. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +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
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012338/* Override any gcc2 internal prototype to avoid an error. */
12339#ifdef __cplusplus
12340extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012341{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012342#endif
12343/* We use char because int might match the return type of a gcc2
12344 builtin and then its argument prototype would still apply. */
12345char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +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. */
12349#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12350choke me
12351#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012352char (*f) () = $ac_func;
12353#endif
12354#ifdef __cplusplus
12355}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012356#endif
12357
Skip Montanaro6dead952003-09-25 14:50:04 +000012358int
12359main ()
12360{
12361return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +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"
12379else
12380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012381sed 's/^/| /' conftest.$ac_ext >&5
12382
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012383eval "$as_ac_var=no"
12384fi
12385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12386fi
12387echo "$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
Jason Tishlerfac083d2003-07-22 15:20:49 +000012393 case $ac_sys_system in
12394 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012395
Jason Tishlerfac083d2003-07-22 15:20:49 +000012396cat >>confdefs.h <<\_ACEOF
12397#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12398_ACEOF
12399
12400 ;;
12401 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012402fi
12403done
12404
12405fi
12406
12407
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012408# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
12410
12411echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12412echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012413# Check whether --enable-ipv6 or --disable-ipv6 was given.
12414if test "${enable_ipv6+set}" = set; then
12415 enableval="$enable_ipv6"
12416 case "$enableval" in
12417 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 echo "$as_me:$LINENO: result: no" >&5
12419echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012420 ipv6=no
12421 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 *) echo "$as_me:$LINENO: result: yes" >&5
12423echo "${ECHO_T}yes" >&6
12424 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012425#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012426_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012427
12428 ipv6=yes
12429 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012431else
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012433 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 echo "$as_me:$LINENO: result: no" >&5
12435echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012436 ipv6=no
12437
12438else
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 cat >conftest.$ac_ext <<_ACEOF
12440#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012441/* confdefs.h. */
12442_ACEOF
12443cat confdefs.h >>conftest.$ac_ext
12444cat >>conftest.$ac_ext <<_ACEOF
12445/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012446 /* AF_INET6 available check */
12447#include <sys/types.h>
12448#include <sys/socket.h>
12449main()
12450{
12451 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12452 exit(1);
12453 else
12454 exit(0);
12455}
12456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
12458rm -f conftest$ac_exeext
12459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12460 (eval $ac_link) 2>&5
12461 ac_status=$?
12462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12465 (eval $ac_try) 2>&5
12466 ac_status=$?
12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468 (exit $ac_status); }; }; then
12469 echo "$as_me:$LINENO: result: yes" >&5
12470echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012471 ipv6=yes
12472else
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 echo "$as_me: program exited with status $ac_status" >&5
12474echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012475sed 's/^/| /' conftest.$ac_ext >&5
12476
Martin v. Löwis11437992002-04-12 09:54:03 +000012477( exit $ac_status )
12478echo "$as_me:$LINENO: result: no" >&5
12479echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012480 ipv6=no
12481fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012482rm -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 +000012483fi
12484
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012485if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12487echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12488 cat >conftest.$ac_ext <<_ACEOF
12489#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012490/* confdefs.h. */
12491_ACEOF
12492cat confdefs.h >>conftest.$ac_ext
12493cat >>conftest.$ac_ext <<_ACEOF
12494/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012495#include <sys/types.h>
12496#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012497int
12498main ()
12499{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012500struct sockaddr_in6 x;
12501x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 ;
12503 return 0;
12504}
12505_ACEOF
12506rm -f conftest.$ac_objext
12507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12508 (eval $ac_compile) 2>&5
12509 ac_status=$?
12510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511 (exit $ac_status); } &&
12512 { ac_try='test -s conftest.$ac_objext'
12513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12514 (eval $ac_try) 2>&5
12515 ac_status=$?
12516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12517 (exit $ac_status); }; }; then
12518 echo "$as_me:$LINENO: result: yes" >&5
12519echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012520 ipv6=yes
12521else
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012523sed 's/^/| /' conftest.$ac_ext >&5
12524
Martin v. Löwis11437992002-04-12 09:54:03 +000012525echo "$as_me:$LINENO: result: no" >&5
12526echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012527 ipv6=no
12528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012529rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012530fi
12531
12532if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012534#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012535_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012536
12537fi
12538
Martin v. Löwis11437992002-04-12 09:54:03 +000012539fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012540
12541ipv6type=unknown
12542ipv6lib=none
12543ipv6trylibc=no
12544
12545if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12547echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012548 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12549 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012550 case $i in
12551 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 cat >conftest.$ac_ext <<_ACEOF
12553#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012554/* confdefs.h. */
12555_ACEOF
12556cat confdefs.h >>conftest.$ac_ext
12557cat >>conftest.$ac_ext <<_ACEOF
12558/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012559
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012560#include <netinet/in.h>
12561#ifdef IPV6_INRIA_VERSION
12562yes
12563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012564_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012566 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012567 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012568fi
12569rm -f conftest*
12570
12571 ;;
12572 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 cat >conftest.$ac_ext <<_ACEOF
12574#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* confdefs.h. */
12576_ACEOF
12577cat confdefs.h >>conftest.$ac_ext
12578cat >>conftest.$ac_ext <<_ACEOF
12579/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012580
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012581#include <netinet/in.h>
12582#ifdef __KAME__
12583yes
12584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012585_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012586if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012587 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012588 ipv6type=$i;
12589 ipv6lib=inet6
12590 ipv6libdir=/usr/local/v6/lib
12591 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012592fi
12593rm -f conftest*
12594
12595 ;;
12596 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 cat >conftest.$ac_ext <<_ACEOF
12598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012599/* confdefs.h. */
12600_ACEOF
12601cat confdefs.h >>conftest.$ac_ext
12602cat >>conftest.$ac_ext <<_ACEOF
12603/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012604
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012605#include <features.h>
12606#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12607yes
12608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012609_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012611 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012612 ipv6type=$i;
12613 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012614fi
12615rm -f conftest*
12616
12617 ;;
12618 linux-inet6)
12619 if test -d /usr/inet6; then
12620 ipv6type=$i
12621 ipv6lib=inet6
12622 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012623 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012624 fi
12625 ;;
12626 solaris)
12627 if test -f /etc/netconfig; then
12628 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12629 ipv6type=$i
12630 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012631 fi
12632 fi
12633 ;;
12634 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 cat >conftest.$ac_ext <<_ACEOF
12636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012637/* confdefs.h. */
12638_ACEOF
12639cat confdefs.h >>conftest.$ac_ext
12640cat >>conftest.$ac_ext <<_ACEOF
12641/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012642
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012643#include <sys/param.h>
12644#ifdef _TOSHIBA_INET6
12645yes
12646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012647_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012649 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012650 ipv6type=$i;
12651 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012652 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012653fi
12654rm -f conftest*
12655
12656 ;;
12657 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 cat >conftest.$ac_ext <<_ACEOF
12659#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012660/* confdefs.h. */
12661_ACEOF
12662cat confdefs.h >>conftest.$ac_ext
12663cat >>conftest.$ac_ext <<_ACEOF
12664/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012665
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012666#include </usr/local/v6/include/sys/v6config.h>
12667#ifdef __V6D__
12668yes
12669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012670_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012672 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012673 ipv6type=$i;
12674 ipv6lib=v6;
12675 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012676 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012677fi
12678rm -f conftest*
12679
12680 ;;
12681 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 cat >conftest.$ac_ext <<_ACEOF
12683#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* confdefs.h. */
12685_ACEOF
12686cat confdefs.h >>conftest.$ac_ext
12687cat >>conftest.$ac_ext <<_ACEOF
12688/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012689
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012690#include <sys/param.h>
12691#ifdef _ZETA_MINAMI_INET6
12692yes
12693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012694_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012696 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012697 ipv6type=$i;
12698 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012699 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012700fi
12701rm -f conftest*
12702
12703 ;;
12704 esac
12705 if test "$ipv6type" != "unknown"; then
12706 break
12707 fi
12708 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 echo "$as_me:$LINENO: result: $ipv6type" >&5
12710echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012711fi
12712
12713if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12714 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12715 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12716 echo "using lib$ipv6lib"
12717 else
12718 if test $ipv6trylibc = "yes"; then
12719 echo "using libc"
12720 else
12721 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12722 echo "You need to fetch lib$ipv6lib.a from appropriate"
12723 echo 'ipv6 kit and compile beforehand.'
12724 exit 1
12725 fi
12726 fi
12727fi
12728
Jack Jansen7b8c7542002-04-14 20:12:41 +000012729# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012730echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12731echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012732
12733# Check whether --with-universal-newlines or --without-universal-newlines was given.
12734if test "${with_universal_newlines+set}" = set; then
12735 withval="$with_universal_newlines"
12736
12737fi;
12738
12739if test -z "$with_universal_newlines"
12740then with_universal_newlines="yes"
12741fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012742if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012743then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012744 echo --without-universal-newlines is unsupported, see README
12745 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012746else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012747
12748cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012749#define WITH_UNIVERSAL_NEWLINES 1
12750_ACEOF
12751
12752fi
12753echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12754echo "${ECHO_T}$with_universal_newlines" >&6
12755
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012756# Check for --with-doc-strings
12757echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12758echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12759
12760# Check whether --with-doc-strings or --without-doc-strings was given.
12761if test "${with_doc_strings+set}" = set; then
12762 withval="$with_doc_strings"
12763
12764fi;
12765
12766if test -z "$with_doc_strings"
12767then with_doc_strings="yes"
12768fi
12769if test "$with_doc_strings" != "no"
12770then
12771
12772cat >>confdefs.h <<\_ACEOF
12773#define WITH_DOC_STRINGS 1
12774_ACEOF
12775
12776fi
12777echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12778echo "${ECHO_T}$with_doc_strings" >&6
12779
Neil Schemenauera35c6882001-02-27 04:45:05 +000012780# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012781echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12782echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12783
Neil Schemenauera35c6882001-02-27 04:45:05 +000012784# Check whether --with-pymalloc or --without-pymalloc was given.
12785if test "${with_pymalloc+set}" = set; then
12786 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012787
Martin v. Löwis11437992002-04-12 09:54:03 +000012788fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012789
Neil Schemenauer16c22972002-03-22 15:34:49 +000012790if test -z "$with_pymalloc"
12791then with_pymalloc="yes"
12792fi
12793if test "$with_pymalloc" != "no"
12794then
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
12796cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012797#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012798_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012799
12800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012801echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12802echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012803
Barry Warsawef82cd72000-06-30 16:21:01 +000012804# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012805echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12806echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12807
Barry Warsawef82cd72000-06-30 16:21:01 +000012808# Check whether --with-wctype-functions or --without-wctype-functions was given.
12809if test "${with_wctype_functions+set}" = set; then
12810 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012811
Barry Warsawef82cd72000-06-30 16:21:01 +000012812if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012813then
12814
12815cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012816#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012817_ACEOF
12818
12819 echo "$as_me:$LINENO: result: yes" >&5
12820echo "${ECHO_T}yes" >&6
12821else echo "$as_me:$LINENO: result: no" >&5
12822echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012823fi
12824else
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 echo "$as_me:$LINENO: result: no" >&5
12826echo "${ECHO_T}no" >&6
12827fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012828
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012829# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012830
Guido van Rossum98935bf2001-09-05 19:13:16 +000012831DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012832
Martin v. Löwis11437992002-04-12 09:54:03 +000012833echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12834echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12835
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012837if test "${with_sgi_dl+set}" = set; then
12838 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
12840echo "$as_me:$LINENO: result: $withval" >&5
12841echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012842echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012843exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012844
12845cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012847_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012848
Guido van Rossume97ee181999-12-20 21:27:22 +000012849DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012850dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012851if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012852then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012853else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12854echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12855 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012856fi
12857DLINCLDIR=${dldir}
12858LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 echo "$as_me:$LINENO: result: no" >&5
12861echo "${ECHO_T}no" >&6
12862fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012863
Martin v. Löwis11437992002-04-12 09:54:03 +000012864echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12865echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012867# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012868if test "${with_dl_dld+set}" = set; then
12869 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
12871echo "$as_me:$LINENO: result: $withval" >&5
12872echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012873echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012874exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
12876cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012878_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012879
Guido van Rossume97ee181999-12-20 21:27:22 +000012880DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012881dldir=`echo "$withval" | sed 's/,.*//'`
12882dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012883if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012884then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012885else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12886echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12887 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012888fi
12889DLINCLDIR=${dldir}
12890LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012891else
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 echo "$as_me:$LINENO: result: no" >&5
12893echo "${ECHO_T}no" >&6
12894fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012895
Guido van Rossume97ee181999-12-20 21:27:22 +000012896# the dlopen() function means we might want to use dynload_shlib.o. some
12897# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Thomas Wouters3a584202000-08-05 23:28:51 +000012899for ac_func in dlopen
12900do
Martin v. Löwis11437992002-04-12 09:54:03 +000012901as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12902echo "$as_me:$LINENO: checking for $ac_func" >&5
12903echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12904if eval "test \"\${$as_ac_var+set}\" = set"; then
12905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012906else
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 cat >conftest.$ac_ext <<_ACEOF
12908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012909/* confdefs.h. */
12910_ACEOF
12911cat confdefs.h >>conftest.$ac_ext
12912cat >>conftest.$ac_ext <<_ACEOF
12913/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012914/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012915 which can conflict with char $ac_func (); below.
12916 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012917 <limits.h> exists even on freestanding compilers. Under hpux,
12918 including <limits.h> includes <sys/time.h> and causes problems
12919 checking for functions defined therein. */
12920#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012921# include <limits.h>
12922#else
12923# include <assert.h>
12924#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012925/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012926#ifdef __cplusplus
12927extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012928{
Martin v. Löwis11437992002-04-12 09:54:03 +000012929#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012930/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 builtin and then its argument prototype would still apply. */
12932char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012933/* The GNU C library defines this for functions which it implements
12934 to always fail with ENOSYS. Some functions are actually named
12935 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012936#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012937choke me
12938#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012939char (*f) () = $ac_func;
12940#endif
12941#ifdef __cplusplus
12942}
Guido van Rossume97ee181999-12-20 21:27:22 +000012943#endif
12944
Skip Montanaro6dead952003-09-25 14:50:04 +000012945int
12946main ()
12947{
12948return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 ;
12950 return 0;
12951}
12952_ACEOF
12953rm -f conftest.$ac_objext conftest$ac_exeext
12954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12955 (eval $ac_link) 2>&5
12956 ac_status=$?
12957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12958 (exit $ac_status); } &&
12959 { ac_try='test -s conftest$ac_exeext'
12960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12961 (eval $ac_try) 2>&5
12962 ac_status=$?
12963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12964 (exit $ac_status); }; }; then
12965 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012966else
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012968sed 's/^/| /' conftest.$ac_ext >&5
12969
Martin v. Löwis11437992002-04-12 09:54:03 +000012970eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012972rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012973fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012974echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12975echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12976if test `eval echo '${'$as_ac_var'}'` = yes; then
12977 cat >>confdefs.h <<_ACEOF
12978#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12979_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012980
Guido van Rossume97ee181999-12-20 21:27:22 +000012981fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012982done
Guido van Rossume97ee181999-12-20 21:27:22 +000012983
Michael W. Hudson54241132001-12-07 15:38:26 +000012984
Guido van Rossume97ee181999-12-20 21:27:22 +000012985# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12986# loading of modules.
12987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12989echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012990if test -z "$DYNLOADFILE"
12991then
12992 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012993 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12994 if test "$ac_cv_func_dlopen" = yes
12995 then DYNLOADFILE="dynload_shlib.o"
12996 else DYNLOADFILE="dynload_aix.o"
12997 fi
12998 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012999 BeOS*) DYNLOADFILE="dynload_beos.o";;
13000 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013001 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013002 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013003 *)
13004 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13005 # out any dynamic loading
13006 if test "$ac_cv_func_dlopen" = yes
13007 then DYNLOADFILE="dynload_shlib.o"
13008 else DYNLOADFILE="dynload_stub.o"
13009 fi
13010 ;;
13011 esac
13012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013013echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13014echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013015if test "$DYNLOADFILE" != "dynload_stub.o"
13016then
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
13018cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013019#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013021
13022fi
13023
Neil Schemenauer4e425612001-06-19 15:44:15 +000013024# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13025
Michael W. Hudson54241132001-12-07 15:38:26 +000013026
Martin v. Löwis11437992002-04-12 09:54:03 +000013027echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13028echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013029if test -z "$MACHDEP_OBJS"
13030then
Jack Jansene578a632001-08-15 01:27:14 +000013031 MACHDEP_OBJS=$extra_machdep_objs
13032else
13033 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013035echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13036echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013037
Guido van Rossum627b2d71993-12-24 10:39:16 +000013038# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000013110
Martin v. Löwisd5843682002-11-21 20:41:28 +000013111for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013112 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013113 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000013114 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013115 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013116 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013117 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013118 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013119 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013120 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013121 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013122 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013123do
Martin v. Löwis11437992002-04-12 09:54:03 +000013124as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13125echo "$as_me:$LINENO: checking for $ac_func" >&5
13126echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13127if eval "test \"\${$as_ac_var+set}\" = set"; then
13128 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013129else
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 cat >conftest.$ac_ext <<_ACEOF
13131#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013132/* confdefs.h. */
13133_ACEOF
13134cat confdefs.h >>conftest.$ac_ext
13135cat >>conftest.$ac_ext <<_ACEOF
13136/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013137/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013138 which can conflict with char $ac_func (); below.
13139 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013140 <limits.h> exists even on freestanding compilers. Under hpux,
13141 including <limits.h> includes <sys/time.h> and causes problems
13142 checking for functions defined therein. */
13143#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013144# include <limits.h>
13145#else
13146# include <assert.h>
13147#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013148/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013149#ifdef __cplusplus
13150extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013151{
Martin v. Löwis11437992002-04-12 09:54:03 +000013152#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013153/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 builtin and then its argument prototype would still apply. */
13155char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013156/* The GNU C library defines this for functions which it implements
13157 to always fail with ENOSYS. Some functions are actually named
13158 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013159#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013160choke me
13161#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013162char (*f) () = $ac_func;
13163#endif
13164#ifdef __cplusplus
13165}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013166#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013167
Skip Montanaro6dead952003-09-25 14:50:04 +000013168int
13169main ()
13170{
13171return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 ;
13173 return 0;
13174}
13175_ACEOF
13176rm -f conftest.$ac_objext conftest$ac_exeext
13177if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13178 (eval $ac_link) 2>&5
13179 ac_status=$?
13180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181 (exit $ac_status); } &&
13182 { ac_try='test -s conftest$ac_exeext'
13183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13184 (eval $ac_try) 2>&5
13185 ac_status=$?
13186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13187 (exit $ac_status); }; }; then
13188 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013189else
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013191sed 's/^/| /' conftest.$ac_ext >&5
13192
Martin v. Löwis11437992002-04-12 09:54:03 +000013193eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013195rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013197echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13198echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13199if test `eval echo '${'$as_ac_var'}'` = yes; then
13200 cat >>confdefs.h <<_ACEOF
13201#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13202_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013203
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013204fi
13205done
13206
Michael W. Hudson54241132001-12-07 15:38:26 +000013207
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013208# For some functions, having a definition is not sufficient, since
13209# we want to take their address.
13210echo "$as_me:$LINENO: checking for chroot" >&5
13211echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13212cat >conftest.$ac_ext <<_ACEOF
13213#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013214/* confdefs.h. */
13215_ACEOF
13216cat confdefs.h >>conftest.$ac_ext
13217cat >>conftest.$ac_ext <<_ACEOF
13218/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013219#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013220int
13221main ()
13222{
13223void *x=chroot
13224 ;
13225 return 0;
13226}
13227_ACEOF
13228rm -f conftest.$ac_objext
13229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13230 (eval $ac_compile) 2>&5
13231 ac_status=$?
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); } &&
13234 { ac_try='test -s conftest.$ac_objext'
13235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13236 (eval $ac_try) 2>&5
13237 ac_status=$?
13238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13239 (exit $ac_status); }; }; then
13240
13241cat >>confdefs.h <<\_ACEOF
13242#define HAVE_CHROOT 1
13243_ACEOF
13244
13245 echo "$as_me:$LINENO: result: yes" >&5
13246echo "${ECHO_T}yes" >&6
13247else
13248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013249sed 's/^/| /' conftest.$ac_ext >&5
13250
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013251echo "$as_me:$LINENO: result: no" >&5
13252echo "${ECHO_T}no" >&6
13253
13254fi
13255rm -f conftest.$ac_objext conftest.$ac_ext
13256echo "$as_me:$LINENO: checking for link" >&5
13257echo $ECHO_N "checking for link... $ECHO_C" >&6
13258cat >conftest.$ac_ext <<_ACEOF
13259#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013260/* confdefs.h. */
13261_ACEOF
13262cat confdefs.h >>conftest.$ac_ext
13263cat >>conftest.$ac_ext <<_ACEOF
13264/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013265#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013266int
13267main ()
13268{
13269void *x=link
13270 ;
13271 return 0;
13272}
13273_ACEOF
13274rm -f conftest.$ac_objext
13275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13276 (eval $ac_compile) 2>&5
13277 ac_status=$?
13278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13279 (exit $ac_status); } &&
13280 { ac_try='test -s conftest.$ac_objext'
13281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13282 (eval $ac_try) 2>&5
13283 ac_status=$?
13284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285 (exit $ac_status); }; }; then
13286
13287cat >>confdefs.h <<\_ACEOF
13288#define HAVE_LINK 1
13289_ACEOF
13290
13291 echo "$as_me:$LINENO: result: yes" >&5
13292echo "${ECHO_T}yes" >&6
13293else
13294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013295sed 's/^/| /' conftest.$ac_ext >&5
13296
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013297echo "$as_me:$LINENO: result: no" >&5
13298echo "${ECHO_T}no" >&6
13299
13300fi
13301rm -f conftest.$ac_objext conftest.$ac_ext
13302echo "$as_me:$LINENO: checking for symlink" >&5
13303echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13304cat >conftest.$ac_ext <<_ACEOF
13305#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013306/* confdefs.h. */
13307_ACEOF
13308cat confdefs.h >>conftest.$ac_ext
13309cat >>conftest.$ac_ext <<_ACEOF
13310/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013311#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013312int
13313main ()
13314{
13315void *x=symlink
13316 ;
13317 return 0;
13318}
13319_ACEOF
13320rm -f conftest.$ac_objext
13321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13322 (eval $ac_compile) 2>&5
13323 ac_status=$?
13324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13325 (exit $ac_status); } &&
13326 { ac_try='test -s conftest.$ac_objext'
13327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13328 (eval $ac_try) 2>&5
13329 ac_status=$?
13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); }; }; then
13332
13333cat >>confdefs.h <<\_ACEOF
13334#define HAVE_SYMLINK 1
13335_ACEOF
13336
13337 echo "$as_me:$LINENO: result: yes" >&5
13338echo "${ECHO_T}yes" >&6
13339else
13340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013341sed 's/^/| /' conftest.$ac_ext >&5
13342
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013343echo "$as_me:$LINENO: result: no" >&5
13344echo "${ECHO_T}no" >&6
13345
13346fi
13347rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013348echo "$as_me:$LINENO: checking for fchdir" >&5
13349echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13350cat >conftest.$ac_ext <<_ACEOF
13351#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013352/* confdefs.h. */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013357#include <unistd.h>
13358int
13359main ()
13360{
13361void *x=fchdir
13362 ;
13363 return 0;
13364}
13365_ACEOF
13366rm -f conftest.$ac_objext
13367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13368 (eval $ac_compile) 2>&5
13369 ac_status=$?
13370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13371 (exit $ac_status); } &&
13372 { ac_try='test -s conftest.$ac_objext'
13373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13374 (eval $ac_try) 2>&5
13375 ac_status=$?
13376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13377 (exit $ac_status); }; }; then
13378
13379cat >>confdefs.h <<\_ACEOF
13380#define HAVE_FCHDIR 1
13381_ACEOF
13382
13383 echo "$as_me:$LINENO: result: yes" >&5
13384echo "${ECHO_T}yes" >&6
13385else
13386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013387sed 's/^/| /' conftest.$ac_ext >&5
13388
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013389echo "$as_me:$LINENO: result: no" >&5
13390echo "${ECHO_T}no" >&6
13391
13392fi
13393rm -f conftest.$ac_objext conftest.$ac_ext
13394echo "$as_me:$LINENO: checking for fsync" >&5
13395echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13396cat >conftest.$ac_ext <<_ACEOF
13397#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* confdefs.h. */
13399_ACEOF
13400cat confdefs.h >>conftest.$ac_ext
13401cat >>conftest.$ac_ext <<_ACEOF
13402/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013403#include <unistd.h>
13404int
13405main ()
13406{
13407void *x=fsync
13408 ;
13409 return 0;
13410}
13411_ACEOF
13412rm -f conftest.$ac_objext
13413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13414 (eval $ac_compile) 2>&5
13415 ac_status=$?
13416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13417 (exit $ac_status); } &&
13418 { ac_try='test -s conftest.$ac_objext'
13419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13420 (eval $ac_try) 2>&5
13421 ac_status=$?
13422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13423 (exit $ac_status); }; }; then
13424
13425cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013426#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013427_ACEOF
13428
13429 echo "$as_me:$LINENO: result: yes" >&5
13430echo "${ECHO_T}yes" >&6
13431else
13432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013433sed 's/^/| /' conftest.$ac_ext >&5
13434
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013435echo "$as_me:$LINENO: result: no" >&5
13436echo "${ECHO_T}no" >&6
13437
13438fi
13439rm -f conftest.$ac_objext conftest.$ac_ext
13440echo "$as_me:$LINENO: checking for fdatasync" >&5
13441echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13442cat >conftest.$ac_ext <<_ACEOF
13443#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013444/* confdefs.h. */
13445_ACEOF
13446cat confdefs.h >>conftest.$ac_ext
13447cat >>conftest.$ac_ext <<_ACEOF
13448/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013449#include <unistd.h>
13450int
13451main ()
13452{
13453void *x=fdatasync
13454 ;
13455 return 0;
13456}
13457_ACEOF
13458rm -f conftest.$ac_objext
13459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13460 (eval $ac_compile) 2>&5
13461 ac_status=$?
13462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13463 (exit $ac_status); } &&
13464 { ac_try='test -s conftest.$ac_objext'
13465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13466 (eval $ac_try) 2>&5
13467 ac_status=$?
13468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13469 (exit $ac_status); }; }; then
13470
13471cat >>confdefs.h <<\_ACEOF
13472#define HAVE_FDATASYNC 1
13473_ACEOF
13474
13475 echo "$as_me:$LINENO: result: yes" >&5
13476echo "${ECHO_T}yes" >&6
13477else
13478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013479sed 's/^/| /' conftest.$ac_ext >&5
13480
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013481echo "$as_me:$LINENO: result: no" >&5
13482echo "${ECHO_T}no" >&6
13483
13484fi
13485rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013486
Martin v. Löwisd5843682002-11-21 20:41:28 +000013487# On some systems (eg. FreeBSD 5), we would find a definition of the
13488# functions ctermid_r, setgroups in the library, but no prototype
13489# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13490# address to avoid compiler warnings and potential miscompilations
13491# because of the missing prototypes.
13492
13493echo "$as_me:$LINENO: checking for ctermid_r" >&5
13494echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13495cat >conftest.$ac_ext <<_ACEOF
13496#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* confdefs.h. */
13498_ACEOF
13499cat confdefs.h >>conftest.$ac_ext
13500cat >>conftest.$ac_ext <<_ACEOF
13501/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013502
13503#include "confdefs.h"
13504#include <stdio.h>
13505
Martin v. Löwisd5843682002-11-21 20:41:28 +000013506int
13507main ()
13508{
13509void* p = ctermid_r
13510 ;
13511 return 0;
13512}
13513_ACEOF
13514rm -f conftest.$ac_objext
13515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13516 (eval $ac_compile) 2>&5
13517 ac_status=$?
13518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13519 (exit $ac_status); } &&
13520 { ac_try='test -s conftest.$ac_objext'
13521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13522 (eval $ac_try) 2>&5
13523 ac_status=$?
13524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13525 (exit $ac_status); }; }; then
13526
13527cat >>confdefs.h <<\_ACEOF
13528#define HAVE_CTERMID_R 1
13529_ACEOF
13530
13531 echo "$as_me:$LINENO: result: yes" >&5
13532echo "${ECHO_T}yes" >&6
13533else
13534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013535sed 's/^/| /' conftest.$ac_ext >&5
13536
Martin v. Löwisd5843682002-11-21 20:41:28 +000013537echo "$as_me:$LINENO: result: no" >&5
13538echo "${ECHO_T}no" >&6
13539
13540fi
13541rm -f conftest.$ac_objext conftest.$ac_ext
13542
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013543echo "$as_me:$LINENO: checking for flock" >&5
13544echo $ECHO_N "checking for flock... $ECHO_C" >&6
13545cat >conftest.$ac_ext <<_ACEOF
13546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* confdefs.h. */
13548_ACEOF
13549cat confdefs.h >>conftest.$ac_ext
13550cat >>conftest.$ac_ext <<_ACEOF
13551/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013552
13553#include "confdefs.h"
13554#include <sys/file.h>
13555
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013556int
13557main ()
13558{
13559void* p = flock
13560 ;
13561 return 0;
13562}
13563_ACEOF
13564rm -f conftest.$ac_objext
13565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13566 (eval $ac_compile) 2>&5
13567 ac_status=$?
13568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569 (exit $ac_status); } &&
13570 { ac_try='test -s conftest.$ac_objext'
13571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13572 (eval $ac_try) 2>&5
13573 ac_status=$?
13574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575 (exit $ac_status); }; }; then
13576
13577cat >>confdefs.h <<\_ACEOF
13578#define HAVE_FLOCK 1
13579_ACEOF
13580
13581 echo "$as_me:$LINENO: result: yes" >&5
13582echo "${ECHO_T}yes" >&6
13583else
13584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013585sed 's/^/| /' conftest.$ac_ext >&5
13586
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013587echo "$as_me:$LINENO: result: no" >&5
13588echo "${ECHO_T}no" >&6
13589
13590fi
13591rm -f conftest.$ac_objext conftest.$ac_ext
13592
13593echo "$as_me:$LINENO: checking for getpagesize" >&5
13594echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13595cat >conftest.$ac_ext <<_ACEOF
13596#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013597/* confdefs.h. */
13598_ACEOF
13599cat confdefs.h >>conftest.$ac_ext
13600cat >>conftest.$ac_ext <<_ACEOF
13601/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013602
13603#include "confdefs.h"
13604#include <unistd.h>
13605
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013606int
13607main ()
13608{
13609void* p = getpagesize
13610 ;
13611 return 0;
13612}
13613_ACEOF
13614rm -f conftest.$ac_objext
13615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13616 (eval $ac_compile) 2>&5
13617 ac_status=$?
13618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619 (exit $ac_status); } &&
13620 { ac_try='test -s conftest.$ac_objext'
13621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13622 (eval $ac_try) 2>&5
13623 ac_status=$?
13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625 (exit $ac_status); }; }; then
13626
13627cat >>confdefs.h <<\_ACEOF
13628#define HAVE_GETPAGESIZE 1
13629_ACEOF
13630
13631 echo "$as_me:$LINENO: result: yes" >&5
13632echo "${ECHO_T}yes" >&6
13633else
13634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013635sed 's/^/| /' conftest.$ac_ext >&5
13636
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013637echo "$as_me:$LINENO: result: no" >&5
13638echo "${ECHO_T}no" >&6
13639
13640fi
13641rm -f conftest.$ac_objext conftest.$ac_ext
13642
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013643for ac_prog in true
13644do
13645 # Extract the first word of "$ac_prog", so it can be a program name with args.
13646set dummy $ac_prog; ac_word=$2
13647echo "$as_me:$LINENO: checking for $ac_word" >&5
13648echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13649if test "${ac_cv_prog_TRUE+set}" = set; then
13650 echo $ECHO_N "(cached) $ECHO_C" >&6
13651else
13652 if test -n "$TRUE"; then
13653 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13654else
13655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13656for as_dir in $PATH
13657do
13658 IFS=$as_save_IFS
13659 test -z "$as_dir" && as_dir=.
13660 for ac_exec_ext in '' $ac_executable_extensions; do
13661 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13662 ac_cv_prog_TRUE="$ac_prog"
13663 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13664 break 2
13665 fi
13666done
13667done
13668
13669fi
13670fi
13671TRUE=$ac_cv_prog_TRUE
13672if test -n "$TRUE"; then
13673 echo "$as_me:$LINENO: result: $TRUE" >&5
13674echo "${ECHO_T}$TRUE" >&6
13675else
13676 echo "$as_me:$LINENO: result: no" >&5
13677echo "${ECHO_T}no" >&6
13678fi
13679
13680 test -n "$TRUE" && break
13681done
13682test -n "$TRUE" || TRUE="/bin/true"
13683
13684
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013685echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13686echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13687if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13688 echo $ECHO_N "(cached) $ECHO_C" >&6
13689else
13690 ac_check_lib_save_LIBS=$LIBS
13691LIBS="-lc $LIBS"
13692cat >conftest.$ac_ext <<_ACEOF
13693#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* confdefs.h. */
13695_ACEOF
13696cat confdefs.h >>conftest.$ac_ext
13697cat >>conftest.$ac_ext <<_ACEOF
13698/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013699
13700/* Override any gcc2 internal prototype to avoid an error. */
13701#ifdef __cplusplus
13702extern "C"
13703#endif
13704/* We use char because int might match the return type of a gcc2
13705 builtin and then its argument prototype would still apply. */
13706char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013707int
13708main ()
13709{
13710inet_aton ();
13711 ;
13712 return 0;
13713}
13714_ACEOF
13715rm -f conftest.$ac_objext conftest$ac_exeext
13716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13717 (eval $ac_link) 2>&5
13718 ac_status=$?
13719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720 (exit $ac_status); } &&
13721 { ac_try='test -s conftest$ac_exeext'
13722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13723 (eval $ac_try) 2>&5
13724 ac_status=$?
13725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13726 (exit $ac_status); }; }; then
13727 ac_cv_lib_c_inet_aton=yes
13728else
13729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013730sed 's/^/| /' conftest.$ac_ext >&5
13731
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013732ac_cv_lib_c_inet_aton=no
13733fi
13734rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13735LIBS=$ac_check_lib_save_LIBS
13736fi
13737echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13738echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13739if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013740 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013741else
13742
13743echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13744echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13745if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13746 echo $ECHO_N "(cached) $ECHO_C" >&6
13747else
13748 ac_check_lib_save_LIBS=$LIBS
13749LIBS="-lresolv $LIBS"
13750cat >conftest.$ac_ext <<_ACEOF
13751#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013752/* confdefs.h. */
13753_ACEOF
13754cat confdefs.h >>conftest.$ac_ext
13755cat >>conftest.$ac_ext <<_ACEOF
13756/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013757
13758/* Override any gcc2 internal prototype to avoid an error. */
13759#ifdef __cplusplus
13760extern "C"
13761#endif
13762/* We use char because int might match the return type of a gcc2
13763 builtin and then its argument prototype would still apply. */
13764char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013765int
13766main ()
13767{
13768inet_aton ();
13769 ;
13770 return 0;
13771}
13772_ACEOF
13773rm -f conftest.$ac_objext conftest$ac_exeext
13774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13775 (eval $ac_link) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); } &&
13779 { ac_try='test -s conftest$ac_exeext'
13780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); }; }; then
13785 ac_cv_lib_resolv_inet_aton=yes
13786else
13787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013788sed 's/^/| /' conftest.$ac_ext >&5
13789
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013790ac_cv_lib_resolv_inet_aton=no
13791fi
13792rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13793LIBS=$ac_check_lib_save_LIBS
13794fi
13795echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13796echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13797if test $ac_cv_lib_resolv_inet_aton = yes; then
13798 cat >>confdefs.h <<_ACEOF
13799#define HAVE_LIBRESOLV 1
13800_ACEOF
13801
13802 LIBS="-lresolv $LIBS"
13803
13804fi
13805
13806
13807fi
13808
13809
Martin v. Löwise9416172003-05-03 10:12:45 +000013810echo "$as_me:$LINENO: checking for hstrerror" >&5
13811echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13812cat >conftest.$ac_ext <<_ACEOF
13813#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* confdefs.h. */
13815_ACEOF
13816cat confdefs.h >>conftest.$ac_ext
13817cat >>conftest.$ac_ext <<_ACEOF
13818/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013819
13820#include "confdefs.h"
13821#include <netdb.h>
13822
Martin v. Löwise9416172003-05-03 10:12:45 +000013823int
13824main ()
13825{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013826void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013827 ;
13828 return 0;
13829}
13830_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013831rm -f conftest.$ac_objext conftest$ac_exeext
13832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13833 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013834 ac_status=$?
13835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13836 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013837 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13839 (eval $ac_try) 2>&5
13840 ac_status=$?
13841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842 (exit $ac_status); }; }; then
13843
13844cat >>confdefs.h <<\_ACEOF
13845#define HAVE_HSTRERROR 1
13846_ACEOF
13847
13848 echo "$as_me:$LINENO: result: yes" >&5
13849echo "${ECHO_T}yes" >&6
13850else
13851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013852sed 's/^/| /' conftest.$ac_ext >&5
13853
Martin v. Löwise9416172003-05-03 10:12:45 +000013854echo "$as_me:$LINENO: result: no" >&5
13855echo "${ECHO_T}no" >&6
13856
13857fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013859
13860echo "$as_me:$LINENO: checking for inet_aton" >&5
13861echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13862cat >conftest.$ac_ext <<_ACEOF
13863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013864/* confdefs.h. */
13865_ACEOF
13866cat confdefs.h >>conftest.$ac_ext
13867cat >>conftest.$ac_ext <<_ACEOF
13868/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013869
13870#include "confdefs.h"
13871#include <sys/socket.h>
13872#include <netinet/in.h>
13873#include <arpa/inet.h>
13874
Martin v. Löwise9416172003-05-03 10:12:45 +000013875int
13876main ()
13877{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013878void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013879 ;
13880 return 0;
13881}
13882_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013883rm -f conftest.$ac_objext conftest$ac_exeext
13884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13885 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013886 ac_status=$?
13887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013889 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13891 (eval $ac_try) 2>&5
13892 ac_status=$?
13893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894 (exit $ac_status); }; }; then
13895
13896cat >>confdefs.h <<\_ACEOF
13897#define HAVE_INET_ATON 1
13898_ACEOF
13899
13900 echo "$as_me:$LINENO: result: yes" >&5
13901echo "${ECHO_T}yes" >&6
13902else
13903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013904sed 's/^/| /' conftest.$ac_ext >&5
13905
Martin v. Löwise9416172003-05-03 10:12:45 +000013906echo "$as_me:$LINENO: result: no" >&5
13907echo "${ECHO_T}no" >&6
13908
13909fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013910rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013911
13912echo "$as_me:$LINENO: checking for inet_pton" >&5
13913echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13914cat >conftest.$ac_ext <<_ACEOF
13915#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013916/* confdefs.h. */
13917_ACEOF
13918cat confdefs.h >>conftest.$ac_ext
13919cat >>conftest.$ac_ext <<_ACEOF
13920/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013921
13922#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013923#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013924#include <sys/socket.h>
13925#include <netinet/in.h>
13926#include <arpa/inet.h>
13927
Martin v. Löwise9416172003-05-03 10:12:45 +000013928int
13929main ()
13930{
13931void* p = inet_pton
13932 ;
13933 return 0;
13934}
13935_ACEOF
13936rm -f conftest.$ac_objext
13937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13938 (eval $ac_compile) 2>&5
13939 ac_status=$?
13940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13941 (exit $ac_status); } &&
13942 { ac_try='test -s conftest.$ac_objext'
13943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13944 (eval $ac_try) 2>&5
13945 ac_status=$?
13946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13947 (exit $ac_status); }; }; then
13948
13949cat >>confdefs.h <<\_ACEOF
13950#define HAVE_INET_PTON 1
13951_ACEOF
13952
13953 echo "$as_me:$LINENO: result: yes" >&5
13954echo "${ECHO_T}yes" >&6
13955else
13956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013957sed 's/^/| /' conftest.$ac_ext >&5
13958
Martin v. Löwise9416172003-05-03 10:12:45 +000013959echo "$as_me:$LINENO: result: no" >&5
13960echo "${ECHO_T}no" >&6
13961
13962fi
13963rm -f conftest.$ac_objext conftest.$ac_ext
13964
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013965# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013966echo "$as_me:$LINENO: checking for setgroups" >&5
13967echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13968cat >conftest.$ac_ext <<_ACEOF
13969#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013970/* confdefs.h. */
13971_ACEOF
13972cat confdefs.h >>conftest.$ac_ext
13973cat >>conftest.$ac_ext <<_ACEOF
13974/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013975
13976#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013977#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013978#ifdef HAVE_GRP_H
13979#include <grp.h>
13980#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013981
Martin v. Löwisd5843682002-11-21 20:41:28 +000013982int
13983main ()
13984{
13985void* p = setgroups
13986 ;
13987 return 0;
13988}
13989_ACEOF
13990rm -f conftest.$ac_objext
13991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13992 (eval $ac_compile) 2>&5
13993 ac_status=$?
13994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13995 (exit $ac_status); } &&
13996 { ac_try='test -s conftest.$ac_objext'
13997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13998 (eval $ac_try) 2>&5
13999 ac_status=$?
14000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14001 (exit $ac_status); }; }; then
14002
14003cat >>confdefs.h <<\_ACEOF
14004#define HAVE_SETGROUPS 1
14005_ACEOF
14006
14007 echo "$as_me:$LINENO: result: yes" >&5
14008echo "${ECHO_T}yes" >&6
14009else
14010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014011sed 's/^/| /' conftest.$ac_ext >&5
14012
Martin v. Löwisd5843682002-11-21 20:41:28 +000014013echo "$as_me:$LINENO: result: no" >&5
14014echo "${ECHO_T}no" >&6
14015
14016fi
14017rm -f conftest.$ac_objext conftest.$ac_ext
14018
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014019# check for openpty and forkpty
14020
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014022for ac_func in openpty
14023do
Martin v. Löwis11437992002-04-12 09:54:03 +000014024as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14025echo "$as_me:$LINENO: checking for $ac_func" >&5
14026echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14027if eval "test \"\${$as_ac_var+set}\" = set"; then
14028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014029else
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 cat >conftest.$ac_ext <<_ACEOF
14031#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014032/* confdefs.h. */
14033_ACEOF
14034cat confdefs.h >>conftest.$ac_ext
14035cat >>conftest.$ac_ext <<_ACEOF
14036/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014037/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014038 which can conflict with char $ac_func (); below.
14039 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014040 <limits.h> exists even on freestanding compilers. Under hpux,
14041 including <limits.h> includes <sys/time.h> and causes problems
14042 checking for functions defined therein. */
14043#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014044# include <limits.h>
14045#else
14046# include <assert.h>
14047#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014048/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014049#ifdef __cplusplus
14050extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014051{
Martin v. Löwis11437992002-04-12 09:54:03 +000014052#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014053/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 builtin and then its argument prototype would still apply. */
14055char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014056/* The GNU C library defines this for functions which it implements
14057 to always fail with ENOSYS. Some functions are actually named
14058 something starting with __ and the normal name is an alias. */
14059#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14060choke me
14061#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014062char (*f) () = $ac_func;
14063#endif
14064#ifdef __cplusplus
14065}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014066#endif
14067
Skip Montanaro6dead952003-09-25 14:50:04 +000014068int
14069main ()
14070{
14071return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ;
14073 return 0;
14074}
14075_ACEOF
14076rm -f conftest.$ac_objext conftest$ac_exeext
14077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14078 (eval $ac_link) 2>&5
14079 ac_status=$?
14080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14081 (exit $ac_status); } &&
14082 { ac_try='test -s conftest$ac_exeext'
14083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14084 (eval $ac_try) 2>&5
14085 ac_status=$?
14086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14087 (exit $ac_status); }; }; then
14088 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014089else
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014091sed 's/^/| /' conftest.$ac_ext >&5
14092
Martin v. Löwis11437992002-04-12 09:54:03 +000014093eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014097echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14098echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14099if test `eval echo '${'$as_ac_var'}'` = yes; then
14100 cat >>confdefs.h <<_ACEOF
14101#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14102_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014103
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014104else
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14106echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14107if test "${ac_cv_lib_util_openpty+set}" = set; then
14108 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014109else
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014111LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014112cat >conftest.$ac_ext <<_ACEOF
14113#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014114/* confdefs.h. */
14115_ACEOF
14116cat confdefs.h >>conftest.$ac_ext
14117cat >>conftest.$ac_ext <<_ACEOF
14118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
Fred Drake8cef4cf2000-06-28 16:40:38 +000014120/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014121#ifdef __cplusplus
14122extern "C"
14123#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014124/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 builtin and then its argument prototype would still apply. */
14126char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014127int
14128main ()
14129{
14130openpty ();
14131 ;
14132 return 0;
14133}
14134_ACEOF
14135rm -f conftest.$ac_objext conftest$ac_exeext
14136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14137 (eval $ac_link) 2>&5
14138 ac_status=$?
14139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14140 (exit $ac_status); } &&
14141 { ac_try='test -s conftest$ac_exeext'
14142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14143 (eval $ac_try) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); }; }; then
14147 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014148else
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014150sed 's/^/| /' conftest.$ac_ext >&5
14151
Martin v. Löwis11437992002-04-12 09:54:03 +000014152ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014154rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14155LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014157echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14158echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14159if test $ac_cv_lib_util_openpty = yes; then
14160 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014161#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014163 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014164fi
14165
14166fi
14167done
14168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
Fred Drake8cef4cf2000-06-28 16:40:38 +000014170for ac_func in forkpty
14171do
Martin v. Löwis11437992002-04-12 09:54:03 +000014172as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14173echo "$as_me:$LINENO: checking for $ac_func" >&5
14174echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14175if eval "test \"\${$as_ac_var+set}\" = set"; then
14176 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014177else
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 cat >conftest.$ac_ext <<_ACEOF
14179#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014180/* confdefs.h. */
14181_ACEOF
14182cat confdefs.h >>conftest.$ac_ext
14183cat >>conftest.$ac_ext <<_ACEOF
14184/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014185/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014186 which can conflict with char $ac_func (); below.
14187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014188 <limits.h> exists even on freestanding compilers. Under hpux,
14189 including <limits.h> includes <sys/time.h> and causes problems
14190 checking for functions defined therein. */
14191#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014192# include <limits.h>
14193#else
14194# include <assert.h>
14195#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014196/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014197#ifdef __cplusplus
14198extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014199{
Martin v. Löwis11437992002-04-12 09:54:03 +000014200#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014201/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 builtin and then its argument prototype would still apply. */
14203char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014204/* The GNU C library defines this for functions which it implements
14205 to always fail with ENOSYS. Some functions are actually named
14206 something starting with __ and the normal name is an alias. */
14207#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14208choke me
14209#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014210char (*f) () = $ac_func;
14211#endif
14212#ifdef __cplusplus
14213}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014214#endif
14215
Skip Montanaro6dead952003-09-25 14:50:04 +000014216int
14217main ()
14218{
14219return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014220 ;
14221 return 0;
14222}
14223_ACEOF
14224rm -f conftest.$ac_objext conftest$ac_exeext
14225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14226 (eval $ac_link) 2>&5
14227 ac_status=$?
14228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14229 (exit $ac_status); } &&
14230 { ac_try='test -s conftest$ac_exeext'
14231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14232 (eval $ac_try) 2>&5
14233 ac_status=$?
14234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14235 (exit $ac_status); }; }; then
14236 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014237else
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014239sed 's/^/| /' conftest.$ac_ext >&5
14240
Martin v. Löwis11437992002-04-12 09:54:03 +000014241eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014243rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014245echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14246echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14247if test `eval echo '${'$as_ac_var'}'` = yes; then
14248 cat >>confdefs.h <<_ACEOF
14249#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14250_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014251
Fred Drake8cef4cf2000-06-28 16:40:38 +000014252else
Martin v. Löwis11437992002-04-12 09:54:03 +000014253 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14254echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14255if test "${ac_cv_lib_util_forkpty+set}" = set; then
14256 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014257else
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014259LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014260cat >conftest.$ac_ext <<_ACEOF
14261#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014262/* confdefs.h. */
14263_ACEOF
14264cat confdefs.h >>conftest.$ac_ext
14265cat >>conftest.$ac_ext <<_ACEOF
14266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014267
Fred Drake8cef4cf2000-06-28 16:40:38 +000014268/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014269#ifdef __cplusplus
14270extern "C"
14271#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014272/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 builtin and then its argument prototype would still apply. */
14274char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014275int
14276main ()
14277{
14278forkpty ();
14279 ;
14280 return 0;
14281}
14282_ACEOF
14283rm -f conftest.$ac_objext conftest$ac_exeext
14284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14285 (eval $ac_link) 2>&5
14286 ac_status=$?
14287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288 (exit $ac_status); } &&
14289 { ac_try='test -s conftest$ac_exeext'
14290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14291 (eval $ac_try) 2>&5
14292 ac_status=$?
14293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14294 (exit $ac_status); }; }; then
14295 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014296else
Martin v. Löwis11437992002-04-12 09:54:03 +000014297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014298sed 's/^/| /' conftest.$ac_ext >&5
14299
Martin v. Löwis11437992002-04-12 09:54:03 +000014300ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014302rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14303LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014305echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14306echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14307if test $ac_cv_lib_util_forkpty = yes; then
14308 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014309#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014310_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014311 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014312fi
14313
14314fi
14315done
14316
Jack Jansendd19cf82001-12-06 22:36:17 +000014317
Michael W. Hudson54241132001-12-07 15:38:26 +000014318# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
14320
14321
14322
14323
14324
Fred Drake8cef4cf2000-06-28 16:40:38 +000014325for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14326do
Martin v. Löwis11437992002-04-12 09:54:03 +000014327as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14328echo "$as_me:$LINENO: checking for $ac_func" >&5
14329echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14330if eval "test \"\${$as_ac_var+set}\" = set"; then
14331 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014332else
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 cat >conftest.$ac_ext <<_ACEOF
14334#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014335/* confdefs.h. */
14336_ACEOF
14337cat confdefs.h >>conftest.$ac_ext
14338cat >>conftest.$ac_ext <<_ACEOF
14339/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014340/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014341 which can conflict with char $ac_func (); below.
14342 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014343 <limits.h> exists even on freestanding compilers. Under hpux,
14344 including <limits.h> includes <sys/time.h> and causes problems
14345 checking for functions defined therein. */
14346#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014347# include <limits.h>
14348#else
14349# include <assert.h>
14350#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014351/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014352#ifdef __cplusplus
14353extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014354{
Martin v. Löwis11437992002-04-12 09:54:03 +000014355#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014356/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 builtin and then its argument prototype would still apply. */
14358char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014359/* The GNU C library defines this for functions which it implements
14360 to always fail with ENOSYS. Some functions are actually named
14361 something starting with __ and the normal name is an alias. */
14362#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14363choke me
14364#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014365char (*f) () = $ac_func;
14366#endif
14367#ifdef __cplusplus
14368}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014369#endif
14370
Skip Montanaro6dead952003-09-25 14:50:04 +000014371int
14372main ()
14373{
14374return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014375 ;
14376 return 0;
14377}
14378_ACEOF
14379rm -f conftest.$ac_objext conftest$ac_exeext
14380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14381 (eval $ac_link) 2>&5
14382 ac_status=$?
14383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14384 (exit $ac_status); } &&
14385 { ac_try='test -s conftest$ac_exeext'
14386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14387 (eval $ac_try) 2>&5
14388 ac_status=$?
14389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14390 (exit $ac_status); }; }; then
14391 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014392else
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014394sed 's/^/| /' conftest.$ac_ext >&5
14395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014400echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14401echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14402if test `eval echo '${'$as_ac_var'}'` = yes; then
14403 cat >>confdefs.h <<_ACEOF
14404#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14405_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014407fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014408done
14409
Michael W. Hudson54241132001-12-07 15:38:26 +000014410
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
14412
14413
14414
14415
Martin v. Löwis1142de32002-03-29 16:28:31 +000014416for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014417do
Martin v. Löwis11437992002-04-12 09:54:03 +000014418as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14419echo "$as_me:$LINENO: checking for $ac_func" >&5
14420echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14421if eval "test \"\${$as_ac_var+set}\" = set"; then
14422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014423else
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 cat >conftest.$ac_ext <<_ACEOF
14425#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014426/* confdefs.h. */
14427_ACEOF
14428cat confdefs.h >>conftest.$ac_ext
14429cat >>conftest.$ac_ext <<_ACEOF
14430/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014431/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014432 which can conflict with char $ac_func (); below.
14433 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014434 <limits.h> exists even on freestanding compilers. Under hpux,
14435 including <limits.h> includes <sys/time.h> and causes problems
14436 checking for functions defined therein. */
14437#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014438# include <limits.h>
14439#else
14440# include <assert.h>
14441#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014443#ifdef __cplusplus
14444extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014445{
Martin v. Löwis11437992002-04-12 09:54:03 +000014446#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014447/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 builtin and then its argument prototype would still apply. */
14449char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014450/* The GNU C library defines this for functions which it implements
14451 to always fail with ENOSYS. Some functions are actually named
14452 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014453#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014454choke me
14455#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014456char (*f) () = $ac_func;
14457#endif
14458#ifdef __cplusplus
14459}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014460#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014461
Skip Montanaro6dead952003-09-25 14:50:04 +000014462int
14463main ()
14464{
14465return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 ;
14467 return 0;
14468}
14469_ACEOF
14470rm -f conftest.$ac_objext conftest$ac_exeext
14471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14472 (eval $ac_link) 2>&5
14473 ac_status=$?
14474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14475 (exit $ac_status); } &&
14476 { ac_try='test -s conftest$ac_exeext'
14477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14478 (eval $ac_try) 2>&5
14479 ac_status=$?
14480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14481 (exit $ac_status); }; }; then
14482 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014483else
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014485sed 's/^/| /' conftest.$ac_ext >&5
14486
Martin v. Löwis11437992002-04-12 09:54:03 +000014487eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014489rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000014490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014491echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14492echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14493if test `eval echo '${'$as_ac_var'}'` = yes; then
14494 cat >>confdefs.h <<_ACEOF
14495#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14496_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000014497
Martin v. Löwis1142de32002-03-29 16:28:31 +000014498else
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014500fi
14501done
14502
14503
Martin v. Löwis11437992002-04-12 09:54:03 +000014504
Martin v. Löwis1142de32002-03-29 16:28:31 +000014505for ac_func in getpgrp
14506do
Martin v. Löwis11437992002-04-12 09:54:03 +000014507as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14508echo "$as_me:$LINENO: checking for $ac_func" >&5
14509echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14510if eval "test \"\${$as_ac_var+set}\" = set"; then
14511 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000014512else
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 cat >conftest.$ac_ext <<_ACEOF
14514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014515/* confdefs.h. */
14516_ACEOF
14517cat confdefs.h >>conftest.$ac_ext
14518cat >>conftest.$ac_ext <<_ACEOF
14519/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000014520/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014521 which can conflict with char $ac_func (); below.
14522 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014523 <limits.h> exists even on freestanding compilers. Under hpux,
14524 including <limits.h> includes <sys/time.h> and causes problems
14525 checking for functions defined therein. */
14526#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014527# include <limits.h>
14528#else
14529# include <assert.h>
14530#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014531/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014532#ifdef __cplusplus
14533extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014534{
Martin v. Löwis11437992002-04-12 09:54:03 +000014535#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014536/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014537 builtin and then its argument prototype would still apply. */
14538char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000014539/* The GNU C library defines this for functions which it implements
14540 to always fail with ENOSYS. Some functions are actually named
14541 something starting with __ and the normal name is an alias. */
14542#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14543choke me
14544#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014545char (*f) () = $ac_func;
14546#endif
14547#ifdef __cplusplus
14548}
Martin v. Löwis1142de32002-03-29 16:28:31 +000014549#endif
14550
Skip Montanaro6dead952003-09-25 14:50:04 +000014551int
14552main ()
14553{
14554return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 ;
14556 return 0;
14557}
14558_ACEOF
14559rm -f conftest.$ac_objext conftest$ac_exeext
14560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14561 (eval $ac_link) 2>&5
14562 ac_status=$?
14563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14564 (exit $ac_status); } &&
14565 { ac_try='test -s conftest$ac_exeext'
14566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14567 (eval $ac_try) 2>&5
14568 ac_status=$?
14569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14570 (exit $ac_status); }; }; then
14571 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014572else
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014574sed 's/^/| /' conftest.$ac_ext >&5
14575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014577fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014580echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14581echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14582if test `eval echo '${'$as_ac_var'}'` = yes; then
14583 cat >>confdefs.h <<_ACEOF
14584#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14585_ACEOF
14586 cat >conftest.$ac_ext <<_ACEOF
14587#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014588/* confdefs.h. */
14589_ACEOF
14590cat confdefs.h >>conftest.$ac_ext
14591cat >>conftest.$ac_ext <<_ACEOF
14592/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014593#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014594int
14595main ()
14596{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 ;
14599 return 0;
14600}
14601_ACEOF
14602rm -f conftest.$ac_objext
14603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14604 (eval $ac_compile) 2>&5
14605 ac_status=$?
14606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607 (exit $ac_status); } &&
14608 { ac_try='test -s conftest.$ac_objext'
14609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14610 (eval $ac_try) 2>&5
14611 ac_status=$?
14612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613 (exit $ac_status); }; }; then
14614
14615cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014616#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014618
Martin v. Löwis11437992002-04-12 09:54:03 +000014619
Guido van Rossumf78abae1997-01-21 22:02:36 +000014620else
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014622sed 's/^/| /' conftest.$ac_ext >&5
14623
Guido van Rossum627b2d71993-12-24 10:39:16 +000014624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014625rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014626
Guido van Rossum627b2d71993-12-24 10:39:16 +000014627fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014628done
Guido van Rossum627b2d71993-12-24 10:39:16 +000014629
Jack Jansen150753c2003-03-29 22:07:47 +000014630
14631for ac_func in setpgrp
14632do
14633as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14634echo "$as_me:$LINENO: checking for $ac_func" >&5
14635echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14636if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 cat >conftest.$ac_ext <<_ACEOF
14640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014641/* confdefs.h. */
14642_ACEOF
14643cat confdefs.h >>conftest.$ac_ext
14644cat >>conftest.$ac_ext <<_ACEOF
14645/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014646/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014647 which can conflict with char $ac_func (); below.
14648 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014649 <limits.h> exists even on freestanding compilers. Under hpux,
14650 including <limits.h> includes <sys/time.h> and causes problems
14651 checking for functions defined therein. */
14652#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014653# include <limits.h>
14654#else
14655# include <assert.h>
14656#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014657/* Override any gcc2 internal prototype to avoid an error. */
14658#ifdef __cplusplus
14659extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014660{
Martin v. Löwis11437992002-04-12 09:54:03 +000014661#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014662/* We use char because int might match the return type of a gcc2
14663 builtin and then its argument prototype would still apply. */
14664char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000014665/* The GNU C library defines this for functions which it implements
14666 to always fail with ENOSYS. Some functions are actually named
14667 something starting with __ and the normal name is an alias. */
14668#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14669choke me
14670#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014671char (*f) () = $ac_func;
14672#endif
14673#ifdef __cplusplus
14674}
Jack Jansen150753c2003-03-29 22:07:47 +000014675#endif
14676
Skip Montanaro6dead952003-09-25 14:50:04 +000014677int
14678main ()
14679{
14680return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 ;
14682 return 0;
14683}
14684_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014685rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14687 (eval $ac_link) 2>&5
14688 ac_status=$?
14689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014690 (exit $ac_status); } &&
14691 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14693 (eval $ac_try) 2>&5
14694 ac_status=$?
14695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14696 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014697 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014698else
Jack Jansen150753c2003-03-29 22:07:47 +000014699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014700sed 's/^/| /' conftest.$ac_ext >&5
14701
Jack Jansen150753c2003-03-29 22:07:47 +000014702eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014703fi
Jack Jansen150753c2003-03-29 22:07:47 +000014704rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014705fi
Jack Jansen150753c2003-03-29 22:07:47 +000014706echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14707echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14708if test `eval echo '${'$as_ac_var'}'` = yes; then
14709 cat >>confdefs.h <<_ACEOF
14710#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14711_ACEOF
14712 cat >conftest.$ac_ext <<_ACEOF
14713#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014714/* confdefs.h. */
14715_ACEOF
14716cat confdefs.h >>conftest.$ac_ext
14717cat >>conftest.$ac_ext <<_ACEOF
14718/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014719#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014720int
14721main ()
14722{
14723setpgrp(0,0);
14724 ;
14725 return 0;
14726}
14727_ACEOF
14728rm -f conftest.$ac_objext
14729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14730 (eval $ac_compile) 2>&5
14731 ac_status=$?
14732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733 (exit $ac_status); } &&
14734 { ac_try='test -s conftest.$ac_objext'
14735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14736 (eval $ac_try) 2>&5
14737 ac_status=$?
14738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14739 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
14741cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014742#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014743_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014744
Jack Jansen150753c2003-03-29 22:07:47 +000014745
14746else
14747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014748sed 's/^/| /' conftest.$ac_ext >&5
14749
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014750fi
Jack Jansen150753c2003-03-29 22:07:47 +000014751rm -f conftest.$ac_objext conftest.$ac_ext
14752
14753fi
14754done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014755
Martin v. Löwis11437992002-04-12 09:54:03 +000014756
Thomas Wouters3a584202000-08-05 23:28:51 +000014757for ac_func in gettimeofday
14758do
Martin v. Löwis11437992002-04-12 09:54:03 +000014759as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14760echo "$as_me:$LINENO: checking for $ac_func" >&5
14761echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14762if eval "test \"\${$as_ac_var+set}\" = set"; then
14763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014764else
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 cat >conftest.$ac_ext <<_ACEOF
14766#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014767/* confdefs.h. */
14768_ACEOF
14769cat confdefs.h >>conftest.$ac_ext
14770cat >>conftest.$ac_ext <<_ACEOF
14771/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014772/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014773 which can conflict with char $ac_func (); below.
14774 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014775 <limits.h> exists even on freestanding compilers. Under hpux,
14776 including <limits.h> includes <sys/time.h> and causes problems
14777 checking for functions defined therein. */
14778#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014779# include <limits.h>
14780#else
14781# include <assert.h>
14782#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014783/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014784#ifdef __cplusplus
14785extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014786{
Martin v. Löwis11437992002-04-12 09:54:03 +000014787#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014788/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 builtin and then its argument prototype would still apply. */
14790char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014791/* The GNU C library defines this for functions which it implements
14792 to always fail with ENOSYS. Some functions are actually named
14793 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014794#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014795choke me
14796#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014797char (*f) () = $ac_func;
14798#endif
14799#ifdef __cplusplus
14800}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014801#endif
14802
Skip Montanaro6dead952003-09-25 14:50:04 +000014803int
14804main ()
14805{
14806return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014807 ;
14808 return 0;
14809}
14810_ACEOF
14811rm -f conftest.$ac_objext conftest$ac_exeext
14812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14813 (eval $ac_link) 2>&5
14814 ac_status=$?
14815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14816 (exit $ac_status); } &&
14817 { ac_try='test -s conftest$ac_exeext'
14818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14819 (eval $ac_try) 2>&5
14820 ac_status=$?
14821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14822 (exit $ac_status); }; }; then
14823 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014824else
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014826sed 's/^/| /' conftest.$ac_ext >&5
14827
Martin v. Löwis11437992002-04-12 09:54:03 +000014828eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014829fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14833echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14834if test `eval echo '${'$as_ac_var'}'` = yes; then
14835 cat >>confdefs.h <<_ACEOF
14836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14837_ACEOF
14838 cat >conftest.$ac_ext <<_ACEOF
14839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014840/* confdefs.h. */
14841_ACEOF
14842cat confdefs.h >>conftest.$ac_ext
14843cat >>conftest.$ac_ext <<_ACEOF
14844/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014845#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014846int
14847main ()
14848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014849gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 ;
14851 return 0;
14852}
14853_ACEOF
14854rm -f conftest.$ac_objext
14855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14856 (eval $ac_compile) 2>&5
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); } &&
14860 { ac_try='test -s conftest.$ac_objext'
14861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14862 (eval $ac_try) 2>&5
14863 ac_status=$?
14864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014866 :
14867else
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014869sed 's/^/| /' conftest.$ac_ext >&5
14870
Martin v. Löwis11437992002-04-12 09:54:03 +000014871
14872cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014873#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014874_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014875
Martin v. Löwis11437992002-04-12 09:54:03 +000014876
Guido van Rossum627b2d71993-12-24 10:39:16 +000014877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014878rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014880fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014881done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014882
Michael W. Hudson54241132001-12-07 15:38:26 +000014883
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014884echo "$as_me:$LINENO: checking for major" >&5
14885echo $ECHO_N "checking for major... $ECHO_C" >&6
14886cat >conftest.$ac_ext <<_ACEOF
14887#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014888/* confdefs.h. */
14889_ACEOF
14890cat confdefs.h >>conftest.$ac_ext
14891cat >>conftest.$ac_ext <<_ACEOF
14892/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014893
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014894#if defined(MAJOR_IN_MKDEV)
14895#include <sys/mkdev.h>
14896#elif defined(MAJOR_IN_SYSMACROS)
14897#include <sys/sysmacros.h>
14898#else
14899#include <sys/types.h>
14900#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014901
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014902int
14903main ()
14904{
14905
14906 makedev(major(0),minor(0));
14907
14908 ;
14909 return 0;
14910}
14911_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014912rm -f conftest.$ac_objext conftest$ac_exeext
14913if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14914 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014915 ac_status=$?
14916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14917 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014918 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14920 (eval $ac_try) 2>&5
14921 ac_status=$?
14922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14923 (exit $ac_status); }; }; then
14924
14925
14926cat >>confdefs.h <<\_ACEOF
14927#define HAVE_DEVICE_MACROS 1
14928_ACEOF
14929
14930 echo "$as_me:$LINENO: result: yes" >&5
14931echo "${ECHO_T}yes" >&6
14932
14933else
14934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014935sed 's/^/| /' conftest.$ac_ext >&5
14936
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014937
14938 echo "$as_me:$LINENO: result: no" >&5
14939echo "${ECHO_T}no" >&6
14940
14941fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014943
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014944# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014945# for [no]getaddrinfo in netdb.h.
14946echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14947echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14948cat >conftest.$ac_ext <<_ACEOF
14949#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014950/* confdefs.h. */
14951_ACEOF
14952cat confdefs.h >>conftest.$ac_ext
14953cat >>conftest.$ac_ext <<_ACEOF
14954/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014955
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014956#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014957#include <sys/socket.h>
14958#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014959#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014960
Martin v. Löwis11437992002-04-12 09:54:03 +000014961int
14962main ()
14963{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014964
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014965getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014966
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ;
14968 return 0;
14969}
14970_ACEOF
14971rm -f conftest.$ac_objext conftest$ac_exeext
14972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14973 (eval $ac_link) 2>&5
14974 ac_status=$?
14975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976 (exit $ac_status); } &&
14977 { ac_try='test -s conftest$ac_exeext'
14978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14979 (eval $ac_try) 2>&5
14980 ac_status=$?
14981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14982 (exit $ac_status); }; }; then
14983
14984echo "$as_me:$LINENO: result: yes" >&5
14985echo "${ECHO_T}yes" >&6
14986echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14987echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014988if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 echo "$as_me:$LINENO: result: buggy" >&5
14990echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014991buggygetaddrinfo=yes
14992else
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 cat >conftest.$ac_ext <<_ACEOF
14994#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014995/* confdefs.h. */
14996_ACEOF
14997cat confdefs.h >>conftest.$ac_ext
14998cat >>conftest.$ac_ext <<_ACEOF
14999/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015000
15001#include <sys/types.h>
15002#include <netdb.h>
15003#include <string.h>
15004#include <sys/socket.h>
15005#include <netinet/in.h>
15006
15007main()
15008{
15009 int passive, gaierr, inet4 = 0, inet6 = 0;
15010 struct addrinfo hints, *ai, *aitop;
15011 char straddr[INET6_ADDRSTRLEN], strport[16];
15012
15013 for (passive = 0; passive <= 1; passive++) {
15014 memset(&hints, 0, sizeof(hints));
15015 hints.ai_family = AF_UNSPEC;
15016 hints.ai_flags = passive ? AI_PASSIVE : 0;
15017 hints.ai_socktype = SOCK_STREAM;
15018 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15019 (void)gai_strerror(gaierr);
15020 goto bad;
15021 }
15022 for (ai = aitop; ai; ai = ai->ai_next) {
15023 if (ai->ai_addr == NULL ||
15024 ai->ai_addrlen == 0 ||
15025 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15026 straddr, sizeof(straddr), strport, sizeof(strport),
15027 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15028 goto bad;
15029 }
15030 switch (ai->ai_family) {
15031 case AF_INET:
15032 if (strcmp(strport, "54321") != 0) {
15033 goto bad;
15034 }
15035 if (passive) {
15036 if (strcmp(straddr, "0.0.0.0") != 0) {
15037 goto bad;
15038 }
15039 } else {
15040 if (strcmp(straddr, "127.0.0.1") != 0) {
15041 goto bad;
15042 }
15043 }
15044 inet4++;
15045 break;
15046 case AF_INET6:
15047 if (strcmp(strport, "54321") != 0) {
15048 goto bad;
15049 }
15050 if (passive) {
15051 if (strcmp(straddr, "::") != 0) {
15052 goto bad;
15053 }
15054 } else {
15055 if (strcmp(straddr, "::1") != 0) {
15056 goto bad;
15057 }
15058 }
15059 inet6++;
15060 break;
15061 case AF_UNSPEC:
15062 goto bad;
15063 break;
15064 default:
15065 /* another family support? */
15066 break;
15067 }
15068 }
15069 }
15070
15071 if (!(inet4 == 0 || inet4 == 2))
15072 goto bad;
15073 if (!(inet6 == 0 || inet6 == 2))
15074 goto bad;
15075
15076 if (aitop)
15077 freeaddrinfo(aitop);
15078 exit(0);
15079
15080 bad:
15081 if (aitop)
15082 freeaddrinfo(aitop);
15083 exit(1);
15084}
15085
Martin v. Löwis11437992002-04-12 09:54:03 +000015086_ACEOF
15087rm -f conftest$ac_exeext
15088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15089 (eval $ac_link) 2>&5
15090 ac_status=$?
15091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15092 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15094 (eval $ac_try) 2>&5
15095 ac_status=$?
15096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15097 (exit $ac_status); }; }; then
15098 echo "$as_me:$LINENO: result: good" >&5
15099echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015100buggygetaddrinfo=no
15101else
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 echo "$as_me: program exited with status $ac_status" >&5
15103echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015104sed 's/^/| /' conftest.$ac_ext >&5
15105
Martin v. Löwis11437992002-04-12 09:54:03 +000015106( exit $ac_status )
15107echo "$as_me:$LINENO: result: buggy" >&5
15108echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015109buggygetaddrinfo=yes
15110fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015111rm -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 +000015112fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015113else
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 +000015117
15118echo "$as_me:$LINENO: result: no" >&5
15119echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015120buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015121
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015124
15125if test "$buggygetaddrinfo" = "yes"; then
15126 if test "$ipv6" = "yes"; then
15127 echo 'Fatal: You must get working getaddrinfo() function.'
15128 echo ' or you can specify "--disable-ipv6"'.
15129 exit 1
15130 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015131else
Martin v. Löwis11437992002-04-12 09:54:03 +000015132
15133cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015134#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015135_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015136
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015139for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015140do
Martin v. Löwis11437992002-04-12 09:54:03 +000015141as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15142echo "$as_me:$LINENO: checking for $ac_func" >&5
15143echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15144if eval "test \"\${$as_ac_var+set}\" = set"; then
15145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015146else
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 cat >conftest.$ac_ext <<_ACEOF
15148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015149/* confdefs.h. */
15150_ACEOF
15151cat confdefs.h >>conftest.$ac_ext
15152cat >>conftest.$ac_ext <<_ACEOF
15153/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015154/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015155 which can conflict with char $ac_func (); below.
15156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015157 <limits.h> exists even on freestanding compilers. Under hpux,
15158 including <limits.h> includes <sys/time.h> and causes problems
15159 checking for functions defined therein. */
15160#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015161# include <limits.h>
15162#else
15163# include <assert.h>
15164#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015165/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015166#ifdef __cplusplus
15167extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015168{
Martin v. Löwis11437992002-04-12 09:54:03 +000015169#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015170/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 builtin and then its argument prototype would still apply. */
15172char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015173/* The GNU C library defines this for functions which it implements
15174 to always fail with ENOSYS. Some functions are actually named
15175 something starting with __ and the normal name is an alias. */
15176#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15177choke me
15178#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015179char (*f) () = $ac_func;
15180#endif
15181#ifdef __cplusplus
15182}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015183#endif
15184
Skip Montanaro6dead952003-09-25 14:50:04 +000015185int
15186main ()
15187{
15188return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 ;
15190 return 0;
15191}
15192_ACEOF
15193rm -f conftest.$ac_objext conftest$ac_exeext
15194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15195 (eval $ac_link) 2>&5
15196 ac_status=$?
15197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15198 (exit $ac_status); } &&
15199 { ac_try='test -s conftest$ac_exeext'
15200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15201 (eval $ac_try) 2>&5
15202 ac_status=$?
15203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15204 (exit $ac_status); }; }; then
15205 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015206else
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015208sed 's/^/| /' conftest.$ac_ext >&5
15209
Martin v. Löwis11437992002-04-12 09:54:03 +000015210eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015214echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15215echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15216if test `eval echo '${'$as_ac_var'}'` = yes; then
15217 cat >>confdefs.h <<_ACEOF
15218#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15219_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015220
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015221fi
15222done
15223
Michael W. Hudson54241132001-12-07 15:38:26 +000015224
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015225# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015226echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15227echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15228if test "${ac_cv_header_time+set}" = set; then
15229 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015230else
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 cat >conftest.$ac_ext <<_ACEOF
15232#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015233/* confdefs.h. */
15234_ACEOF
15235cat confdefs.h >>conftest.$ac_ext
15236cat >>conftest.$ac_ext <<_ACEOF
15237/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015238#include <sys/types.h>
15239#include <sys/time.h>
15240#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
Martin v. Löwis11437992002-04-12 09:54:03 +000015242int
15243main ()
15244{
15245if ((struct tm *) 0)
15246return 0;
15247 ;
15248 return 0;
15249}
15250_ACEOF
15251rm -f conftest.$ac_objext
15252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15253 (eval $ac_compile) 2>&5
15254 ac_status=$?
15255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15256 (exit $ac_status); } &&
15257 { ac_try='test -s conftest.$ac_objext'
15258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15259 (eval $ac_try) 2>&5
15260 ac_status=$?
15261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015263 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015264else
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015266sed 's/^/| /' conftest.$ac_ext >&5
15267
Martin v. Löwis11437992002-04-12 09:54:03 +000015268ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015270rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015272echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15273echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015274if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015275
15276cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015277#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015279
15280fi
15281
Martin v. Löwis11437992002-04-12 09:54:03 +000015282echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15283echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15284if test "${ac_cv_struct_tm+set}" = set; then
15285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015286else
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 cat >conftest.$ac_ext <<_ACEOF
15288#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015289/* confdefs.h. */
15290_ACEOF
15291cat confdefs.h >>conftest.$ac_ext
15292cat >>conftest.$ac_ext <<_ACEOF
15293/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015294#include <sys/types.h>
15295#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015296
Martin v. Löwis11437992002-04-12 09:54:03 +000015297int
15298main ()
15299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015300struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ;
15302 return 0;
15303}
15304_ACEOF
15305rm -f conftest.$ac_objext
15306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15307 (eval $ac_compile) 2>&5
15308 ac_status=$?
15309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15310 (exit $ac_status); } &&
15311 { ac_try='test -s conftest.$ac_objext'
15312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15313 (eval $ac_try) 2>&5
15314 ac_status=$?
15315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15316 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015317 ac_cv_struct_tm=time.h
15318else
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015320sed 's/^/| /' conftest.$ac_ext >&5
15321
Martin v. Löwis11437992002-04-12 09:54:03 +000015322ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015324rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015326echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15327echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015328if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015329
15330cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015331#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015332_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015333
15334fi
15335
Martin v. Löwis11437992002-04-12 09:54:03 +000015336echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15337echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15338if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015340else
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 cat >conftest.$ac_ext <<_ACEOF
15342#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015343/* confdefs.h. */
15344_ACEOF
15345cat confdefs.h >>conftest.$ac_ext
15346cat >>conftest.$ac_ext <<_ACEOF
15347/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015348#include <sys/types.h>
15349#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015350
15351
Martin v. Löwis11437992002-04-12 09:54:03 +000015352int
15353main ()
15354{
15355static struct tm ac_aggr;
15356if (ac_aggr.tm_zone)
15357return 0;
15358 ;
15359 return 0;
15360}
15361_ACEOF
15362rm -f conftest.$ac_objext
15363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15364 (eval $ac_compile) 2>&5
15365 ac_status=$?
15366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15367 (exit $ac_status); } &&
15368 { ac_try='test -s conftest.$ac_objext'
15369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15370 (eval $ac_try) 2>&5
15371 ac_status=$?
15372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15373 (exit $ac_status); }; }; then
15374 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015375else
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015377sed 's/^/| /' conftest.$ac_ext >&5
15378
15379cat >conftest.$ac_ext <<_ACEOF
15380#line $LINENO "configure"
15381/* confdefs.h. */
15382_ACEOF
15383cat confdefs.h >>conftest.$ac_ext
15384cat >>conftest.$ac_ext <<_ACEOF
15385/* end confdefs.h. */
15386#include <sys/types.h>
15387#include <$ac_cv_struct_tm>
15388
15389
15390int
15391main ()
15392{
15393static struct tm ac_aggr;
15394if (sizeof ac_aggr.tm_zone)
15395return 0;
15396 ;
15397 return 0;
15398}
15399_ACEOF
15400rm -f conftest.$ac_objext
15401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15402 (eval $ac_compile) 2>&5
15403 ac_status=$?
15404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405 (exit $ac_status); } &&
15406 { ac_try='test -s conftest.$ac_objext'
15407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15408 (eval $ac_try) 2>&5
15409 ac_status=$?
15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15411 (exit $ac_status); }; }; then
15412 ac_cv_member_struct_tm_tm_zone=yes
15413else
15414 echo "$as_me: failed program was:" >&5
15415sed 's/^/| /' conftest.$ac_ext >&5
15416
Martin v. Löwis11437992002-04-12 09:54:03 +000015417ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015419rm -f conftest.$ac_objext conftest.$ac_ext
15420fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015421rm -f conftest.$ac_objext conftest.$ac_ext
15422fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015423echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15424echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
15425if test $ac_cv_member_struct_tm_tm_zone = yes; then
15426
15427cat >>confdefs.h <<_ACEOF
15428#define HAVE_STRUCT_TM_TM_ZONE 1
15429_ACEOF
15430
15431
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015433
Martin v. Löwis11437992002-04-12 09:54:03 +000015434if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15435
15436cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015437#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015438_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015439
15440else
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 echo "$as_me:$LINENO: checking for tzname" >&5
15442echo $ECHO_N "checking for tzname... $ECHO_C" >&6
15443if test "${ac_cv_var_tzname+set}" = set; then
15444 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015445else
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 cat >conftest.$ac_ext <<_ACEOF
15447#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015448/* confdefs.h. */
15449_ACEOF
15450cat confdefs.h >>conftest.$ac_ext
15451cat >>conftest.$ac_ext <<_ACEOF
15452/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015453#include <time.h>
15454#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015455extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015457
Martin v. Löwis11437992002-04-12 09:54:03 +000015458int
15459main ()
15460{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015461atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 ;
15463 return 0;
15464}
15465_ACEOF
15466rm -f conftest.$ac_objext conftest$ac_exeext
15467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15468 (eval $ac_link) 2>&5
15469 ac_status=$?
15470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15471 (exit $ac_status); } &&
15472 { ac_try='test -s conftest$ac_exeext'
15473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15474 (eval $ac_try) 2>&5
15475 ac_status=$?
15476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015478 ac_cv_var_tzname=yes
15479else
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015481sed 's/^/| /' conftest.$ac_ext >&5
15482
Martin v. Löwis11437992002-04-12 09:54:03 +000015483ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015487echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15488echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015489 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015490
15491cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015492#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015493_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015494
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015495 fi
15496fi
15497
Martin v. Löwis11437992002-04-12 09:54:03 +000015498echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
15499echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
15500if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
15501 echo $ECHO_N "(cached) $ECHO_C" >&6
15502else
15503 cat >conftest.$ac_ext <<_ACEOF
15504#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015505/* confdefs.h. */
15506_ACEOF
15507cat confdefs.h >>conftest.$ac_ext
15508cat >>conftest.$ac_ext <<_ACEOF
15509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015510$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015511int
15512main ()
15513{
15514static struct stat ac_aggr;
15515if (ac_aggr.st_rdev)
15516return 0;
15517 ;
15518 return 0;
15519}
15520_ACEOF
15521rm -f conftest.$ac_objext
15522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15523 (eval $ac_compile) 2>&5
15524 ac_status=$?
15525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15526 (exit $ac_status); } &&
15527 { ac_try='test -s conftest.$ac_objext'
15528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15529 (eval $ac_try) 2>&5
15530 ac_status=$?
15531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15532 (exit $ac_status); }; }; then
15533 ac_cv_member_struct_stat_st_rdev=yes
15534else
15535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015536sed 's/^/| /' conftest.$ac_ext >&5
15537
15538cat >conftest.$ac_ext <<_ACEOF
15539#line $LINENO "configure"
15540/* confdefs.h. */
15541_ACEOF
15542cat confdefs.h >>conftest.$ac_ext
15543cat >>conftest.$ac_ext <<_ACEOF
15544/* end confdefs.h. */
15545$ac_includes_default
15546int
15547main ()
15548{
15549static struct stat ac_aggr;
15550if (sizeof ac_aggr.st_rdev)
15551return 0;
15552 ;
15553 return 0;
15554}
15555_ACEOF
15556rm -f conftest.$ac_objext
15557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15558 (eval $ac_compile) 2>&5
15559 ac_status=$?
15560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15561 (exit $ac_status); } &&
15562 { ac_try='test -s conftest.$ac_objext'
15563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15564 (eval $ac_try) 2>&5
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567 (exit $ac_status); }; }; then
15568 ac_cv_member_struct_stat_st_rdev=yes
15569else
15570 echo "$as_me: failed program was:" >&5
15571sed 's/^/| /' conftest.$ac_ext >&5
15572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573ac_cv_member_struct_stat_st_rdev=no
15574fi
15575rm -f conftest.$ac_objext conftest.$ac_ext
15576fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015577rm -f conftest.$ac_objext conftest.$ac_ext
15578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015579echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
15580echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
15581if test $ac_cv_member_struct_stat_st_rdev = yes; then
15582
15583cat >>confdefs.h <<_ACEOF
15584#define HAVE_STRUCT_STAT_ST_RDEV 1
15585_ACEOF
15586
15587
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015588fi
15589
Martin v. Löwis11437992002-04-12 09:54:03 +000015590echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
15591echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
15592if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
15593 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015594else
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 cat >conftest.$ac_ext <<_ACEOF
15596#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015597/* confdefs.h. */
15598_ACEOF
15599cat confdefs.h >>conftest.$ac_ext
15600cat >>conftest.$ac_ext <<_ACEOF
15601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015602$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015603int
15604main ()
15605{
15606static struct stat ac_aggr;
15607if (ac_aggr.st_blksize)
15608return 0;
15609 ;
15610 return 0;
15611}
15612_ACEOF
15613rm -f conftest.$ac_objext
15614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15615 (eval $ac_compile) 2>&5
15616 ac_status=$?
15617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15618 (exit $ac_status); } &&
15619 { ac_try='test -s conftest.$ac_objext'
15620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15621 (eval $ac_try) 2>&5
15622 ac_status=$?
15623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15624 (exit $ac_status); }; }; then
15625 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015626else
Martin v. Löwis11437992002-04-12 09:54:03 +000015627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015628sed 's/^/| /' conftest.$ac_ext >&5
15629
15630cat >conftest.$ac_ext <<_ACEOF
15631#line $LINENO "configure"
15632/* confdefs.h. */
15633_ACEOF
15634cat confdefs.h >>conftest.$ac_ext
15635cat >>conftest.$ac_ext <<_ACEOF
15636/* end confdefs.h. */
15637$ac_includes_default
15638int
15639main ()
15640{
15641static struct stat ac_aggr;
15642if (sizeof ac_aggr.st_blksize)
15643return 0;
15644 ;
15645 return 0;
15646}
15647_ACEOF
15648rm -f conftest.$ac_objext
15649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15650 (eval $ac_compile) 2>&5
15651 ac_status=$?
15652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653 (exit $ac_status); } &&
15654 { ac_try='test -s conftest.$ac_objext'
15655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15656 (eval $ac_try) 2>&5
15657 ac_status=$?
15658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15659 (exit $ac_status); }; }; then
15660 ac_cv_member_struct_stat_st_blksize=yes
15661else
15662 echo "$as_me: failed program was:" >&5
15663sed 's/^/| /' conftest.$ac_ext >&5
15664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015667rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015668fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015669rm -f conftest.$ac_objext conftest.$ac_ext
15670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015671echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
15672echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
15673if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015674
Martin v. Löwis11437992002-04-12 09:54:03 +000015675cat >>confdefs.h <<_ACEOF
15676#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15677_ACEOF
15678
15679
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015680fi
15681
Martin v. Löwis11437992002-04-12 09:54:03 +000015682echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
15683echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
15684if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
15685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015686else
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 cat >conftest.$ac_ext <<_ACEOF
15688#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015689/* confdefs.h. */
15690_ACEOF
15691cat confdefs.h >>conftest.$ac_ext
15692cat >>conftest.$ac_ext <<_ACEOF
15693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015694$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015695int
15696main ()
15697{
15698static struct stat ac_aggr;
15699if (ac_aggr.st_blocks)
15700return 0;
15701 ;
15702 return 0;
15703}
15704_ACEOF
15705rm -f conftest.$ac_objext
15706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15707 (eval $ac_compile) 2>&5
15708 ac_status=$?
15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15710 (exit $ac_status); } &&
15711 { ac_try='test -s conftest.$ac_objext'
15712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15713 (eval $ac_try) 2>&5
15714 ac_status=$?
15715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); }; }; then
15717 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015718else
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015720sed 's/^/| /' conftest.$ac_ext >&5
15721
15722cat >conftest.$ac_ext <<_ACEOF
15723#line $LINENO "configure"
15724/* confdefs.h. */
15725_ACEOF
15726cat confdefs.h >>conftest.$ac_ext
15727cat >>conftest.$ac_ext <<_ACEOF
15728/* end confdefs.h. */
15729$ac_includes_default
15730int
15731main ()
15732{
15733static struct stat ac_aggr;
15734if (sizeof ac_aggr.st_blocks)
15735return 0;
15736 ;
15737 return 0;
15738}
15739_ACEOF
15740rm -f conftest.$ac_objext
15741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15742 (eval $ac_compile) 2>&5
15743 ac_status=$?
15744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15745 (exit $ac_status); } &&
15746 { ac_try='test -s conftest.$ac_objext'
15747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15748 (eval $ac_try) 2>&5
15749 ac_status=$?
15750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751 (exit $ac_status); }; }; then
15752 ac_cv_member_struct_stat_st_blocks=yes
15753else
15754 echo "$as_me: failed program was:" >&5
15755sed 's/^/| /' conftest.$ac_ext >&5
15756
Martin v. Löwis11437992002-04-12 09:54:03 +000015757ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015759rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015760fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015761rm -f conftest.$ac_objext conftest.$ac_ext
15762fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015763echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15764echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15765if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015766
Martin v. Löwis11437992002-04-12 09:54:03 +000015767cat >>confdefs.h <<_ACEOF
15768#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15769_ACEOF
15770
15771
15772cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015773#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015774_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015775
15776else
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015778fi
15779
Michael W. Hudson54241132001-12-07 15:38:26 +000015780
Martin v. Löwis11437992002-04-12 09:54:03 +000015781
15782echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15783echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15784if test "${ac_cv_header_time_altzone+set}" = set; then
15785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015786else
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 cat >conftest.$ac_ext <<_ACEOF
15788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015789/* confdefs.h. */
15790_ACEOF
15791cat confdefs.h >>conftest.$ac_ext
15792cat >>conftest.$ac_ext <<_ACEOF
15793/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015794#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015795int
15796main ()
15797{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015798return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 ;
15800 return 0;
15801}
15802_ACEOF
15803rm -f conftest.$ac_objext
15804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15805 (eval $ac_compile) 2>&5
15806 ac_status=$?
15807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15808 (exit $ac_status); } &&
15809 { ac_try='test -s conftest.$ac_objext'
15810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15811 (eval $ac_try) 2>&5
15812 ac_status=$?
15813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15814 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015815 ac_cv_header_time_altzone=yes
15816else
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015818sed 's/^/| /' conftest.$ac_ext >&5
15819
Martin v. Löwis11437992002-04-12 09:54:03 +000015820ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015822rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015823fi
15824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15826echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015827if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
15829cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015830#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015832
15833fi
15834
Guido van Rossumda88dad1995-01-26 00:46:29 +000015835was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015836echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15837echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15838cat >conftest.$ac_ext <<_ACEOF
15839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015840/* confdefs.h. */
15841_ACEOF
15842cat confdefs.h >>conftest.$ac_ext
15843cat >>conftest.$ac_ext <<_ACEOF
15844/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015845
15846#include <sys/types.h>
15847#include <sys/select.h>
15848#include <sys/time.h>
15849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850int
15851main ()
15852{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015853;
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 ;
15855 return 0;
15856}
15857_ACEOF
15858rm -f conftest.$ac_objext
15859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15860 (eval $ac_compile) 2>&5
15861 ac_status=$?
15862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15863 (exit $ac_status); } &&
15864 { ac_try='test -s conftest.$ac_objext'
15865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15866 (eval $ac_try) 2>&5
15867 ac_status=$?
15868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15869 (exit $ac_status); }; }; then
15870
15871
15872cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015873#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015874_ACEOF
15875
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015876 was_it_defined=yes
15877
Guido van Rossumf78abae1997-01-21 22:02:36 +000015878else
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015880sed 's/^/| /' conftest.$ac_ext >&5
15881
Guido van Rossum7f43da71994-08-01 12:15:30 +000015882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015883rm -f conftest.$ac_objext conftest.$ac_ext
15884echo "$as_me:$LINENO: result: $was_it_defined" >&5
15885echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887echo "$as_me:$LINENO: checking for addrinfo" >&5
15888echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15889if test "${ac_cv_struct_addrinfo+set}" = set; then
15890 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015891else
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 cat >conftest.$ac_ext <<_ACEOF
15893#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015894/* confdefs.h. */
15895_ACEOF
15896cat confdefs.h >>conftest.$ac_ext
15897cat >>conftest.$ac_ext <<_ACEOF
15898/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015899
15900# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015901int
15902main ()
15903{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015904struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015905 ;
15906 return 0;
15907}
15908_ACEOF
15909rm -f conftest.$ac_objext
15910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15911 (eval $ac_compile) 2>&5
15912 ac_status=$?
15913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15914 (exit $ac_status); } &&
15915 { ac_try='test -s conftest.$ac_objext'
15916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15917 (eval $ac_try) 2>&5
15918 ac_status=$?
15919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15920 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015921 ac_cv_struct_addrinfo=yes
15922else
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015924sed 's/^/| /' conftest.$ac_ext >&5
15925
Martin v. Löwis11437992002-04-12 09:54:03 +000015926ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015928rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015929fi
15930
Martin v. Löwis11437992002-04-12 09:54:03 +000015931echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15932echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015933if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015934
15935cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015936#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015937_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015938
15939fi
15940
Martin v. Löwis11437992002-04-12 09:54:03 +000015941echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15942echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15943if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15944 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015945else
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 cat >conftest.$ac_ext <<_ACEOF
15947#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015953
15954# include <sys/types.h>
15955# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015956int
15957main ()
15958{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015959struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 ;
15961 return 0;
15962}
15963_ACEOF
15964rm -f conftest.$ac_objext
15965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15966 (eval $ac_compile) 2>&5
15967 ac_status=$?
15968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15969 (exit $ac_status); } &&
15970 { ac_try='test -s conftest.$ac_objext'
15971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15972 (eval $ac_try) 2>&5
15973 ac_status=$?
15974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15975 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015976 ac_cv_struct_sockaddr_storage=yes
15977else
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015979sed 's/^/| /' conftest.$ac_ext >&5
15980
Martin v. Löwis11437992002-04-12 09:54:03 +000015981ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015983rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015984fi
15985
Martin v. Löwis11437992002-04-12 09:54:03 +000015986echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15987echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015988if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015989
15990cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015991#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015992_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015993
15994fi
15995
Guido van Rossum627b2d71993-12-24 10:39:16 +000015996# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015997
Michael W. Hudson54241132001-12-07 15:38:26 +000015998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16000echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16001if test "${ac_cv_c_char_unsigned+set}" = set; then
16002 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016003else
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 cat >conftest.$ac_ext <<_ACEOF
16005#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016006/* confdefs.h. */
16007_ACEOF
16008cat confdefs.h >>conftest.$ac_ext
16009cat >>conftest.$ac_ext <<_ACEOF
16010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016011$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016012int
16013main ()
16014{
16015static int test_array [1 - 2 * !(((char) -1) < 0)];
16016test_array [0] = 0
16017
16018 ;
16019 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016020}
Martin v. Löwis11437992002-04-12 09:54:03 +000016021_ACEOF
16022rm -f conftest.$ac_objext
16023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16024 (eval $ac_compile) 2>&5
16025 ac_status=$?
16026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16027 (exit $ac_status); } &&
16028 { ac_try='test -s conftest.$ac_objext'
16029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16030 (eval $ac_try) 2>&5
16031 ac_status=$?
16032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16033 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016034 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016035else
16036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016037sed 's/^/| /' conftest.$ac_ext >&5
16038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016041rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016043echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16044echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016045if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016047#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016048_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016049
16050fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016051
Martin v. Löwis11437992002-04-12 09:54:03 +000016052echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16053echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16054if test "${ac_cv_c_const+set}" = set; then
16055 echo $ECHO_N "(cached) $ECHO_C" >&6
16056else
16057 cat >conftest.$ac_ext <<_ACEOF
16058#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016059/* confdefs.h. */
16060_ACEOF
16061cat confdefs.h >>conftest.$ac_ext
16062cat >>conftest.$ac_ext <<_ACEOF
16063/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016064
Martin v. Löwis11437992002-04-12 09:54:03 +000016065int
16066main ()
16067{
16068/* FIXME: Include the comments suggested by Paul. */
16069#ifndef __cplusplus
16070 /* Ultrix mips cc rejects this. */
16071 typedef int charset[2];
16072 const charset x;
16073 /* SunOS 4.1.1 cc rejects this. */
16074 char const *const *ccp;
16075 char **p;
16076 /* NEC SVR4.0.2 mips cc rejects this. */
16077 struct point {int x, y;};
16078 static struct point const zero = {0,0};
16079 /* AIX XL C 1.02.0.0 rejects this.
16080 It does not let you subtract one const X* pointer from another in
16081 an arm of an if-expression whose if-part is not a constant
16082 expression */
16083 const char *g = "string";
16084 ccp = &g + (g ? g-g : 0);
16085 /* HPUX 7.0 cc rejects these. */
16086 ++ccp;
16087 p = (char**) ccp;
16088 ccp = (char const *const *) p;
16089 { /* SCO 3.2v4 cc rejects this. */
16090 char *t;
16091 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016092
Martin v. Löwis11437992002-04-12 09:54:03 +000016093 *t++ = 0;
16094 }
16095 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16096 int x[] = {25, 17};
16097 const int *foo = &x[0];
16098 ++foo;
16099 }
16100 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16101 typedef const int *iptr;
16102 iptr p = 0;
16103 ++p;
16104 }
16105 { /* AIX XL C 1.02.0.0 rejects this saying
16106 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16107 struct s { int j; const int *ap[3]; };
16108 struct s *b; b->j = 5;
16109 }
16110 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16111 const int foo = 10;
16112 }
16113#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016114
Martin v. Löwis11437992002-04-12 09:54:03 +000016115 ;
16116 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016117}
Martin v. Löwis11437992002-04-12 09:54:03 +000016118_ACEOF
16119rm -f conftest.$ac_objext
16120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16121 (eval $ac_compile) 2>&5
16122 ac_status=$?
16123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16124 (exit $ac_status); } &&
16125 { ac_try='test -s conftest.$ac_objext'
16126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16127 (eval $ac_try) 2>&5
16128 ac_status=$?
16129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16130 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016131 ac_cv_c_const=yes
16132else
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016134sed 's/^/| /' conftest.$ac_ext >&5
16135
Martin v. Löwis11437992002-04-12 09:54:03 +000016136ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016138rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016140echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16141echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016142if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016143
16144cat >>confdefs.h <<\_ACEOF
16145#define const
16146_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016147
16148fi
16149
Michael W. Hudson54241132001-12-07 15:38:26 +000016150
Guido van Rossumda88dad1995-01-26 00:46:29 +000016151works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016152echo "$as_me:$LINENO: checking for working volatile" >&5
16153echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16154cat >conftest.$ac_ext <<_ACEOF
16155#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016156/* confdefs.h. */
16157_ACEOF
16158cat confdefs.h >>conftest.$ac_ext
16159cat >>conftest.$ac_ext <<_ACEOF
16160/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016161
Martin v. Löwis11437992002-04-12 09:54:03 +000016162int
16163main ()
16164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016165volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016166 ;
16167 return 0;
16168}
16169_ACEOF
16170rm -f conftest.$ac_objext
16171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16172 (eval $ac_compile) 2>&5
16173 ac_status=$?
16174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16175 (exit $ac_status); } &&
16176 { ac_try='test -s conftest.$ac_objext'
16177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16178 (eval $ac_try) 2>&5
16179 ac_status=$?
16180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16181 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016182 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016183else
Martin v. Löwis11437992002-04-12 09:54:03 +000016184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016185sed 's/^/| /' conftest.$ac_ext >&5
16186
Martin v. Löwis11437992002-04-12 09:54:03 +000016187
16188cat >>confdefs.h <<\_ACEOF
16189#define volatile
16190_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016191
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016192
Guido van Rossum627b2d71993-12-24 10:39:16 +000016193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016194rm -f conftest.$ac_objext conftest.$ac_ext
16195echo "$as_me:$LINENO: result: $works" >&5
16196echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016197
Guido van Rossumda88dad1995-01-26 00:46:29 +000016198works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016199echo "$as_me:$LINENO: checking for working signed char" >&5
16200echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16201cat >conftest.$ac_ext <<_ACEOF
16202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016203/* confdefs.h. */
16204_ACEOF
16205cat confdefs.h >>conftest.$ac_ext
16206cat >>conftest.$ac_ext <<_ACEOF
16207/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016208
Martin v. Löwis11437992002-04-12 09:54:03 +000016209int
16210main ()
16211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016212signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 ;
16214 return 0;
16215}
16216_ACEOF
16217rm -f conftest.$ac_objext
16218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16219 (eval $ac_compile) 2>&5
16220 ac_status=$?
16221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222 (exit $ac_status); } &&
16223 { ac_try='test -s conftest.$ac_objext'
16224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16225 (eval $ac_try) 2>&5
16226 ac_status=$?
16227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16228 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016229 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016230else
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016232sed 's/^/| /' conftest.$ac_ext >&5
16233
Martin v. Löwis11437992002-04-12 09:54:03 +000016234
16235cat >>confdefs.h <<\_ACEOF
16236#define signed
16237_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016238
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016239
Guido van Rossum7f43da71994-08-01 12:15:30 +000016240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016241rm -f conftest.$ac_objext conftest.$ac_ext
16242echo "$as_me:$LINENO: result: $works" >&5
16243echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016244
Guido van Rossumda88dad1995-01-26 00:46:29 +000016245have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016246echo "$as_me:$LINENO: checking for prototypes" >&5
16247echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
16248cat >conftest.$ac_ext <<_ACEOF
16249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016250/* confdefs.h. */
16251_ACEOF
16252cat confdefs.h >>conftest.$ac_ext
16253cat >>conftest.$ac_ext <<_ACEOF
16254/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016255int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016256int
16257main ()
16258{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016259return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016260 ;
16261 return 0;
16262}
16263_ACEOF
16264rm -f conftest.$ac_objext
16265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16266 (eval $ac_compile) 2>&5
16267 ac_status=$?
16268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16269 (exit $ac_status); } &&
16270 { ac_try='test -s conftest.$ac_objext'
16271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16272 (eval $ac_try) 2>&5
16273 ac_status=$?
16274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16275 (exit $ac_status); }; }; then
16276
16277
16278cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016279#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016280_ACEOF
16281
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016282 have_prototypes=yes
16283
Guido van Rossumf78abae1997-01-21 22:02:36 +000016284else
Martin v. Löwis11437992002-04-12 09:54:03 +000016285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016286sed 's/^/| /' conftest.$ac_ext >&5
16287
Guido van Rossum7f43da71994-08-01 12:15:30 +000016288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016289rm -f conftest.$ac_objext conftest.$ac_ext
16290echo "$as_me:$LINENO: result: $have_prototypes" >&5
16291echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016292
Guido van Rossumda88dad1995-01-26 00:46:29 +000016293works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016294echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
16295echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
16296cat >conftest.$ac_ext <<_ACEOF
16297#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016298/* confdefs.h. */
16299_ACEOF
16300cat confdefs.h >>conftest.$ac_ext
16301cat >>conftest.$ac_ext <<_ACEOF
16302/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016303
16304#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016305int foo(int x, ...) {
16306 va_list va;
16307 va_start(va, x);
16308 va_arg(va, int);
16309 va_arg(va, char *);
16310 va_arg(va, double);
16311 return 0;
16312}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016313
Martin v. Löwis11437992002-04-12 09:54:03 +000016314int
16315main ()
16316{
Guido van Rossum90eea071996-08-30 20:58:57 +000016317return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016318 ;
16319 return 0;
16320}
16321_ACEOF
16322rm -f conftest.$ac_objext
16323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16324 (eval $ac_compile) 2>&5
16325 ac_status=$?
16326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16327 (exit $ac_status); } &&
16328 { ac_try='test -s conftest.$ac_objext'
16329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16330 (eval $ac_try) 2>&5
16331 ac_status=$?
16332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16333 (exit $ac_status); }; }; then
16334
16335
16336cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016337#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016338_ACEOF
16339
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016340 works=yes
16341
Guido van Rossumf78abae1997-01-21 22:02:36 +000016342else
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016344sed 's/^/| /' conftest.$ac_ext >&5
16345
Guido van Rossum627b2d71993-12-24 10:39:16 +000016346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016347rm -f conftest.$ac_objext conftest.$ac_ext
16348echo "$as_me:$LINENO: result: $works" >&5
16349echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016350
Guido van Rossumda88dad1995-01-26 00:46:29 +000016351if test "$have_prototypes" = yes; then
16352bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016353echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
16354echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
16355cat >conftest.$ac_ext <<_ACEOF
16356#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016357/* confdefs.h. */
16358_ACEOF
16359cat confdefs.h >>conftest.$ac_ext
16360cat >>conftest.$ac_ext <<_ACEOF
16361/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016362#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016363int
16364main ()
16365{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016366char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 ;
16368 return 0;
16369}
16370_ACEOF
16371rm -f conftest.$ac_objext
16372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16373 (eval $ac_compile) 2>&5
16374 ac_status=$?
16375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16376 (exit $ac_status); } &&
16377 { ac_try='test -s conftest.$ac_objext'
16378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16379 (eval $ac_try) 2>&5
16380 ac_status=$?
16381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16382 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016383 :
16384else
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016386sed 's/^/| /' conftest.$ac_ext >&5
16387
Martin v. Löwis11437992002-04-12 09:54:03 +000016388
16389cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016390#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016391_ACEOF
16392
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016393 bad_prototypes=yes
16394
Guido van Rossum627b2d71993-12-24 10:39:16 +000016395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016396rm -f conftest.$ac_objext conftest.$ac_ext
16397echo "$as_me:$LINENO: result: $bad_prototypes" >&5
16398echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016399fi
16400
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016401# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000016402echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
16403echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
16404cat >conftest.$ac_ext <<_ACEOF
16405#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016406/* confdefs.h. */
16407_ACEOF
16408cat confdefs.h >>conftest.$ac_ext
16409cat >>conftest.$ac_ext <<_ACEOF
16410/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016411#include <sys/types.h>
16412#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016413int
16414main ()
16415{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016416struct sockaddr x;
16417x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016418 ;
16419 return 0;
16420}
16421_ACEOF
16422rm -f conftest.$ac_objext
16423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16424 (eval $ac_compile) 2>&5
16425 ac_status=$?
16426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16427 (exit $ac_status); } &&
16428 { ac_try='test -s conftest.$ac_objext'
16429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16430 (eval $ac_try) 2>&5
16431 ac_status=$?
16432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16433 (exit $ac_status); }; }; then
16434 echo "$as_me:$LINENO: result: yes" >&5
16435echo "${ECHO_T}yes" >&6
16436
16437cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016438#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016439_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016440
16441else
Martin v. Löwis11437992002-04-12 09:54:03 +000016442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016443sed 's/^/| /' conftest.$ac_ext >&5
16444
Martin v. Löwis11437992002-04-12 09:54:03 +000016445echo "$as_me:$LINENO: result: no" >&5
16446echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016448rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016449
Guido van Rossumda88dad1995-01-26 00:46:29 +000016450va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016451echo "$as_me:$LINENO: checking whether va_list is an array" >&5
16452echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
16453cat >conftest.$ac_ext <<_ACEOF
16454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016455/* confdefs.h. */
16456_ACEOF
16457cat confdefs.h >>conftest.$ac_ext
16458cat >>conftest.$ac_ext <<_ACEOF
16459/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016460
16461#ifdef HAVE_STDARG_PROTOTYPES
16462#include <stdarg.h>
16463#else
16464#include <varargs.h>
16465#endif
16466
Martin v. Löwis11437992002-04-12 09:54:03 +000016467int
16468main ()
16469{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016470va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 ;
16472 return 0;
16473}
16474_ACEOF
16475rm -f conftest.$ac_objext
16476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16477 (eval $ac_compile) 2>&5
16478 ac_status=$?
16479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16480 (exit $ac_status); } &&
16481 { ac_try='test -s conftest.$ac_objext'
16482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16483 (eval $ac_try) 2>&5
16484 ac_status=$?
16485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16486 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016487 :
16488else
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016490sed 's/^/| /' conftest.$ac_ext >&5
16491
Martin v. Löwis11437992002-04-12 09:54:03 +000016492
16493
16494cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016495#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016496_ACEOF
16497
Guido van Rossumda88dad1995-01-26 00:46:29 +000016498 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016499
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016500fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016501rm -f conftest.$ac_objext conftest.$ac_ext
16502echo "$as_me:$LINENO: result: $va_list_is_array" >&5
16503echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016504
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016505# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016506
16507
16508
16509echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
16510echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
16511if test "${ac_cv_func_gethostbyname_r+set}" = set; then
16512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016513else
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 cat >conftest.$ac_ext <<_ACEOF
16515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016516/* confdefs.h. */
16517_ACEOF
16518cat confdefs.h >>conftest.$ac_ext
16519cat >>conftest.$ac_ext <<_ACEOF
16520/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016521/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016522 which can conflict with char gethostbyname_r (); below.
16523 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016524 <limits.h> exists even on freestanding compilers. Under hpux,
16525 including <limits.h> includes <sys/time.h> and causes problems
16526 checking for functions defined therein. */
16527#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016528# include <limits.h>
16529#else
16530# include <assert.h>
16531#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016532/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016533#ifdef __cplusplus
16534extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016535{
Martin v. Löwis11437992002-04-12 09:54:03 +000016536#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016537/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 builtin and then its argument prototype would still apply. */
16539char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016540/* The GNU C library defines this for functions which it implements
16541 to always fail with ENOSYS. Some functions are actually named
16542 something starting with __ and the normal name is an alias. */
16543#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
16544choke me
16545#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016546char (*f) () = gethostbyname_r;
16547#endif
16548#ifdef __cplusplus
16549}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016550#endif
16551
Skip Montanaro6dead952003-09-25 14:50:04 +000016552int
16553main ()
16554{
16555return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 ;
16557 return 0;
16558}
16559_ACEOF
16560rm -f conftest.$ac_objext conftest$ac_exeext
16561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16562 (eval $ac_link) 2>&5
16563 ac_status=$?
16564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16565 (exit $ac_status); } &&
16566 { ac_try='test -s conftest$ac_exeext'
16567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16568 (eval $ac_try) 2>&5
16569 ac_status=$?
16570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16571 (exit $ac_status); }; }; then
16572 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016573else
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016575sed 's/^/| /' conftest.$ac_ext >&5
16576
Martin v. Löwis11437992002-04-12 09:54:03 +000016577ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016579rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016581echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
16582echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
16583if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016584
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016586#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016587_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016588
Martin v. Löwis11437992002-04-12 09:54:03 +000016589 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
16590echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016591 OLD_CFLAGS=$CFLAGS
16592 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 cat >conftest.$ac_ext <<_ACEOF
16594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016595/* confdefs.h. */
16596_ACEOF
16597cat confdefs.h >>conftest.$ac_ext
16598cat >>conftest.$ac_ext <<_ACEOF
16599/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016600
16601# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016602
Martin v. Löwis11437992002-04-12 09:54:03 +000016603int
16604main ()
16605{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016606
16607 char *name;
16608 struct hostent *he, *res;
16609 char buffer[2048];
16610 int buflen = 2048;
16611 int h_errnop;
16612
16613 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016614
16615 ;
16616 return 0;
16617}
16618_ACEOF
16619rm -f conftest.$ac_objext
16620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16621 (eval $ac_compile) 2>&5
16622 ac_status=$?
16623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16624 (exit $ac_status); } &&
16625 { ac_try='test -s conftest.$ac_objext'
16626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16627 (eval $ac_try) 2>&5
16628 ac_status=$?
16629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16630 (exit $ac_status); }; }; then
16631
16632 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016633#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016634_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016635
Martin v. Löwis11437992002-04-12 09:54:03 +000016636
16637cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016638#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016639_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016640
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 echo "$as_me:$LINENO: result: yes" >&5
16642echo "${ECHO_T}yes" >&6
16643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016644else
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016646sed 's/^/| /' conftest.$ac_ext >&5
16647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648
16649 echo "$as_me:$LINENO: result: no" >&5
16650echo "${ECHO_T}no" >&6
16651 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
16652echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
16653 cat >conftest.$ac_ext <<_ACEOF
16654#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016655/* confdefs.h. */
16656_ACEOF
16657cat confdefs.h >>conftest.$ac_ext
16658cat >>conftest.$ac_ext <<_ACEOF
16659/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016660
16661# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016662
Martin v. Löwis11437992002-04-12 09:54:03 +000016663int
16664main ()
16665{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016666
16667 char *name;
16668 struct hostent *he;
16669 char buffer[2048];
16670 int buflen = 2048;
16671 int h_errnop;
16672
16673 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016674
16675 ;
16676 return 0;
16677}
16678_ACEOF
16679rm -f conftest.$ac_objext
16680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16681 (eval $ac_compile) 2>&5
16682 ac_status=$?
16683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16684 (exit $ac_status); } &&
16685 { ac_try='test -s conftest.$ac_objext'
16686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16687 (eval $ac_try) 2>&5
16688 ac_status=$?
16689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16690 (exit $ac_status); }; }; then
16691
16692 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016693#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016694_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696
16697cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016698#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016699_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016700
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 echo "$as_me:$LINENO: result: yes" >&5
16702echo "${ECHO_T}yes" >&6
16703
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016704else
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016706sed 's/^/| /' conftest.$ac_ext >&5
16707
Martin v. Löwis11437992002-04-12 09:54:03 +000016708
16709 echo "$as_me:$LINENO: result: no" >&5
16710echo "${ECHO_T}no" >&6
16711 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16712echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16713 cat >conftest.$ac_ext <<_ACEOF
16714#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016715/* confdefs.h. */
16716_ACEOF
16717cat confdefs.h >>conftest.$ac_ext
16718cat >>conftest.$ac_ext <<_ACEOF
16719/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016720
16721# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016722
Martin v. Löwis11437992002-04-12 09:54:03 +000016723int
16724main ()
16725{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016726
16727 char *name;
16728 struct hostent *he;
16729 struct hostent_data data;
16730
16731 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016732
16733 ;
16734 return 0;
16735}
16736_ACEOF
16737rm -f conftest.$ac_objext
16738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16739 (eval $ac_compile) 2>&5
16740 ac_status=$?
16741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16742 (exit $ac_status); } &&
16743 { ac_try='test -s conftest.$ac_objext'
16744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16745 (eval $ac_try) 2>&5
16746 ac_status=$?
16747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16748 (exit $ac_status); }; }; then
16749
16750 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016751#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016752_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016753
Martin v. Löwis11437992002-04-12 09:54:03 +000016754
16755cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016756#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016757_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016758
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 echo "$as_me:$LINENO: result: yes" >&5
16760echo "${ECHO_T}yes" >&6
16761
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016762else
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016764sed 's/^/| /' conftest.$ac_ext >&5
16765
Martin v. Löwis11437992002-04-12 09:54:03 +000016766
16767 echo "$as_me:$LINENO: result: no" >&5
16768echo "${ECHO_T}no" >&6
16769
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016771rm -f conftest.$ac_objext conftest.$ac_ext
16772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016774rm -f conftest.$ac_objext conftest.$ac_ext
16775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016776fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016777rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016778 CFLAGS=$OLD_CFLAGS
16779
16780else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016781
Martin v. Löwis11437992002-04-12 09:54:03 +000016782
16783for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016784do
Martin v. Löwis11437992002-04-12 09:54:03 +000016785as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16786echo "$as_me:$LINENO: checking for $ac_func" >&5
16787echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16788if eval "test \"\${$as_ac_var+set}\" = set"; then
16789 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016790else
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 cat >conftest.$ac_ext <<_ACEOF
16792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016793/* confdefs.h. */
16794_ACEOF
16795cat confdefs.h >>conftest.$ac_ext
16796cat >>conftest.$ac_ext <<_ACEOF
16797/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016798/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016799 which can conflict with char $ac_func (); below.
16800 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016801 <limits.h> exists even on freestanding compilers. Under hpux,
16802 including <limits.h> includes <sys/time.h> and causes problems
16803 checking for functions defined therein. */
16804#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016805# include <limits.h>
16806#else
16807# include <assert.h>
16808#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016809/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016810#ifdef __cplusplus
16811extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016812{
Martin v. Löwis11437992002-04-12 09:54:03 +000016813#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016814/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 builtin and then its argument prototype would still apply. */
16816char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016817/* The GNU C library defines this for functions which it implements
16818 to always fail with ENOSYS. Some functions are actually named
16819 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016820#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016821choke me
16822#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016823char (*f) () = $ac_func;
16824#endif
16825#ifdef __cplusplus
16826}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016827#endif
16828
Skip Montanaro6dead952003-09-25 14:50:04 +000016829int
16830main ()
16831{
16832return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 ;
16834 return 0;
16835}
16836_ACEOF
16837rm -f conftest.$ac_objext conftest$ac_exeext
16838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16839 (eval $ac_link) 2>&5
16840 ac_status=$?
16841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16842 (exit $ac_status); } &&
16843 { ac_try='test -s conftest$ac_exeext'
16844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16845 (eval $ac_try) 2>&5
16846 ac_status=$?
16847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16848 (exit $ac_status); }; }; then
16849 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016850else
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016852sed 's/^/| /' conftest.$ac_ext >&5
16853
Martin v. Löwis11437992002-04-12 09:54:03 +000016854eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016856rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016858echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16859echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16860if test `eval echo '${'$as_ac_var'}'` = yes; then
16861 cat >>confdefs.h <<_ACEOF
16862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16863_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016864
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016865fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016866done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016867
Michael W. Hudson54241132001-12-07 15:38:26 +000016868
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016869fi
16870
Michael W. Hudson54241132001-12-07 15:38:26 +000016871
16872
16873
16874
16875
16876
Guido van Rossum627b2d71993-12-24 10:39:16 +000016877# checks for system services
16878# (none yet)
16879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016880# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016881echo "$as_me:$LINENO: checking for __fpu_control" >&5
16882echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16883if test "${ac_cv_func___fpu_control+set}" = set; then
16884 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016885else
Martin v. Löwis11437992002-04-12 09:54:03 +000016886 cat >conftest.$ac_ext <<_ACEOF
16887#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016888/* confdefs.h. */
16889_ACEOF
16890cat confdefs.h >>conftest.$ac_ext
16891cat >>conftest.$ac_ext <<_ACEOF
16892/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016893/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016894 which can conflict with char __fpu_control (); below.
16895 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016896 <limits.h> exists even on freestanding compilers. Under hpux,
16897 including <limits.h> includes <sys/time.h> and causes problems
16898 checking for functions defined therein. */
16899#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016900# include <limits.h>
16901#else
16902# include <assert.h>
16903#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016904/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016905#ifdef __cplusplus
16906extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016907{
Martin v. Löwis11437992002-04-12 09:54:03 +000016908#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016909/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 builtin and then its argument prototype would still apply. */
16911char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016912/* The GNU C library defines this for functions which it implements
16913 to always fail with ENOSYS. Some functions are actually named
16914 something starting with __ and the normal name is an alias. */
16915#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16916choke me
16917#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016918char (*f) () = __fpu_control;
16919#endif
16920#ifdef __cplusplus
16921}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016922#endif
16923
Skip Montanaro6dead952003-09-25 14:50:04 +000016924int
16925main ()
16926{
16927return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 ;
16929 return 0;
16930}
16931_ACEOF
16932rm -f conftest.$ac_objext conftest$ac_exeext
16933if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16934 (eval $ac_link) 2>&5
16935 ac_status=$?
16936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16937 (exit $ac_status); } &&
16938 { ac_try='test -s conftest$ac_exeext'
16939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16940 (eval $ac_try) 2>&5
16941 ac_status=$?
16942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16943 (exit $ac_status); }; }; then
16944 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016945else
Martin v. Löwis11437992002-04-12 09:54:03 +000016946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016947sed 's/^/| /' conftest.$ac_ext >&5
16948
Martin v. Löwis11437992002-04-12 09:54:03 +000016949ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016951rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016953echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16954echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16955if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016956 :
16957else
Martin v. Löwis11437992002-04-12 09:54:03 +000016958
16959echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16960echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16961if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016963else
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016965LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016966cat >conftest.$ac_ext <<_ACEOF
16967#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016968/* confdefs.h. */
16969_ACEOF
16970cat confdefs.h >>conftest.$ac_ext
16971cat >>conftest.$ac_ext <<_ACEOF
16972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016973
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016974/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016975#ifdef __cplusplus
16976extern "C"
16977#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016978/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016979 builtin and then its argument prototype would still apply. */
16980char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016981int
16982main ()
16983{
16984__fpu_control ();
16985 ;
16986 return 0;
16987}
16988_ACEOF
16989rm -f conftest.$ac_objext conftest$ac_exeext
16990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16991 (eval $ac_link) 2>&5
16992 ac_status=$?
16993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16994 (exit $ac_status); } &&
16995 { ac_try='test -s conftest$ac_exeext'
16996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16997 (eval $ac_try) 2>&5
16998 ac_status=$?
16999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17000 (exit $ac_status); }; }; then
17001 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017002else
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017004sed 's/^/| /' conftest.$ac_ext >&5
17005
Martin v. Löwis11437992002-04-12 09:54:03 +000017006ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017008rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17009LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017011echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17012echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17013if test $ac_cv_lib_ieee___fpu_control = yes; then
17014 cat >>confdefs.h <<_ACEOF
17015#define HAVE_LIBIEEE 1
17016_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017017
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017018 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017019
Guido van Rossum627b2d71993-12-24 10:39:16 +000017020fi
17021
Michael W. Hudson54241132001-12-07 15:38:26 +000017022
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017023fi
17024
Michael W. Hudson54241132001-12-07 15:38:26 +000017025
Guido van Rossum7f253911997-05-09 02:42:48 +000017026# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017027echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17028echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17029
Guido van Rossum7f253911997-05-09 02:42:48 +000017030# Check whether --with-fpectl or --without-fpectl was given.
17031if test "${with_fpectl+set}" = set; then
17032 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017033
Guido van Rossum7f253911997-05-09 02:42:48 +000017034if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017035then
17036
17037cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017038#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017039_ACEOF
17040
17041 echo "$as_me:$LINENO: result: yes" >&5
17042echo "${ECHO_T}yes" >&6
17043else echo "$as_me:$LINENO: result: no" >&5
17044echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017045fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017046else
Martin v. Löwis11437992002-04-12 09:54:03 +000017047 echo "$as_me:$LINENO: result: no" >&5
17048echo "${ECHO_T}no" >&6
17049fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017050
Guido van Rossum7f43da71994-08-01 12:15:30 +000017051# check for --with-libm=...
17052
Guido van Rossum563e7081996-09-10 18:20:48 +000017053case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017054Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017055BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017056*) LIBM=-lm
17057esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017058echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17059echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17060
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017061# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017062if test "${with_libm+set}" = set; then
17063 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017064
Guido van Rossum7f253911997-05-09 02:42:48 +000017065if test "$withval" = no
17066then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017067 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17068echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017069elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017070then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017071 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17072echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17073else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17074echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17075 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017076fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017077else
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17079echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17080fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017081
17082# check for --with-libc=...
17083
Martin v. Löwis11437992002-04-12 09:54:03 +000017084echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
17085echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
17086
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017087# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017088if test "${with_libc+set}" = set; then
17089 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000017090
Guido van Rossum7f253911997-05-09 02:42:48 +000017091if test "$withval" = no
17092then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000017093 echo "$as_me:$LINENO: result: force LIBC empty" >&5
17094echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017095elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017096then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017097 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
17098echo "${ECHO_T}set LIBC=\"$withval\"" >&6
17099else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
17100echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
17101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017102fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017103else
Martin v. Löwis11437992002-04-12 09:54:03 +000017104 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
17105echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
17106fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017107
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017108# check for hypot() in math library
17109LIBS_SAVE=$LIBS
17110LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000017111
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017112for ac_func in hypot
17113do
Martin v. Löwis11437992002-04-12 09:54:03 +000017114as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17115echo "$as_me:$LINENO: checking for $ac_func" >&5
17116echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17117if eval "test \"\${$as_ac_var+set}\" = set"; then
17118 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017119else
Martin v. Löwis11437992002-04-12 09:54:03 +000017120 cat >conftest.$ac_ext <<_ACEOF
17121#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017122/* confdefs.h. */
17123_ACEOF
17124cat confdefs.h >>conftest.$ac_ext
17125cat >>conftest.$ac_ext <<_ACEOF
17126/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017127/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017128 which can conflict with char $ac_func (); below.
17129 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017130 <limits.h> exists even on freestanding compilers. Under hpux,
17131 including <limits.h> includes <sys/time.h> and causes problems
17132 checking for functions defined therein. */
17133#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017134# include <limits.h>
17135#else
17136# include <assert.h>
17137#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017138/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017139#ifdef __cplusplus
17140extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017141{
Martin v. Löwis11437992002-04-12 09:54:03 +000017142#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017143/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 builtin and then its argument prototype would still apply. */
17145char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017146/* The GNU C library defines this for functions which it implements
17147 to always fail with ENOSYS. Some functions are actually named
17148 something starting with __ and the normal name is an alias. */
17149#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17150choke me
17151#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017152char (*f) () = $ac_func;
17153#endif
17154#ifdef __cplusplus
17155}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017156#endif
17157
Skip Montanaro6dead952003-09-25 14:50:04 +000017158int
17159main ()
17160{
17161return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 ;
17163 return 0;
17164}
17165_ACEOF
17166rm -f conftest.$ac_objext conftest$ac_exeext
17167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17168 (eval $ac_link) 2>&5
17169 ac_status=$?
17170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17171 (exit $ac_status); } &&
17172 { ac_try='test -s conftest$ac_exeext'
17173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17174 (eval $ac_try) 2>&5
17175 ac_status=$?
17176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17177 (exit $ac_status); }; }; then
17178 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017179else
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017181sed 's/^/| /' conftest.$ac_ext >&5
17182
Martin v. Löwis11437992002-04-12 09:54:03 +000017183eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017185rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017187echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17188echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17189if test `eval echo '${'$as_ac_var'}'` = yes; then
17190 cat >>confdefs.h <<_ACEOF
17191#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17192_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017193
Michael W. Hudson54241132001-12-07 15:38:26 +000017194else
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017196fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017197done
17198
Michael W. Hudson54241132001-12-07 15:38:26 +000017199
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017200LIBS=$LIBS_SAVE
17201
Guido van Rossumef2255b2000-03-10 22:30:29 +000017202# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017203if test "${ac_cv_header_wchar_h+set}" = set; then
17204 echo "$as_me:$LINENO: checking for wchar.h" >&5
17205echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17206if test "${ac_cv_header_wchar_h+set}" = set; then
17207 echo $ECHO_N "(cached) $ECHO_C" >&6
17208fi
17209echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17210echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017211else
Martin v. Löwis11437992002-04-12 09:54:03 +000017212 # Is the header compilable?
17213echo "$as_me:$LINENO: checking wchar.h usability" >&5
17214echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
17215cat >conftest.$ac_ext <<_ACEOF
17216#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017217/* confdefs.h. */
17218_ACEOF
17219cat confdefs.h >>conftest.$ac_ext
17220cat >>conftest.$ac_ext <<_ACEOF
17221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017222$ac_includes_default
17223#include <wchar.h>
17224_ACEOF
17225rm -f conftest.$ac_objext
17226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17227 (eval $ac_compile) 2>&5
17228 ac_status=$?
17229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17230 (exit $ac_status); } &&
17231 { ac_try='test -s conftest.$ac_objext'
17232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17233 (eval $ac_try) 2>&5
17234 ac_status=$?
17235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17236 (exit $ac_status); }; }; then
17237 ac_header_compiler=yes
17238else
17239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017240sed 's/^/| /' conftest.$ac_ext >&5
17241
Martin v. Löwis11437992002-04-12 09:54:03 +000017242ac_header_compiler=no
17243fi
17244rm -f conftest.$ac_objext conftest.$ac_ext
17245echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17246echo "${ECHO_T}$ac_header_compiler" >&6
17247
17248# Is the header present?
17249echo "$as_me:$LINENO: checking wchar.h presence" >&5
17250echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
17251cat >conftest.$ac_ext <<_ACEOF
17252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017253/* confdefs.h. */
17254_ACEOF
17255cat confdefs.h >>conftest.$ac_ext
17256cat >>conftest.$ac_ext <<_ACEOF
17257/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017258#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017259_ACEOF
17260if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17261 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17262 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017263 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000017264 rm -f conftest.er1
17265 cat conftest.err >&5
17266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17267 (exit $ac_status); } >/dev/null; then
17268 if test -s conftest.err; then
17269 ac_cpp_err=$ac_c_preproc_warn_flag
17270 else
17271 ac_cpp_err=
17272 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017273else
Martin v. Löwis11437992002-04-12 09:54:03 +000017274 ac_cpp_err=yes
17275fi
17276if test -z "$ac_cpp_err"; then
17277 ac_header_preproc=yes
17278else
17279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017280sed 's/^/| /' conftest.$ac_ext >&5
17281
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017284rm -f conftest.err conftest.$ac_ext
17285echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17286echo "${ECHO_T}$ac_header_preproc" >&6
17287
17288# So? What about this header?
17289case $ac_header_compiler:$ac_header_preproc in
17290 yes:no )
17291 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
17292echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17293 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017294echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17295 (
17296 cat <<\_ASBOX
17297## ------------------------------------ ##
17298## Report this to bug-autoconf@gnu.org. ##
17299## ------------------------------------ ##
17300_ASBOX
17301 ) |
17302 sed "s/^/$as_me: WARNING: /" >&2
17303 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 no:yes )
17305 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
17306echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
17307 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
17308echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
17309 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017310echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17311 (
17312 cat <<\_ASBOX
17313## ------------------------------------ ##
17314## Report this to bug-autoconf@gnu.org. ##
17315## ------------------------------------ ##
17316_ASBOX
17317 ) |
17318 sed "s/^/$as_me: WARNING: /" >&2
17319 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017320esac
17321echo "$as_me:$LINENO: checking for wchar.h" >&5
17322echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17323if test "${ac_cv_header_wchar_h+set}" = set; then
17324 echo $ECHO_N "(cached) $ECHO_C" >&6
17325else
17326 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000017327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017328echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17329echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
17330
17331fi
17332if test $ac_cv_header_wchar_h = yes; then
17333
17334
17335cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017336#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017337_ACEOF
17338
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017339 wchar_h="yes"
17340
Guido van Rossumef2255b2000-03-10 22:30:29 +000017341else
Martin v. Löwis11437992002-04-12 09:54:03 +000017342 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017343
17344fi
17345
Michael W. Hudson54241132001-12-07 15:38:26 +000017346
Martin v. Löwis11437992002-04-12 09:54:03 +000017347
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017348# determine wchar_t size
17349if test "$wchar_h" = yes
17350then
Martin v. Löwis11437992002-04-12 09:54:03 +000017351 echo "$as_me:$LINENO: checking for wchar_t" >&5
17352echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
17353if test "${ac_cv_type_wchar_t+set}" = set; then
17354 echo $ECHO_N "(cached) $ECHO_C" >&6
17355else
17356 cat >conftest.$ac_ext <<_ACEOF
17357#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017358/* confdefs.h. */
17359_ACEOF
17360cat confdefs.h >>conftest.$ac_ext
17361cat >>conftest.$ac_ext <<_ACEOF
17362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017363#include <wchar.h>
17364
Martin v. Löwis11437992002-04-12 09:54:03 +000017365int
17366main ()
17367{
17368if ((wchar_t *) 0)
17369 return 0;
17370if (sizeof (wchar_t))
17371 return 0;
17372 ;
17373 return 0;
17374}
17375_ACEOF
17376rm -f conftest.$ac_objext
17377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17378 (eval $ac_compile) 2>&5
17379 ac_status=$?
17380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17381 (exit $ac_status); } &&
17382 { ac_try='test -s conftest.$ac_objext'
17383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17384 (eval $ac_try) 2>&5
17385 ac_status=$?
17386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17387 (exit $ac_status); }; }; then
17388 ac_cv_type_wchar_t=yes
17389else
17390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017391sed 's/^/| /' conftest.$ac_ext >&5
17392
Martin v. Löwis11437992002-04-12 09:54:03 +000017393ac_cv_type_wchar_t=no
17394fi
17395rm -f conftest.$ac_objext conftest.$ac_ext
17396fi
17397echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
17398echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
17399
17400echo "$as_me:$LINENO: checking size of wchar_t" >&5
17401echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
17402if test "${ac_cv_sizeof_wchar_t+set}" = set; then
17403 echo $ECHO_N "(cached) $ECHO_C" >&6
17404else
17405 if test "$ac_cv_type_wchar_t" = yes; then
17406 # The cast to unsigned long works around a bug in the HP C Compiler
17407 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17408 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17409 # This bug is HP SR number 8606223364.
17410 if test "$cross_compiling" = yes; then
17411 # Depending upon the size, compute the lo and hi bounds.
17412cat >conftest.$ac_ext <<_ACEOF
17413#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017414/* confdefs.h. */
17415_ACEOF
17416cat confdefs.h >>conftest.$ac_ext
17417cat >>conftest.$ac_ext <<_ACEOF
17418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017419#include <wchar.h>
17420
Martin v. Löwis11437992002-04-12 09:54:03 +000017421int
17422main ()
17423{
17424static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
17425test_array [0] = 0
17426
17427 ;
17428 return 0;
17429}
17430_ACEOF
17431rm -f conftest.$ac_objext
17432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17433 (eval $ac_compile) 2>&5
17434 ac_status=$?
17435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436 (exit $ac_status); } &&
17437 { ac_try='test -s conftest.$ac_objext'
17438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17439 (eval $ac_try) 2>&5
17440 ac_status=$?
17441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442 (exit $ac_status); }; }; then
17443 ac_lo=0 ac_mid=0
17444 while :; do
17445 cat >conftest.$ac_ext <<_ACEOF
17446#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017447/* confdefs.h. */
17448_ACEOF
17449cat confdefs.h >>conftest.$ac_ext
17450cat >>conftest.$ac_ext <<_ACEOF
17451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017452#include <wchar.h>
17453
Martin v. Löwis11437992002-04-12 09:54:03 +000017454int
17455main ()
17456{
17457static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17458test_array [0] = 0
17459
17460 ;
17461 return 0;
17462}
17463_ACEOF
17464rm -f conftest.$ac_objext
17465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17466 (eval $ac_compile) 2>&5
17467 ac_status=$?
17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469 (exit $ac_status); } &&
17470 { ac_try='test -s conftest.$ac_objext'
17471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17472 (eval $ac_try) 2>&5
17473 ac_status=$?
17474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475 (exit $ac_status); }; }; then
17476 ac_hi=$ac_mid; break
17477else
17478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017479sed 's/^/| /' conftest.$ac_ext >&5
17480
Martin v. Löwis11437992002-04-12 09:54:03 +000017481ac_lo=`expr $ac_mid + 1`
17482 if test $ac_lo -le $ac_mid; then
17483 ac_lo= ac_hi=
17484 break
17485 fi
17486 ac_mid=`expr 2 '*' $ac_mid + 1`
17487fi
17488rm -f conftest.$ac_objext conftest.$ac_ext
17489 done
17490else
17491 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 +000017494cat >conftest.$ac_ext <<_ACEOF
17495#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017496/* confdefs.h. */
17497_ACEOF
17498cat confdefs.h >>conftest.$ac_ext
17499cat >>conftest.$ac_ext <<_ACEOF
17500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017501#include <wchar.h>
17502
Martin v. Löwis11437992002-04-12 09:54:03 +000017503int
17504main ()
17505{
17506static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
17507test_array [0] = 0
17508
17509 ;
17510 return 0;
17511}
17512_ACEOF
17513rm -f conftest.$ac_objext
17514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17515 (eval $ac_compile) 2>&5
17516 ac_status=$?
17517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17518 (exit $ac_status); } &&
17519 { ac_try='test -s conftest.$ac_objext'
17520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17521 (eval $ac_try) 2>&5
17522 ac_status=$?
17523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17524 (exit $ac_status); }; }; then
17525 ac_hi=-1 ac_mid=-1
17526 while :; do
17527 cat >conftest.$ac_ext <<_ACEOF
17528#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017529/* confdefs.h. */
17530_ACEOF
17531cat confdefs.h >>conftest.$ac_ext
17532cat >>conftest.$ac_ext <<_ACEOF
17533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017534#include <wchar.h>
17535
Martin v. Löwis11437992002-04-12 09:54:03 +000017536int
17537main ()
17538{
17539static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
17540test_array [0] = 0
17541
17542 ;
17543 return 0;
17544}
17545_ACEOF
17546rm -f conftest.$ac_objext
17547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17548 (eval $ac_compile) 2>&5
17549 ac_status=$?
17550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17551 (exit $ac_status); } &&
17552 { ac_try='test -s conftest.$ac_objext'
17553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17554 (eval $ac_try) 2>&5
17555 ac_status=$?
17556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557 (exit $ac_status); }; }; then
17558 ac_lo=$ac_mid; break
17559else
17560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017561sed 's/^/| /' conftest.$ac_ext >&5
17562
Martin v. Löwis11437992002-04-12 09:54:03 +000017563ac_hi=`expr '(' $ac_mid ')' - 1`
17564 if test $ac_mid -le $ac_hi; then
17565 ac_lo= ac_hi=
17566 break
17567 fi
17568 ac_mid=`expr 2 '*' $ac_mid`
17569fi
17570rm -f conftest.$ac_objext conftest.$ac_ext
17571 done
17572else
17573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017574sed 's/^/| /' conftest.$ac_ext >&5
17575
Martin v. Löwis11437992002-04-12 09:54:03 +000017576ac_lo= ac_hi=
17577fi
17578rm -f conftest.$ac_objext conftest.$ac_ext
17579fi
17580rm -f conftest.$ac_objext conftest.$ac_ext
17581# Binary search between lo and hi bounds.
17582while test "x$ac_lo" != "x$ac_hi"; do
17583 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17584 cat >conftest.$ac_ext <<_ACEOF
17585#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017586/* confdefs.h. */
17587_ACEOF
17588cat confdefs.h >>conftest.$ac_ext
17589cat >>conftest.$ac_ext <<_ACEOF
17590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017591#include <wchar.h>
17592
Martin v. Löwis11437992002-04-12 09:54:03 +000017593int
17594main ()
17595{
17596static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17597test_array [0] = 0
17598
17599 ;
17600 return 0;
17601}
17602_ACEOF
17603rm -f conftest.$ac_objext
17604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17605 (eval $ac_compile) 2>&5
17606 ac_status=$?
17607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17608 (exit $ac_status); } &&
17609 { ac_try='test -s conftest.$ac_objext'
17610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17611 (eval $ac_try) 2>&5
17612 ac_status=$?
17613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17614 (exit $ac_status); }; }; then
17615 ac_hi=$ac_mid
17616else
17617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017618sed 's/^/| /' conftest.$ac_ext >&5
17619
Martin v. Löwis11437992002-04-12 09:54:03 +000017620ac_lo=`expr '(' $ac_mid ')' + 1`
17621fi
17622rm -f conftest.$ac_objext conftest.$ac_ext
17623done
17624case $ac_lo in
17625?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017626'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17627See \`config.log' for more details." >&5
17628echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17629See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 { (exit 1); exit 1; }; } ;;
17631esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017632else
17633 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017634 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17635See \`config.log' for more details." >&5
17636echo "$as_me: error: cannot run test program while cross compiling
17637See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000017639else
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 cat >conftest.$ac_ext <<_ACEOF
17641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017642/* confdefs.h. */
17643_ACEOF
17644cat confdefs.h >>conftest.$ac_ext
17645cat >>conftest.$ac_ext <<_ACEOF
17646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017647#include <wchar.h>
17648
17649long longval () { return (long) (sizeof (wchar_t)); }
17650unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000017651#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017652#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017653int
17654main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017655{
Martin v. Löwis11437992002-04-12 09:54:03 +000017656
17657 FILE *f = fopen ("conftest.val", "w");
17658 if (! f)
17659 exit (1);
17660 if (((long) (sizeof (wchar_t))) < 0)
17661 {
17662 long i = longval ();
17663 if (i != ((long) (sizeof (wchar_t))))
17664 exit (1);
17665 fprintf (f, "%ld\n", i);
17666 }
17667 else
17668 {
17669 unsigned long i = ulongval ();
17670 if (i != ((long) (sizeof (wchar_t))))
17671 exit (1);
17672 fprintf (f, "%lu\n", i);
17673 }
17674 exit (ferror (f) || fclose (f) != 0);
17675
17676 ;
17677 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017678}
Martin v. Löwis11437992002-04-12 09:54:03 +000017679_ACEOF
17680rm -f conftest$ac_exeext
17681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17682 (eval $ac_link) 2>&5
17683 ac_status=$?
17684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17687 (eval $ac_try) 2>&5
17688 ac_status=$?
17689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17690 (exit $ac_status); }; }; then
17691 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017692else
Martin v. Löwis11437992002-04-12 09:54:03 +000017693 echo "$as_me: program exited with status $ac_status" >&5
17694echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017695sed 's/^/| /' conftest.$ac_ext >&5
17696
Martin v. Löwis11437992002-04-12 09:54:03 +000017697( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017698{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17699See \`config.log' for more details." >&5
17700echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17701See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 { (exit 1); exit 1; }; }
17703fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017704rm -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 +000017705fi
17706fi
17707rm -f conftest.val
17708else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017709 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017710fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017712echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17713echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17714cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017715#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017716_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017717
Michael W. Hudson54241132001-12-07 15:38:26 +000017718
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017719fi
17720
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017721echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17722echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17723have_ucs4_tcl=no
17724cat >conftest.$ac_ext <<_ACEOF
17725#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017726/* confdefs.h. */
17727_ACEOF
17728cat confdefs.h >>conftest.$ac_ext
17729cat >>conftest.$ac_ext <<_ACEOF
17730/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017731
17732#include <tcl.h>
17733#if TCL_UTF_MAX != 6
17734# error "NOT UCS4_TCL"
17735#endif
17736int
17737main ()
17738{
17739
17740 ;
17741 return 0;
17742}
17743_ACEOF
17744rm -f conftest.$ac_objext
17745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17746 (eval $ac_compile) 2>&5
17747 ac_status=$?
17748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17749 (exit $ac_status); } &&
17750 { ac_try='test -s conftest.$ac_objext'
17751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17752 (eval $ac_try) 2>&5
17753 ac_status=$?
17754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17755 (exit $ac_status); }; }; then
17756
17757
17758cat >>confdefs.h <<\_ACEOF
17759#define HAVE_UCS4_TCL 1
17760_ACEOF
17761
17762 have_ucs4_tcl=yes
17763
17764else
17765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017766sed 's/^/| /' conftest.$ac_ext >&5
17767
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017768fi
17769rm -f conftest.$ac_objext conftest.$ac_ext
17770echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17771echo "${ECHO_T}$have_ucs4_tcl" >&6
17772
Skip Montanaro6dead952003-09-25 14:50:04 +000017773# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017774if test "$wchar_h" = yes
17775then
17776 # check whether wchar_t is signed or not
17777 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17778echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17779 if test "${ac_cv_wchar_t_signed+set}" = set; then
17780 echo $ECHO_N "(cached) $ECHO_C" >&6
17781else
17782
17783 if test "$cross_compiling" = yes; then
17784 ac_cv_wchar_t_signed=yes
17785else
17786 cat >conftest.$ac_ext <<_ACEOF
17787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017788/* confdefs.h. */
17789_ACEOF
17790cat confdefs.h >>conftest.$ac_ext
17791cat >>conftest.$ac_ext <<_ACEOF
17792/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017793
17794 #include <wchar.h>
17795 int main()
17796 {
17797 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17798 }
17799
17800_ACEOF
17801rm -f conftest$ac_exeext
17802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17803 (eval $ac_link) 2>&5
17804 ac_status=$?
17805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17808 (eval $ac_try) 2>&5
17809 ac_status=$?
17810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17811 (exit $ac_status); }; }; then
17812 ac_cv_wchar_t_signed=yes
17813else
17814 echo "$as_me: program exited with status $ac_status" >&5
17815echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017816sed 's/^/| /' conftest.$ac_ext >&5
17817
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017818( exit $ac_status )
17819ac_cv_wchar_t_signed=no
17820fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017821rm -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 +000017822fi
17823fi
17824
17825 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17826echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17827fi
17828
Martin v. Löwis11437992002-04-12 09:54:03 +000017829echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17830echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017831# Check whether --enable-unicode or --disable-unicode was given.
17832if test "${enable_unicode+set}" = set; then
17833 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017834
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017835else
17836 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017837fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017838
17839if test $enable_unicode = yes
17840then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017841 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017842 case "$have_ucs4_tcl" in
17843 yes) enable_unicode="ucs4"
17844 ;;
17845 *) enable_unicode="ucs2"
17846 ;;
17847 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017848fi
17849
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017850
17851
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017852case "$enable_unicode" in
17853ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017854 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017855#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017856_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017857
17858 ;;
17859ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017860 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017861#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017862_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017863
17864 ;;
17865esac
17866
Michael W. Hudson54241132001-12-07 15:38:26 +000017867
Martin v. Löwis11437992002-04-12 09:54:03 +000017868
17869
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017870
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017871if test "$enable_unicode" = "no"
17872then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017873 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017874 echo "$as_me:$LINENO: result: not used" >&5
17875echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017876else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017877 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017878
17879cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017880#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017881_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017882
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017883
17884 # wchar_t is only usable if it maps to an unsigned type
17885 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17886 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017887 then
17888 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017889
Martin v. Löwis11437992002-04-12 09:54:03 +000017890cat >>confdefs.h <<\_ACEOF
17891#define HAVE_USABLE_WCHAR_T 1
17892_ACEOF
17893
17894 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017895#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017896_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017897
17898 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17899 then
17900 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017902#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017903_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017904
17905 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17906 then
17907 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017909#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017910_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017911
17912 else
17913 PY_UNICODE_TYPE="no type found"
17914 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017915 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17916echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017917fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017918
17919# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017920echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17921echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17922if test "${ac_cv_c_bigendian+set}" = set; then
17923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017924else
Martin v. Löwis11437992002-04-12 09:54:03 +000017925 # See if sys/param.h defines the BYTE_ORDER macro.
17926cat >conftest.$ac_ext <<_ACEOF
17927#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017928/* confdefs.h. */
17929_ACEOF
17930cat confdefs.h >>conftest.$ac_ext
17931cat >>conftest.$ac_ext <<_ACEOF
17932/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017933#include <sys/types.h>
17934#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017935
Martin v. Löwis11437992002-04-12 09:54:03 +000017936int
17937main ()
17938{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017939#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17940 bogus endian macros
17941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017942
17943 ;
17944 return 0;
17945}
17946_ACEOF
17947rm -f conftest.$ac_objext
17948if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17949 (eval $ac_compile) 2>&5
17950 ac_status=$?
17951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17952 (exit $ac_status); } &&
17953 { ac_try='test -s conftest.$ac_objext'
17954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17955 (eval $ac_try) 2>&5
17956 ac_status=$?
17957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017959 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017960cat >conftest.$ac_ext <<_ACEOF
17961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017962/* confdefs.h. */
17963_ACEOF
17964cat confdefs.h >>conftest.$ac_ext
17965cat >>conftest.$ac_ext <<_ACEOF
17966/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017967#include <sys/types.h>
17968#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017969
Martin v. Löwis11437992002-04-12 09:54:03 +000017970int
17971main ()
17972{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017973#if BYTE_ORDER != BIG_ENDIAN
17974 not big endian
17975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017976
17977 ;
17978 return 0;
17979}
17980_ACEOF
17981rm -f conftest.$ac_objext
17982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17983 (eval $ac_compile) 2>&5
17984 ac_status=$?
17985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17986 (exit $ac_status); } &&
17987 { ac_try='test -s conftest.$ac_objext'
17988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17989 (eval $ac_try) 2>&5
17990 ac_status=$?
17991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17992 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017993 ac_cv_c_bigendian=yes
17994else
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017996sed 's/^/| /' conftest.$ac_ext >&5
17997
Martin v. Löwis11437992002-04-12 09:54:03 +000017998ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018000rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000018001else
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018003sed 's/^/| /' conftest.$ac_ext >&5
18004
Martin v. Löwis11437992002-04-12 09:54:03 +000018005# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000018006if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018007 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000018008 ac_cv_c_bigendian=unknown
18009 cat >conftest.$ac_ext <<_ACEOF
18010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018011/* confdefs.h. */
18012_ACEOF
18013cat confdefs.h >>conftest.$ac_ext
18014cat >>conftest.$ac_ext <<_ACEOF
18015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018016short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18017short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18018void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
18019short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18020short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18021void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018022int
18023main ()
18024{
18025 _ascii (); _ebcdic ();
18026 ;
18027 return 0;
18028}
18029_ACEOF
18030rm -f conftest.$ac_objext
18031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18032 (eval $ac_compile) 2>&5
18033 ac_status=$?
18034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18035 (exit $ac_status); } &&
18036 { ac_try='test -s conftest.$ac_objext'
18037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18038 (eval $ac_try) 2>&5
18039 ac_status=$?
18040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18041 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018042 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 ac_cv_c_bigendian=yes
18044fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018045if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018046 if test "$ac_cv_c_bigendian" = unknown; then
18047 ac_cv_c_bigendian=no
18048 else
18049 # finding both strings is unlikely to happen, but who knows?
18050 ac_cv_c_bigendian=unknown
18051 fi
18052fi
18053else
18054 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018055sed 's/^/| /' conftest.$ac_ext >&5
18056
Martin v. Löwis11437992002-04-12 09:54:03 +000018057fi
18058rm -f conftest.$ac_objext conftest.$ac_ext
18059else
18060 cat >conftest.$ac_ext <<_ACEOF
18061#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018062/* confdefs.h. */
18063_ACEOF
18064cat confdefs.h >>conftest.$ac_ext
18065cat >>conftest.$ac_ext <<_ACEOF
18066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018067int
18068main ()
18069{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018070 /* Are we little or big endian? From Harbison&Steele. */
18071 union
18072 {
18073 long l;
18074 char c[sizeof (long)];
18075 } u;
18076 u.l = 1;
18077 exit (u.c[sizeof (long) - 1] == 1);
18078}
Martin v. Löwis11437992002-04-12 09:54:03 +000018079_ACEOF
18080rm -f conftest$ac_exeext
18081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18082 (eval $ac_link) 2>&5
18083 ac_status=$?
18084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18087 (eval $ac_try) 2>&5
18088 ac_status=$?
18089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18090 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018091 ac_cv_c_bigendian=no
18092else
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 echo "$as_me: program exited with status $ac_status" >&5
18094echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018095sed 's/^/| /' conftest.$ac_ext >&5
18096
Martin v. Löwis11437992002-04-12 09:54:03 +000018097( exit $ac_status )
18098ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000018099fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018100rm -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 +000018101fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018102fi
18103rm -f conftest.$ac_objext conftest.$ac_ext
18104fi
18105echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
18106echo "${ECHO_T}$ac_cv_c_bigendian" >&6
18107case $ac_cv_c_bigendian in
18108 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000018109
Martin v. Löwis11437992002-04-12 09:54:03 +000018110cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018111#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018112_ACEOF
18113 ;;
18114 no)
18115 ;;
18116 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018117 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018118presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018119echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018120presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
18121 { (exit 1); exit 1; }; } ;;
18122esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000018123
Michael W. Hudson54241132001-12-07 15:38:26 +000018124
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018125# Check whether right shifting a negative integer extends the sign bit
18126# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000018127echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
18128echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
18129if test "${ac_cv_rshift_extends_sign+set}" = set; then
18130 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018131else
Martin v. Löwis11437992002-04-12 09:54:03 +000018132
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018133if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018134 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018135else
Martin v. Löwis11437992002-04-12 09:54:03 +000018136 cat >conftest.$ac_ext <<_ACEOF
18137#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018138/* confdefs.h. */
18139_ACEOF
18140cat confdefs.h >>conftest.$ac_ext
18141cat >>conftest.$ac_ext <<_ACEOF
18142/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018143
18144int main()
18145{
Vladimir Marangozova6180282000-07-12 05:05:06 +000018146 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018147}
18148
Martin v. Löwis11437992002-04-12 09:54:03 +000018149_ACEOF
18150rm -f conftest$ac_exeext
18151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18152 (eval $ac_link) 2>&5
18153 ac_status=$?
18154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18157 (eval $ac_try) 2>&5
18158 ac_status=$?
18159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18160 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000018161 ac_cv_rshift_extends_sign=yes
18162else
Martin v. Löwis11437992002-04-12 09:54:03 +000018163 echo "$as_me: program exited with status $ac_status" >&5
18164echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018165sed 's/^/| /' conftest.$ac_ext >&5
18166
Martin v. Löwis11437992002-04-12 09:54:03 +000018167( exit $ac_status )
18168ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000018169fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018170rm -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 +000018171fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000018172fi
18173
Martin v. Löwis11437992002-04-12 09:54:03 +000018174echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
18175echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018176if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018177then
Martin v. Löwis11437992002-04-12 09:54:03 +000018178
18179cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018180#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018181_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018182
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018183fi
18184
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018185# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018186echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
18187echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
18188if test "${ac_cv_have_getc_unlocked+set}" = set; then
18189 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018190else
Martin v. Löwis11437992002-04-12 09:54:03 +000018191
18192cat >conftest.$ac_ext <<_ACEOF
18193#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018194/* confdefs.h. */
18195_ACEOF
18196cat confdefs.h >>conftest.$ac_ext
18197cat >>conftest.$ac_ext <<_ACEOF
18198/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018199#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018200int
18201main ()
18202{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018203
18204 FILE *f = fopen("/dev/null", "r");
18205 flockfile(f);
18206 getc_unlocked(f);
18207 funlockfile(f);
18208
Martin v. Löwis11437992002-04-12 09:54:03 +000018209 ;
18210 return 0;
18211}
18212_ACEOF
18213rm -f conftest.$ac_objext conftest$ac_exeext
18214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18215 (eval $ac_link) 2>&5
18216 ac_status=$?
18217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18218 (exit $ac_status); } &&
18219 { ac_try='test -s conftest$ac_exeext'
18220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18221 (eval $ac_try) 2>&5
18222 ac_status=$?
18223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18224 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018225 ac_cv_have_getc_unlocked=yes
18226else
Martin v. Löwis11437992002-04-12 09:54:03 +000018227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018228sed 's/^/| /' conftest.$ac_ext >&5
18229
Martin v. Löwis11437992002-04-12 09:54:03 +000018230ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018232rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018233fi
18234
Martin v. Löwis11437992002-04-12 09:54:03 +000018235echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
18236echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018237if test "$ac_cv_have_getc_unlocked" = yes
18238then
Martin v. Löwis11437992002-04-12 09:54:03 +000018239
18240cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018241#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018242_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018243
18244fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018245
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018246# check for readline 2.2
18247cat >conftest.$ac_ext <<_ACEOF
18248#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018249/* confdefs.h. */
18250_ACEOF
18251cat confdefs.h >>conftest.$ac_ext
18252cat >>conftest.$ac_ext <<_ACEOF
18253/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018254#include <readline/readline.h>
18255_ACEOF
18256if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18257 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18258 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018259 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018260 rm -f conftest.er1
18261 cat conftest.err >&5
18262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18263 (exit $ac_status); } >/dev/null; then
18264 if test -s conftest.err; then
18265 ac_cpp_err=$ac_c_preproc_warn_flag
18266 else
18267 ac_cpp_err=
18268 fi
18269else
18270 ac_cpp_err=yes
18271fi
18272if test -z "$ac_cpp_err"; then
18273 have_readline=yes
18274else
18275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018276sed 's/^/| /' conftest.$ac_ext >&5
18277
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018278 have_readline=no
18279fi
18280rm -f conftest.err conftest.$ac_ext
18281if test $have_readline = yes
18282then
18283 cat >conftest.$ac_ext <<_ACEOF
18284#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018285/* confdefs.h. */
18286_ACEOF
18287cat confdefs.h >>conftest.$ac_ext
18288cat >>conftest.$ac_ext <<_ACEOF
18289/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018290#include <readline/readline.h>
18291
18292_ACEOF
18293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000018294 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018295
18296cat >>confdefs.h <<\_ACEOF
18297#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
18298_ACEOF
18299
18300fi
18301rm -f conftest*
18302
18303fi
18304
Martin v. Löwis0daad592001-09-30 21:09:59 +000018305# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000018306echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
18307echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
18308if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
18309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000018310else
Martin v. Löwis11437992002-04-12 09:54:03 +000018311 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000018312LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018313cat >conftest.$ac_ext <<_ACEOF
18314#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018315/* confdefs.h. */
18316_ACEOF
18317cat confdefs.h >>conftest.$ac_ext
18318cat >>conftest.$ac_ext <<_ACEOF
18319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018320
Guido van Rossum353ae582001-07-10 16:45:32 +000018321/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018322#ifdef __cplusplus
18323extern "C"
18324#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000018325/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018326 builtin and then its argument prototype would still apply. */
18327char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018328int
18329main ()
18330{
18331rl_pre_input_hook ();
18332 ;
18333 return 0;
18334}
18335_ACEOF
18336rm -f conftest.$ac_objext conftest$ac_exeext
18337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18338 (eval $ac_link) 2>&5
18339 ac_status=$?
18340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18341 (exit $ac_status); } &&
18342 { ac_try='test -s conftest$ac_exeext'
18343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18344 (eval $ac_try) 2>&5
18345 ac_status=$?
18346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18347 (exit $ac_status); }; }; then
18348 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000018349else
Martin v. Löwis11437992002-04-12 09:54:03 +000018350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018351sed 's/^/| /' conftest.$ac_ext >&5
18352
Martin v. Löwis11437992002-04-12 09:54:03 +000018353ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000018354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018355rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18356LIBS=$ac_check_lib_save_LIBS
18357fi
18358echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
18359echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
18360if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018361
Martin v. Löwis11437992002-04-12 09:54:03 +000018362cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018363#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018364_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018365
Martin v. Löwis0daad592001-09-30 21:09:59 +000018366fi
18367
Michael W. Hudson54241132001-12-07 15:38:26 +000018368
Martin v. Löwis0daad592001-09-30 21:09:59 +000018369# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000018370echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
18371echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
18372if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
18373 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000018374else
Martin v. Löwis11437992002-04-12 09:54:03 +000018375 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000018376LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018377cat >conftest.$ac_ext <<_ACEOF
18378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018379/* confdefs.h. */
18380_ACEOF
18381cat confdefs.h >>conftest.$ac_ext
18382cat >>conftest.$ac_ext <<_ACEOF
18383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018384
Martin v. Löwis0daad592001-09-30 21:09:59 +000018385/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018386#ifdef __cplusplus
18387extern "C"
18388#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000018389/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018390 builtin and then its argument prototype would still apply. */
18391char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018392int
18393main ()
18394{
18395rl_completion_matches ();
18396 ;
18397 return 0;
18398}
18399_ACEOF
18400rm -f conftest.$ac_objext conftest$ac_exeext
18401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18402 (eval $ac_link) 2>&5
18403 ac_status=$?
18404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18405 (exit $ac_status); } &&
18406 { ac_try='test -s conftest$ac_exeext'
18407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18408 (eval $ac_try) 2>&5
18409 ac_status=$?
18410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18411 (exit $ac_status); }; }; then
18412 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000018413else
Martin v. Löwis11437992002-04-12 09:54:03 +000018414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018415sed 's/^/| /' conftest.$ac_ext >&5
18416
Martin v. Löwis11437992002-04-12 09:54:03 +000018417ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000018418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018419rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18420LIBS=$ac_check_lib_save_LIBS
18421fi
18422echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
18423echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
18424if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018425
Martin v. Löwis11437992002-04-12 09:54:03 +000018426cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018427#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018428_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018429
Guido van Rossum353ae582001-07-10 16:45:32 +000018430fi
18431
Jack Jansendd19cf82001-12-06 22:36:17 +000018432
Martin v. Löwis11437992002-04-12 09:54:03 +000018433echo "$as_me:$LINENO: checking for broken nice()" >&5
18434echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
18435if test "${ac_cv_broken_nice+set}" = set; then
18436 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018437else
Martin v. Löwis11437992002-04-12 09:54:03 +000018438
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018439if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018440 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018441else
Martin v. Löwis11437992002-04-12 09:54:03 +000018442 cat >conftest.$ac_ext <<_ACEOF
18443#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018444/* confdefs.h. */
18445_ACEOF
18446cat confdefs.h >>conftest.$ac_ext
18447cat >>conftest.$ac_ext <<_ACEOF
18448/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018449
18450int main()
18451{
18452 int val1 = nice(1);
18453 if (val1 != -1 && val1 == nice(2))
18454 exit(0);
18455 exit(1);
18456}
18457
Martin v. Löwis11437992002-04-12 09:54:03 +000018458_ACEOF
18459rm -f conftest$ac_exeext
18460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18461 (eval $ac_link) 2>&5
18462 ac_status=$?
18463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18464 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18466 (eval $ac_try) 2>&5
18467 ac_status=$?
18468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18469 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018470 ac_cv_broken_nice=yes
18471else
Martin v. Löwis11437992002-04-12 09:54:03 +000018472 echo "$as_me: program exited with status $ac_status" >&5
18473echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018474sed 's/^/| /' conftest.$ac_ext >&5
18475
Martin v. Löwis11437992002-04-12 09:54:03 +000018476( exit $ac_status )
18477ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018478fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018479rm -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 +000018480fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018481fi
18482
Martin v. Löwis11437992002-04-12 09:54:03 +000018483echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
18484echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018485if test "$ac_cv_broken_nice" = yes
18486then
Martin v. Löwis11437992002-04-12 09:54:03 +000018487
18488cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018489#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018490_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018491
18492fi
18493
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018494# tzset(3) exists and works like we expect it to
18495echo "$as_me:$LINENO: checking for working tzset()" >&5
18496echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
18497if test "${ac_cv_working_tzset+set}" = set; then
18498 echo $ECHO_N "(cached) $ECHO_C" >&6
18499else
18500
18501if test "$cross_compiling" = yes; then
18502 ac_cv_working_tzset=no
18503else
18504 cat >conftest.$ac_ext <<_ACEOF
18505#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018506/* confdefs.h. */
18507_ACEOF
18508cat confdefs.h >>conftest.$ac_ext
18509cat >>conftest.$ac_ext <<_ACEOF
18510/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018511
18512#include <stdlib.h>
18513#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018514#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018515int main()
18516{
Brett Cannon18367812003-09-19 00:59:16 +000018517 /* Note that we need to ensure that not only does tzset(3)
18518 do 'something' with localtime, but it works as documented
18519 in the library reference and as expected by the test suite.
18520
18521 Red Hat 6.2 doesn't understand the southern hemisphere
18522 after New Year's Day; it thinks swaps on that day.
18523 */
18524
18525 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
18526 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18527
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018528 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018529 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018530 if (localtime(&groundhogday)->tm_hour != 0)
18531 exit(1);
18532
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018533 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018534 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018535 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018536 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000018537
18538 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18539 tzset();
18540 if (localtime(&groundhogday)->tm_hour != 11)
18541 exit(1);
18542 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18543 exit(1);
18544 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18545 exit(1);
18546
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018547 exit(0);
18548}
18549
18550_ACEOF
18551rm -f conftest$ac_exeext
18552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18553 (eval $ac_link) 2>&5
18554 ac_status=$?
18555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18558 (eval $ac_try) 2>&5
18559 ac_status=$?
18560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18561 (exit $ac_status); }; }; then
18562 ac_cv_working_tzset=yes
18563else
18564 echo "$as_me: program exited with status $ac_status" >&5
18565echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018566sed 's/^/| /' conftest.$ac_ext >&5
18567
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018568( exit $ac_status )
18569ac_cv_working_tzset=no
18570fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018571rm -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 +000018572fi
18573fi
18574
18575echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
18576echo "${ECHO_T}$ac_cv_working_tzset" >&6
18577if test "$ac_cv_working_tzset" = yes
18578then
18579
18580cat >>confdefs.h <<\_ACEOF
18581#define HAVE_WORKING_TZSET 1
18582_ACEOF
18583
18584fi
18585
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018586# Look for subsecond timestamps in struct stat
18587echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
18588echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
18589if test "${ac_cv_stat_tv_nsec+set}" = set; then
18590 echo $ECHO_N "(cached) $ECHO_C" >&6
18591else
18592 cat >conftest.$ac_ext <<_ACEOF
18593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018594/* confdefs.h. */
18595_ACEOF
18596cat confdefs.h >>conftest.$ac_ext
18597cat >>conftest.$ac_ext <<_ACEOF
18598/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018599#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018600int
18601main ()
18602{
18603
18604struct stat st;
18605st.st_mtim.tv_nsec = 1;
18606
18607 ;
18608 return 0;
18609}
18610_ACEOF
18611rm -f conftest.$ac_objext
18612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18613 (eval $ac_compile) 2>&5
18614 ac_status=$?
18615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18616 (exit $ac_status); } &&
18617 { ac_try='test -s conftest.$ac_objext'
18618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18619 (eval $ac_try) 2>&5
18620 ac_status=$?
18621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18622 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018623 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018624else
18625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018626sed 's/^/| /' conftest.$ac_ext >&5
18627
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018628ac_cv_stat_tv_nsec=no
18629fi
18630rm -f conftest.$ac_objext conftest.$ac_ext
18631fi
18632
18633echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18634echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18635if test "$ac_cv_stat_tv_nsec" = yes
18636then
18637
18638cat >>confdefs.h <<\_ACEOF
18639#define HAVE_STAT_TV_NSEC 1
18640_ACEOF
18641
18642fi
18643
Jack Jansen666b1e72001-10-31 12:11:48 +000018644# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018645echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18646echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18647if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18648 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018649else
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 cat >conftest.$ac_ext <<_ACEOF
18651#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018652/* confdefs.h. */
18653_ACEOF
18654cat confdefs.h >>conftest.$ac_ext
18655cat >>conftest.$ac_ext <<_ACEOF
18656/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018657#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018658int
18659main ()
18660{
Jack Jansen666b1e72001-10-31 12:11:48 +000018661
18662 int rtn;
18663 rtn = mvwdelch(0,0,0);
18664
Martin v. Löwis11437992002-04-12 09:54:03 +000018665 ;
18666 return 0;
18667}
18668_ACEOF
18669rm -f conftest.$ac_objext
18670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18671 (eval $ac_compile) 2>&5
18672 ac_status=$?
18673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18674 (exit $ac_status); } &&
18675 { ac_try='test -s conftest.$ac_objext'
18676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18677 (eval $ac_try) 2>&5
18678 ac_status=$?
18679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18680 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018681 ac_cv_mvwdelch_is_expression=yes
18682else
Martin v. Löwis11437992002-04-12 09:54:03 +000018683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018684sed 's/^/| /' conftest.$ac_ext >&5
18685
Martin v. Löwis11437992002-04-12 09:54:03 +000018686ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018688rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018689fi
18690
Martin v. Löwis11437992002-04-12 09:54:03 +000018691echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18692echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018693
18694if test "$ac_cv_mvwdelch_is_expression" = yes
18695then
Martin v. Löwis11437992002-04-12 09:54:03 +000018696
18697cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018698#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018699_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018700
18701fi
18702
Martin v. Löwis11437992002-04-12 09:54:03 +000018703echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18704echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18705if test "${ac_cv_window_has_flags+set}" = set; then
18706 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018707else
Martin v. Löwis11437992002-04-12 09:54:03 +000018708 cat >conftest.$ac_ext <<_ACEOF
18709#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018710/* confdefs.h. */
18711_ACEOF
18712cat confdefs.h >>conftest.$ac_ext
18713cat >>conftest.$ac_ext <<_ACEOF
18714/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018715#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018716int
18717main ()
18718{
Jack Jansen666b1e72001-10-31 12:11:48 +000018719
18720 WINDOW *w;
18721 w->_flags = 0;
18722
Martin v. Löwis11437992002-04-12 09:54:03 +000018723 ;
18724 return 0;
18725}
18726_ACEOF
18727rm -f conftest.$ac_objext
18728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18729 (eval $ac_compile) 2>&5
18730 ac_status=$?
18731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18732 (exit $ac_status); } &&
18733 { ac_try='test -s conftest.$ac_objext'
18734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18735 (eval $ac_try) 2>&5
18736 ac_status=$?
18737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018739 ac_cv_window_has_flags=yes
18740else
Martin v. Löwis11437992002-04-12 09:54:03 +000018741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018742sed 's/^/| /' conftest.$ac_ext >&5
18743
Martin v. Löwis11437992002-04-12 09:54:03 +000018744ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018746rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018747fi
18748
Martin v. Löwis11437992002-04-12 09:54:03 +000018749echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18750echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018751
Jack Jansen666b1e72001-10-31 12:11:48 +000018752
18753if test "$ac_cv_window_has_flags" = yes
18754then
Martin v. Löwis11437992002-04-12 09:54:03 +000018755
18756cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018757#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018758_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018759
18760fi
18761
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018762echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18763echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18764
18765if test -e /dev/ptmx
18766then
18767 echo "$as_me:$LINENO: result: yes" >&5
18768echo "${ECHO_T}yes" >&6
18769
18770cat >>confdefs.h <<\_ACEOF
18771#define HAVE_DEV_PTMX 1
18772_ACEOF
18773
18774else
18775 echo "$as_me:$LINENO: result: no" >&5
18776echo "${ECHO_T}no" >&6
18777fi
18778
Neal Norwitz865400f2003-03-21 01:42:58 +000018779echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18780echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18781
18782if test -e /dev/ptc
18783then
18784 echo "$as_me:$LINENO: result: yes" >&5
18785echo "${ECHO_T}yes" >&6
18786
18787cat >>confdefs.h <<\_ACEOF
18788#define HAVE_DEV_PTC 1
18789_ACEOF
18790
18791else
18792 echo "$as_me:$LINENO: result: no" >&5
18793echo "${ECHO_T}no" >&6
18794fi
18795
Martin v. Löwis11437992002-04-12 09:54:03 +000018796echo "$as_me:$LINENO: checking for socklen_t" >&5
18797echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18798if test "${ac_cv_type_socklen_t+set}" = set; then
18799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018800else
Martin v. Löwis11437992002-04-12 09:54:03 +000018801 cat >conftest.$ac_ext <<_ACEOF
18802#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018803/* confdefs.h. */
18804_ACEOF
18805cat confdefs.h >>conftest.$ac_ext
18806cat >>conftest.$ac_ext <<_ACEOF
18807/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018808
18809#ifdef HAVE_SYS_TYPES_H
18810#include <sys/types.h>
18811#endif
18812#ifdef HAVE_SYS_SOCKET_H
18813#include <sys/socket.h>
18814#endif
18815
18816
Martin v. Löwis11437992002-04-12 09:54:03 +000018817int
18818main ()
18819{
18820if ((socklen_t *) 0)
18821 return 0;
18822if (sizeof (socklen_t))
18823 return 0;
18824 ;
18825 return 0;
18826}
18827_ACEOF
18828rm -f conftest.$ac_objext
18829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18830 (eval $ac_compile) 2>&5
18831 ac_status=$?
18832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18833 (exit $ac_status); } &&
18834 { ac_try='test -s conftest.$ac_objext'
18835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18836 (eval $ac_try) 2>&5
18837 ac_status=$?
18838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18839 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018840 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018841else
Martin v. Löwis11437992002-04-12 09:54:03 +000018842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018843sed 's/^/| /' conftest.$ac_ext >&5
18844
Martin v. Löwis11437992002-04-12 09:54:03 +000018845ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018847rm -f conftest.$ac_objext conftest.$ac_ext
18848fi
18849echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18850echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18851if test $ac_cv_type_socklen_t = yes; then
18852 :
18853else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018854
Martin v. Löwis01c04012002-11-11 14:58:44 +000018855cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018856#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018857_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018858
18859fi
18860
Michael W. Hudson54241132001-12-07 15:38:26 +000018861
Michael W. Hudson54241132001-12-07 15:38:26 +000018862
18863
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018864for h in `(cd $srcdir;echo Python/thread_*.h)`
18865do
18866 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18867done
18868
Michael W. Hudson54241132001-12-07 15:38:26 +000018869
Jack Jansen0b06be72002-06-21 14:48:38 +000018870SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018871echo "$as_me:$LINENO: checking for build directories" >&5
18872echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018873for dir in $SRCDIRS; do
18874 if test ! -d $dir; then
18875 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018876 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018877done
Martin v. Löwis11437992002-04-12 09:54:03 +000018878echo "$as_me:$LINENO: result: done" >&5
18879echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018880
Guido van Rossum627b2d71993-12-24 10:39:16 +000018881# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018882 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018883
Martin v. Löwis11437992002-04-12 09:54:03 +000018884cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018885# This file is a shell script that caches the results of configure
18886# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018887# scripts and configure runs, see configure's option --config-cache.
18888# It is not useful on other systems. If it contains results you don't
18889# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018890#
Martin v. Löwis11437992002-04-12 09:54:03 +000018891# config.status only pays attention to the cache file if you give it
18892# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018893#
Skip Montanaro6dead952003-09-25 14:50:04 +000018894# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018895# loading this file, other *unset* `ac_cv_foo' will be assigned the
18896# following values.
18897
18898_ACEOF
18899
Guido van Rossumf78abae1997-01-21 22:02:36 +000018900# The following way of writing the cache mishandles newlines in values,
18901# but we know of no workaround that is simple, portable, and efficient.
18902# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018903# Ultrix sh set writes to stderr and can't be redirected directly,
18904# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018905{
18906 (set) 2>&1 |
18907 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18908 *ac_space=\ *)
18909 # `set' does not quote correctly, so add quotes (double-quote
18910 # substitution turns \\\\ into \\, and sed turns \\ into \).
18911 sed -n \
18912 "s/'/'\\\\''/g;
18913 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18914 ;;
18915 *)
18916 # `set' quotes correctly as required by POSIX, so do not add quotes.
18917 sed -n \
18918 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18919 ;;
18920 esac;
18921} |
18922 sed '
18923 t clear
18924 : clear
18925 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18926 t end
18927 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18928 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018929if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018930 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18932 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018933 else
18934 echo "not updating unwritable cache $cache_file"
18935 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018936fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018937rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018938
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018939test "x$prefix" = xNONE && prefix=$ac_default_prefix
18940# Let make expand exec_prefix.
18941test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018942
Martin v. Löwis11437992002-04-12 09:54:03 +000018943# VPATH may cause trouble with some makes, so we remove $(srcdir),
18944# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18945# trailing colons and then remove the whole line if VPATH becomes empty
18946# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018947if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018948 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18949s/:*\$(srcdir):*/:/;
18950s/:*\${srcdir}:*/:/;
18951s/:*@srcdir@:*/:/;
18952s/^\([^=]*=[ ]*\):*/\1/;
18953s/:*$//;
18954s/^[^=]*=[ ]*$//;
18955}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018956fi
18957
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018958DEFS=-DHAVE_CONFIG_H
18959
Skip Montanaro6dead952003-09-25 14:50:04 +000018960ac_libobjs=
18961ac_ltlibobjs=
18962for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18963 # 1. Remove the extension, and $U if already installed.
18964 ac_i=`echo "$ac_i" |
18965 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18966 # 2. Add them.
18967 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18968 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18969done
18970LIBOBJS=$ac_libobjs
18971
18972LTLIBOBJS=$ac_ltlibobjs
18973
18974
Martin v. Löwis11437992002-04-12 09:54:03 +000018975
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018976: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018977ac_clean_files_save=$ac_clean_files
18978ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18979{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18980echo "$as_me: creating $CONFIG_STATUS" >&6;}
18981cat >$CONFIG_STATUS <<_ACEOF
18982#! $SHELL
18983# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018984# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018985# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018986# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018987
Martin v. Löwis11437992002-04-12 09:54:03 +000018988debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018989ac_cs_recheck=false
18990ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018991SHELL=\${CONFIG_SHELL-$SHELL}
18992_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018993
Martin v. Löwis11437992002-04-12 09:54:03 +000018994cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018995## --------------------- ##
18996## M4sh Initialization. ##
18997## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018998
Martin v. Löwis11437992002-04-12 09:54:03 +000018999# Be Bourne compatible
19000if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19001 emulate sh
19002 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019003 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19004 # is contrary to our usage. Disable this feature.
19005 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000019006elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19007 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000019008fi
Michael W. Hudson54241132001-12-07 15:38:26 +000019009
Martin v. Löwis11437992002-04-12 09:54:03 +000019010# Support unset when possible.
19011if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19012 as_unset=unset
19013else
19014 as_unset=false
19015fi
Michael W. Hudson54241132001-12-07 15:38:26 +000019016
Skip Montanaro6dead952003-09-25 14:50:04 +000019017
19018# Work around bugs in pre-3.0 UWIN ksh.
19019$as_unset ENV MAIL MAILPATH
19020PS1='$ '
19021PS2='> '
19022PS4='+ '
19023
19024# NLS nuisances.
19025for as_var in \
19026 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19027 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19028 LC_TELEPHONE LC_TIME
19029do
19030 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19031 eval $as_var=C; export $as_var
19032 else
19033 $as_unset $as_var
19034 fi
19035done
19036
19037# Required to use basename.
19038if expr a : '\(a\)' >/dev/null 2>&1; then
19039 as_expr=expr
19040else
19041 as_expr=false
19042fi
19043
19044if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19045 as_basename=basename
19046else
19047 as_basename=false
19048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019049
19050
19051# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000019052as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019053$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19054 X"$0" : 'X\(//\)$' \| \
19055 X"$0" : 'X\(/\)$' \| \
19056 . : '\(.\)' 2>/dev/null ||
19057echo X/"$0" |
19058 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19059 /^X\/\(\/\/\)$/{ s//\1/; q; }
19060 /^X\/\(\/\).*/{ s//\1/; q; }
19061 s/.*/./; q'`
19062
Skip Montanaro6dead952003-09-25 14:50:04 +000019063
Martin v. Löwis11437992002-04-12 09:54:03 +000019064# PATH needs CR, and LINENO needs CR and PATH.
19065# Avoid depending upon Character Ranges.
19066as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19067as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19068as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19069as_cr_digits='0123456789'
19070as_cr_alnum=$as_cr_Letters$as_cr_digits
19071
19072# The user is always right.
19073if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019074 echo "#! /bin/sh" >conf$$.sh
19075 echo "exit 0" >>conf$$.sh
19076 chmod +x conf$$.sh
19077 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019078 PATH_SEPARATOR=';'
19079 else
19080 PATH_SEPARATOR=:
19081 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019082 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000019083fi
19084
19085
19086 as_lineno_1=$LINENO
19087 as_lineno_2=$LINENO
19088 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19089 test "x$as_lineno_1" != "x$as_lineno_2" &&
19090 test "x$as_lineno_3" = "x$as_lineno_2" || {
19091 # Find who we are. Look in the path if we contain no path at all
19092 # relative or not.
19093 case $0 in
19094 *[\\/]* ) as_myself=$0 ;;
19095 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19096for as_dir in $PATH
19097do
19098 IFS=$as_save_IFS
19099 test -z "$as_dir" && as_dir=.
19100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19101done
19102
19103 ;;
19104 esac
19105 # We did not find ourselves, most probably we were run as `sh COMMAND'
19106 # in which case we are not to be found in the path.
19107 if test "x$as_myself" = x; then
19108 as_myself=$0
19109 fi
19110 if test ! -f "$as_myself"; then
19111 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19112echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19113 { (exit 1); exit 1; }; }
19114 fi
19115 case $CONFIG_SHELL in
19116 '')
19117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19118for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19119do
19120 IFS=$as_save_IFS
19121 test -z "$as_dir" && as_dir=.
19122 for as_base in sh bash ksh sh5; do
19123 case $as_dir in
19124 /*)
19125 if ("$as_dir/$as_base" -c '
19126 as_lineno_1=$LINENO
19127 as_lineno_2=$LINENO
19128 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19129 test "x$as_lineno_1" != "x$as_lineno_2" &&
19130 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019131 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19132 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019133 CONFIG_SHELL=$as_dir/$as_base
19134 export CONFIG_SHELL
19135 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19136 fi;;
19137 esac
19138 done
19139done
19140;;
Jack Jansendd19cf82001-12-06 22:36:17 +000019141 esac
19142
Martin v. Löwis11437992002-04-12 09:54:03 +000019143 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19144 # uniformly replaced by the line number. The first 'sed' inserts a
19145 # line-number line before each line; the second 'sed' does the real
19146 # work. The second script uses 'N' to pair each line-number line
19147 # with the numbered line, and appends trailing '-' during
19148 # substitution so that $LINENO is not a special case at line end.
19149 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19150 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
19151 sed '=' <$as_myself |
19152 sed '
19153 N
19154 s,$,-,
19155 : loop
19156 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19157 t loop
19158 s,-$,,
19159 s,^['$as_cr_digits']*\n,,
19160 ' >$as_me.lineno &&
19161 chmod +x $as_me.lineno ||
19162 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19163echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19164 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019165
Martin v. Löwis11437992002-04-12 09:54:03 +000019166 # Don't try to exec as it changes $[0], causing all sort of problems
19167 # (the dirname of $[0] is not the place where we might find the
19168 # original and so on. Autoconf is especially sensible to this).
19169 . ./$as_me.lineno
19170 # Exit status is that of the last command.
19171 exit
19172}
19173
19174
19175case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19176 *c*,-n*) ECHO_N= ECHO_C='
19177' ECHO_T=' ' ;;
19178 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19179 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
19180esac
19181
19182if expr a : '\(a\)' >/dev/null 2>&1; then
19183 as_expr=expr
19184else
19185 as_expr=false
19186fi
19187
19188rm -f conf$$ conf$$.exe conf$$.file
19189echo >conf$$.file
19190if ln -s conf$$.file conf$$ 2>/dev/null; then
19191 # We could just check for DJGPP; but this test a) works b) is more generic
19192 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19193 if test -f conf$$.exe; then
19194 # Don't use ln at all; we don't have any links
19195 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019196 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019197 as_ln_s='ln -s'
19198 fi
19199elif ln conf$$.file conf$$ 2>/dev/null; then
19200 as_ln_s=ln
19201else
19202 as_ln_s='cp -p'
19203fi
19204rm -f conf$$ conf$$.exe conf$$.file
19205
Skip Montanaro6dead952003-09-25 14:50:04 +000019206if mkdir -p . 2>/dev/null; then
19207 as_mkdir_p=:
19208else
19209 as_mkdir_p=false
19210fi
19211
Martin v. Löwis11437992002-04-12 09:54:03 +000019212as_executable_p="test -f"
19213
19214# Sed expression to map a string onto a valid CPP name.
19215as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19216
19217# Sed expression to map a string onto a valid variable name.
19218as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19219
19220
19221# IFS
19222# We need space, tab and new line, in precisely that order.
19223as_nl='
19224'
19225IFS=" $as_nl"
19226
19227# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000019228$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000019229
19230exec 6>&1
19231
19232# Open the log real soon, to keep \$[0] and so on meaningful, and to
19233# report actual input values of CONFIG_FILES etc. instead of their
19234# values after options handling. Logging --version etc. is OK.
19235exec 5>>config.log
19236{
19237 echo
19238 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19239## Running $as_me. ##
19240_ASBOX
19241} >&5
19242cat >&5 <<_CSEOF
19243
Fred Drake9bd44622003-07-30 17:39:48 +000019244This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000019245generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000019246
19247 CONFIG_FILES = $CONFIG_FILES
19248 CONFIG_HEADERS = $CONFIG_HEADERS
19249 CONFIG_LINKS = $CONFIG_LINKS
19250 CONFIG_COMMANDS = $CONFIG_COMMANDS
19251 $ $0 $@
19252
19253_CSEOF
19254echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19255echo >&5
19256_ACEOF
19257
19258# Files that config.status was made for.
19259if test -n "$ac_config_files"; then
19260 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19261fi
19262
19263if test -n "$ac_config_headers"; then
19264 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19265fi
19266
19267if test -n "$ac_config_links"; then
19268 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19269fi
19270
19271if test -n "$ac_config_commands"; then
19272 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19273fi
19274
19275cat >>$CONFIG_STATUS <<\_ACEOF
19276
19277ac_cs_usage="\
19278\`$as_me' instantiates files from templates according to the
19279current configuration.
19280
19281Usage: $0 [OPTIONS] [FILE]...
19282
19283 -h, --help print this help, then exit
19284 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000019285 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000019286 -d, --debug don't remove temporary files
19287 --recheck update $as_me by reconfiguring in the same conditions
19288 --file=FILE[:TEMPLATE]
19289 instantiate the configuration file FILE
19290 --header=FILE[:TEMPLATE]
19291 instantiate the configuration header FILE
19292
19293Configuration files:
19294$config_files
19295
19296Configuration headers:
19297$config_headers
19298
19299Report bugs to <bug-autoconf@gnu.org>."
19300_ACEOF
19301
19302cat >>$CONFIG_STATUS <<_ACEOF
19303ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000019304python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000019305configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000019306 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19307
19308Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19309Free Software Foundation, Inc.
19310This config.status script is free software; the Free Software Foundation
19311gives unlimited permission to copy, distribute and modify it."
19312srcdir=$srcdir
19313INSTALL="$INSTALL"
19314_ACEOF
19315
19316cat >>$CONFIG_STATUS <<\_ACEOF
19317# If no file are specified by the user, then we need to provide default
19318# value. By we need to know if files were specified by the user.
19319ac_need_defaults=:
19320while test $# != 0
19321do
19322 case $1 in
19323 --*=*)
19324 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19325 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019326 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000019327 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019328 -*)
19329 ac_option=$1
19330 ac_optarg=$2
19331 ac_shift=shift
19332 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019333 *) # This is not an option, so the user has probably given explicit
19334 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000019335 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000019336 ac_need_defaults=false;;
19337 esac
19338
Skip Montanaro6dead952003-09-25 14:50:04 +000019339 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000019340 # Handling of the options.
19341_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019342cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019343 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19344 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019345 --version | --vers* | -V )
19346 echo "$ac_cs_version"; exit 0 ;;
19347 --he | --h)
19348 # Conflict between --help and --header
19349 { { echo "$as_me:$LINENO: error: ambiguous option: $1
19350Try \`$0 --help' for more information." >&5
19351echo "$as_me: error: ambiguous option: $1
19352Try \`$0 --help' for more information." >&2;}
19353 { (exit 1); exit 1; }; };;
19354 --help | --hel | -h )
19355 echo "$ac_cs_usage"; exit 0 ;;
19356 --debug | --d* | -d )
19357 debug=: ;;
19358 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000019359 $ac_shift
19360 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019361 ac_need_defaults=false;;
19362 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000019363 $ac_shift
19364 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019365 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019366 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19367 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19368 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019369
19370 # This is an error.
19371 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19372Try \`$0 --help' for more information." >&5
19373echo "$as_me: error: unrecognized option: $1
19374Try \`$0 --help' for more information." >&2;}
19375 { (exit 1); exit 1; }; } ;;
19376
19377 *) ac_config_targets="$ac_config_targets $1" ;;
19378
19379 esac
19380 shift
19381done
19382
Skip Montanaro6dead952003-09-25 14:50:04 +000019383ac_configure_extra_args=
19384
19385if $ac_cs_silent; then
19386 exec 6>/dev/null
19387 ac_configure_extra_args="$ac_configure_extra_args --silent"
19388fi
19389
19390_ACEOF
19391cat >>$CONFIG_STATUS <<_ACEOF
19392if \$ac_cs_recheck; then
19393 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19394 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19395fi
19396
Martin v. Löwis11437992002-04-12 09:54:03 +000019397_ACEOF
19398
19399
19400
19401
19402
19403cat >>$CONFIG_STATUS <<\_ACEOF
19404for ac_config_target in $ac_config_targets
19405do
19406 case "$ac_config_target" in
19407 # Handling of arguments.
19408 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
19409 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
19410 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
19411 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19412echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19413 { (exit 1); exit 1; }; };;
19414 esac
19415done
19416
19417# If the user did not use the arguments to specify the items to instantiate,
19418# then the envvar interface is used. Set only those that are not.
19419# We use the long form for the default assignment because of an extremely
19420# bizarre bug on SunOS 4.1.3.
19421if $ac_need_defaults; then
19422 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19423 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19424fi
19425
Skip Montanaro6dead952003-09-25 14:50:04 +000019426# Have a temporary directory for convenience. Make it in the build tree
19427# simply because there is no reason to put it here, and in addition,
19428# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000019429# Create a temporary directory, and hook for its removal unless debugging.
19430$debug ||
19431{
19432 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19433 trap '{ (exit 1); exit 1; }' 1 2 13 15
19434}
19435
19436# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000019437
Martin v. Löwis11437992002-04-12 09:54:03 +000019438{
Skip Montanaro6dead952003-09-25 14:50:04 +000019439 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000019440 test -n "$tmp" && test -d "$tmp"
19441} ||
19442{
Skip Montanaro6dead952003-09-25 14:50:04 +000019443 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000019444 (umask 077 && mkdir $tmp)
19445} ||
19446{
Skip Montanaro6dead952003-09-25 14:50:04 +000019447 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000019448 { (exit 1); exit 1; }
19449}
19450
19451_ACEOF
19452
19453cat >>$CONFIG_STATUS <<_ACEOF
19454
19455#
19456# CONFIG_FILES section.
19457#
19458
19459# No need to generate the scripts if there are no CONFIG_FILES.
19460# This happens for instance when ./config.status config.h
19461if test -n "\$CONFIG_FILES"; then
19462 # Protect against being on the right side of a sed subst in config.status.
19463 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19464 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19465s,@SHELL@,$SHELL,;t t
19466s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19467s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19468s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19469s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19470s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19471s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19472s,@exec_prefix@,$exec_prefix,;t t
19473s,@prefix@,$prefix,;t t
19474s,@program_transform_name@,$program_transform_name,;t t
19475s,@bindir@,$bindir,;t t
19476s,@sbindir@,$sbindir,;t t
19477s,@libexecdir@,$libexecdir,;t t
19478s,@datadir@,$datadir,;t t
19479s,@sysconfdir@,$sysconfdir,;t t
19480s,@sharedstatedir@,$sharedstatedir,;t t
19481s,@localstatedir@,$localstatedir,;t t
19482s,@libdir@,$libdir,;t t
19483s,@includedir@,$includedir,;t t
19484s,@oldincludedir@,$oldincludedir,;t t
19485s,@infodir@,$infodir,;t t
19486s,@mandir@,$mandir,;t t
19487s,@build_alias@,$build_alias,;t t
19488s,@host_alias@,$host_alias,;t t
19489s,@target_alias@,$target_alias,;t t
19490s,@DEFS@,$DEFS,;t t
19491s,@ECHO_C@,$ECHO_C,;t t
19492s,@ECHO_N@,$ECHO_N,;t t
19493s,@ECHO_T@,$ECHO_T,;t t
19494s,@LIBS@,$LIBS,;t t
19495s,@VERSION@,$VERSION,;t t
19496s,@SOVERSION@,$SOVERSION,;t t
19497s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
19498s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
19499s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
19500s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
19501s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
19502s,@MACHDEP@,$MACHDEP,;t t
19503s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000019504s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000019505s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019506s,@CXX@,$CXX,;t t
19507s,@MAINOBJ@,$MAINOBJ,;t t
19508s,@EXEEXT@,$EXEEXT,;t t
19509s,@CC@,$CC,;t t
19510s,@CFLAGS@,$CFLAGS,;t t
19511s,@LDFLAGS@,$LDFLAGS,;t t
19512s,@CPPFLAGS@,$CPPFLAGS,;t t
19513s,@ac_ct_CC@,$ac_ct_CC,;t t
19514s,@OBJEXT@,$OBJEXT,;t t
19515s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019516s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019517s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
19518s,@LIBRARY@,$LIBRARY,;t t
19519s,@LDLIBRARY@,$LDLIBRARY,;t t
19520s,@DLLLIBRARY@,$DLLLIBRARY,;t t
19521s,@BLDLIBRARY@,$BLDLIBRARY,;t t
19522s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
19523s,@INSTSONAME@,$INSTSONAME,;t t
19524s,@RUNSHARED@,$RUNSHARED,;t t
19525s,@LINKCC@,$LINKCC,;t t
19526s,@RANLIB@,$RANLIB,;t t
19527s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19528s,@AR@,$AR,;t t
19529s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19530s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19531s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19532s,@LN@,$LN,;t t
19533s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000019534s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019535s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
19536s,@SO@,$SO,;t t
19537s,@LDSHARED@,$LDSHARED,;t t
19538s,@BLDSHARED@,$BLDSHARED,;t t
19539s,@CCSHARED@,$CCSHARED,;t t
19540s,@LINKFORSHARED@,$LINKFORSHARED,;t t
19541s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000019542s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019543s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
19544s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
19545s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
19546s,@LDLAST@,$LDLAST,;t t
19547s,@THREADOBJ@,$THREADOBJ,;t t
19548s,@DLINCLDIR@,$DLINCLDIR,;t t
19549s,@DYNLOADFILE@,$DYNLOADFILE,;t t
19550s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019551s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019552s,@LIBOBJS@,$LIBOBJS,;t t
19553s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
19554s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
19555s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
19556s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
19557s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
19558s,@LIBM@,$LIBM,;t t
19559s,@LIBC@,$LIBC,;t t
19560s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
19561s,@THREADHEADERS@,$THREADHEADERS,;t t
19562s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019563s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019564CEOF
19565
19566_ACEOF
19567
19568 cat >>$CONFIG_STATUS <<\_ACEOF
19569 # Split the substitutions into bite-sized pieces for seds with
19570 # small command number limits, like on Digital OSF/1 and HP-UX.
19571 ac_max_sed_lines=48
19572 ac_sed_frag=1 # Number of current file.
19573 ac_beg=1 # First line for current file.
19574 ac_end=$ac_max_sed_lines # Line after last line for current file.
19575 ac_more_lines=:
19576 ac_sed_cmds=
19577 while $ac_more_lines; do
19578 if test $ac_beg -gt 1; then
19579 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19580 else
19581 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19582 fi
19583 if test ! -s $tmp/subs.frag; then
19584 ac_more_lines=false
19585 else
19586 # The purpose of the label and of the branching condition is to
19587 # speed up the sed processing (if there are no `@' at all, there
19588 # is no need to browse any of the substitutions).
19589 # These are the two extra sed commands mentioned above.
19590 (echo ':t
19591 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19592 if test -z "$ac_sed_cmds"; then
19593 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19594 else
19595 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19596 fi
19597 ac_sed_frag=`expr $ac_sed_frag + 1`
19598 ac_beg=$ac_end
19599 ac_end=`expr $ac_end + $ac_max_sed_lines`
19600 fi
19601 done
19602 if test -z "$ac_sed_cmds"; then
19603 ac_sed_cmds=cat
19604 fi
19605fi # test -n "$CONFIG_FILES"
19606
19607_ACEOF
19608cat >>$CONFIG_STATUS <<\_ACEOF
19609for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19610 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19611 case $ac_file in
19612 - | *:- | *:-:* ) # input from stdin
19613 cat >$tmp/stdin
19614 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19615 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19616 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19617 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19618 * ) ac_file_in=$ac_file.in ;;
19619 esac
19620
19621 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19622 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19623$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19624 X"$ac_file" : 'X\(//\)[^/]' \| \
19625 X"$ac_file" : 'X\(//\)$' \| \
19626 X"$ac_file" : 'X\(/\)' \| \
19627 . : '\(.\)' 2>/dev/null ||
19628echo X"$ac_file" |
19629 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19630 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19631 /^X\(\/\/\)$/{ s//\1/; q; }
19632 /^X\(\/\).*/{ s//\1/; q; }
19633 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019634 { if $as_mkdir_p; then
19635 mkdir -p "$ac_dir"
19636 else
19637 as_dir="$ac_dir"
19638 as_dirs=
19639 while test ! -d "$as_dir"; do
19640 as_dirs="$as_dir $as_dirs"
19641 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19642$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19643 X"$as_dir" : 'X\(//\)[^/]' \| \
19644 X"$as_dir" : 'X\(//\)$' \| \
19645 X"$as_dir" : 'X\(/\)' \| \
19646 . : '\(.\)' 2>/dev/null ||
19647echo X"$as_dir" |
19648 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19649 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19650 /^X\(\/\/\)$/{ s//\1/; q; }
19651 /^X\(\/\).*/{ s//\1/; q; }
19652 s/.*/./; q'`
19653 done
19654 test ! -n "$as_dirs" || mkdir $as_dirs
19655 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19656echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19657 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019658
19659 ac_builddir=.
19660
19661if test "$ac_dir" != .; then
19662 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19663 # A "../" for each directory in $ac_dir_suffix.
19664 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19665else
19666 ac_dir_suffix= ac_top_builddir=
19667fi
19668
19669case $srcdir in
19670 .) # No --srcdir option. We are building in place.
19671 ac_srcdir=.
19672 if test -z "$ac_top_builddir"; then
19673 ac_top_srcdir=.
19674 else
19675 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19676 fi ;;
19677 [\\/]* | ?:[\\/]* ) # Absolute path.
19678 ac_srcdir=$srcdir$ac_dir_suffix;
19679 ac_top_srcdir=$srcdir ;;
19680 *) # Relative path.
19681 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19682 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19683esac
19684# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19685# absolute.
19686ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000019687ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019688ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19689ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19690
19691
19692 case $INSTALL in
19693 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19694 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19695 esac
19696
19697 if test x"$ac_file" != x-; then
19698 { echo "$as_me:$LINENO: creating $ac_file" >&5
19699echo "$as_me: creating $ac_file" >&6;}
19700 rm -f "$ac_file"
19701 fi
19702 # Let's still pretend it is `configure' which instantiates (i.e., don't
19703 # use $as_me), people would be surprised to read:
19704 # /* config.h. Generated by config.status. */
19705 if test x"$ac_file" = x-; then
19706 configure_input=
19707 else
19708 configure_input="$ac_file. "
19709 fi
19710 configure_input=$configure_input"Generated from `echo $ac_file_in |
19711 sed 's,.*/,,'` by configure."
19712
19713 # First look for the input files in the build tree, otherwise in the
19714 # src tree.
19715 ac_file_inputs=`IFS=:
19716 for f in $ac_file_in; do
19717 case $f in
19718 -) echo $tmp/stdin ;;
19719 [\\/$]*)
19720 # Absolute (can't be DOS-style, as IFS=:)
19721 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19722echo "$as_me: error: cannot find input file: $f" >&2;}
19723 { (exit 1); exit 1; }; }
19724 echo $f;;
19725 *) # Relative
19726 if test -f "$f"; then
19727 # Build tree
19728 echo $f
19729 elif test -f "$srcdir/$f"; then
19730 # Source tree
19731 echo $srcdir/$f
19732 else
19733 # /dev/null tree
19734 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19735echo "$as_me: error: cannot find input file: $f" >&2;}
19736 { (exit 1); exit 1; }; }
19737 fi;;
19738 esac
19739 done` || { (exit 1); exit 1; }
19740_ACEOF
19741cat >>$CONFIG_STATUS <<_ACEOF
19742 sed "$ac_vpsub
19743$extrasub
19744_ACEOF
19745cat >>$CONFIG_STATUS <<\_ACEOF
19746:t
19747/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19748s,@configure_input@,$configure_input,;t t
19749s,@srcdir@,$ac_srcdir,;t t
19750s,@abs_srcdir@,$ac_abs_srcdir,;t t
19751s,@top_srcdir@,$ac_top_srcdir,;t t
19752s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19753s,@builddir@,$ac_builddir,;t t
19754s,@abs_builddir@,$ac_abs_builddir,;t t
19755s,@top_builddir@,$ac_top_builddir,;t t
19756s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19757s,@INSTALL@,$ac_INSTALL,;t t
19758" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19759 rm -f $tmp/stdin
19760 if test x"$ac_file" != x-; then
19761 mv $tmp/out $ac_file
19762 else
19763 cat $tmp/out
19764 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019765 fi
19766
Martin v. Löwis11437992002-04-12 09:54:03 +000019767done
19768_ACEOF
19769cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019770
Martin v. Löwis11437992002-04-12 09:54:03 +000019771#
19772# CONFIG_HEADER section.
19773#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019774
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019775# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19776# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019777#
19778# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019779ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19780ac_dB='[ ].*$,\1#\2'
19781ac_dC=' '
19782ac_dD=',;t'
19783# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19784ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19785ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019786ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019787ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019788
Martin v. Löwis11437992002-04-12 09:54:03 +000019789for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019790 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019791 case $ac_file in
19792 - | *:- | *:-:* ) # input from stdin
19793 cat >$tmp/stdin
19794 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19795 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19796 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19797 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19798 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019799 esac
19800
Martin v. Löwis11437992002-04-12 09:54:03 +000019801 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19802echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019803
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 # First look for the input files in the build tree, otherwise in the
19805 # src tree.
19806 ac_file_inputs=`IFS=:
19807 for f in $ac_file_in; do
19808 case $f in
19809 -) echo $tmp/stdin ;;
19810 [\\/$]*)
19811 # Absolute (can't be DOS-style, as IFS=:)
19812 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19813echo "$as_me: error: cannot find input file: $f" >&2;}
19814 { (exit 1); exit 1; }; }
19815 echo $f;;
19816 *) # Relative
19817 if test -f "$f"; then
19818 # Build tree
19819 echo $f
19820 elif test -f "$srcdir/$f"; then
19821 # Source tree
19822 echo $srcdir/$f
19823 else
19824 # /dev/null tree
19825 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19826echo "$as_me: error: cannot find input file: $f" >&2;}
19827 { (exit 1); exit 1; }; }
19828 fi;;
19829 esac
19830 done` || { (exit 1); exit 1; }
19831 # Remove the trailing spaces.
19832 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019833
Martin v. Löwis11437992002-04-12 09:54:03 +000019834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019835
Martin v. Löwis11437992002-04-12 09:54:03 +000019836# Transform confdefs.h into two sed scripts, `conftest.defines' and
19837# `conftest.undefs', that substitutes the proper values into
19838# config.h.in to produce config.h. The first handles `#define'
19839# templates, and the second `#undef' templates.
19840# And first: Protect against being on the right side of a sed subst in
19841# config.status. Protect against being in an unquoted here document
19842# in config.status.
19843rm -f conftest.defines conftest.undefs
19844# Using a here document instead of a string reduces the quoting nightmare.
19845# Putting comments in sed scripts is not portable.
19846#
19847# `end' is used to avoid that the second main sed command (meant for
19848# 0-ary CPP macros) applies to n-ary macro definitions.
19849# See the Autoconf documentation for `clear'.
19850cat >confdef2sed.sed <<\_ACEOF
19851s/[\\&,]/\\&/g
19852s,[\\$`],\\&,g
19853t clear
19854: clear
19855s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19856t end
19857s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19858: end
19859_ACEOF
19860# If some macros were called several times there might be several times
19861# the same #defines, which is useless. Nevertheless, we may not want to
19862# sort them, since we want the *last* AC-DEFINE to be honored.
19863uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19864sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19865rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019866
19867# This sed command replaces #undef with comments. This is necessary, for
19868# example, in the case of _POSIX_SOURCE, which is predefined and required
19869# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019870cat >>conftest.undefs <<\_ACEOF
19871s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19872_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019873
Martin v. Löwis11437992002-04-12 09:54:03 +000019874# Break up conftest.defines because some shells have a limit on the size
19875# of here documents, and old seds have small limits too (100 cmds).
19876echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019877echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019878echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19879echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019880rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019881while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019882do
Martin v. Löwis11437992002-04-12 09:54:03 +000019883 # Write a limited-size here document to $tmp/defines.sed.
19884 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19885 # Speed up: don't consider the non `#define' lines.
19886 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19887 # Work around the forget-to-reset-the-flag bug.
19888 echo 't clr' >>$CONFIG_STATUS
19889 echo ': clr' >>$CONFIG_STATUS
19890 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019891 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019892 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19893 rm -f $tmp/in
19894 mv $tmp/out $tmp/in
19895' >>$CONFIG_STATUS
19896 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19897 rm -f conftest.defines
19898 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019899done
Martin v. Löwis11437992002-04-12 09:54:03 +000019900rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019901echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019902echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019903
Martin v. Löwis11437992002-04-12 09:54:03 +000019904# Break up conftest.undefs because some shells have a limit on the size
19905# of here documents, and old seds have small limits too (100 cmds).
19906echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19907rm -f conftest.tail
19908while grep . conftest.undefs >/dev/null
19909do
19910 # Write a limited-size here document to $tmp/undefs.sed.
19911 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19912 # Speed up: don't consider the non `#undef'
19913 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19914 # Work around the forget-to-reset-the-flag bug.
19915 echo 't clr' >>$CONFIG_STATUS
19916 echo ': clr' >>$CONFIG_STATUS
19917 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19918 echo 'CEOF
19919 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19920 rm -f $tmp/in
19921 mv $tmp/out $tmp/in
19922' >>$CONFIG_STATUS
19923 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19924 rm -f conftest.undefs
19925 mv conftest.tail conftest.undefs
19926done
19927rm -f conftest.undefs
19928
19929cat >>$CONFIG_STATUS <<\_ACEOF
19930 # Let's still pretend it is `configure' which instantiates (i.e., don't
19931 # use $as_me), people would be surprised to read:
19932 # /* config.h. Generated by config.status. */
19933 if test x"$ac_file" = x-; then
19934 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019935 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019936 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019938 cat $tmp/in >>$tmp/config.h
19939 rm -f $tmp/in
19940 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019941 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019942 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19943echo "$as_me: $ac_file is unchanged" >&6;}
19944 else
19945 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19946$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19947 X"$ac_file" : 'X\(//\)[^/]' \| \
19948 X"$ac_file" : 'X\(//\)$' \| \
19949 X"$ac_file" : 'X\(/\)' \| \
19950 . : '\(.\)' 2>/dev/null ||
19951echo X"$ac_file" |
19952 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19953 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19954 /^X\(\/\/\)$/{ s//\1/; q; }
19955 /^X\(\/\).*/{ s//\1/; q; }
19956 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019957 { if $as_mkdir_p; then
19958 mkdir -p "$ac_dir"
19959 else
19960 as_dir="$ac_dir"
19961 as_dirs=
19962 while test ! -d "$as_dir"; do
19963 as_dirs="$as_dir $as_dirs"
19964 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19965$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19966 X"$as_dir" : 'X\(//\)[^/]' \| \
19967 X"$as_dir" : 'X\(//\)$' \| \
19968 X"$as_dir" : 'X\(/\)' \| \
19969 . : '\(.\)' 2>/dev/null ||
19970echo X"$as_dir" |
19971 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19972 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19973 /^X\(\/\/\)$/{ s//\1/; q; }
19974 /^X\(\/\).*/{ s//\1/; q; }
19975 s/.*/./; q'`
19976 done
19977 test ! -n "$as_dirs" || mkdir $as_dirs
19978 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19979echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19980 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019981
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 rm -f $ac_file
19983 mv $tmp/config.h $ac_file
19984 fi
19985 else
19986 cat $tmp/config.h
19987 rm -f $tmp/config.h
19988 fi
19989done
19990_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019991
Martin v. Löwis11437992002-04-12 09:54:03 +000019992cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019993
Martin v. Löwis11437992002-04-12 09:54:03 +000019994{ (exit 0); exit 0; }
19995_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019996chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019997ac_clean_files=$ac_clean_files_save
19998
19999
20000# configure is writing to config.log, and then calls config.status.
20001# config.status does its own redirection, appending to config.log.
20002# Unfortunately, on DOS this fails, as config.log is still kept open
20003# by configure, so config.status won't be able to write to it; its
20004# output is simply discarded. So we exec the FD to /dev/null,
20005# effectively closing config.log, so it can be properly (re)opened and
20006# appended to by config.status. When coming back to configure, we
20007# need to make the FD available again.
20008if test "$no_create" != yes; then
20009 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020010 ac_config_status_args=
20011 test "$silent" = yes &&
20012 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000020013 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000020014 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020015 exec 5>>config.log
20016 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20017 # would make configure fail if this is the last instruction.
20018 $ac_cs_success || { (exit 1); exit 1; }
20019fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020020
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000020021
20022echo "creating Setup"
20023if test ! -f Modules/Setup
20024then
20025 cp $srcdir/Modules/Setup.dist Modules/Setup
20026fi
20027
20028echo "creating Setup.local"
20029if test ! -f Modules/Setup.local
20030then
20031 echo "# Edit this file for local setup changes" >Modules/Setup.local
20032fi
20033
20034echo "creating Makefile"
20035$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
20036 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000020037 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000020038mv config.c Modules