blob: 605af7b9fad31a68d02ccf2413662cd91fb10a51 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Anthony Baxterc0501192003-09-27 09:12:27 +00002# From configure.in Revision: 1.436 .
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öwis858f8172003-05-24 12:35:47 +00001440 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm.
1441 OpenBSD/2.* | OpenBSD/3.[0123])
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;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001455esac
1456
1457if test $define_xopen_source = yes
1458then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001459
1460cat >>confdefs.h <<\_ACEOF
1461#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001462_ACEOF
1463
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001464
1465 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1466 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1467 # several APIs are not declared. Since this is also needed in some
1468 # cases for HP-UX, we define it globally.
1469
1470
1471cat >>confdefs.h <<\_ACEOF
1472#define _XOPEN_SOURCE_EXTENDED 1
1473_ACEOF
1474
1475
1476cat >>confdefs.h <<\_ACEOF
1477#define _POSIX_C_SOURCE 200112L
1478_ACEOF
1479
1480
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001481fi
1482
Guido van Rossum91922671997-10-09 20:24:13 +00001483#
1484# SGI compilers allow the specification of the both the ABI and the
1485# ISA on the command line. Depending on the values of these switches,
1486# different and often incompatable code will be generated.
1487#
1488# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1489# thus supply support for various ABI/ISA combinations. The MACHDEP
1490# variable is also adjusted.
1491#
1492
1493if test ! -z "$SGI_ABI"
1494then
1495 CC="cc $SGI_ABI"
1496 LDFLAGS="$SGI_ABI $LDFLAGS"
1497 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1498fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001499echo "$as_me:$LINENO: result: $MACHDEP" >&5
1500echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001501
Jack Jansen83f898c2002-12-30 22:23:40 +00001502# And add extra plat-mac for darwin
1503
Jack Jansen7b59b422003-03-17 15:44:10 +00001504
Jack Jansen83f898c2002-12-30 22:23:40 +00001505echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1506echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1507if test -z "$EXTRAPLATDIR"
1508then
1509 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001510 darwin)
1511 EXTRAPLATDIR="\$(PLATMACDIRS)"
1512 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1513 ;;
1514 *)
1515 EXTRAPLATDIR=""
1516 EXTRAMACHDEPPATH=""
1517 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001518 esac
1519fi
1520echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1521echo "${ECHO_T}$EXTRAPLATDIR" >&6
1522
Guido van Rossum627b2d71993-12-24 10:39:16 +00001523# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001524
1525# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1526# for debug/optimization stuff. BASECFLAGS is for flags that are required
1527# just to get things to compile and link. Users are free to override OPT
1528# when running configure or make. The build should not break if they do.
1529# BASECFLAGS should generally not be messed with, however.
1530
1531# XXX shouldn't some/most/all of this code be merged with the stuff later
1532# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001533echo "$as_me:$LINENO: checking for --without-gcc" >&5
1534echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001537if test "${with_gcc+set}" = set; then
1538 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001539
Guido van Rossum7f43da71994-08-01 12:15:30 +00001540 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001541 no) CC=cc
1542 without_gcc=yes;;
1543 yes) CC=gcc
1544 without_gcc=no;;
1545 *) CC=$withval
1546 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001547 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001548else
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001550 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001551 AIX*) CC=cc_r
1552 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001553 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001554 case $BE_HOST_CPU in
1555 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001556 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001557 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001558 BASECFLAGS="$BASECFLAGS -export pragma"
1559 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001560 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001561 ;;
1562 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001563 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001564 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001565 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001566 ;;
1567 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1569echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1570 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 ;;
1572 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001573 AR="\$(srcdir)/Modules/ar_beos"
1574 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001576 Monterey*)
1577 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001578 without_gcc=;;
1579 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001580 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001581fi;
1582echo "$as_me:$LINENO: result: $without_gcc" >&5
1583echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001584
1585
Guido van Rossum95012191999-12-16 17:50:52 +00001586
Fred Drakea1a84e72001-03-06 05:52:16 +00001587MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001588echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1589echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1590
Guido van Rossum95012191999-12-16 17:50:52 +00001591# Check whether --with-cxx or --without-cxx was given.
1592if test "${with_cxx+set}" = set; then
1593 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
Martin v. Löwis22352952000-12-13 17:37:02 +00001595 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001596 case $withval in
1597 no) CXX=
1598 with_cxx=no;;
1599 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001600 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001601 with_cxx=$withval;;
1602 esac
1603else
Martin v. Löwis11437992002-04-12 09:54:03 +00001604
Guido van Rossum95012191999-12-16 17:50:52 +00001605 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001606 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001607
Martin v. Löwis11437992002-04-12 09:54:03 +00001608fi;
1609echo "$as_me:$LINENO: result: $with_cxx" >&5
1610echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001611
1612if test "$with_cxx" = "yes"
1613then
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1615echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1616 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001617fi
1618
1619
1620
1621
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001623then
1624 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1625do
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 # 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 +00001627set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001628echo "$as_me:$LINENO: checking for $ac_word" >&5
1629echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630if test "${ac_cv_prog_CXX+set}" = set; then
1631 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001632else
1633 if test -n "$CXX"; then
1634 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1635else
Martin v. Löwis11437992002-04-12 09:54:03 +00001636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1637for as_dir in $PATH
1638do
1639 IFS=$as_save_IFS
1640 test -z "$as_dir" && as_dir=.
1641 for ac_exec_ext in '' $ac_executable_extensions; do
1642 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1643 ac_cv_prog_CXX="$ac_prog"
1644 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1645 break 2
1646 fi
1647done
1648done
1649
Martin v. Löwis22352952000-12-13 17:37:02 +00001650fi
1651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001652CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001653if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 echo "$as_me:$LINENO: result: $CXX" >&5
1655echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001656else
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 echo "$as_me:$LINENO: result: no" >&5
1658echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001659fi
1660
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001662done
1663test -n "$CXX" || CXX="notfound"
1664
1665 if test "$CXX" = "notfound"
1666 then
1667 CXX=
1668 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001670ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1674 cat >conftest.$ac_ext <<_ACEOF
1675#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001676/* confdefs.h. */
1677_ACEOF
1678cat confdefs.h >>conftest.$ac_ext
1679cat >>conftest.$ac_ext <<_ACEOF
1680/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001681
Martin v. Löwis11437992002-04-12 09:54:03 +00001682int
1683main ()
1684{
Michael W. Hudson54241132001-12-07 15:38:26 +00001685
Martin v. Löwis11437992002-04-12 09:54:03 +00001686 ;
1687 return 0;
1688}
1689_ACEOF
1690ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001691ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001692# Try to create an executable without -o first, disregard a.out.
1693# It will help us diagnose broken compilers, and finding out an intuition
1694# of exeext.
1695echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1696echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1697ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1698if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1699 (eval $ac_link_default) 2>&5
1700 ac_status=$?
1701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1702 (exit $ac_status); }; then
1703 # Find the output, starting from the most likely. This scheme is
1704# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1705# resort.
1706
1707# Be careful to initialize this variable, since it used to be cached.
1708# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1709ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001710# b.out is created by i960 compilers.
1711for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1712do
1713 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001715 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1716 ;;
1717 conftest.$ac_ext )
1718 # This is the source file.
1719 ;;
1720 [ab].out )
1721 # We found the default executable, but exeext='' is most
1722 # certainly right.
1723 break;;
1724 *.* )
1725 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1726 # FIXME: I believe we export ac_cv_exeext for Libtool,
1727 # but it would be cool to find out if it's true. Does anybody
1728 # maintain Libtool? --akim.
1729 export ac_cv_exeext
1730 break;;
1731 * )
1732 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001733 esac
1734done
1735else
1736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001737sed 's/^/| /' conftest.$ac_ext >&5
1738
1739{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1740See \`config.log' for more details." >&5
1741echo "$as_me: error: C++ compiler cannot create executables
1742See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001744fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001745
1746ac_exeext=$ac_cv_exeext
1747echo "$as_me:$LINENO: result: $ac_file" >&5
1748echo "${ECHO_T}$ac_file" >&6
1749
1750# Check the compiler produces executables we can run. If not, either
1751# the compiler is broken, or we cross compile.
1752echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1753echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1754# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1755# If not cross compiling, check that we can run a simple program.
1756if test "$cross_compiling" != yes; then
1757 if { ac_try='./$ac_file'
1758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1759 (eval $ac_try) 2>&5
1760 ac_status=$?
1761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1762 (exit $ac_status); }; }; then
1763 cross_compiling=no
1764 else
1765 if test "$cross_compiling" = maybe; then
1766 cross_compiling=yes
1767 else
1768 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001769If you meant to cross compile, use \`--host'.
1770See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001771echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001772If you meant to cross compile, use \`--host'.
1773See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
1775 fi
1776 fi
1777fi
1778echo "$as_me:$LINENO: result: yes" >&5
1779echo "${ECHO_T}yes" >&6
1780
Skip Montanaro6dead952003-09-25 14:50:04 +00001781rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001782ac_clean_files=$ac_clean_files_save
1783# Check the compiler produces executables we can run. If not, either
1784# the compiler is broken, or we cross compile.
1785echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1786echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1787echo "$as_me:$LINENO: result: $cross_compiling" >&5
1788echo "${ECHO_T}$cross_compiling" >&6
1789
1790echo "$as_me:$LINENO: checking for suffix of executables" >&5
1791echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1793 (eval $ac_link) 2>&5
1794 ac_status=$?
1795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1796 (exit $ac_status); }; then
1797 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1798# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1799# work properly (i.e., refer to `conftest.exe'), while it won't with
1800# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001801for ac_file in conftest.exe conftest conftest.*; do
1802 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001803 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001805 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1806 export ac_cv_exeext
1807 break;;
1808 * ) break;;
1809 esac
1810done
1811else
Skip Montanaro6dead952003-09-25 14:50:04 +00001812 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1813See \`config.log' for more details." >&5
1814echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1815See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001816 { (exit 1); exit 1; }; }
1817fi
1818
1819rm -f conftest$ac_cv_exeext
1820echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1821echo "${ECHO_T}$ac_cv_exeext" >&6
1822
1823rm -f conftest.$ac_ext
1824EXEEXT=$ac_cv_exeext
1825ac_exeext=$EXEEXT
1826
1827 ac_ext=c
1828ac_cpp='$CPP $CPPFLAGS'
1829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1831ac_compiler_gnu=$ac_cv_c_compiler_gnu
1832
1833
Martin v. Löwis22352952000-12-13 17:37:02 +00001834
1835 fi
1836fi
1837
Guido van Rossum8b131c51995-03-09 14:10:13 +00001838# If the user switches compilers, we can't believe the cache
1839if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1840then
Martin v. Löwis11437992002-04-12 09:54:03 +00001841 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1842(it is also a good idea to do 'make clean' before compiling)" >&5
1843echo "$as_me: error: cached CC is different -- throw away $cache_file
1844(it is also a good idea to do 'make clean' before compiling)" >&2;}
1845 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001846fi
1847
Martin v. Löwis11437992002-04-12 09:54:03 +00001848ac_ext=c
1849ac_cpp='$CPP $CPPFLAGS'
1850ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1851ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1852ac_compiler_gnu=$ac_cv_c_compiler_gnu
1853if test -n "$ac_tool_prefix"; then
1854 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1855set dummy ${ac_tool_prefix}gcc; ac_word=$2
1856echo "$as_me:$LINENO: checking for $ac_word" >&5
1857echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1858if test "${ac_cv_prog_CC+set}" = set; then
1859 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001860else
1861 if test -n "$CC"; then
1862 ac_cv_prog_CC="$CC" # Let the user override the test.
1863else
Martin v. Löwis11437992002-04-12 09:54:03 +00001864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1865for as_dir in $PATH
1866do
1867 IFS=$as_save_IFS
1868 test -z "$as_dir" && as_dir=.
1869 for ac_exec_ext in '' $ac_executable_extensions; do
1870 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1871 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1872 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1873 break 2
1874 fi
1875done
1876done
1877
Jack Jansendd19cf82001-12-06 22:36:17 +00001878fi
1879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001880CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001881if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001882 echo "$as_me:$LINENO: result: $CC" >&5
1883echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001884else
Martin v. Löwis11437992002-04-12 09:54:03 +00001885 echo "$as_me:$LINENO: result: no" >&5
1886echo "${ECHO_T}no" >&6
1887fi
1888
1889fi
1890if test -z "$ac_cv_prog_CC"; then
1891 ac_ct_CC=$CC
1892 # Extract the first word of "gcc", so it can be a program name with args.
1893set dummy gcc; ac_word=$2
1894echo "$as_me:$LINENO: checking for $ac_word" >&5
1895echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1896if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1897 echo $ECHO_N "(cached) $ECHO_C" >&6
1898else
1899 if test -n "$ac_ct_CC"; then
1900 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1901else
1902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1903for as_dir in $PATH
1904do
1905 IFS=$as_save_IFS
1906 test -z "$as_dir" && as_dir=.
1907 for ac_exec_ext in '' $ac_executable_extensions; do
1908 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1909 ac_cv_prog_ac_ct_CC="gcc"
1910 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1911 break 2
1912 fi
1913done
1914done
1915
1916fi
1917fi
1918ac_ct_CC=$ac_cv_prog_ac_ct_CC
1919if test -n "$ac_ct_CC"; then
1920 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1921echo "${ECHO_T}$ac_ct_CC" >&6
1922else
1923 echo "$as_me:$LINENO: result: no" >&5
1924echo "${ECHO_T}no" >&6
1925fi
1926
1927 CC=$ac_ct_CC
1928else
1929 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001930fi
1931
Jack Jansendd19cf82001-12-06 22:36:17 +00001932if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001933 if test -n "$ac_tool_prefix"; then
1934 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1935set dummy ${ac_tool_prefix}cc; ac_word=$2
1936echo "$as_me:$LINENO: checking for $ac_word" >&5
1937echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1938if test "${ac_cv_prog_CC+set}" = set; then
1939 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001940else
1941 if test -n "$CC"; then
1942 ac_cv_prog_CC="$CC" # Let the user override the test.
1943else
Martin v. Löwis11437992002-04-12 09:54:03 +00001944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1945for as_dir in $PATH
1946do
1947 IFS=$as_save_IFS
1948 test -z "$as_dir" && as_dir=.
1949 for ac_exec_ext in '' $ac_executable_extensions; do
1950 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1951 ac_cv_prog_CC="${ac_tool_prefix}cc"
1952 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1953 break 2
1954 fi
1955done
1956done
1957
1958fi
1959fi
1960CC=$ac_cv_prog_CC
1961if test -n "$CC"; then
1962 echo "$as_me:$LINENO: result: $CC" >&5
1963echo "${ECHO_T}$CC" >&6
1964else
1965 echo "$as_me:$LINENO: result: no" >&5
1966echo "${ECHO_T}no" >&6
1967fi
1968
1969fi
1970if test -z "$ac_cv_prog_CC"; then
1971 ac_ct_CC=$CC
1972 # Extract the first word of "cc", so it can be a program name with args.
1973set dummy cc; ac_word=$2
1974echo "$as_me:$LINENO: checking for $ac_word" >&5
1975echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1976if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1977 echo $ECHO_N "(cached) $ECHO_C" >&6
1978else
1979 if test -n "$ac_ct_CC"; then
1980 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1981else
1982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1983for as_dir in $PATH
1984do
1985 IFS=$as_save_IFS
1986 test -z "$as_dir" && as_dir=.
1987 for ac_exec_ext in '' $ac_executable_extensions; do
1988 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1989 ac_cv_prog_ac_ct_CC="cc"
1990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1991 break 2
1992 fi
1993done
1994done
1995
1996fi
1997fi
1998ac_ct_CC=$ac_cv_prog_ac_ct_CC
1999if test -n "$ac_ct_CC"; then
2000 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2001echo "${ECHO_T}$ac_ct_CC" >&6
2002else
2003 echo "$as_me:$LINENO: result: no" >&5
2004echo "${ECHO_T}no" >&6
2005fi
2006
2007 CC=$ac_ct_CC
2008else
2009 CC="$ac_cv_prog_CC"
2010fi
2011
2012fi
2013if test -z "$CC"; then
2014 # Extract the first word of "cc", so it can be a program name with args.
2015set dummy cc; ac_word=$2
2016echo "$as_me:$LINENO: checking for $ac_word" >&5
2017echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2018if test "${ac_cv_prog_CC+set}" = set; then
2019 echo $ECHO_N "(cached) $ECHO_C" >&6
2020else
2021 if test -n "$CC"; then
2022 ac_cv_prog_CC="$CC" # Let the user override the test.
2023else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002024 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2026for as_dir in $PATH
2027do
2028 IFS=$as_save_IFS
2029 test -z "$as_dir" && as_dir=.
2030 for ac_exec_ext in '' $ac_executable_extensions; do
2031 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2032 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2033 ac_prog_rejected=yes
2034 continue
2035 fi
2036 ac_cv_prog_CC="cc"
2037 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2038 break 2
2039 fi
2040done
2041done
2042
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002043if test $ac_prog_rejected = yes; then
2044 # We found a bogon in the path, so make sure we never use it.
2045 set dummy $ac_cv_prog_CC
2046 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002047 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002048 # We chose a different compiler from the bogus one.
2049 # However, it has the same basename, so the bogon will be chosen
2050 # first if we set CC to just the basename; use the full file name.
2051 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002052 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002053 fi
2054fi
2055fi
2056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002057CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002058if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002059 echo "$as_me:$LINENO: result: $CC" >&5
2060echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002061else
Martin v. Löwis11437992002-04-12 09:54:03 +00002062 echo "$as_me:$LINENO: result: no" >&5
2063echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064fi
2065
Martin v. Löwis11437992002-04-12 09:54:03 +00002066fi
2067if test -z "$CC"; then
2068 if test -n "$ac_tool_prefix"; then
2069 for ac_prog in cl
2070 do
2071 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2073echo "$as_me:$LINENO: checking for $ac_word" >&5
2074echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2075if test "${ac_cv_prog_CC+set}" = set; then
2076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002077else
2078 if test -n "$CC"; then
2079 ac_cv_prog_CC="$CC" # Let the user override the test.
2080else
Martin v. Löwis11437992002-04-12 09:54:03 +00002081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2082for as_dir in $PATH
2083do
2084 IFS=$as_save_IFS
2085 test -z "$as_dir" && as_dir=.
2086 for ac_exec_ext in '' $ac_executable_extensions; do
2087 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2088 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2089 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2090 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002091 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002092done
2093done
2094
2095fi
2096fi
2097CC=$ac_cv_prog_CC
2098if test -n "$CC"; then
2099 echo "$as_me:$LINENO: result: $CC" >&5
2100echo "${ECHO_T}$CC" >&6
2101else
2102 echo "$as_me:$LINENO: result: no" >&5
2103echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002104fi
2105
Martin v. Löwis11437992002-04-12 09:54:03 +00002106 test -n "$CC" && break
2107 done
2108fi
2109if test -z "$CC"; then
2110 ac_ct_CC=$CC
2111 for ac_prog in cl
2112do
2113 # Extract the first word of "$ac_prog", so it can be a program name with args.
2114set dummy $ac_prog; ac_word=$2
2115echo "$as_me:$LINENO: checking for $ac_word" >&5
2116echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2117if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2118 echo $ECHO_N "(cached) $ECHO_C" >&6
2119else
2120 if test -n "$ac_ct_CC"; then
2121 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2122else
2123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2124for as_dir in $PATH
2125do
2126 IFS=$as_save_IFS
2127 test -z "$as_dir" && as_dir=.
2128 for ac_exec_ext in '' $ac_executable_extensions; do
2129 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2130 ac_cv_prog_ac_ct_CC="$ac_prog"
2131 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2132 break 2
2133 fi
2134done
2135done
Jack Jansendd19cf82001-12-06 22:36:17 +00002136
Martin v. Löwis11437992002-04-12 09:54:03 +00002137fi
2138fi
2139ac_ct_CC=$ac_cv_prog_ac_ct_CC
2140if test -n "$ac_ct_CC"; then
2141 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2142echo "${ECHO_T}$ac_ct_CC" >&6
2143else
2144 echo "$as_me:$LINENO: result: no" >&5
2145echo "${ECHO_T}no" >&6
2146fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002147
Martin v. Löwis11437992002-04-12 09:54:03 +00002148 test -n "$ac_ct_CC" && break
2149done
Michael W. Hudson54241132001-12-07 15:38:26 +00002150
Martin v. Löwis11437992002-04-12 09:54:03 +00002151 CC=$ac_ct_CC
2152fi
2153
2154fi
2155
2156
Skip Montanaro6dead952003-09-25 14:50:04 +00002157test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2158See \`config.log' for more details." >&5
2159echo "$as_me: error: no acceptable C compiler found in \$PATH
2160See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002161 { (exit 1); exit 1; }; }
2162
2163# Provide some information about the compiler.
2164echo "$as_me:$LINENO:" \
2165 "checking for C compiler version" >&5
2166ac_compiler=`set X $ac_compile; echo $2`
2167{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2168 (eval $ac_compiler --version </dev/null >&5) 2>&5
2169 ac_status=$?
2170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2171 (exit $ac_status); }
2172{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2173 (eval $ac_compiler -v </dev/null >&5) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); }
2177{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2178 (eval $ac_compiler -V </dev/null >&5) 2>&5
2179 ac_status=$?
2180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2181 (exit $ac_status); }
2182
2183cat >conftest.$ac_ext <<_ACEOF
2184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002185/* confdefs.h. */
2186_ACEOF
2187cat confdefs.h >>conftest.$ac_ext
2188cat >>conftest.$ac_ext <<_ACEOF
2189/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002190
Martin v. Löwis11437992002-04-12 09:54:03 +00002191int
2192main ()
2193{
2194
2195 ;
2196 return 0;
2197}
2198_ACEOF
2199ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002200ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002201# Try to create an executable without -o first, disregard a.out.
2202# It will help us diagnose broken compilers, and finding out an intuition
2203# of exeext.
2204echo "$as_me:$LINENO: checking for C compiler default output" >&5
2205echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2206ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2207if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2208 (eval $ac_link_default) 2>&5
2209 ac_status=$?
2210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2211 (exit $ac_status); }; then
2212 # Find the output, starting from the most likely. This scheme is
2213# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2214# resort.
2215
2216# Be careful to initialize this variable, since it used to be cached.
2217# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2218ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002219# b.out is created by i960 compilers.
2220for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2221do
2222 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002224 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2225 ;;
2226 conftest.$ac_ext )
2227 # This is the source file.
2228 ;;
2229 [ab].out )
2230 # We found the default executable, but exeext='' is most
2231 # certainly right.
2232 break;;
2233 *.* )
2234 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2235 # FIXME: I believe we export ac_cv_exeext for Libtool,
2236 # but it would be cool to find out if it's true. Does anybody
2237 # maintain Libtool? --akim.
2238 export ac_cv_exeext
2239 break;;
2240 * )
2241 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002242 esac
2243done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002244else
Martin v. Löwis11437992002-04-12 09:54:03 +00002245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002246sed 's/^/| /' conftest.$ac_ext >&5
2247
2248{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2249See \`config.log' for more details." >&5
2250echo "$as_me: error: C compiler cannot create executables
2251See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002252 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002253fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002254
Martin v. Löwis11437992002-04-12 09:54:03 +00002255ac_exeext=$ac_cv_exeext
2256echo "$as_me:$LINENO: result: $ac_file" >&5
2257echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002258
Martin v. Löwis11437992002-04-12 09:54:03 +00002259# Check the compiler produces executables we can run. If not, either
2260# the compiler is broken, or we cross compile.
2261echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2262echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2263# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2264# If not cross compiling, check that we can run a simple program.
2265if test "$cross_compiling" != yes; then
2266 if { ac_try='./$ac_file'
2267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2268 (eval $ac_try) 2>&5
2269 ac_status=$?
2270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271 (exit $ac_status); }; }; then
2272 cross_compiling=no
2273 else
2274 if test "$cross_compiling" = maybe; then
2275 cross_compiling=yes
2276 else
2277 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002278If you meant to cross compile, use \`--host'.
2279See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002280echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002281If you meant to cross compile, use \`--host'.
2282See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002283 { (exit 1); exit 1; }; }
2284 fi
2285 fi
2286fi
2287echo "$as_me:$LINENO: result: yes" >&5
2288echo "${ECHO_T}yes" >&6
2289
Skip Montanaro6dead952003-09-25 14:50:04 +00002290rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002291ac_clean_files=$ac_clean_files_save
2292# Check the compiler produces executables we can run. If not, either
2293# the compiler is broken, or we cross compile.
2294echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2295echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2296echo "$as_me:$LINENO: result: $cross_compiling" >&5
2297echo "${ECHO_T}$cross_compiling" >&6
2298
2299echo "$as_me:$LINENO: checking for suffix of executables" >&5
2300echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2302 (eval $ac_link) 2>&5
2303 ac_status=$?
2304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2305 (exit $ac_status); }; then
2306 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2307# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2308# work properly (i.e., refer to `conftest.exe'), while it won't with
2309# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002310for ac_file in conftest.exe conftest conftest.*; do
2311 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002312 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002313 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002314 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2315 export ac_cv_exeext
2316 break;;
2317 * ) break;;
2318 esac
2319done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002320else
Skip Montanaro6dead952003-09-25 14:50:04 +00002321 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2322See \`config.log' for more details." >&5
2323echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2324See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002326fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002327
Martin v. Löwis11437992002-04-12 09:54:03 +00002328rm -f conftest$ac_cv_exeext
2329echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2330echo "${ECHO_T}$ac_cv_exeext" >&6
2331
2332rm -f conftest.$ac_ext
2333EXEEXT=$ac_cv_exeext
2334ac_exeext=$EXEEXT
2335echo "$as_me:$LINENO: checking for suffix of object files" >&5
2336echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2337if test "${ac_cv_objext+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002339else
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 cat >conftest.$ac_ext <<_ACEOF
2341#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002342/* confdefs.h. */
2343_ACEOF
2344cat confdefs.h >>conftest.$ac_ext
2345cat >>conftest.$ac_ext <<_ACEOF
2346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
Martin v. Löwis11437992002-04-12 09:54:03 +00002348int
2349main ()
2350{
2351
2352 ;
2353 return 0;
2354}
2355_ACEOF
2356rm -f conftest.o conftest.obj
2357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2358 (eval $ac_compile) 2>&5
2359 ac_status=$?
2360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2361 (exit $ac_status); }; then
2362 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2363 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002364 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002365 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2366 break;;
2367 esac
2368done
2369else
2370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002371sed 's/^/| /' conftest.$ac_ext >&5
2372
2373{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2374See \`config.log' for more details." >&5
2375echo "$as_me: error: cannot compute suffix of object files: cannot compile
2376See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002377 { (exit 1); exit 1; }; }
2378fi
2379
2380rm -f conftest.$ac_cv_objext conftest.$ac_ext
2381fi
2382echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2383echo "${ECHO_T}$ac_cv_objext" >&6
2384OBJEXT=$ac_cv_objext
2385ac_objext=$OBJEXT
2386echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2387echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2388if test "${ac_cv_c_compiler_gnu+set}" = set; then
2389 echo $ECHO_N "(cached) $ECHO_C" >&6
2390else
2391 cat >conftest.$ac_ext <<_ACEOF
2392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002393/* confdefs.h. */
2394_ACEOF
2395cat confdefs.h >>conftest.$ac_ext
2396cat >>conftest.$ac_ext <<_ACEOF
2397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002398
Martin v. Löwis11437992002-04-12 09:54:03 +00002399int
2400main ()
2401{
2402#ifndef __GNUC__
2403 choke me
2404#endif
2405
2406 ;
2407 return 0;
2408}
2409_ACEOF
2410rm -f conftest.$ac_objext
2411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2412 (eval $ac_compile) 2>&5
2413 ac_status=$?
2414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2415 (exit $ac_status); } &&
2416 { ac_try='test -s conftest.$ac_objext'
2417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2418 (eval $ac_try) 2>&5
2419 ac_status=$?
2420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421 (exit $ac_status); }; }; then
2422 ac_compiler_gnu=yes
2423else
2424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002425sed 's/^/| /' conftest.$ac_ext >&5
2426
Martin v. Löwis11437992002-04-12 09:54:03 +00002427ac_compiler_gnu=no
2428fi
2429rm -f conftest.$ac_objext conftest.$ac_ext
2430ac_cv_c_compiler_gnu=$ac_compiler_gnu
2431
2432fi
2433echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2434echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2435GCC=`test $ac_compiler_gnu = yes && echo yes`
2436ac_test_CFLAGS=${CFLAGS+set}
2437ac_save_CFLAGS=$CFLAGS
2438CFLAGS="-g"
2439echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2440echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2441if test "${ac_cv_prog_cc_g+set}" = set; then
2442 echo $ECHO_N "(cached) $ECHO_C" >&6
2443else
2444 cat >conftest.$ac_ext <<_ACEOF
2445#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446/* confdefs.h. */
2447_ACEOF
2448cat confdefs.h >>conftest.$ac_ext
2449cat >>conftest.$ac_ext <<_ACEOF
2450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002451
Martin v. Löwis11437992002-04-12 09:54:03 +00002452int
2453main ()
2454{
2455
2456 ;
2457 return 0;
2458}
2459_ACEOF
2460rm -f conftest.$ac_objext
2461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2462 (eval $ac_compile) 2>&5
2463 ac_status=$?
2464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2465 (exit $ac_status); } &&
2466 { ac_try='test -s conftest.$ac_objext'
2467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2468 (eval $ac_try) 2>&5
2469 ac_status=$?
2470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2471 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002472 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002473else
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002475sed 's/^/| /' conftest.$ac_ext >&5
2476
Martin v. Löwis11437992002-04-12 09:54:03 +00002477ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002479rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002481echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2482echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002483if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002485elif test $ac_cv_prog_cc_g = yes; then
2486 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002487 CFLAGS="-g -O2"
2488 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002489 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002490 fi
2491else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002492 if test "$GCC" = yes; then
2493 CFLAGS="-O2"
2494 else
2495 CFLAGS=
2496 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002497fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002498echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2499echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2500if test "${ac_cv_prog_cc_stdc+set}" = set; then
2501 echo $ECHO_N "(cached) $ECHO_C" >&6
2502else
2503 ac_cv_prog_cc_stdc=no
2504ac_save_CC=$CC
2505cat >conftest.$ac_ext <<_ACEOF
2506#line $LINENO "configure"
2507/* confdefs.h. */
2508_ACEOF
2509cat confdefs.h >>conftest.$ac_ext
2510cat >>conftest.$ac_ext <<_ACEOF
2511/* end confdefs.h. */
2512#include <stdarg.h>
2513#include <stdio.h>
2514#include <sys/types.h>
2515#include <sys/stat.h>
2516/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2517struct buf { int x; };
2518FILE * (*rcsopen) (struct buf *, struct stat *, int);
2519static char *e (p, i)
2520 char **p;
2521 int i;
2522{
2523 return p[i];
2524}
2525static char *f (char * (*g) (char **, int), char **p, ...)
2526{
2527 char *s;
2528 va_list v;
2529 va_start (v,p);
2530 s = g (p, va_arg (v,int));
2531 va_end (v);
2532 return s;
2533}
2534int test (int i, double x);
2535struct s1 {int (*f) (int a);};
2536struct s2 {int (*f) (double a);};
2537int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2538int argc;
2539char **argv;
2540int
2541main ()
2542{
2543return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2544 ;
2545 return 0;
2546}
2547_ACEOF
2548# Don't try gcc -ansi; that turns off useful extensions and
2549# breaks some systems' header files.
2550# AIX -qlanglvl=ansi
2551# Ultrix and OSF/1 -std1
2552# HP-UX 10.20 and later -Ae
2553# HP-UX older versions -Aa -D_HPUX_SOURCE
2554# SVR4 -Xc -D__EXTENSIONS__
2555for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2556do
2557 CC="$ac_save_CC $ac_arg"
2558 rm -f conftest.$ac_objext
2559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2560 (eval $ac_compile) 2>&5
2561 ac_status=$?
2562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2563 (exit $ac_status); } &&
2564 { ac_try='test -s conftest.$ac_objext'
2565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2566 (eval $ac_try) 2>&5
2567 ac_status=$?
2568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2569 (exit $ac_status); }; }; then
2570 ac_cv_prog_cc_stdc=$ac_arg
2571break
2572else
2573 echo "$as_me: failed program was:" >&5
2574sed 's/^/| /' conftest.$ac_ext >&5
2575
2576fi
2577rm -f conftest.$ac_objext
2578done
2579rm -f conftest.$ac_ext conftest.$ac_objext
2580CC=$ac_save_CC
2581
2582fi
2583
2584case "x$ac_cv_prog_cc_stdc" in
2585 x|xno)
2586 echo "$as_me:$LINENO: result: none needed" >&5
2587echo "${ECHO_T}none needed" >&6 ;;
2588 *)
2589 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2590echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2591 CC="$CC $ac_cv_prog_cc_stdc" ;;
2592esac
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594# Some people use a C++ compiler to compile C. Since we use `exit',
2595# in C++ we need to declare it. In case someone uses the same compiler
2596# for both compiling C and C++ we need to have the C++ compiler decide
2597# the declaration of exit, since it's the most demanding environment.
2598cat >conftest.$ac_ext <<_ACEOF
2599#ifndef __cplusplus
2600 choke me
2601#endif
2602_ACEOF
2603rm -f conftest.$ac_objext
2604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2605 (eval $ac_compile) 2>&5
2606 ac_status=$?
2607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2608 (exit $ac_status); } &&
2609 { ac_try='test -s conftest.$ac_objext'
2610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2611 (eval $ac_try) 2>&5
2612 ac_status=$?
2613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2614 (exit $ac_status); }; }; then
2615 for ac_declaration in \
2616 ''\
2617 '#include <stdlib.h>' \
2618 'extern "C" void std::exit (int) throw (); using std::exit;' \
2619 'extern "C" void std::exit (int); using std::exit;' \
2620 'extern "C" void exit (int) throw ();' \
2621 'extern "C" void exit (int);' \
2622 'void exit (int);'
2623do
2624 cat >conftest.$ac_ext <<_ACEOF
2625#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002626/* confdefs.h. */
2627_ACEOF
2628cat confdefs.h >>conftest.$ac_ext
2629cat >>conftest.$ac_ext <<_ACEOF
2630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002631#include <stdlib.h>
2632$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002633int
2634main ()
2635{
2636exit (42);
2637 ;
2638 return 0;
2639}
2640_ACEOF
2641rm -f conftest.$ac_objext
2642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2643 (eval $ac_compile) 2>&5
2644 ac_status=$?
2645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2646 (exit $ac_status); } &&
2647 { ac_try='test -s conftest.$ac_objext'
2648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2649 (eval $ac_try) 2>&5
2650 ac_status=$?
2651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652 (exit $ac_status); }; }; then
2653 :
2654else
2655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002656sed 's/^/| /' conftest.$ac_ext >&5
2657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658continue
2659fi
2660rm -f conftest.$ac_objext conftest.$ac_ext
2661 cat >conftest.$ac_ext <<_ACEOF
2662#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002663/* confdefs.h. */
2664_ACEOF
2665cat confdefs.h >>conftest.$ac_ext
2666cat >>conftest.$ac_ext <<_ACEOF
2667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002668$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002669int
2670main ()
2671{
2672exit (42);
2673 ;
2674 return 0;
2675}
2676_ACEOF
2677rm -f conftest.$ac_objext
2678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2679 (eval $ac_compile) 2>&5
2680 ac_status=$?
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); } &&
2683 { ac_try='test -s conftest.$ac_objext'
2684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2685 (eval $ac_try) 2>&5
2686 ac_status=$?
2687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2688 (exit $ac_status); }; }; then
2689 break
2690else
2691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002692sed 's/^/| /' conftest.$ac_ext >&5
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694fi
2695rm -f conftest.$ac_objext conftest.$ac_ext
2696done
2697rm -f conftest*
2698if test -n "$ac_declaration"; then
2699 echo '#ifdef __cplusplus' >>confdefs.h
2700 echo $ac_declaration >>confdefs.h
2701 echo '#endif' >>confdefs.h
2702fi
2703
2704else
2705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002706sed 's/^/| /' conftest.$ac_ext >&5
2707
Martin v. Löwis11437992002-04-12 09:54:03 +00002708fi
2709rm -f conftest.$ac_objext conftest.$ac_ext
2710ac_ext=c
2711ac_cpp='$CPP $CPPFLAGS'
2712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2714ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002716
2717# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002718
2719ac_ext=c
2720ac_cpp='$CPP $CPPFLAGS'
2721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2723ac_compiler_gnu=$ac_cv_c_compiler_gnu
2724echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2725echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002726# On Suns, sometimes $CPP names a directory.
2727if test -n "$CPP" && test -d "$CPP"; then
2728 CPP=
2729fi
2730if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 if test "${ac_cv_prog_CPP+set}" = set; then
2732 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002733else
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 # Double quotes because CPP needs to be expanded
2735 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2736 do
2737 ac_preproc_ok=false
2738for ac_c_preproc_warn_flag in '' yes
2739do
2740 # Use a header file that comes with gcc, so configuring glibc
2741 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002742 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2743 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002744 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 # not just through cpp. "Syntax error" is here to catch this case.
2746 cat >conftest.$ac_ext <<_ACEOF
2747#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002748/* confdefs.h. */
2749_ACEOF
2750cat confdefs.h >>conftest.$ac_ext
2751cat >>conftest.$ac_ext <<_ACEOF
2752/* end confdefs.h. */
2753#ifdef __STDC__
2754# include <limits.h>
2755#else
2756# include <assert.h>
2757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 Syntax error
2759_ACEOF
2760if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2761 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2762 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002763 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 rm -f conftest.er1
2765 cat conftest.err >&5
2766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2767 (exit $ac_status); } >/dev/null; then
2768 if test -s conftest.err; then
2769 ac_cpp_err=$ac_c_preproc_warn_flag
2770 else
2771 ac_cpp_err=
2772 fi
2773else
2774 ac_cpp_err=yes
2775fi
2776if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002777 :
2778else
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002780sed 's/^/| /' conftest.$ac_ext >&5
2781
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 # Broken: fails on valid input.
2783continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002785rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002786
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 # OK, works on sane cases. Now check whether non-existent headers
2788 # can be detected and how.
2789 cat >conftest.$ac_ext <<_ACEOF
2790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002791/* confdefs.h. */
2792_ACEOF
2793cat confdefs.h >>conftest.$ac_ext
2794cat >>conftest.$ac_ext <<_ACEOF
2795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002796#include <ac_nonexistent.h>
2797_ACEOF
2798if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2799 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2800 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002801 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 rm -f conftest.er1
2803 cat conftest.err >&5
2804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2805 (exit $ac_status); } >/dev/null; then
2806 if test -s conftest.err; then
2807 ac_cpp_err=$ac_c_preproc_warn_flag
2808 else
2809 ac_cpp_err=
2810 fi
2811else
2812 ac_cpp_err=yes
2813fi
2814if test -z "$ac_cpp_err"; then
2815 # Broken: success on invalid input.
2816continue
2817else
2818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002819sed 's/^/| /' conftest.$ac_ext >&5
2820
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 # Passes both tests.
2822ac_preproc_ok=:
2823break
2824fi
2825rm -f conftest.err conftest.$ac_ext
2826
2827done
2828# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2829rm -f conftest.err conftest.$ac_ext
2830if $ac_preproc_ok; then
2831 break
2832fi
2833
2834 done
2835 ac_cv_prog_CPP=$CPP
2836
2837fi
2838 CPP=$ac_cv_prog_CPP
2839else
2840 ac_cv_prog_CPP=$CPP
2841fi
2842echo "$as_me:$LINENO: result: $CPP" >&5
2843echo "${ECHO_T}$CPP" >&6
2844ac_preproc_ok=false
2845for ac_c_preproc_warn_flag in '' yes
2846do
2847 # Use a header file that comes with gcc, so configuring glibc
2848 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002849 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2850 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002851 # On the NeXT, cc -E runs the code through the compiler's parser,
2852 # not just through cpp. "Syntax error" is here to catch this case.
2853 cat >conftest.$ac_ext <<_ACEOF
2854#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002855/* confdefs.h. */
2856_ACEOF
2857cat confdefs.h >>conftest.$ac_ext
2858cat >>conftest.$ac_ext <<_ACEOF
2859/* end confdefs.h. */
2860#ifdef __STDC__
2861# include <limits.h>
2862#else
2863# include <assert.h>
2864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 Syntax error
2866_ACEOF
2867if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2868 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2869 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002870 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 rm -f conftest.er1
2872 cat conftest.err >&5
2873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2874 (exit $ac_status); } >/dev/null; then
2875 if test -s conftest.err; then
2876 ac_cpp_err=$ac_c_preproc_warn_flag
2877 else
2878 ac_cpp_err=
2879 fi
2880else
2881 ac_cpp_err=yes
2882fi
2883if test -z "$ac_cpp_err"; then
2884 :
2885else
2886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002887sed 's/^/| /' conftest.$ac_ext >&5
2888
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 # Broken: fails on valid input.
2890continue
2891fi
2892rm -f conftest.err conftest.$ac_ext
2893
2894 # OK, works on sane cases. Now check whether non-existent headers
2895 # can be detected and how.
2896 cat >conftest.$ac_ext <<_ACEOF
2897#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002898/* confdefs.h. */
2899_ACEOF
2900cat confdefs.h >>conftest.$ac_ext
2901cat >>conftest.$ac_ext <<_ACEOF
2902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002903#include <ac_nonexistent.h>
2904_ACEOF
2905if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2906 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2907 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002908 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 rm -f conftest.er1
2910 cat conftest.err >&5
2911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2912 (exit $ac_status); } >/dev/null; then
2913 if test -s conftest.err; then
2914 ac_cpp_err=$ac_c_preproc_warn_flag
2915 else
2916 ac_cpp_err=
2917 fi
2918else
2919 ac_cpp_err=yes
2920fi
2921if test -z "$ac_cpp_err"; then
2922 # Broken: success on invalid input.
2923continue
2924else
2925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002926sed 's/^/| /' conftest.$ac_ext >&5
2927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928 # Passes both tests.
2929ac_preproc_ok=:
2930break
2931fi
2932rm -f conftest.err conftest.$ac_ext
2933
2934done
2935# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2936rm -f conftest.err conftest.$ac_ext
2937if $ac_preproc_ok; then
2938 :
2939else
Skip Montanaro6dead952003-09-25 14:50:04 +00002940 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2941See \`config.log' for more details." >&5
2942echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2943See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 { (exit 1); exit 1; }; }
2945fi
2946
2947ac_ext=c
2948ac_cpp='$CPP $CPPFLAGS'
2949ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2950ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2951ac_compiler_gnu=$ac_cv_c_compiler_gnu
2952
2953
Skip Montanaro6dead952003-09-25 14:50:04 +00002954echo "$as_me:$LINENO: checking for egrep" >&5
2955echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2956if test "${ac_cv_prog_egrep+set}" = set; then
2957 echo $ECHO_N "(cached) $ECHO_C" >&6
2958else
2959 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2960 then ac_cv_prog_egrep='grep -E'
2961 else ac_cv_prog_egrep='egrep'
2962 fi
2963fi
2964echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2965echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2966 EGREP=$ac_cv_prog_egrep
2967
2968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969
2970echo "$as_me:$LINENO: checking for AIX" >&5
2971echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2972cat >conftest.$ac_ext <<_ACEOF
2973#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002974/* confdefs.h. */
2975_ACEOF
2976cat confdefs.h >>conftest.$ac_ext
2977cat >>conftest.$ac_ext <<_ACEOF
2978/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002979#ifdef _AIX
2980 yes
2981#endif
2982
Martin v. Löwis11437992002-04-12 09:54:03 +00002983_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002985 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002986 echo "$as_me:$LINENO: result: yes" >&5
2987echo "${ECHO_T}yes" >&6
2988cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002989#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002990_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991
2992else
Martin v. Löwis11437992002-04-12 09:54:03 +00002993 echo "$as_me:$LINENO: result: no" >&5
2994echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995fi
2996rm -f conftest*
2997
Michael W. Hudson54241132001-12-07 15:38:26 +00002998
Martin v. Löwis11437992002-04-12 09:54:03 +00002999echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3000echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3001if test "${ac_cv_header_stdc+set}" = set; then
3002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003003else
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 cat >conftest.$ac_ext <<_ACEOF
3005#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003006/* confdefs.h. */
3007_ACEOF
3008cat confdefs.h >>conftest.$ac_ext
3009cat >>conftest.$ac_ext <<_ACEOF
3010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003011#include <stdlib.h>
3012#include <stdarg.h>
3013#include <string.h>
3014#include <float.h>
3015
Skip Montanaro6dead952003-09-25 14:50:04 +00003016int
3017main ()
3018{
3019
3020 ;
3021 return 0;
3022}
Martin v. Löwis11437992002-04-12 09:54:03 +00003023_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003024rm -f conftest.$ac_objext
3025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3026 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003027 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00003028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003029 (exit $ac_status); } &&
3030 { ac_try='test -s conftest.$ac_objext'
3031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3032 (eval $ac_try) 2>&5
3033 ac_status=$?
3034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3035 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003036 ac_cv_header_stdc=yes
3037else
3038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003039sed 's/^/| /' conftest.$ac_ext >&5
3040
3041ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003042fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003043rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
3045if test $ac_cv_header_stdc = yes; then
3046 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3047 cat >conftest.$ac_ext <<_ACEOF
3048#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003049/* confdefs.h. */
3050_ACEOF
3051cat confdefs.h >>conftest.$ac_ext
3052cat >>conftest.$ac_ext <<_ACEOF
3053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003054#include <string.h>
3055
3056_ACEOF
3057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003058 $EGREP "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003059 :
3060else
3061 ac_cv_header_stdc=no
3062fi
3063rm -f conftest*
3064
3065fi
3066
3067if test $ac_cv_header_stdc = yes; then
3068 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3069 cat >conftest.$ac_ext <<_ACEOF
3070#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003071/* confdefs.h. */
3072_ACEOF
3073cat confdefs.h >>conftest.$ac_ext
3074cat >>conftest.$ac_ext <<_ACEOF
3075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003076#include <stdlib.h>
3077
3078_ACEOF
3079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003080 $EGREP "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003081 :
3082else
3083 ac_cv_header_stdc=no
3084fi
3085rm -f conftest*
3086
3087fi
3088
3089if test $ac_cv_header_stdc = yes; then
3090 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3091 if test "$cross_compiling" = yes; then
3092 :
3093else
3094 cat >conftest.$ac_ext <<_ACEOF
3095#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003096/* confdefs.h. */
3097_ACEOF
3098cat confdefs.h >>conftest.$ac_ext
3099cat >>conftest.$ac_ext <<_ACEOF
3100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003101#include <ctype.h>
3102#if ((' ' & 0x0FF) == 0x020)
3103# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3104# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3105#else
Skip Montanaro6dead952003-09-25 14:50:04 +00003106# define ISLOWER(c) \
3107 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 || ('j' <= (c) && (c) <= 'r') \
3109 || ('s' <= (c) && (c) <= 'z'))
3110# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3111#endif
3112
3113#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3114int
3115main ()
3116{
3117 int i;
3118 for (i = 0; i < 256; i++)
3119 if (XOR (islower (i), ISLOWER (i))
3120 || toupper (i) != TOUPPER (i))
3121 exit(2);
3122 exit (0);
3123}
3124_ACEOF
3125rm -f conftest$ac_exeext
3126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3127 (eval $ac_link) 2>&5
3128 ac_status=$?
3129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3132 (eval $ac_try) 2>&5
3133 ac_status=$?
3134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3135 (exit $ac_status); }; }; then
3136 :
3137else
3138 echo "$as_me: program exited with status $ac_status" >&5
3139echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003140sed 's/^/| /' conftest.$ac_ext >&5
3141
Martin v. Löwis11437992002-04-12 09:54:03 +00003142( exit $ac_status )
3143ac_cv_header_stdc=no
3144fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003145rm -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 +00003146fi
3147fi
3148fi
3149echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3150echo "${ECHO_T}$ac_cv_header_stdc" >&6
3151if test $ac_cv_header_stdc = yes; then
3152
3153cat >>confdefs.h <<\_ACEOF
3154#define STDC_HEADERS 1
3155_ACEOF
3156
3157fi
3158
3159# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3170 inttypes.h stdint.h unistd.h
3171do
3172as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3173echo "$as_me:$LINENO: checking for $ac_header" >&5
3174echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3175if eval "test \"\${$as_ac_Header+set}\" = set"; then
3176 echo $ECHO_N "(cached) $ECHO_C" >&6
3177else
3178 cat >conftest.$ac_ext <<_ACEOF
3179#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003180/* confdefs.h. */
3181_ACEOF
3182cat confdefs.h >>conftest.$ac_ext
3183cat >>conftest.$ac_ext <<_ACEOF
3184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003185$ac_includes_default
3186
3187#include <$ac_header>
3188_ACEOF
3189rm -f conftest.$ac_objext
3190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3191 (eval $ac_compile) 2>&5
3192 ac_status=$?
3193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3194 (exit $ac_status); } &&
3195 { ac_try='test -s conftest.$ac_objext'
3196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3197 (eval $ac_try) 2>&5
3198 ac_status=$?
3199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3200 (exit $ac_status); }; }; then
3201 eval "$as_ac_Header=yes"
3202else
3203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003204sed 's/^/| /' conftest.$ac_ext >&5
3205
Martin v. Löwis11437992002-04-12 09:54:03 +00003206eval "$as_ac_Header=no"
3207fi
3208rm -f conftest.$ac_objext conftest.$ac_ext
3209fi
3210echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3211echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3212if test `eval echo '${'$as_ac_Header'}'` = yes; then
3213 cat >>confdefs.h <<_ACEOF
3214#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3215_ACEOF
3216
3217fi
3218
3219done
3220
3221
3222if test "${ac_cv_header_minix_config_h+set}" = set; then
3223 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3224echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3225if test "${ac_cv_header_minix_config_h+set}" = set; then
3226 echo $ECHO_N "(cached) $ECHO_C" >&6
3227fi
3228echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3229echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3230else
3231 # Is the header compilable?
3232echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3233echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3234cat >conftest.$ac_ext <<_ACEOF
3235#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003236/* confdefs.h. */
3237_ACEOF
3238cat confdefs.h >>conftest.$ac_ext
3239cat >>conftest.$ac_ext <<_ACEOF
3240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003241$ac_includes_default
3242#include <minix/config.h>
3243_ACEOF
3244rm -f conftest.$ac_objext
3245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3246 (eval $ac_compile) 2>&5
3247 ac_status=$?
3248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249 (exit $ac_status); } &&
3250 { ac_try='test -s conftest.$ac_objext'
3251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3252 (eval $ac_try) 2>&5
3253 ac_status=$?
3254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3255 (exit $ac_status); }; }; then
3256 ac_header_compiler=yes
3257else
3258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003259sed 's/^/| /' conftest.$ac_ext >&5
3260
Martin v. Löwis11437992002-04-12 09:54:03 +00003261ac_header_compiler=no
3262fi
3263rm -f conftest.$ac_objext conftest.$ac_ext
3264echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3265echo "${ECHO_T}$ac_header_compiler" >&6
3266
3267# Is the header present?
3268echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3269echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3270cat >conftest.$ac_ext <<_ACEOF
3271#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003272/* confdefs.h. */
3273_ACEOF
3274cat confdefs.h >>conftest.$ac_ext
3275cat >>conftest.$ac_ext <<_ACEOF
3276/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003277#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003278_ACEOF
3279if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3280 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3281 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003282 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003283 rm -f conftest.er1
3284 cat conftest.err >&5
3285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3286 (exit $ac_status); } >/dev/null; then
3287 if test -s conftest.err; then
3288 ac_cpp_err=$ac_c_preproc_warn_flag
3289 else
3290 ac_cpp_err=
3291 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003292else
Martin v. Löwis11437992002-04-12 09:54:03 +00003293 ac_cpp_err=yes
3294fi
3295if test -z "$ac_cpp_err"; then
3296 ac_header_preproc=yes
3297else
3298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003299sed 's/^/| /' conftest.$ac_ext >&5
3300
Martin v. Löwis11437992002-04-12 09:54:03 +00003301 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003303rm -f conftest.err conftest.$ac_ext
3304echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3305echo "${ECHO_T}$ac_header_preproc" >&6
3306
3307# So? What about this header?
3308case $ac_header_compiler:$ac_header_preproc in
3309 yes:no )
3310 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3311echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3312 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003313echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3314 (
3315 cat <<\_ASBOX
3316## ------------------------------------ ##
3317## Report this to bug-autoconf@gnu.org. ##
3318## ------------------------------------ ##
3319_ASBOX
3320 ) |
3321 sed "s/^/$as_me: WARNING: /" >&2
3322 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003323 no:yes )
3324 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3325echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3326 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3327echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3328 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003329echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3330 (
3331 cat <<\_ASBOX
3332## ------------------------------------ ##
3333## Report this to bug-autoconf@gnu.org. ##
3334## ------------------------------------ ##
3335_ASBOX
3336 ) |
3337 sed "s/^/$as_me: WARNING: /" >&2
3338 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003339esac
3340echo "$as_me:$LINENO: checking for minix/config.h" >&5
3341echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3342if test "${ac_cv_header_minix_config_h+set}" = set; then
3343 echo $ECHO_N "(cached) $ECHO_C" >&6
3344else
3345 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003347echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3348echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3349
3350fi
3351if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003352 MINIX=yes
3353else
Martin v. Löwis11437992002-04-12 09:54:03 +00003354 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003355fi
3356
Martin v. Löwis11437992002-04-12 09:54:03 +00003357
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003358if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003359
3360cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003361#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003362_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003363
Martin v. Löwis11437992002-04-12 09:54:03 +00003364
3365cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003366#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003367_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003368
Martin v. Löwis11437992002-04-12 09:54:03 +00003369
3370cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003371#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003372_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003373
3374fi
3375
3376
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003377# Check for unsupported systems
3378case $ac_sys_system/$ac_sys_release in
3379SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3380 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3381 echo See README for details.
3382 exit 1;;
3383esac
3384
3385if test "$MINIX" = yes; then
3386 echo This system \(MINIX\) is no longer supported.
3387 echo Read README for details.
3388 exit 1
3389fi
3390
Michael W. Hudson54241132001-12-07 15:38:26 +00003391
Martin v. Löwis11437992002-04-12 09:54:03 +00003392echo "$as_me:$LINENO: checking for --with-suffix" >&5
3393echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003394
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003395# Check whether --with-suffix or --without-suffix was given.
3396if test "${with_suffix+set}" = set; then
3397 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003399 case $withval in
3400 no) EXEEXT=;;
3401 yes) EXEEXT=.exe;;
3402 *) EXEEXT=$withval;;
3403 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003404fi;
3405echo "$as_me:$LINENO: result: $EXEEXT" >&5
3406echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003407
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003408# Test whether we're running on a non-case-sensitive system, in which
3409# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003410
Martin v. Löwis11437992002-04-12 09:54:03 +00003411echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3412echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003413if test ! -d CaseSensitiveTestDir; then
3414mkdir CaseSensitiveTestDir
3415fi
3416
3417if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003418then
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 echo "$as_me:$LINENO: result: yes" >&5
3420echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003421 BUILDEXEEXT=.exe
3422else
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 echo "$as_me:$LINENO: result: no" >&5
3424echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003425 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003426fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003427rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003428
Guido van Rossumdd997f71998-10-07 19:58:26 +00003429case $MACHDEP in
3430bsdos*)
3431 case $CC in
3432 gcc) CC="$CC -D_HAVE_BSDI";;
3433 esac;;
3434esac
3435
Guido van Rossum24b1e751997-08-21 02:29:16 +00003436case $ac_sys_system in
3437hp*|HP*)
3438 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003439 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003440 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003441Monterey*)
3442 case $CC in
3443 cc) CC="$CC -Wl,-Bexport";;
3444 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003445SunOS*)
3446 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003447
3448cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003449#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003450_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003451
3452 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003453esac
3454
Michael W. Hudson54241132001-12-07 15:38:26 +00003455
3456
Martin v. Löwis11437992002-04-12 09:54:03 +00003457echo "$as_me:$LINENO: checking LIBRARY" >&5
3458echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003459if test -z "$LIBRARY"
3460then
3461 LIBRARY='libpython$(VERSION).a'
3462fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003463echo "$as_me:$LINENO: result: $LIBRARY" >&5
3464echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003465
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003466# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003467# name of the library into which to insert object files). BLDLIBRARY is also
3468# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3469# is blank as the main program is not linked directly against LDLIBRARY.
3470# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3471# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3472# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3473# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003474#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003475# RUNSHARED is used to run shared python without installed libraries
3476#
3477# INSTSONAME is the name of the shared library that will be use to install
3478# on the system - some systems like version suffix, others don't
3479
3480
Michael W. Hudson54241132001-12-07 15:38:26 +00003481
3482
3483
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003484
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003485LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003486BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003487INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003488DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003489LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003490RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003491
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003492# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003493# If CXX is set, and if it is needed to link a main function that was
3494# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3495# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003496# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003497# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003498
Martin v. Löwis11437992002-04-12 09:54:03 +00003499echo "$as_me:$LINENO: checking LINKCC" >&5
3500echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003501if test -z "$LINKCC"
3502then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003503 if test -z "$CXX"; then
3504 LINKCC="\$(PURIFY) \$(CC)"
3505 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003506 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003507 $CXX -c conftest.$ac_ext 2>&5
3508 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3509 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3510 then
3511 LINKCC="\$(PURIFY) \$(CC)"
3512 else
3513 LINKCC="\$(PURIFY) \$(CXX)"
3514 fi
3515 rm -fr conftest*
3516 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003517 case $ac_sys_system in
3518 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003519 exp_extra="\"\""
3520 if test $ac_sys_release -ge 5 -o \
3521 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3522 exp_extra="."
3523 fi
3524 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003525 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003526 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003527 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003528 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003529 esac
3530fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003531echo "$as_me:$LINENO: result: $LINKCC" >&5
3532echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003533
Martin v. Löwis11437992002-04-12 09:54:03 +00003534echo "$as_me:$LINENO: checking for --enable-shared" >&5
3535echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003536# Check whether --enable-shared or --disable-shared was given.
3537if test "${enable_shared+set}" = set; then
3538 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003541
3542if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003543then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003544 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003545 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003546 enable_shared="yes";;
3547 *)
3548 enable_shared="no";;
3549 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003551echo "$as_me:$LINENO: result: $enable_shared" >&5
3552echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003553
3554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3556echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003557
Guido van Rossumb8552162001-09-05 14:58:11 +00003558# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3559# library that we build, but we do not want to link against it (we
3560# will find it with a -framework option). For this reason there is an
3561# extra variable BLDLIBRARY against which Python and the extension
3562# modules are linked, BLDLIBRARY. This is normally the same as
3563# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003564if test "$enable_framework"
3565then
3566 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003567 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003568 BLDLIBRARY=''
3569else
3570 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
Jack Jansene578a632001-08-15 01:27:14 +00003572
Martin v. Löwis1142de32002-03-29 16:28:31 +00003573# Other platforms follow
3574if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003575
3576cat >>confdefs.h <<\_ACEOF
3577#define Py_ENABLE_SHARED 1
3578_ACEOF
3579
Martin v. Löwis1142de32002-03-29 16:28:31 +00003580 case $ac_sys_system in
3581 BeOS*)
3582 LDLIBRARY='libpython$(VERSION).so'
3583 ;;
3584 CYGWIN*)
3585 LDLIBRARY='libpython$(VERSION).dll.a'
3586 DLLLIBRARY='libpython$(VERSION).dll'
3587 ;;
3588 SunOS*)
3589 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003590 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003591 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003592 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003593 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003594 LDLIBRARY='libpython$(VERSION).so'
3595 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003596 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003597 INSTSONAME="$LDLIBRARY".$SOVERSION
3598 ;;
3599 hp*|HP*)
3600 LDLIBRARY='libpython$(VERSION).sl'
3601 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003602 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003603 ;;
3604 OSF*)
3605 LDLIBRARY='libpython$(VERSION).so'
3606 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003607 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003608 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003609 atheos*)
3610 LDLIBRARY='libpython$(VERSION).so'
3611 BLDLIBRARY='-L. -lpython$(VERSION)'
3612 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3613 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003614 esac
3615 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3616 case $MACHDEP in
3617 dguxR4)
3618 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003620 ;;
3621 esac
Jason Tishler30765592003-09-04 11:04:06 +00003622else # shared is disabled
3623 case $ac_sys_system in
3624 CYGWIN*)
3625 BLDLIBRARY='$(LIBRARY)'
3626 LDLIBRARY='libpython$(VERSION).dll.a'
3627 ;;
3628 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003629fi
3630
Martin v. Löwis11437992002-04-12 09:54:03 +00003631echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3632echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003633
Martin v. Löwis11437992002-04-12 09:54:03 +00003634if test -n "$ac_tool_prefix"; then
3635 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3636set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3637echo "$as_me:$LINENO: checking for $ac_word" >&5
3638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3639if test "${ac_cv_prog_RANLIB+set}" = set; then
3640 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003641else
3642 if test -n "$RANLIB"; then
3643 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3644else
Martin v. Löwis11437992002-04-12 09:54:03 +00003645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3646for as_dir in $PATH
3647do
3648 IFS=$as_save_IFS
3649 test -z "$as_dir" && as_dir=.
3650 for ac_exec_ext in '' $ac_executable_extensions; do
3651 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3652 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3653 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3654 break 2
3655 fi
3656done
3657done
3658
Guido van Rossum627b2d71993-12-24 10:39:16 +00003659fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003660fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003661RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003662if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 echo "$as_me:$LINENO: result: $RANLIB" >&5
3664echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003665else
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 echo "$as_me:$LINENO: result: no" >&5
3667echo "${ECHO_T}no" >&6
3668fi
3669
3670fi
3671if test -z "$ac_cv_prog_RANLIB"; then
3672 ac_ct_RANLIB=$RANLIB
3673 # Extract the first word of "ranlib", so it can be a program name with args.
3674set dummy ranlib; ac_word=$2
3675echo "$as_me:$LINENO: checking for $ac_word" >&5
3676echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3677if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3678 echo $ECHO_N "(cached) $ECHO_C" >&6
3679else
3680 if test -n "$ac_ct_RANLIB"; then
3681 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3682else
3683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
3688 for ac_exec_ext in '' $ac_executable_extensions; do
3689 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3690 ac_cv_prog_ac_ct_RANLIB="ranlib"
3691 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3692 break 2
3693 fi
3694done
3695done
3696
3697 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3698fi
3699fi
3700ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3701if test -n "$ac_ct_RANLIB"; then
3702 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3703echo "${ECHO_T}$ac_ct_RANLIB" >&6
3704else
3705 echo "$as_me:$LINENO: result: no" >&5
3706echo "${ECHO_T}no" >&6
3707fi
3708
3709 RANLIB=$ac_ct_RANLIB
3710else
3711 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003712fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003713
3714
Guido van Rossum7f43da71994-08-01 12:15:30 +00003715for ac_prog in ar aal
3716do
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003718set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003719echo "$as_me:$LINENO: checking for $ac_word" >&5
3720echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3721if test "${ac_cv_prog_AR+set}" = set; then
3722 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003723else
3724 if test -n "$AR"; then
3725 ac_cv_prog_AR="$AR" # Let the user override the test.
3726else
Martin v. Löwis11437992002-04-12 09:54:03 +00003727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3728for as_dir in $PATH
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
3732 for ac_exec_ext in '' $ac_executable_extensions; do
3733 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3734 ac_cv_prog_AR="$ac_prog"
3735 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3736 break 2
3737 fi
3738done
3739done
3740
Guido van Rossum7f43da71994-08-01 12:15:30 +00003741fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003742fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003743AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003744if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 echo "$as_me:$LINENO: result: $AR" >&5
3746echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003747else
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 echo "$as_me:$LINENO: result: no" >&5
3749echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003753done
3754test -n "$AR" || AR="ar"
3755
Michael W. Hudson54241132001-12-07 15:38:26 +00003756
Neil Schemenauera42c8272001-03-31 00:01:55 +00003757case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003758bsdos*|hp*|HP*)
3759 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003760 if test -z "$INSTALL"
3761 then
3762 INSTALL="${srcdir}/install-sh -c"
3763 fi
3764esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003765ac_aux_dir=
3766for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3767 if test -f $ac_dir/install-sh; then
3768 ac_aux_dir=$ac_dir
3769 ac_install_sh="$ac_aux_dir/install-sh -c"
3770 break
3771 elif test -f $ac_dir/install.sh; then
3772 ac_aux_dir=$ac_dir
3773 ac_install_sh="$ac_aux_dir/install.sh -c"
3774 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 elif test -f $ac_dir/shtool; then
3776 ac_aux_dir=$ac_dir
3777 ac_install_sh="$ac_aux_dir/shtool install -c"
3778 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003779 fi
3780done
3781if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3783echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3784 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3787ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3788ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003789
3790# Find a good install program. We prefer a C program (faster),
3791# so one script is as good as another. But avoid the broken or
3792# incompatible versions:
3793# SysV /etc/install, /usr/sbin/install
3794# SunOS /usr/etc/install
3795# IRIX /sbin/install
3796# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003797# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003798# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3799# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3800# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3801# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003802echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3803echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003804if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805if test "${ac_cv_path_install+set}" = set; then
3806 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
3813 # Account for people who put trailing slashes in PATH elements.
3814case $as_dir/ in
3815 ./ | .// | /cC/* | \
3816 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3817 /usr/ucb/* ) ;;
3818 *)
3819 # OSF1 and SCO ODT 3.0 have their own names for install.
3820 # Don't use installbsd from OSF since it installs stuff as root
3821 # by default.
3822 for ac_prog in ginstall scoinst install; do
3823 for ac_exec_ext in '' $ac_executable_extensions; do
3824 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3825 if test $ac_prog = install &&
3826 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3827 # AIX install. It has an incompatible calling convention.
3828 :
3829 elif test $ac_prog = install &&
3830 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3831 # program-specific install script used by HP pwplus--don't use.
3832 :
3833 else
3834 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3835 break 3
3836 fi
3837 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003838 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 done
3840 ;;
3841esac
3842done
3843
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003844
3845fi
3846 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003848 else
3849 # As a last resort, use the slow shell script. We don't cache a
3850 # path for INSTALL within a source directory, because that will
3851 # break other packages using the cache if that directory is
3852 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003854 fi
3855fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003856echo "$as_me:$LINENO: result: $INSTALL" >&5
3857echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003858
3859# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3860# It thinks the first close brace ends the variable substitution.
3861test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003864
3865test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3866
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003868# Not every filesystem supports hard links
3869
3870if test -z "$LN" ; then
3871 case $ac_sys_system in
3872 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003873 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003874 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003875 *) LN=ln;;
3876 esac
3877fi
3878
Fred Drake109d9862001-07-11 06:27:56 +00003879# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003880echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3881echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3882
Fred Drake109d9862001-07-11 06:27:56 +00003883# Check whether --with-pydebug or --without-pydebug was given.
3884if test "${with_pydebug+set}" = set; then
3885 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003886
Fred Drake109d9862001-07-11 06:27:56 +00003887if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003888then
3889
3890cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003891#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003892_ACEOF
3893
3894 echo "$as_me:$LINENO: result: yes" >&5
3895echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003896 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003897else echo "$as_me:$LINENO: result: no" >&5
3898echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003899fi
3900else
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 echo "$as_me:$LINENO: result: no" >&5
3902echo "${ECHO_T}no" >&6
3903fi;
Fred Drake109d9862001-07-11 06:27:56 +00003904
Skip Montanarodecc6a42003-01-01 20:07:49 +00003905# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3906# merged with this chunk of code?
3907
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003908# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003909# ------------------------
3910# (The following bit of code is complicated enough - please keep things
3911# indented properly. Just pretend you're editing Python code. ;-)
3912
3913# There are two parallel sets of case statements below, one that checks to
3914# see if OPT was set and one that does BASECFLAGS setting based upon
3915# compiler and platform. BASECFLAGS tweaks need to be made even if the
3916# user set OPT.
3917
3918# tweak OPT based on compiler and platform, only if the user didn't set
3919# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003920
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003921if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003922then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003923 case $GCC in
3924 yes)
3925 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003926 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003927 if test "$Py_DEBUG" = 'true' ; then
3928 # Optimization messes up debuggers, so turn it off for
3929 # debug builds.
3930 OPT="-g -Wall -Wstrict-prototypes"
3931 else
3932 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003933 fi
3934 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003935 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003936 OPT="-O3 -Wall -Wstrict-prototypes"
3937 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003938 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003939 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003940 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3941 ;;
3942 esac
Fred Drake109d9862001-07-11 06:27:56 +00003943 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003944
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003945 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003946 OPT="-O"
3947 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003948 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003949
3950 # The current (beta) Monterey compiler dies with optimizations
3951 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003952 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003953 Monterey*)
3954 OPT=""
3955 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003956 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003957
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003958fi
3959
Skip Montanarodecc6a42003-01-01 20:07:49 +00003960
3961# tweak BASECFLAGS based on compiler and platform
3962case $GCC in
3963yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003964 # Python violates C99 rules, by casting between incompatible
3965 # pointer types. GCC may generate bad code as a result of that,
3966 # so use -fno-strict-aliasing if supported.
3967 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3968echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3969 ac_save_cc="$CC"
3970 CC="$CC -fno-strict-aliasing"
3971 if test "$cross_compiling" = yes; then
3972 ac_cv_no_strict_aliasing_ok=no
3973else
3974 cat >conftest.$ac_ext <<_ACEOF
3975#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003976/* confdefs.h. */
3977_ACEOF
3978cat confdefs.h >>conftest.$ac_ext
3979cat >>conftest.$ac_ext <<_ACEOF
3980/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003981int main() { return 0; }
3982_ACEOF
3983rm -f conftest$ac_exeext
3984if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3985 (eval $ac_link) 2>&5
3986 ac_status=$?
3987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3988 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3990 (eval $ac_try) 2>&5
3991 ac_status=$?
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993 (exit $ac_status); }; }; then
3994 ac_cv_no_strict_aliasing_ok=yes
3995else
3996 echo "$as_me: program exited with status $ac_status" >&5
3997echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003998sed 's/^/| /' conftest.$ac_ext >&5
3999
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004000( exit $ac_status )
4001ac_cv_no_strict_aliasing_ok=no
4002fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004003rm -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 +00004004fi
4005 CC="$ac_save_cc"
4006 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4007echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
4008 if test $ac_cv_no_strict_aliasing_ok = yes
4009 then
4010 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4011 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004012 case $ac_sys_system in
4013 SCO_SV*)
4014 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4015 ;;
4016 # is there any other compiler on Darwin besides gcc?
4017 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004018 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004019 ;;
4020 esac
4021 ;;
4022
4023*)
4024 case $ac_sys_system in
4025 OpenUNIX*|UnixWare*)
4026 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4027 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004028 OSF*)
4029 BASECFLAGS="$BASECFLAGS -ieee -std"
4030 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004031 SCO_SV*)
4032 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4033 ;;
4034 esac
4035 ;;
4036esac
4037
Fred Drakee1ceaa02001-12-04 20:55:47 +00004038if test "$Py_DEBUG" = 'true'; then
4039 :
4040else
4041 OPT="-DNDEBUG $OPT"
4042fi
4043
Guido van Rossum563e7081996-09-10 18:20:48 +00004044if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004045then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004046 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004047fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004048
Martin v. Löwis11437992002-04-12 09:54:03 +00004049echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4050echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
4051if test "${ac_cv_opt_olimit_ok+set}" = set; then
4052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004053else
4054 ac_save_cc="$CC"
4055CC="$CC -OPT:Olimit=0"
4056if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004057 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004058else
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 cat >conftest.$ac_ext <<_ACEOF
4060#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004061/* confdefs.h. */
4062_ACEOF
4063cat confdefs.h >>conftest.$ac_ext
4064cat >>conftest.$ac_ext <<_ACEOF
4065/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004066int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004067_ACEOF
4068rm -f conftest$ac_exeext
4069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4070 (eval $ac_link) 2>&5
4071 ac_status=$?
4072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4075 (eval $ac_try) 2>&5
4076 ac_status=$?
4077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4078 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004079 ac_cv_opt_olimit_ok=yes
4080else
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 echo "$as_me: program exited with status $ac_status" >&5
4082echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004083sed 's/^/| /' conftest.$ac_ext >&5
4084
Martin v. Löwis11437992002-04-12 09:54:03 +00004085( exit $ac_status )
4086ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004087fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004088rm -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 +00004089fi
Guido van Rossum91922671997-10-09 20:24:13 +00004090CC="$ac_save_cc"
4091fi
4092
Martin v. Löwis11437992002-04-12 09:54:03 +00004093echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4094echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004095if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004096 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004097 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4098 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4099 # environment?
4100 Darwin*)
4101 ;;
4102 *)
4103 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4104 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004105 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004106else
Martin v. Löwis11437992002-04-12 09:54:03 +00004107 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4108echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
4109 if test "${ac_cv_olimit_ok+set}" = set; then
4110 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004111else
4112 ac_save_cc="$CC"
4113 CC="$CC -Olimit 1500"
4114 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004115 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004116else
Martin v. Löwis11437992002-04-12 09:54:03 +00004117 cat >conftest.$ac_ext <<_ACEOF
4118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004119/* confdefs.h. */
4120_ACEOF
4121cat confdefs.h >>conftest.$ac_ext
4122cat >>conftest.$ac_ext <<_ACEOF
4123/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004124int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004125_ACEOF
4126rm -f conftest$ac_exeext
4127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4128 (eval $ac_link) 2>&5
4129 ac_status=$?
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4133 (eval $ac_try) 2>&5
4134 ac_status=$?
4135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004137 ac_cv_olimit_ok=yes
4138else
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 echo "$as_me: program exited with status $ac_status" >&5
4140echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004141sed 's/^/| /' conftest.$ac_ext >&5
4142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143( exit $ac_status )
4144ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004145fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004146rm -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 +00004147fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004148 CC="$ac_save_cc"
4149fi
4150
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4152echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004153 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004154 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004155 fi
4156fi
4157
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004158# On some compilers, pthreads are available without further options
4159# (e.g. MacOS X). On some of these systems, the compiler will not
4160# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4161# So we have to see first whether pthreads are available without
4162# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004163echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4164echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4165if test "${ac_cv_pthread_is_default+set}" = set; then
4166 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004167else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004168 if test "$cross_compiling" = yes; then
4169 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004170else
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 cat >conftest.$ac_ext <<_ACEOF
4172#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004173/* confdefs.h. */
4174_ACEOF
4175cat confdefs.h >>conftest.$ac_ext
4176cat >>conftest.$ac_ext <<_ACEOF
4177/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004178
Martin v. Löwis130fb172001-07-19 11:00:41 +00004179#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004180
4181void* routine(void* p){return NULL;}
4182
4183int main(){
4184 pthread_t p;
4185 if(pthread_create(&p,NULL,routine,NULL)!=0)
4186 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004187 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004188 return 0;
4189}
4190
Martin v. Löwis11437992002-04-12 09:54:03 +00004191_ACEOF
4192rm -f conftest$ac_exeext
4193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4194 (eval $ac_link) 2>&5
4195 ac_status=$?
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4199 (eval $ac_try) 2>&5
4200 ac_status=$?
4201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004203
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004204 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004205 ac_cv_kthread=no
4206 ac_cv_pthread=no
4207
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004208else
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 echo "$as_me: program exited with status $ac_status" >&5
4210echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004211sed 's/^/| /' conftest.$ac_ext >&5
4212
Martin v. Löwis11437992002-04-12 09:54:03 +00004213( exit $ac_status )
4214ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004215fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004216rm -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 +00004217fi
4218
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004219fi
4220
Martin v. Löwis11437992002-04-12 09:54:03 +00004221echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4222echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004223
Michael W. Hudson54241132001-12-07 15:38:26 +00004224
Martin v. Löwis11437992002-04-12 09:54:03 +00004225if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004226then
4227 ac_cv_kpthread=no
4228else
4229# -Kpthread, if available, provides the right #defines
4230# and linker options to make pthread_create available
4231# Some compilers won't report that they do not support -Kpthread,
4232# so we need to run a program to see whether it really made the
4233# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004234echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4235echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4236if test "${ac_cv_kpthread+set}" = set; then
4237 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004238else
4239 ac_save_cc="$CC"
4240CC="$CC -Kpthread"
4241if test "$cross_compiling" = yes; then
4242 ac_cv_kpthread=no
4243else
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 cat >conftest.$ac_ext <<_ACEOF
4245#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004246/* confdefs.h. */
4247_ACEOF
4248cat confdefs.h >>conftest.$ac_ext
4249cat >>conftest.$ac_ext <<_ACEOF
4250/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004251
4252#include <pthread.h>
4253
4254void* routine(void* p){return NULL;}
4255
4256int main(){
4257 pthread_t p;
4258 if(pthread_create(&p,NULL,routine,NULL)!=0)
4259 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004260 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004261 return 0;
4262}
4263
Martin v. Löwis11437992002-04-12 09:54:03 +00004264_ACEOF
4265rm -f conftest$ac_exeext
4266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4267 (eval $ac_link) 2>&5
4268 ac_status=$?
4269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4272 (eval $ac_try) 2>&5
4273 ac_status=$?
4274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4275 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004276 ac_cv_kpthread=yes
4277else
Martin v. Löwis11437992002-04-12 09:54:03 +00004278 echo "$as_me: program exited with status $ac_status" >&5
4279echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004280sed 's/^/| /' conftest.$ac_ext >&5
4281
Martin v. Löwis11437992002-04-12 09:54:03 +00004282( exit $ac_status )
4283ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004284fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004285rm -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 +00004286fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004287CC="$ac_save_cc"
4288fi
4289
Martin v. Löwis11437992002-04-12 09:54:03 +00004290echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4291echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004292fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004293
Skip Montanarod8d39a02003-07-10 20:44:10 +00004294if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004295then
4296# -Kthread, if available, provides the right #defines
4297# and linker options to make pthread_create available
4298# Some compilers won't report that they do not support -Kthread,
4299# so we need to run a program to see whether it really made the
4300# function available.
4301echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4302echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4303if test "${ac_cv_kthread+set}" = set; then
4304 echo $ECHO_N "(cached) $ECHO_C" >&6
4305else
4306 ac_save_cc="$CC"
4307CC="$CC -Kthread"
4308if test "$cross_compiling" = yes; then
4309 ac_cv_kthread=no
4310else
4311 cat >conftest.$ac_ext <<_ACEOF
4312#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004313/* confdefs.h. */
4314_ACEOF
4315cat confdefs.h >>conftest.$ac_ext
4316cat >>conftest.$ac_ext <<_ACEOF
4317/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004318
4319#include <pthread.h>
4320
4321void* routine(void* p){return NULL;}
4322
4323int main(){
4324 pthread_t p;
4325 if(pthread_create(&p,NULL,routine,NULL)!=0)
4326 return 1;
4327 (void)pthread_detach(p);
4328 return 0;
4329}
4330
4331_ACEOF
4332rm -f conftest$ac_exeext
4333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4334 (eval $ac_link) 2>&5
4335 ac_status=$?
4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4339 (eval $ac_try) 2>&5
4340 ac_status=$?
4341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4342 (exit $ac_status); }; }; then
4343 ac_cv_kthread=yes
4344else
4345 echo "$as_me: program exited with status $ac_status" >&5
4346echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004347sed 's/^/| /' conftest.$ac_ext >&5
4348
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004349( exit $ac_status )
4350ac_cv_kthread=no
4351fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004352rm -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 +00004353fi
4354CC="$ac_save_cc"
4355fi
4356
4357echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4358echo "${ECHO_T}$ac_cv_kthread" >&6
4359fi
4360
Skip Montanarod8d39a02003-07-10 20:44:10 +00004361if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004362then
4363# -pthread, if available, provides the right #defines
4364# and linker options to make pthread_create available
4365# Some compilers won't report that they do not support -pthread,
4366# so we need to run a program to see whether it really made the
4367# function available.
4368echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4369echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4370if test "${ac_cv_thread+set}" = set; then
4371 echo $ECHO_N "(cached) $ECHO_C" >&6
4372else
4373 ac_save_cc="$CC"
4374CC="$CC -pthread"
4375if test "$cross_compiling" = yes; then
4376 ac_cv_pthread=no
4377else
4378 cat >conftest.$ac_ext <<_ACEOF
4379#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004380/* confdefs.h. */
4381_ACEOF
4382cat confdefs.h >>conftest.$ac_ext
4383cat >>conftest.$ac_ext <<_ACEOF
4384/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004385
4386#include <pthread.h>
4387
4388void* routine(void* p){return NULL;}
4389
4390int main(){
4391 pthread_t p;
4392 if(pthread_create(&p,NULL,routine,NULL)!=0)
4393 return 1;
4394 (void)pthread_detach(p);
4395 return 0;
4396}
4397
4398_ACEOF
4399rm -f conftest$ac_exeext
4400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4401 (eval $ac_link) 2>&5
4402 ac_status=$?
4403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4404 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4406 (eval $ac_try) 2>&5
4407 ac_status=$?
4408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4409 (exit $ac_status); }; }; then
4410 ac_cv_pthread=yes
4411else
4412 echo "$as_me: program exited with status $ac_status" >&5
4413echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004414sed 's/^/| /' conftest.$ac_ext >&5
4415
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004416( exit $ac_status )
4417ac_cv_pthread=no
4418fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004419rm -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 +00004420fi
4421CC="$ac_save_cc"
4422fi
4423
4424echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4425echo "${ECHO_T}$ac_cv_pthread" >&6
4426fi
4427
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004428# If we have set a CC compiler flag for thread support then
4429# check if it works for CXX, too.
4430ac_cv_cxx_thread=no
4431if test ! -z "$CXX"
4432then
4433echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4434echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4435ac_save_cxx="$CXX"
4436
4437if test "$ac_cv_kpthread" = "yes"
4438then
4439 CXX="$CXX -Kpthread"
4440 ac_cv_cxx_thread=yes
4441elif test "$ac_cv_kthread" = "yes"
4442then
4443 CXX="$CXX -Kthread"
4444 ac_cv_cxx_thread=yes
4445elif test "$ac_cv_pthread" = "yes"
4446then
4447 CXX="$CXX -pthread"
4448 ac_cv_cxx_thread=yes
4449fi
4450
4451if test $ac_cv_cxx_thread = yes
4452then
4453 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4454 $CXX -c conftest.$ac_ext 2>&5
4455 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4456 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4457 then
4458 ac_cv_cxx_thread=yes
4459 else
4460 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004461 fi
4462 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004463fi
4464fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004465CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004466echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4467echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4468
Michael W. Hudson54241132001-12-07 15:38:26 +00004469
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004470# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004471echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4472echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4473if test "${ac_cv_header_stdc+set}" = set; then
4474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004475else
Martin v. Löwis11437992002-04-12 09:54:03 +00004476 cat >conftest.$ac_ext <<_ACEOF
4477#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004478/* confdefs.h. */
4479_ACEOF
4480cat confdefs.h >>conftest.$ac_ext
4481cat >>conftest.$ac_ext <<_ACEOF
4482/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004483#include <stdlib.h>
4484#include <stdarg.h>
4485#include <string.h>
4486#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004487
Skip Montanaro6dead952003-09-25 14:50:04 +00004488int
4489main ()
4490{
4491
4492 ;
4493 return 0;
4494}
Martin v. Löwis11437992002-04-12 09:54:03 +00004495_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004496rm -f conftest.$ac_objext
4497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4498 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004499 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004501 (exit $ac_status); } &&
4502 { ac_try='test -s conftest.$ac_objext'
4503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4504 (eval $ac_try) 2>&5
4505 ac_status=$?
4506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4507 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508 ac_cv_header_stdc=yes
4509else
Martin v. Löwis11437992002-04-12 09:54:03 +00004510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004511sed 's/^/| /' conftest.$ac_ext >&5
4512
4513ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004514fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004515rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004516
4517if test $ac_cv_header_stdc = yes; then
4518 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004519 cat >conftest.$ac_ext <<_ACEOF
4520#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004521/* confdefs.h. */
4522_ACEOF
4523cat confdefs.h >>conftest.$ac_ext
4524cat >>conftest.$ac_ext <<_ACEOF
4525/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004526#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004527
4528_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004530 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004531 :
4532else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004533 ac_cv_header_stdc=no
4534fi
4535rm -f conftest*
4536
4537fi
4538
4539if test $ac_cv_header_stdc = yes; then
4540 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004541 cat >conftest.$ac_ext <<_ACEOF
4542#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004543/* confdefs.h. */
4544_ACEOF
4545cat confdefs.h >>conftest.$ac_ext
4546cat >>conftest.$ac_ext <<_ACEOF
4547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004549
4550_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004552 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553 :
4554else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004555 ac_cv_header_stdc=no
4556fi
4557rm -f conftest*
4558
4559fi
4560
4561if test $ac_cv_header_stdc = yes; then
4562 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004563 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004564 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565else
Martin v. Löwis11437992002-04-12 09:54:03 +00004566 cat >conftest.$ac_ext <<_ACEOF
4567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004568/* confdefs.h. */
4569_ACEOF
4570cat confdefs.h >>conftest.$ac_ext
4571cat >>conftest.$ac_ext <<_ACEOF
4572/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004573#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004574#if ((' ' & 0x0FF) == 0x020)
4575# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4576# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4577#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004578# define ISLOWER(c) \
4579 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004580 || ('j' <= (c) && (c) <= 'r') \
4581 || ('s' <= (c) && (c) <= 'z'))
4582# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4583#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004584
Martin v. Löwis11437992002-04-12 09:54:03 +00004585#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4586int
4587main ()
4588{
4589 int i;
4590 for (i = 0; i < 256; i++)
4591 if (XOR (islower (i), ISLOWER (i))
4592 || toupper (i) != TOUPPER (i))
4593 exit(2);
4594 exit (0);
4595}
4596_ACEOF
4597rm -f conftest$ac_exeext
4598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4599 (eval $ac_link) 2>&5
4600 ac_status=$?
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4604 (eval $ac_try) 2>&5
4605 ac_status=$?
4606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608 :
4609else
Martin v. Löwis11437992002-04-12 09:54:03 +00004610 echo "$as_me: program exited with status $ac_status" >&5
4611echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004612sed 's/^/| /' conftest.$ac_ext >&5
4613
Martin v. Löwis11437992002-04-12 09:54:03 +00004614( exit $ac_status )
4615ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004616fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004617rm -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 +00004618fi
4619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004620fi
4621echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4622echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004623if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004624
4625cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004627_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004628
4629fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004630
Martin v. Löwis11437992002-04-12 09:54:03 +00004631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004668
Barry Warsawfe33b792003-01-07 22:42:49 +00004669
Neal Norwitz82251032003-05-23 14:35:24 +00004670
Martin v. Löwis11437992002-04-12 09:54:03 +00004671for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004672libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004673signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4674unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004675sys/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 +00004676sys/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 +00004677sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004678sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004679do
Martin v. Löwis11437992002-04-12 09:54:03 +00004680as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4681if eval "test \"\${$as_ac_Header+set}\" = set"; then
4682 echo "$as_me:$LINENO: checking for $ac_header" >&5
4683echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4684if eval "test \"\${$as_ac_Header+set}\" = set"; then
4685 echo $ECHO_N "(cached) $ECHO_C" >&6
4686fi
4687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4688echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004689else
Martin v. Löwis11437992002-04-12 09:54:03 +00004690 # Is the header compilable?
4691echo "$as_me:$LINENO: checking $ac_header usability" >&5
4692echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4693cat >conftest.$ac_ext <<_ACEOF
4694#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004695/* confdefs.h. */
4696_ACEOF
4697cat confdefs.h >>conftest.$ac_ext
4698cat >>conftest.$ac_ext <<_ACEOF
4699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004700$ac_includes_default
4701#include <$ac_header>
4702_ACEOF
4703rm -f conftest.$ac_objext
4704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4705 (eval $ac_compile) 2>&5
4706 ac_status=$?
4707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4708 (exit $ac_status); } &&
4709 { ac_try='test -s conftest.$ac_objext'
4710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4711 (eval $ac_try) 2>&5
4712 ac_status=$?
4713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714 (exit $ac_status); }; }; then
4715 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004716else
Martin v. Löwis11437992002-04-12 09:54:03 +00004717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004718sed 's/^/| /' conftest.$ac_ext >&5
4719
Martin v. Löwis11437992002-04-12 09:54:03 +00004720ac_header_compiler=no
4721fi
4722rm -f conftest.$ac_objext conftest.$ac_ext
4723echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4724echo "${ECHO_T}$ac_header_compiler" >&6
4725
4726# Is the header present?
4727echo "$as_me:$LINENO: checking $ac_header presence" >&5
4728echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4729cat >conftest.$ac_ext <<_ACEOF
4730#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004731/* confdefs.h. */
4732_ACEOF
4733cat confdefs.h >>conftest.$ac_ext
4734cat >>conftest.$ac_ext <<_ACEOF
4735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004736#include <$ac_header>
4737_ACEOF
4738if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4739 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4740 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004741 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004742 rm -f conftest.er1
4743 cat conftest.err >&5
4744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4745 (exit $ac_status); } >/dev/null; then
4746 if test -s conftest.err; then
4747 ac_cpp_err=$ac_c_preproc_warn_flag
4748 else
4749 ac_cpp_err=
4750 fi
4751else
4752 ac_cpp_err=yes
4753fi
4754if test -z "$ac_cpp_err"; then
4755 ac_header_preproc=yes
4756else
4757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004758sed 's/^/| /' conftest.$ac_ext >&5
4759
Martin v. Löwis11437992002-04-12 09:54:03 +00004760 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004761fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004762rm -f conftest.err conftest.$ac_ext
4763echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4764echo "${ECHO_T}$ac_header_preproc" >&6
4765
4766# So? What about this header?
4767case $ac_header_compiler:$ac_header_preproc in
4768 yes:no )
4769 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4770echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4771 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004772echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4773 (
4774 cat <<\_ASBOX
4775## ------------------------------------ ##
4776## Report this to bug-autoconf@gnu.org. ##
4777## ------------------------------------ ##
4778_ASBOX
4779 ) |
4780 sed "s/^/$as_me: WARNING: /" >&2
4781 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 no:yes )
4783 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4784echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4785 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4786echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4787 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004788echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4789 (
4790 cat <<\_ASBOX
4791## ------------------------------------ ##
4792## Report this to bug-autoconf@gnu.org. ##
4793## ------------------------------------ ##
4794_ASBOX
4795 ) |
4796 sed "s/^/$as_me: WARNING: /" >&2
4797 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004798esac
4799echo "$as_me:$LINENO: checking for $ac_header" >&5
4800echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4801if eval "test \"\${$as_ac_Header+set}\" = set"; then
4802 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004803else
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004806echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4807echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4808
4809fi
4810if test `eval echo '${'$as_ac_Header'}'` = yes; then
4811 cat >>confdefs.h <<_ACEOF
4812#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4813_ACEOF
4814
4815fi
4816
Guido van Rossum627b2d71993-12-24 10:39:16 +00004817done
4818
Martin v. Löwis11437992002-04-12 09:54:03 +00004819
4820
4821
4822
4823
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004824ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004825for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4826 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4827echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4828echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4829if eval "test \"\${$as_ac_Header+set}\" = set"; then
4830 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004831else
Martin v. Löwis11437992002-04-12 09:54:03 +00004832 cat >conftest.$ac_ext <<_ACEOF
4833#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004834/* confdefs.h. */
4835_ACEOF
4836cat confdefs.h >>conftest.$ac_ext
4837cat >>conftest.$ac_ext <<_ACEOF
4838/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004839#include <sys/types.h>
4840#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004841
Martin v. Löwis11437992002-04-12 09:54:03 +00004842int
4843main ()
4844{
4845if ((DIR *) 0)
4846return 0;
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851rm -f conftest.$ac_objext
4852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4853 (eval $ac_compile) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); } &&
4857 { ac_try='test -s conftest.$ac_objext'
4858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; }; then
4863 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004864else
Martin v. Löwis11437992002-04-12 09:54:03 +00004865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004866sed 's/^/| /' conftest.$ac_ext >&5
4867
Martin v. Löwis11437992002-04-12 09:54:03 +00004868eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004869fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004870rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004872echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4873echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4874if test `eval echo '${'$as_ac_Header'}'` = yes; then
4875 cat >>confdefs.h <<_ACEOF
4876#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4877_ACEOF
4878
4879ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004880fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004881
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004882done
4883# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4884if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4886echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4887if test "${ac_cv_search_opendir+set}" = set; then
4888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004889else
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 ac_func_search_save_LIBS=$LIBS
4891ac_cv_search_opendir=no
4892cat >conftest.$ac_ext <<_ACEOF
4893#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004894/* confdefs.h. */
4895_ACEOF
4896cat confdefs.h >>conftest.$ac_ext
4897cat >>conftest.$ac_ext <<_ACEOF
4898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004899
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004900/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004901#ifdef __cplusplus
4902extern "C"
4903#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004904/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 builtin and then its argument prototype would still apply. */
4906char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004907int
4908main ()
4909{
4910opendir ();
4911 ;
4912 return 0;
4913}
4914_ACEOF
4915rm -f conftest.$ac_objext conftest$ac_exeext
4916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4917 (eval $ac_link) 2>&5
4918 ac_status=$?
4919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920 (exit $ac_status); } &&
4921 { ac_try='test -s conftest$ac_exeext'
4922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4923 (eval $ac_try) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); }; }; then
4927 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004928else
Martin v. Löwis11437992002-04-12 09:54:03 +00004929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004930sed 's/^/| /' conftest.$ac_ext >&5
4931
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004932fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004933rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4934if test "$ac_cv_search_opendir" = no; then
4935 for ac_lib in dir; do
4936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4937 cat >conftest.$ac_ext <<_ACEOF
4938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004939/* confdefs.h. */
4940_ACEOF
4941cat confdefs.h >>conftest.$ac_ext
4942cat >>conftest.$ac_ext <<_ACEOF
4943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004944
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004945/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004946#ifdef __cplusplus
4947extern "C"
4948#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004949/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 builtin and then its argument prototype would still apply. */
4951char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004952int
4953main ()
4954{
4955opendir ();
4956 ;
4957 return 0;
4958}
4959_ACEOF
4960rm -f conftest.$ac_objext conftest$ac_exeext
4961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4962 (eval $ac_link) 2>&5
4963 ac_status=$?
4964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4965 (exit $ac_status); } &&
4966 { ac_try='test -s conftest$ac_exeext'
4967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4968 (eval $ac_try) 2>&5
4969 ac_status=$?
4970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971 (exit $ac_status); }; }; then
4972 ac_cv_search_opendir="-l$ac_lib"
4973break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004974else
Martin v. Löwis11437992002-04-12 09:54:03 +00004975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004976sed 's/^/| /' conftest.$ac_ext >&5
4977
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004978fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004979rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4980 done
4981fi
4982LIBS=$ac_func_search_save_LIBS
4983fi
4984echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4985echo "${ECHO_T}$ac_cv_search_opendir" >&6
4986if test "$ac_cv_search_opendir" != no; then
4987 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004990
Michael W. Hudson54241132001-12-07 15:38:26 +00004991else
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4993echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4994if test "${ac_cv_search_opendir+set}" = set; then
4995 echo $ECHO_N "(cached) $ECHO_C" >&6
4996else
4997 ac_func_search_save_LIBS=$LIBS
4998ac_cv_search_opendir=no
4999cat >conftest.$ac_ext <<_ACEOF
5000#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005001/* confdefs.h. */
5002_ACEOF
5003cat confdefs.h >>conftest.$ac_ext
5004cat >>conftest.$ac_ext <<_ACEOF
5005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005006
5007/* Override any gcc2 internal prototype to avoid an error. */
5008#ifdef __cplusplus
5009extern "C"
5010#endif
5011/* We use char because int might match the return type of a gcc2
5012 builtin and then its argument prototype would still apply. */
5013char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005014int
5015main ()
5016{
5017opendir ();
5018 ;
5019 return 0;
5020}
5021_ACEOF
5022rm -f conftest.$ac_objext conftest$ac_exeext
5023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5024 (eval $ac_link) 2>&5
5025 ac_status=$?
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); } &&
5028 { ac_try='test -s conftest$ac_exeext'
5029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5030 (eval $ac_try) 2>&5
5031 ac_status=$?
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); }; }; then
5034 ac_cv_search_opendir="none required"
5035else
5036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005037sed 's/^/| /' conftest.$ac_ext >&5
5038
Martin v. Löwis11437992002-04-12 09:54:03 +00005039fi
5040rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5041if test "$ac_cv_search_opendir" = no; then
5042 for ac_lib in x; do
5043 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5044 cat >conftest.$ac_ext <<_ACEOF
5045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005046/* confdefs.h. */
5047_ACEOF
5048cat confdefs.h >>conftest.$ac_ext
5049cat >>conftest.$ac_ext <<_ACEOF
5050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005051
5052/* Override any gcc2 internal prototype to avoid an error. */
5053#ifdef __cplusplus
5054extern "C"
5055#endif
5056/* We use char because int might match the return type of a gcc2
5057 builtin and then its argument prototype would still apply. */
5058char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005059int
5060main ()
5061{
5062opendir ();
5063 ;
5064 return 0;
5065}
5066_ACEOF
5067rm -f conftest.$ac_objext conftest$ac_exeext
5068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5069 (eval $ac_link) 2>&5
5070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); } &&
5073 { ac_try='test -s conftest$ac_exeext'
5074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075 (eval $ac_try) 2>&5
5076 ac_status=$?
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); }; }; then
5079 ac_cv_search_opendir="-l$ac_lib"
5080break
5081else
5082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005083sed 's/^/| /' conftest.$ac_ext >&5
5084
Martin v. Löwis11437992002-04-12 09:54:03 +00005085fi
5086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5087 done
5088fi
5089LIBS=$ac_func_search_save_LIBS
5090fi
5091echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5092echo "${ECHO_T}$ac_cv_search_opendir" >&6
5093if test "$ac_cv_search_opendir" != no; then
5094 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096fi
5097
5098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005099
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005100echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5101echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5102if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5103 echo $ECHO_N "(cached) $ECHO_C" >&6
5104else
5105 cat >conftest.$ac_ext <<_ACEOF
5106#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005107/* confdefs.h. */
5108_ACEOF
5109cat confdefs.h >>conftest.$ac_ext
5110cat >>conftest.$ac_ext <<_ACEOF
5111/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005112#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005113int
5114main ()
5115{
5116return makedev(0, 0);
5117 ;
5118 return 0;
5119}
5120_ACEOF
5121rm -f conftest.$ac_objext conftest$ac_exeext
5122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5123 (eval $ac_link) 2>&5
5124 ac_status=$?
5125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126 (exit $ac_status); } &&
5127 { ac_try='test -s conftest$ac_exeext'
5128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5129 (eval $ac_try) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); }; }; then
5133 ac_cv_header_sys_types_h_makedev=yes
5134else
5135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005136sed 's/^/| /' conftest.$ac_ext >&5
5137
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005138ac_cv_header_sys_types_h_makedev=no
5139fi
5140rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5141
5142fi
5143echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5144echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5145
5146if test $ac_cv_header_sys_types_h_makedev = no; then
5147if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5148 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5149echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5150if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5151 echo $ECHO_N "(cached) $ECHO_C" >&6
5152fi
5153echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5154echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5155else
5156 # Is the header compilable?
5157echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5158echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5159cat >conftest.$ac_ext <<_ACEOF
5160#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005161/* confdefs.h. */
5162_ACEOF
5163cat confdefs.h >>conftest.$ac_ext
5164cat >>conftest.$ac_ext <<_ACEOF
5165/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005166$ac_includes_default
5167#include <sys/mkdev.h>
5168_ACEOF
5169rm -f conftest.$ac_objext
5170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5171 (eval $ac_compile) 2>&5
5172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); } &&
5175 { ac_try='test -s conftest.$ac_objext'
5176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5177 (eval $ac_try) 2>&5
5178 ac_status=$?
5179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); }; }; then
5181 ac_header_compiler=yes
5182else
5183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005184sed 's/^/| /' conftest.$ac_ext >&5
5185
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005186ac_header_compiler=no
5187fi
5188rm -f conftest.$ac_objext conftest.$ac_ext
5189echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5190echo "${ECHO_T}$ac_header_compiler" >&6
5191
5192# Is the header present?
5193echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5194echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5195cat >conftest.$ac_ext <<_ACEOF
5196#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005197/* confdefs.h. */
5198_ACEOF
5199cat confdefs.h >>conftest.$ac_ext
5200cat >>conftest.$ac_ext <<_ACEOF
5201/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005202#include <sys/mkdev.h>
5203_ACEOF
5204if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5205 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5206 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005207 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005208 rm -f conftest.er1
5209 cat conftest.err >&5
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); } >/dev/null; then
5212 if test -s conftest.err; then
5213 ac_cpp_err=$ac_c_preproc_warn_flag
5214 else
5215 ac_cpp_err=
5216 fi
5217else
5218 ac_cpp_err=yes
5219fi
5220if test -z "$ac_cpp_err"; then
5221 ac_header_preproc=yes
5222else
5223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005224sed 's/^/| /' conftest.$ac_ext >&5
5225
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005226 ac_header_preproc=no
5227fi
5228rm -f conftest.err conftest.$ac_ext
5229echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5230echo "${ECHO_T}$ac_header_preproc" >&6
5231
5232# So? What about this header?
5233case $ac_header_compiler:$ac_header_preproc in
5234 yes:no )
5235 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5236echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5237 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005238echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5239 (
5240 cat <<\_ASBOX
5241## ------------------------------------ ##
5242## Report this to bug-autoconf@gnu.org. ##
5243## ------------------------------------ ##
5244_ASBOX
5245 ) |
5246 sed "s/^/$as_me: WARNING: /" >&2
5247 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005248 no:yes )
5249 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5250echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
5251 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5252echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5253 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005254echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5255 (
5256 cat <<\_ASBOX
5257## ------------------------------------ ##
5258## Report this to bug-autoconf@gnu.org. ##
5259## ------------------------------------ ##
5260_ASBOX
5261 ) |
5262 sed "s/^/$as_me: WARNING: /" >&2
5263 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005264esac
5265echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5266echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5267if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5268 echo $ECHO_N "(cached) $ECHO_C" >&6
5269else
5270 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5271fi
5272echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5273echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5274
5275fi
5276if test $ac_cv_header_sys_mkdev_h = yes; then
5277
5278cat >>confdefs.h <<\_ACEOF
5279#define MAJOR_IN_MKDEV 1
5280_ACEOF
5281
5282fi
5283
5284
5285
5286 if test $ac_cv_header_sys_mkdev_h = no; then
5287 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5288 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5289echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5290if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5291 echo $ECHO_N "(cached) $ECHO_C" >&6
5292fi
5293echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5294echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5295else
5296 # Is the header compilable?
5297echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5298echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5299cat >conftest.$ac_ext <<_ACEOF
5300#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005301/* confdefs.h. */
5302_ACEOF
5303cat confdefs.h >>conftest.$ac_ext
5304cat >>conftest.$ac_ext <<_ACEOF
5305/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005306$ac_includes_default
5307#include <sys/sysmacros.h>
5308_ACEOF
5309rm -f conftest.$ac_objext
5310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5311 (eval $ac_compile) 2>&5
5312 ac_status=$?
5313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5314 (exit $ac_status); } &&
5315 { ac_try='test -s conftest.$ac_objext'
5316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5317 (eval $ac_try) 2>&5
5318 ac_status=$?
5319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320 (exit $ac_status); }; }; then
5321 ac_header_compiler=yes
5322else
5323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005324sed 's/^/| /' conftest.$ac_ext >&5
5325
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005326ac_header_compiler=no
5327fi
5328rm -f conftest.$ac_objext conftest.$ac_ext
5329echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5330echo "${ECHO_T}$ac_header_compiler" >&6
5331
5332# Is the header present?
5333echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5334echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5335cat >conftest.$ac_ext <<_ACEOF
5336#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005337/* confdefs.h. */
5338_ACEOF
5339cat confdefs.h >>conftest.$ac_ext
5340cat >>conftest.$ac_ext <<_ACEOF
5341/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005342#include <sys/sysmacros.h>
5343_ACEOF
5344if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5345 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5346 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005347 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005348 rm -f conftest.er1
5349 cat conftest.err >&5
5350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5351 (exit $ac_status); } >/dev/null; then
5352 if test -s conftest.err; then
5353 ac_cpp_err=$ac_c_preproc_warn_flag
5354 else
5355 ac_cpp_err=
5356 fi
5357else
5358 ac_cpp_err=yes
5359fi
5360if test -z "$ac_cpp_err"; then
5361 ac_header_preproc=yes
5362else
5363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005364sed 's/^/| /' conftest.$ac_ext >&5
5365
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005366 ac_header_preproc=no
5367fi
5368rm -f conftest.err conftest.$ac_ext
5369echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5370echo "${ECHO_T}$ac_header_preproc" >&6
5371
5372# So? What about this header?
5373case $ac_header_compiler:$ac_header_preproc in
5374 yes:no )
5375 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5376echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5377 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005378echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5379 (
5380 cat <<\_ASBOX
5381## ------------------------------------ ##
5382## Report this to bug-autoconf@gnu.org. ##
5383## ------------------------------------ ##
5384_ASBOX
5385 ) |
5386 sed "s/^/$as_me: WARNING: /" >&2
5387 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005388 no:yes )
5389 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5390echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5391 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5392echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5393 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005394echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5395 (
5396 cat <<\_ASBOX
5397## ------------------------------------ ##
5398## Report this to bug-autoconf@gnu.org. ##
5399## ------------------------------------ ##
5400_ASBOX
5401 ) |
5402 sed "s/^/$as_me: WARNING: /" >&2
5403 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005404esac
5405echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5406echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5407if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5408 echo $ECHO_N "(cached) $ECHO_C" >&6
5409else
5410 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5411fi
5412echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5413echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5414
5415fi
5416if test $ac_cv_header_sys_sysmacros_h = yes; then
5417
5418cat >>confdefs.h <<\_ACEOF
5419#define MAJOR_IN_SYSMACROS 1
5420_ACEOF
5421
5422fi
5423
5424
5425 fi
5426fi
5427
Michael W. Hudson54241132001-12-07 15:38:26 +00005428
Guido van Rossum627b2d71993-12-24 10:39:16 +00005429# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005430was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005431echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5432echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5433cat >conftest.$ac_ext <<_ACEOF
5434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005435/* confdefs.h. */
5436_ACEOF
5437cat confdefs.h >>conftest.$ac_ext
5438cat >>conftest.$ac_ext <<_ACEOF
5439/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005441
5442_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005444 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005445 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005446else
Martin v. Löwis11437992002-04-12 09:54:03 +00005447
5448
5449cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005450#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005451_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005452
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005453
Guido van Rossum627b2d71993-12-24 10:39:16 +00005454fi
5455rm -f conftest*
5456
Martin v. Löwis11437992002-04-12 09:54:03 +00005457echo "$as_me:$LINENO: result: $was_it_defined" >&5
5458echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005459
Neal Norwitz11690112002-07-30 01:08:28 +00005460# Check whether using makedev requires defining _OSF_SOURCE
5461echo "$as_me:$LINENO: checking for makedev" >&5
5462echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5463cat >conftest.$ac_ext <<_ACEOF
5464#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005465/* confdefs.h. */
5466_ACEOF
5467cat confdefs.h >>conftest.$ac_ext
5468cat >>conftest.$ac_ext <<_ACEOF
5469/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005470#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005471int
5472main ()
5473{
5474 makedev(0, 0)
5475 ;
5476 return 0;
5477}
5478_ACEOF
5479rm -f conftest.$ac_objext conftest$ac_exeext
5480if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5481 (eval $ac_link) 2>&5
5482 ac_status=$?
5483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5484 (exit $ac_status); } &&
5485 { ac_try='test -s conftest$ac_exeext'
5486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5487 (eval $ac_try) 2>&5
5488 ac_status=$?
5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490 (exit $ac_status); }; }; then
5491 ac_cv_has_makedev=yes
5492else
5493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005494sed 's/^/| /' conftest.$ac_ext >&5
5495
Neal Norwitz11690112002-07-30 01:08:28 +00005496ac_cv_has_makedev=no
5497fi
5498rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5499if test "$ac_cv_has_makedev" = "no"; then
5500 # we didn't link, try if _OSF_SOURCE will allow us to link
5501 cat >conftest.$ac_ext <<_ACEOF
5502#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005503/* confdefs.h. */
5504_ACEOF
5505cat confdefs.h >>conftest.$ac_ext
5506cat >>conftest.$ac_ext <<_ACEOF
5507/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005508
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005509#define _OSF_SOURCE 1
5510#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005511
Neal Norwitz11690112002-07-30 01:08:28 +00005512int
5513main ()
5514{
5515 makedev(0, 0)
5516 ;
5517 return 0;
5518}
5519_ACEOF
5520rm -f conftest.$ac_objext conftest$ac_exeext
5521if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5522 (eval $ac_link) 2>&5
5523 ac_status=$?
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); } &&
5526 { ac_try='test -s conftest$ac_exeext'
5527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5528 (eval $ac_try) 2>&5
5529 ac_status=$?
5530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5531 (exit $ac_status); }; }; then
5532 ac_cv_has_makedev=yes
5533else
5534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005535sed 's/^/| /' conftest.$ac_ext >&5
5536
Neal Norwitz11690112002-07-30 01:08:28 +00005537ac_cv_has_makedev=no
5538fi
5539rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5540 if test "$ac_cv_has_makedev" = "yes"; then
5541
5542cat >>confdefs.h <<\_ACEOF
5543#define _OSF_SOURCE 1
5544_ACEOF
5545
5546 fi
5547fi
5548echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5549echo "${ECHO_T}$ac_cv_has_makedev" >&6
5550if test "$ac_cv_has_makedev" = "yes"; then
5551
5552cat >>confdefs.h <<\_ACEOF
5553#define HAVE_MAKEDEV 1
5554_ACEOF
5555
5556fi
5557
Martin v. Löwis399a6892002-10-04 10:22:02 +00005558# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5559# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5560# defined, but the compiler does not support pragma redefine_extname,
5561# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5562# structures (such as rlimit64) without declaring them. As a
5563# work-around, disable LFS on such configurations
5564
5565use_lfs=yes
5566echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5567echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5568cat >conftest.$ac_ext <<_ACEOF
5569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005570/* confdefs.h. */
5571_ACEOF
5572cat confdefs.h >>conftest.$ac_ext
5573cat >>conftest.$ac_ext <<_ACEOF
5574/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005575
5576#define _LARGEFILE_SOURCE 1
5577#define _FILE_OFFSET_BITS 64
5578#include <sys/resource.h>
5579
Martin v. Löwis399a6892002-10-04 10:22:02 +00005580int
5581main ()
5582{
5583struct rlimit foo;
5584 ;
5585 return 0;
5586}
5587_ACEOF
5588rm -f conftest.$ac_objext
5589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5590 (eval $ac_compile) 2>&5
5591 ac_status=$?
5592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593 (exit $ac_status); } &&
5594 { ac_try='test -s conftest.$ac_objext'
5595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5596 (eval $ac_try) 2>&5
5597 ac_status=$?
5598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5599 (exit $ac_status); }; }; then
5600 sol_lfs_bug=no
5601else
5602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005603sed 's/^/| /' conftest.$ac_ext >&5
5604
Martin v. Löwis399a6892002-10-04 10:22:02 +00005605sol_lfs_bug=yes
5606fi
5607rm -f conftest.$ac_objext conftest.$ac_ext
5608echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5609echo "${ECHO_T}$sol_lfs_bug" >&6
5610if test "$sol_lfs_bug" = "yes"; then
5611 use_lfs=no
5612fi
5613
5614if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005615# Two defines needed to enable largefile support on various platforms
5616# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005617
Martin v. Löwis11437992002-04-12 09:54:03 +00005618cat >>confdefs.h <<\_ACEOF
5619#define _LARGEFILE_SOURCE 1
5620_ACEOF
5621
5622
5623cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005624#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005625_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005626
Martin v. Löwis399a6892002-10-04 10:22:02 +00005627fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005628
Guido van Rossum84e7b241996-08-19 21:59:00 +00005629# Add some code to confdefs.h so that the test for off_t works on SCO
5630cat >> confdefs.h <<\EOF
5631#if defined(SCO_DS)
5632#undef _OFF_T
5633#endif
5634EOF
5635
Guido van Rossumef2255b2000-03-10 22:30:29 +00005636# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005637echo "$as_me:$LINENO: checking for mode_t" >&5
5638echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5639if test "${ac_cv_type_mode_t+set}" = set; then
5640 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005641else
Martin v. Löwis11437992002-04-12 09:54:03 +00005642 cat >conftest.$ac_ext <<_ACEOF
5643#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005644/* confdefs.h. */
5645_ACEOF
5646cat confdefs.h >>conftest.$ac_ext
5647cat >>conftest.$ac_ext <<_ACEOF
5648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005649$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005650int
5651main ()
5652{
5653if ((mode_t *) 0)
5654 return 0;
5655if (sizeof (mode_t))
5656 return 0;
5657 ;
5658 return 0;
5659}
5660_ACEOF
5661rm -f conftest.$ac_objext
5662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5663 (eval $ac_compile) 2>&5
5664 ac_status=$?
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); } &&
5667 { ac_try='test -s conftest.$ac_objext'
5668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005673 ac_cv_type_mode_t=yes
5674else
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005676sed 's/^/| /' conftest.$ac_ext >&5
5677
Martin v. Löwis11437992002-04-12 09:54:03 +00005678ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005679fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005680rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005681fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005682echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5683echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5684if test $ac_cv_type_mode_t = yes; then
5685 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005686else
Martin v. Löwis11437992002-04-12 09:54:03 +00005687
5688cat >>confdefs.h <<_ACEOF
5689#define mode_t int
5690_ACEOF
5691
5692fi
5693
5694echo "$as_me:$LINENO: checking for off_t" >&5
5695echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5696if test "${ac_cv_type_off_t+set}" = set; then
5697 echo $ECHO_N "(cached) $ECHO_C" >&6
5698else
5699 cat >conftest.$ac_ext <<_ACEOF
5700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005701/* confdefs.h. */
5702_ACEOF
5703cat confdefs.h >>conftest.$ac_ext
5704cat >>conftest.$ac_ext <<_ACEOF
5705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005706$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005707int
5708main ()
5709{
5710if ((off_t *) 0)
5711 return 0;
5712if (sizeof (off_t))
5713 return 0;
5714 ;
5715 return 0;
5716}
5717_ACEOF
5718rm -f conftest.$ac_objext
5719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5720 (eval $ac_compile) 2>&5
5721 ac_status=$?
5722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5723 (exit $ac_status); } &&
5724 { ac_try='test -s conftest.$ac_objext'
5725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5726 (eval $ac_try) 2>&5
5727 ac_status=$?
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005730 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005731else
Martin v. Löwis11437992002-04-12 09:54:03 +00005732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005733sed 's/^/| /' conftest.$ac_ext >&5
5734
Martin v. Löwis11437992002-04-12 09:54:03 +00005735ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005737rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005739echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5740echo "${ECHO_T}$ac_cv_type_off_t" >&6
5741if test $ac_cv_type_off_t = yes; then
5742 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743else
Martin v. Löwis11437992002-04-12 09:54:03 +00005744
5745cat >>confdefs.h <<_ACEOF
5746#define off_t long
5747_ACEOF
5748
5749fi
5750
5751echo "$as_me:$LINENO: checking for pid_t" >&5
5752echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5753if test "${ac_cv_type_pid_t+set}" = set; then
5754 echo $ECHO_N "(cached) $ECHO_C" >&6
5755else
5756 cat >conftest.$ac_ext <<_ACEOF
5757#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005758/* confdefs.h. */
5759_ACEOF
5760cat confdefs.h >>conftest.$ac_ext
5761cat >>conftest.$ac_ext <<_ACEOF
5762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005763$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005764int
5765main ()
5766{
5767if ((pid_t *) 0)
5768 return 0;
5769if (sizeof (pid_t))
5770 return 0;
5771 ;
5772 return 0;
5773}
5774_ACEOF
5775rm -f conftest.$ac_objext
5776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5777 (eval $ac_compile) 2>&5
5778 ac_status=$?
5779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780 (exit $ac_status); } &&
5781 { ac_try='test -s conftest.$ac_objext'
5782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5783 (eval $ac_try) 2>&5
5784 ac_status=$?
5785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5786 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005787 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005788else
Martin v. Löwis11437992002-04-12 09:54:03 +00005789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005790sed 's/^/| /' conftest.$ac_ext >&5
5791
Martin v. Löwis11437992002-04-12 09:54:03 +00005792ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005794rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005796echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5797echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5798if test $ac_cv_type_pid_t = yes; then
5799 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800else
Martin v. Löwis11437992002-04-12 09:54:03 +00005801
5802cat >>confdefs.h <<_ACEOF
5803#define pid_t int
5804_ACEOF
5805
5806fi
5807
5808echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5809echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5810if test "${ac_cv_type_signal+set}" = set; then
5811 echo $ECHO_N "(cached) $ECHO_C" >&6
5812else
5813 cat >conftest.$ac_ext <<_ACEOF
5814#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005815/* confdefs.h. */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005820#include <sys/types.h>
5821#include <signal.h>
5822#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005823# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005824#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005825#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005826extern "C" void (*signal (int, void (*)(int)))(int);
5827#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005828void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005829#endif
5830
Martin v. Löwis11437992002-04-12 09:54:03 +00005831int
5832main ()
5833{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005834int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005835 ;
5836 return 0;
5837}
5838_ACEOF
5839rm -f conftest.$ac_objext
5840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5841 (eval $ac_compile) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); } &&
5845 { ac_try='test -s conftest.$ac_objext'
5846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5847 (eval $ac_try) 2>&5
5848 ac_status=$?
5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005852else
Martin v. Löwis11437992002-04-12 09:54:03 +00005853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005854sed 's/^/| /' conftest.$ac_ext >&5
5855
Martin v. Löwis11437992002-04-12 09:54:03 +00005856ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005857fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005858rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005860echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5861echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005862
Martin v. Löwis11437992002-04-12 09:54:03 +00005863cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005865_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005866
Michael W. Hudson54241132001-12-07 15:38:26 +00005867
Martin v. Löwis11437992002-04-12 09:54:03 +00005868echo "$as_me:$LINENO: checking for size_t" >&5
5869echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5870if test "${ac_cv_type_size_t+set}" = set; then
5871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005872else
Martin v. Löwis11437992002-04-12 09:54:03 +00005873 cat >conftest.$ac_ext <<_ACEOF
5874#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005875/* confdefs.h. */
5876_ACEOF
5877cat confdefs.h >>conftest.$ac_ext
5878cat >>conftest.$ac_ext <<_ACEOF
5879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005880$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005881int
5882main ()
5883{
5884if ((size_t *) 0)
5885 return 0;
5886if (sizeof (size_t))
5887 return 0;
5888 ;
5889 return 0;
5890}
5891_ACEOF
5892rm -f conftest.$ac_objext
5893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5894 (eval $ac_compile) 2>&5
5895 ac_status=$?
5896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5897 (exit $ac_status); } &&
5898 { ac_try='test -s conftest.$ac_objext'
5899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5900 (eval $ac_try) 2>&5
5901 ac_status=$?
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5903 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005904 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005905else
Martin v. Löwis11437992002-04-12 09:54:03 +00005906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005907sed 's/^/| /' conftest.$ac_ext >&5
5908
Martin v. Löwis11437992002-04-12 09:54:03 +00005909ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005910fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005911rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005913echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5914echo "${ECHO_T}$ac_cv_type_size_t" >&6
5915if test $ac_cv_type_size_t = yes; then
5916 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005917else
Martin v. Löwis11437992002-04-12 09:54:03 +00005918
5919cat >>confdefs.h <<_ACEOF
5920#define size_t unsigned
5921_ACEOF
5922
5923fi
5924
5925echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5926echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5927if test "${ac_cv_type_uid_t+set}" = set; then
5928 echo $ECHO_N "(cached) $ECHO_C" >&6
5929else
5930 cat >conftest.$ac_ext <<_ACEOF
5931#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005932/* confdefs.h. */
5933_ACEOF
5934cat confdefs.h >>conftest.$ac_ext
5935cat >>conftest.$ac_ext <<_ACEOF
5936/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005937#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005938
5939_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005941 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005942 ac_cv_type_uid_t=yes
5943else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005944 ac_cv_type_uid_t=no
5945fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005946rm -f conftest*
5947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005949echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5950echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005951if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952
Martin v. Löwis11437992002-04-12 09:54:03 +00005953cat >>confdefs.h <<\_ACEOF
5954#define uid_t int
5955_ACEOF
5956
5957
5958cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005959#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005960_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005961
5962fi
5963
Jack Jansendd19cf82001-12-06 22:36:17 +00005964
Michael W. Hudson54241132001-12-07 15:38:26 +00005965# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005966echo "$as_me:$LINENO: checking for int" >&5
5967echo $ECHO_N "checking for int... $ECHO_C" >&6
5968if test "${ac_cv_type_int+set}" = set; then
5969 echo $ECHO_N "(cached) $ECHO_C" >&6
5970else
5971 cat >conftest.$ac_ext <<_ACEOF
5972#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005973/* confdefs.h. */
5974_ACEOF
5975cat confdefs.h >>conftest.$ac_ext
5976cat >>conftest.$ac_ext <<_ACEOF
5977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005978$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005979int
5980main ()
5981{
5982if ((int *) 0)
5983 return 0;
5984if (sizeof (int))
5985 return 0;
5986 ;
5987 return 0;
5988}
5989_ACEOF
5990rm -f conftest.$ac_objext
5991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5992 (eval $ac_compile) 2>&5
5993 ac_status=$?
5994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995 (exit $ac_status); } &&
5996 { ac_try='test -s conftest.$ac_objext'
5997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5998 (eval $ac_try) 2>&5
5999 ac_status=$?
6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); }; }; then
6002 ac_cv_type_int=yes
6003else
6004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006005sed 's/^/| /' conftest.$ac_ext >&5
6006
Martin v. Löwis11437992002-04-12 09:54:03 +00006007ac_cv_type_int=no
6008fi
6009rm -f conftest.$ac_objext conftest.$ac_ext
6010fi
6011echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6012echo "${ECHO_T}$ac_cv_type_int" >&6
6013
6014echo "$as_me:$LINENO: checking size of int" >&5
6015echo $ECHO_N "checking size of int... $ECHO_C" >&6
6016if test "${ac_cv_sizeof_int+set}" = set; then
6017 echo $ECHO_N "(cached) $ECHO_C" >&6
6018else
6019 if test "$ac_cv_type_int" = yes; then
6020 # The cast to unsigned long works around a bug in the HP C Compiler
6021 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6022 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6023 # This bug is HP SR number 8606223364.
6024 if test "$cross_compiling" = yes; then
6025 # Depending upon the size, compute the lo and hi bounds.
6026cat >conftest.$ac_ext <<_ACEOF
6027#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006028/* confdefs.h. */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006033$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006034int
6035main ()
6036{
6037static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6038test_array [0] = 0
6039
6040 ;
6041 return 0;
6042}
6043_ACEOF
6044rm -f conftest.$ac_objext
6045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6046 (eval $ac_compile) 2>&5
6047 ac_status=$?
6048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6049 (exit $ac_status); } &&
6050 { ac_try='test -s conftest.$ac_objext'
6051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6052 (eval $ac_try) 2>&5
6053 ac_status=$?
6054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6055 (exit $ac_status); }; }; then
6056 ac_lo=0 ac_mid=0
6057 while :; do
6058 cat >conftest.$ac_ext <<_ACEOF
6059#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006060/* confdefs.h. */
6061_ACEOF
6062cat confdefs.h >>conftest.$ac_ext
6063cat >>conftest.$ac_ext <<_ACEOF
6064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006065$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006066int
6067main ()
6068{
6069static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6070test_array [0] = 0
6071
6072 ;
6073 return 0;
6074}
6075_ACEOF
6076rm -f conftest.$ac_objext
6077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6078 (eval $ac_compile) 2>&5
6079 ac_status=$?
6080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081 (exit $ac_status); } &&
6082 { ac_try='test -s conftest.$ac_objext'
6083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6084 (eval $ac_try) 2>&5
6085 ac_status=$?
6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6087 (exit $ac_status); }; }; then
6088 ac_hi=$ac_mid; break
6089else
6090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006091sed 's/^/| /' conftest.$ac_ext >&5
6092
Martin v. Löwis11437992002-04-12 09:54:03 +00006093ac_lo=`expr $ac_mid + 1`
6094 if test $ac_lo -le $ac_mid; then
6095 ac_lo= ac_hi=
6096 break
6097 fi
6098 ac_mid=`expr 2 '*' $ac_mid + 1`
6099fi
6100rm -f conftest.$ac_objext conftest.$ac_ext
6101 done
6102else
6103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006104sed 's/^/| /' conftest.$ac_ext >&5
6105
Martin v. Löwis11437992002-04-12 09:54:03 +00006106cat >conftest.$ac_ext <<_ACEOF
6107#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006113$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006114int
6115main ()
6116{
6117static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6118test_array [0] = 0
6119
6120 ;
6121 return 0;
6122}
6123_ACEOF
6124rm -f conftest.$ac_objext
6125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6126 (eval $ac_compile) 2>&5
6127 ac_status=$?
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); } &&
6130 { ac_try='test -s conftest.$ac_objext'
6131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132 (eval $ac_try) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); }; }; then
6136 ac_hi=-1 ac_mid=-1
6137 while :; do
6138 cat >conftest.$ac_ext <<_ACEOF
6139#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006140/* confdefs.h. */
6141_ACEOF
6142cat confdefs.h >>conftest.$ac_ext
6143cat >>conftest.$ac_ext <<_ACEOF
6144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006145$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006146int
6147main ()
6148{
6149static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6150test_array [0] = 0
6151
6152 ;
6153 return 0;
6154}
6155_ACEOF
6156rm -f conftest.$ac_objext
6157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6158 (eval $ac_compile) 2>&5
6159 ac_status=$?
6160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6161 (exit $ac_status); } &&
6162 { ac_try='test -s conftest.$ac_objext'
6163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6164 (eval $ac_try) 2>&5
6165 ac_status=$?
6166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6167 (exit $ac_status); }; }; then
6168 ac_lo=$ac_mid; break
6169else
6170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006171sed 's/^/| /' conftest.$ac_ext >&5
6172
Martin v. Löwis11437992002-04-12 09:54:03 +00006173ac_hi=`expr '(' $ac_mid ')' - 1`
6174 if test $ac_mid -le $ac_hi; then
6175 ac_lo= ac_hi=
6176 break
6177 fi
6178 ac_mid=`expr 2 '*' $ac_mid`
6179fi
6180rm -f conftest.$ac_objext conftest.$ac_ext
6181 done
6182else
6183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006184sed 's/^/| /' conftest.$ac_ext >&5
6185
Martin v. Löwis11437992002-04-12 09:54:03 +00006186ac_lo= ac_hi=
6187fi
6188rm -f conftest.$ac_objext conftest.$ac_ext
6189fi
6190rm -f conftest.$ac_objext conftest.$ac_ext
6191# Binary search between lo and hi bounds.
6192while test "x$ac_lo" != "x$ac_hi"; do
6193 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6194 cat >conftest.$ac_ext <<_ACEOF
6195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* confdefs.h. */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006201$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006202int
6203main ()
6204{
6205static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6206test_array [0] = 0
6207
6208 ;
6209 return 0;
6210}
6211_ACEOF
6212rm -f conftest.$ac_objext
6213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6214 (eval $ac_compile) 2>&5
6215 ac_status=$?
6216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217 (exit $ac_status); } &&
6218 { ac_try='test -s conftest.$ac_objext'
6219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6220 (eval $ac_try) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); }; }; then
6224 ac_hi=$ac_mid
6225else
6226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006227sed 's/^/| /' conftest.$ac_ext >&5
6228
Martin v. Löwis11437992002-04-12 09:54:03 +00006229ac_lo=`expr '(' $ac_mid ')' + 1`
6230fi
6231rm -f conftest.$ac_objext conftest.$ac_ext
6232done
6233case $ac_lo in
6234?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006235'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6236See \`config.log' for more details." >&5
6237echo "$as_me: error: cannot compute sizeof (int), 77
6238See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006239 { (exit 1); exit 1; }; } ;;
6240esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006241else
6242 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006243 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6244See \`config.log' for more details." >&5
6245echo "$as_me: error: cannot run test program while cross compiling
6246See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006247 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006248else
Martin v. Löwis11437992002-04-12 09:54:03 +00006249 cat >conftest.$ac_ext <<_ACEOF
6250#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006251/* confdefs.h. */
6252_ACEOF
6253cat confdefs.h >>conftest.$ac_ext
6254cat >>conftest.$ac_ext <<_ACEOF
6255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006256$ac_includes_default
6257long longval () { return (long) (sizeof (int)); }
6258unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006259#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006260#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006261int
6262main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006263{
Martin v. Löwis11437992002-04-12 09:54:03 +00006264
6265 FILE *f = fopen ("conftest.val", "w");
6266 if (! f)
6267 exit (1);
6268 if (((long) (sizeof (int))) < 0)
6269 {
6270 long i = longval ();
6271 if (i != ((long) (sizeof (int))))
6272 exit (1);
6273 fprintf (f, "%ld\n", i);
6274 }
6275 else
6276 {
6277 unsigned long i = ulongval ();
6278 if (i != ((long) (sizeof (int))))
6279 exit (1);
6280 fprintf (f, "%lu\n", i);
6281 }
6282 exit (ferror (f) || fclose (f) != 0);
6283
6284 ;
6285 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006286}
Martin v. Löwis11437992002-04-12 09:54:03 +00006287_ACEOF
6288rm -f conftest$ac_exeext
6289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6290 (eval $ac_link) 2>&5
6291 ac_status=$?
6292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6295 (eval $ac_try) 2>&5
6296 ac_status=$?
6297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298 (exit $ac_status); }; }; then
6299 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006300else
Martin v. Löwis11437992002-04-12 09:54:03 +00006301 echo "$as_me: program exited with status $ac_status" >&5
6302echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006303sed 's/^/| /' conftest.$ac_ext >&5
6304
Martin v. Löwis11437992002-04-12 09:54:03 +00006305( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006306{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6307See \`config.log' for more details." >&5
6308echo "$as_me: error: cannot compute sizeof (int), 77
6309See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006310 { (exit 1); exit 1; }; }
6311fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006312rm -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 +00006313fi
6314fi
6315rm -f conftest.val
6316else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006317 ac_cv_sizeof_int=0
6318fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006319fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006320echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6321echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6322cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006323#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006324_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006325
6326
Martin v. Löwis11437992002-04-12 09:54:03 +00006327echo "$as_me:$LINENO: checking for long" >&5
6328echo $ECHO_N "checking for long... $ECHO_C" >&6
6329if test "${ac_cv_type_long+set}" = set; then
6330 echo $ECHO_N "(cached) $ECHO_C" >&6
6331else
6332 cat >conftest.$ac_ext <<_ACEOF
6333#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006334/* confdefs.h. */
6335_ACEOF
6336cat confdefs.h >>conftest.$ac_ext
6337cat >>conftest.$ac_ext <<_ACEOF
6338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006339$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006340int
6341main ()
6342{
6343if ((long *) 0)
6344 return 0;
6345if (sizeof (long))
6346 return 0;
6347 ;
6348 return 0;
6349}
6350_ACEOF
6351rm -f conftest.$ac_objext
6352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6353 (eval $ac_compile) 2>&5
6354 ac_status=$?
6355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6356 (exit $ac_status); } &&
6357 { ac_try='test -s conftest.$ac_objext'
6358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6359 (eval $ac_try) 2>&5
6360 ac_status=$?
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362 (exit $ac_status); }; }; then
6363 ac_cv_type_long=yes
6364else
6365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006366sed 's/^/| /' conftest.$ac_ext >&5
6367
Martin v. Löwis11437992002-04-12 09:54:03 +00006368ac_cv_type_long=no
6369fi
6370rm -f conftest.$ac_objext conftest.$ac_ext
6371fi
6372echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6373echo "${ECHO_T}$ac_cv_type_long" >&6
6374
6375echo "$as_me:$LINENO: checking size of long" >&5
6376echo $ECHO_N "checking size of long... $ECHO_C" >&6
6377if test "${ac_cv_sizeof_long+set}" = set; then
6378 echo $ECHO_N "(cached) $ECHO_C" >&6
6379else
6380 if test "$ac_cv_type_long" = yes; then
6381 # The cast to unsigned long works around a bug in the HP C Compiler
6382 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6383 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6384 # This bug is HP SR number 8606223364.
6385 if test "$cross_compiling" = yes; then
6386 # Depending upon the size, compute the lo and hi bounds.
6387cat >conftest.$ac_ext <<_ACEOF
6388#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006389/* confdefs.h. */
6390_ACEOF
6391cat confdefs.h >>conftest.$ac_ext
6392cat >>conftest.$ac_ext <<_ACEOF
6393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006394$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006395int
6396main ()
6397{
6398static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6399test_array [0] = 0
6400
6401 ;
6402 return 0;
6403}
6404_ACEOF
6405rm -f conftest.$ac_objext
6406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6407 (eval $ac_compile) 2>&5
6408 ac_status=$?
6409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6410 (exit $ac_status); } &&
6411 { ac_try='test -s conftest.$ac_objext'
6412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413 (eval $ac_try) 2>&5
6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); }; }; then
6417 ac_lo=0 ac_mid=0
6418 while :; do
6419 cat >conftest.$ac_ext <<_ACEOF
6420#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006421/* confdefs.h. */
6422_ACEOF
6423cat confdefs.h >>conftest.$ac_ext
6424cat >>conftest.$ac_ext <<_ACEOF
6425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006426$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006427int
6428main ()
6429{
6430static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6431test_array [0] = 0
6432
6433 ;
6434 return 0;
6435}
6436_ACEOF
6437rm -f conftest.$ac_objext
6438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6439 (eval $ac_compile) 2>&5
6440 ac_status=$?
6441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442 (exit $ac_status); } &&
6443 { ac_try='test -s conftest.$ac_objext'
6444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6445 (eval $ac_try) 2>&5
6446 ac_status=$?
6447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6448 (exit $ac_status); }; }; then
6449 ac_hi=$ac_mid; break
6450else
6451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006452sed 's/^/| /' conftest.$ac_ext >&5
6453
Martin v. Löwis11437992002-04-12 09:54:03 +00006454ac_lo=`expr $ac_mid + 1`
6455 if test $ac_lo -le $ac_mid; then
6456 ac_lo= ac_hi=
6457 break
6458 fi
6459 ac_mid=`expr 2 '*' $ac_mid + 1`
6460fi
6461rm -f conftest.$ac_objext conftest.$ac_ext
6462 done
6463else
6464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006465sed 's/^/| /' conftest.$ac_ext >&5
6466
Martin v. Löwis11437992002-04-12 09:54:03 +00006467cat >conftest.$ac_ext <<_ACEOF
6468#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006469/* confdefs.h. */
6470_ACEOF
6471cat confdefs.h >>conftest.$ac_ext
6472cat >>conftest.$ac_ext <<_ACEOF
6473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006474$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006475int
6476main ()
6477{
6478static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6479test_array [0] = 0
6480
6481 ;
6482 return 0;
6483}
6484_ACEOF
6485rm -f conftest.$ac_objext
6486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6487 (eval $ac_compile) 2>&5
6488 ac_status=$?
6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490 (exit $ac_status); } &&
6491 { ac_try='test -s conftest.$ac_objext'
6492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6493 (eval $ac_try) 2>&5
6494 ac_status=$?
6495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496 (exit $ac_status); }; }; then
6497 ac_hi=-1 ac_mid=-1
6498 while :; do
6499 cat >conftest.$ac_ext <<_ACEOF
6500#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006501/* confdefs.h. */
6502_ACEOF
6503cat confdefs.h >>conftest.$ac_ext
6504cat >>conftest.$ac_ext <<_ACEOF
6505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006506$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006507int
6508main ()
6509{
6510static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6511test_array [0] = 0
6512
6513 ;
6514 return 0;
6515}
6516_ACEOF
6517rm -f conftest.$ac_objext
6518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6519 (eval $ac_compile) 2>&5
6520 ac_status=$?
6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522 (exit $ac_status); } &&
6523 { ac_try='test -s conftest.$ac_objext'
6524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6525 (eval $ac_try) 2>&5
6526 ac_status=$?
6527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528 (exit $ac_status); }; }; then
6529 ac_lo=$ac_mid; break
6530else
6531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006532sed 's/^/| /' conftest.$ac_ext >&5
6533
Martin v. Löwis11437992002-04-12 09:54:03 +00006534ac_hi=`expr '(' $ac_mid ')' - 1`
6535 if test $ac_mid -le $ac_hi; then
6536 ac_lo= ac_hi=
6537 break
6538 fi
6539 ac_mid=`expr 2 '*' $ac_mid`
6540fi
6541rm -f conftest.$ac_objext conftest.$ac_ext
6542 done
6543else
6544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006545sed 's/^/| /' conftest.$ac_ext >&5
6546
Martin v. Löwis11437992002-04-12 09:54:03 +00006547ac_lo= ac_hi=
6548fi
6549rm -f conftest.$ac_objext conftest.$ac_ext
6550fi
6551rm -f conftest.$ac_objext conftest.$ac_ext
6552# Binary search between lo and hi bounds.
6553while test "x$ac_lo" != "x$ac_hi"; do
6554 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6555 cat >conftest.$ac_ext <<_ACEOF
6556#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006557/* confdefs.h. */
6558_ACEOF
6559cat confdefs.h >>conftest.$ac_ext
6560cat >>conftest.$ac_ext <<_ACEOF
6561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006562$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006563int
6564main ()
6565{
6566static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6567test_array [0] = 0
6568
6569 ;
6570 return 0;
6571}
6572_ACEOF
6573rm -f conftest.$ac_objext
6574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6575 (eval $ac_compile) 2>&5
6576 ac_status=$?
6577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6578 (exit $ac_status); } &&
6579 { ac_try='test -s conftest.$ac_objext'
6580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6581 (eval $ac_try) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); }; }; then
6585 ac_hi=$ac_mid
6586else
6587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006588sed 's/^/| /' conftest.$ac_ext >&5
6589
Martin v. Löwis11437992002-04-12 09:54:03 +00006590ac_lo=`expr '(' $ac_mid ')' + 1`
6591fi
6592rm -f conftest.$ac_objext conftest.$ac_ext
6593done
6594case $ac_lo in
6595?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006596'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6597See \`config.log' for more details." >&5
6598echo "$as_me: error: cannot compute sizeof (long), 77
6599See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006600 { (exit 1); exit 1; }; } ;;
6601esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006602else
6603 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006604 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6605See \`config.log' for more details." >&5
6606echo "$as_me: error: cannot run test program while cross compiling
6607See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006608 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006609else
Martin v. Löwis11437992002-04-12 09:54:03 +00006610 cat >conftest.$ac_ext <<_ACEOF
6611#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006612/* confdefs.h. */
6613_ACEOF
6614cat confdefs.h >>conftest.$ac_ext
6615cat >>conftest.$ac_ext <<_ACEOF
6616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006617$ac_includes_default
6618long longval () { return (long) (sizeof (long)); }
6619unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006620#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006621#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006622int
6623main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006624{
Martin v. Löwis11437992002-04-12 09:54:03 +00006625
6626 FILE *f = fopen ("conftest.val", "w");
6627 if (! f)
6628 exit (1);
6629 if (((long) (sizeof (long))) < 0)
6630 {
6631 long i = longval ();
6632 if (i != ((long) (sizeof (long))))
6633 exit (1);
6634 fprintf (f, "%ld\n", i);
6635 }
6636 else
6637 {
6638 unsigned long i = ulongval ();
6639 if (i != ((long) (sizeof (long))))
6640 exit (1);
6641 fprintf (f, "%lu\n", i);
6642 }
6643 exit (ferror (f) || fclose (f) != 0);
6644
6645 ;
6646 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006647}
Martin v. Löwis11437992002-04-12 09:54:03 +00006648_ACEOF
6649rm -f conftest$ac_exeext
6650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6651 (eval $ac_link) 2>&5
6652 ac_status=$?
6653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6656 (eval $ac_try) 2>&5
6657 ac_status=$?
6658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6659 (exit $ac_status); }; }; then
6660 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006661else
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 echo "$as_me: program exited with status $ac_status" >&5
6663echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006664sed 's/^/| /' conftest.$ac_ext >&5
6665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006667{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6668See \`config.log' for more details." >&5
6669echo "$as_me: error: cannot compute sizeof (long), 77
6670See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006671 { (exit 1); exit 1; }; }
6672fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006673rm -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 +00006674fi
6675fi
6676rm -f conftest.val
6677else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006678 ac_cv_sizeof_long=0
6679fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006680fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006681echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6682echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6683cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006684#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006685_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006686
6687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688echo "$as_me:$LINENO: checking for void *" >&5
6689echo $ECHO_N "checking for void *... $ECHO_C" >&6
6690if test "${ac_cv_type_void_p+set}" = set; then
6691 echo $ECHO_N "(cached) $ECHO_C" >&6
6692else
6693 cat >conftest.$ac_ext <<_ACEOF
6694#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006695/* confdefs.h. */
6696_ACEOF
6697cat confdefs.h >>conftest.$ac_ext
6698cat >>conftest.$ac_ext <<_ACEOF
6699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006700$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006701int
6702main ()
6703{
6704if ((void * *) 0)
6705 return 0;
6706if (sizeof (void *))
6707 return 0;
6708 ;
6709 return 0;
6710}
6711_ACEOF
6712rm -f conftest.$ac_objext
6713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6714 (eval $ac_compile) 2>&5
6715 ac_status=$?
6716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717 (exit $ac_status); } &&
6718 { ac_try='test -s conftest.$ac_objext'
6719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6720 (eval $ac_try) 2>&5
6721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); }; }; then
6724 ac_cv_type_void_p=yes
6725else
6726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006727sed 's/^/| /' conftest.$ac_ext >&5
6728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729ac_cv_type_void_p=no
6730fi
6731rm -f conftest.$ac_objext conftest.$ac_ext
6732fi
6733echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6734echo "${ECHO_T}$ac_cv_type_void_p" >&6
6735
6736echo "$as_me:$LINENO: checking size of void *" >&5
6737echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6738if test "${ac_cv_sizeof_void_p+set}" = set; then
6739 echo $ECHO_N "(cached) $ECHO_C" >&6
6740else
6741 if test "$ac_cv_type_void_p" = yes; then
6742 # The cast to unsigned long works around a bug in the HP C Compiler
6743 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6744 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6745 # This bug is HP SR number 8606223364.
6746 if test "$cross_compiling" = yes; then
6747 # Depending upon the size, compute the lo and hi bounds.
6748cat >conftest.$ac_ext <<_ACEOF
6749#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006750/* confdefs.h. */
6751_ACEOF
6752cat confdefs.h >>conftest.$ac_ext
6753cat >>conftest.$ac_ext <<_ACEOF
6754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006755$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006756int
6757main ()
6758{
6759static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6760test_array [0] = 0
6761
6762 ;
6763 return 0;
6764}
6765_ACEOF
6766rm -f conftest.$ac_objext
6767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6768 (eval $ac_compile) 2>&5
6769 ac_status=$?
6770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6771 (exit $ac_status); } &&
6772 { ac_try='test -s conftest.$ac_objext'
6773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6774 (eval $ac_try) 2>&5
6775 ac_status=$?
6776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6777 (exit $ac_status); }; }; then
6778 ac_lo=0 ac_mid=0
6779 while :; do
6780 cat >conftest.$ac_ext <<_ACEOF
6781#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006782/* confdefs.h. */
6783_ACEOF
6784cat confdefs.h >>conftest.$ac_ext
6785cat >>conftest.$ac_ext <<_ACEOF
6786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006787$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006788int
6789main ()
6790{
6791static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6792test_array [0] = 0
6793
6794 ;
6795 return 0;
6796}
6797_ACEOF
6798rm -f conftest.$ac_objext
6799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6800 (eval $ac_compile) 2>&5
6801 ac_status=$?
6802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6803 (exit $ac_status); } &&
6804 { ac_try='test -s conftest.$ac_objext'
6805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6806 (eval $ac_try) 2>&5
6807 ac_status=$?
6808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 (exit $ac_status); }; }; then
6810 ac_hi=$ac_mid; break
6811else
6812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006813sed 's/^/| /' conftest.$ac_ext >&5
6814
Martin v. Löwis11437992002-04-12 09:54:03 +00006815ac_lo=`expr $ac_mid + 1`
6816 if test $ac_lo -le $ac_mid; then
6817 ac_lo= ac_hi=
6818 break
6819 fi
6820 ac_mid=`expr 2 '*' $ac_mid + 1`
6821fi
6822rm -f conftest.$ac_objext conftest.$ac_ext
6823 done
6824else
6825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006826sed 's/^/| /' conftest.$ac_ext >&5
6827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828cat >conftest.$ac_ext <<_ACEOF
6829#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006830/* confdefs.h. */
6831_ACEOF
6832cat confdefs.h >>conftest.$ac_ext
6833cat >>conftest.$ac_ext <<_ACEOF
6834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006836int
6837main ()
6838{
6839static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6840test_array [0] = 0
6841
6842 ;
6843 return 0;
6844}
6845_ACEOF
6846rm -f conftest.$ac_objext
6847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6848 (eval $ac_compile) 2>&5
6849 ac_status=$?
6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851 (exit $ac_status); } &&
6852 { ac_try='test -s conftest.$ac_objext'
6853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6854 (eval $ac_try) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); }; }; then
6858 ac_hi=-1 ac_mid=-1
6859 while :; do
6860 cat >conftest.$ac_ext <<_ACEOF
6861#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006862/* confdefs.h. */
6863_ACEOF
6864cat confdefs.h >>conftest.$ac_ext
6865cat >>conftest.$ac_ext <<_ACEOF
6866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006867$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006868int
6869main ()
6870{
6871static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6872test_array [0] = 0
6873
6874 ;
6875 return 0;
6876}
6877_ACEOF
6878rm -f conftest.$ac_objext
6879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6880 (eval $ac_compile) 2>&5
6881 ac_status=$?
6882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6883 (exit $ac_status); } &&
6884 { ac_try='test -s conftest.$ac_objext'
6885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6886 (eval $ac_try) 2>&5
6887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); }; }; then
6890 ac_lo=$ac_mid; break
6891else
6892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006893sed 's/^/| /' conftest.$ac_ext >&5
6894
Martin v. Löwis11437992002-04-12 09:54:03 +00006895ac_hi=`expr '(' $ac_mid ')' - 1`
6896 if test $ac_mid -le $ac_hi; then
6897 ac_lo= ac_hi=
6898 break
6899 fi
6900 ac_mid=`expr 2 '*' $ac_mid`
6901fi
6902rm -f conftest.$ac_objext conftest.$ac_ext
6903 done
6904else
6905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006906sed 's/^/| /' conftest.$ac_ext >&5
6907
Martin v. Löwis11437992002-04-12 09:54:03 +00006908ac_lo= ac_hi=
6909fi
6910rm -f conftest.$ac_objext conftest.$ac_ext
6911fi
6912rm -f conftest.$ac_objext conftest.$ac_ext
6913# Binary search between lo and hi bounds.
6914while test "x$ac_lo" != "x$ac_hi"; do
6915 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6916 cat >conftest.$ac_ext <<_ACEOF
6917#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006918/* confdefs.h. */
6919_ACEOF
6920cat confdefs.h >>conftest.$ac_ext
6921cat >>conftest.$ac_ext <<_ACEOF
6922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006923$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006924int
6925main ()
6926{
6927static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6928test_array [0] = 0
6929
6930 ;
6931 return 0;
6932}
6933_ACEOF
6934rm -f conftest.$ac_objext
6935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6936 (eval $ac_compile) 2>&5
6937 ac_status=$?
6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6939 (exit $ac_status); } &&
6940 { ac_try='test -s conftest.$ac_objext'
6941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6942 (eval $ac_try) 2>&5
6943 ac_status=$?
6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6945 (exit $ac_status); }; }; then
6946 ac_hi=$ac_mid
6947else
6948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006949sed 's/^/| /' conftest.$ac_ext >&5
6950
Martin v. Löwis11437992002-04-12 09:54:03 +00006951ac_lo=`expr '(' $ac_mid ')' + 1`
6952fi
6953rm -f conftest.$ac_objext conftest.$ac_ext
6954done
6955case $ac_lo in
6956?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006957'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6958See \`config.log' for more details." >&5
6959echo "$as_me: error: cannot compute sizeof (void *), 77
6960See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006961 { (exit 1); exit 1; }; } ;;
6962esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006963else
6964 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006965 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6966See \`config.log' for more details." >&5
6967echo "$as_me: error: cannot run test program while cross compiling
6968See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006970else
Martin v. Löwis11437992002-04-12 09:54:03 +00006971 cat >conftest.$ac_ext <<_ACEOF
6972#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006973/* confdefs.h. */
6974_ACEOF
6975cat confdefs.h >>conftest.$ac_ext
6976cat >>conftest.$ac_ext <<_ACEOF
6977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006978$ac_includes_default
6979long longval () { return (long) (sizeof (void *)); }
6980unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006981#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006982#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006983int
6984main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006985{
Martin v. Löwis11437992002-04-12 09:54:03 +00006986
6987 FILE *f = fopen ("conftest.val", "w");
6988 if (! f)
6989 exit (1);
6990 if (((long) (sizeof (void *))) < 0)
6991 {
6992 long i = longval ();
6993 if (i != ((long) (sizeof (void *))))
6994 exit (1);
6995 fprintf (f, "%ld\n", i);
6996 }
6997 else
6998 {
6999 unsigned long i = ulongval ();
7000 if (i != ((long) (sizeof (void *))))
7001 exit (1);
7002 fprintf (f, "%lu\n", i);
7003 }
7004 exit (ferror (f) || fclose (f) != 0);
7005
7006 ;
7007 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007008}
Martin v. Löwis11437992002-04-12 09:54:03 +00007009_ACEOF
7010rm -f conftest$ac_exeext
7011if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7012 (eval $ac_link) 2>&5
7013 ac_status=$?
7014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7015 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7017 (eval $ac_try) 2>&5
7018 ac_status=$?
7019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020 (exit $ac_status); }; }; then
7021 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007022else
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 echo "$as_me: program exited with status $ac_status" >&5
7024echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007025sed 's/^/| /' conftest.$ac_ext >&5
7026
Martin v. Löwis11437992002-04-12 09:54:03 +00007027( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007028{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7029See \`config.log' for more details." >&5
7030echo "$as_me: error: cannot compute sizeof (void *), 77
7031See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007032 { (exit 1); exit 1; }; }
7033fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007034rm -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 +00007035fi
7036fi
7037rm -f conftest.val
7038else
Guido van Rossumad678af1998-10-02 14:42:15 +00007039 ac_cv_sizeof_void_p=0
7040fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007041fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007042echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7043echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7044cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007045#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007047
7048
Martin v. Löwis11437992002-04-12 09:54:03 +00007049echo "$as_me:$LINENO: checking for char" >&5
7050echo $ECHO_N "checking for char... $ECHO_C" >&6
7051if test "${ac_cv_type_char+set}" = set; then
7052 echo $ECHO_N "(cached) $ECHO_C" >&6
7053else
7054 cat >conftest.$ac_ext <<_ACEOF
7055#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007056/* confdefs.h. */
7057_ACEOF
7058cat confdefs.h >>conftest.$ac_ext
7059cat >>conftest.$ac_ext <<_ACEOF
7060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007061$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007062int
7063main ()
7064{
7065if ((char *) 0)
7066 return 0;
7067if (sizeof (char))
7068 return 0;
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
7074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7075 (eval $ac_compile) 2>&5
7076 ac_status=$?
7077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7078 (exit $ac_status); } &&
7079 { ac_try='test -s conftest.$ac_objext'
7080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7081 (eval $ac_try) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); }; }; then
7085 ac_cv_type_char=yes
7086else
7087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007088sed 's/^/| /' conftest.$ac_ext >&5
7089
Martin v. Löwis11437992002-04-12 09:54:03 +00007090ac_cv_type_char=no
7091fi
7092rm -f conftest.$ac_objext conftest.$ac_ext
7093fi
7094echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
7095echo "${ECHO_T}$ac_cv_type_char" >&6
7096
7097echo "$as_me:$LINENO: checking size of char" >&5
7098echo $ECHO_N "checking size of char... $ECHO_C" >&6
7099if test "${ac_cv_sizeof_char+set}" = set; then
7100 echo $ECHO_N "(cached) $ECHO_C" >&6
7101else
7102 if test "$ac_cv_type_char" = yes; then
7103 # The cast to unsigned long works around a bug in the HP C Compiler
7104 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7105 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7106 # This bug is HP SR number 8606223364.
7107 if test "$cross_compiling" = yes; then
7108 # Depending upon the size, compute the lo and hi bounds.
7109cat >conftest.$ac_ext <<_ACEOF
7110#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007116$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007117int
7118main ()
7119{
7120static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
7121test_array [0] = 0
7122
7123 ;
7124 return 0;
7125}
7126_ACEOF
7127rm -f conftest.$ac_objext
7128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7129 (eval $ac_compile) 2>&5
7130 ac_status=$?
7131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7132 (exit $ac_status); } &&
7133 { ac_try='test -s conftest.$ac_objext'
7134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7135 (eval $ac_try) 2>&5
7136 ac_status=$?
7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138 (exit $ac_status); }; }; then
7139 ac_lo=0 ac_mid=0
7140 while :; do
7141 cat >conftest.$ac_ext <<_ACEOF
7142#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007143/* confdefs.h. */
7144_ACEOF
7145cat confdefs.h >>conftest.$ac_ext
7146cat >>conftest.$ac_ext <<_ACEOF
7147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007148$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007149int
7150main ()
7151{
7152static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7153test_array [0] = 0
7154
7155 ;
7156 return 0;
7157}
7158_ACEOF
7159rm -f conftest.$ac_objext
7160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7161 (eval $ac_compile) 2>&5
7162 ac_status=$?
7163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7164 (exit $ac_status); } &&
7165 { ac_try='test -s conftest.$ac_objext'
7166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7167 (eval $ac_try) 2>&5
7168 ac_status=$?
7169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7170 (exit $ac_status); }; }; then
7171 ac_hi=$ac_mid; break
7172else
7173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007174sed 's/^/| /' conftest.$ac_ext >&5
7175
Martin v. Löwis11437992002-04-12 09:54:03 +00007176ac_lo=`expr $ac_mid + 1`
7177 if test $ac_lo -le $ac_mid; then
7178 ac_lo= ac_hi=
7179 break
7180 fi
7181 ac_mid=`expr 2 '*' $ac_mid + 1`
7182fi
7183rm -f conftest.$ac_objext conftest.$ac_ext
7184 done
7185else
7186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007187sed 's/^/| /' conftest.$ac_ext >&5
7188
Martin v. Löwis11437992002-04-12 09:54:03 +00007189cat >conftest.$ac_ext <<_ACEOF
7190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007191/* confdefs.h. */
7192_ACEOF
7193cat confdefs.h >>conftest.$ac_ext
7194cat >>conftest.$ac_ext <<_ACEOF
7195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007196$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007197int
7198main ()
7199{
7200static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
7201test_array [0] = 0
7202
7203 ;
7204 return 0;
7205}
7206_ACEOF
7207rm -f conftest.$ac_objext
7208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7209 (eval $ac_compile) 2>&5
7210 ac_status=$?
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); } &&
7213 { ac_try='test -s conftest.$ac_objext'
7214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7215 (eval $ac_try) 2>&5
7216 ac_status=$?
7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7218 (exit $ac_status); }; }; then
7219 ac_hi=-1 ac_mid=-1
7220 while :; do
7221 cat >conftest.$ac_ext <<_ACEOF
7222#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007223/* confdefs.h. */
7224_ACEOF
7225cat confdefs.h >>conftest.$ac_ext
7226cat >>conftest.$ac_ext <<_ACEOF
7227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007228$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007229int
7230main ()
7231{
7232static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
7233test_array [0] = 0
7234
7235 ;
7236 return 0;
7237}
7238_ACEOF
7239rm -f conftest.$ac_objext
7240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7241 (eval $ac_compile) 2>&5
7242 ac_status=$?
7243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244 (exit $ac_status); } &&
7245 { ac_try='test -s conftest.$ac_objext'
7246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7247 (eval $ac_try) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); }; }; then
7251 ac_lo=$ac_mid; break
7252else
7253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007254sed 's/^/| /' conftest.$ac_ext >&5
7255
Martin v. Löwis11437992002-04-12 09:54:03 +00007256ac_hi=`expr '(' $ac_mid ')' - 1`
7257 if test $ac_mid -le $ac_hi; then
7258 ac_lo= ac_hi=
7259 break
7260 fi
7261 ac_mid=`expr 2 '*' $ac_mid`
7262fi
7263rm -f conftest.$ac_objext conftest.$ac_ext
7264 done
7265else
7266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007267sed 's/^/| /' conftest.$ac_ext >&5
7268
Martin v. Löwis11437992002-04-12 09:54:03 +00007269ac_lo= ac_hi=
7270fi
7271rm -f conftest.$ac_objext conftest.$ac_ext
7272fi
7273rm -f conftest.$ac_objext conftest.$ac_ext
7274# Binary search between lo and hi bounds.
7275while test "x$ac_lo" != "x$ac_hi"; do
7276 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7277 cat >conftest.$ac_ext <<_ACEOF
7278#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007279/* confdefs.h. */
7280_ACEOF
7281cat confdefs.h >>conftest.$ac_ext
7282cat >>conftest.$ac_ext <<_ACEOF
7283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007284$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007285int
7286main ()
7287{
7288static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
7289test_array [0] = 0
7290
7291 ;
7292 return 0;
7293}
7294_ACEOF
7295rm -f conftest.$ac_objext
7296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7297 (eval $ac_compile) 2>&5
7298 ac_status=$?
7299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7300 (exit $ac_status); } &&
7301 { ac_try='test -s conftest.$ac_objext'
7302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7303 (eval $ac_try) 2>&5
7304 ac_status=$?
7305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7306 (exit $ac_status); }; }; then
7307 ac_hi=$ac_mid
7308else
7309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007310sed 's/^/| /' conftest.$ac_ext >&5
7311
Martin v. Löwis11437992002-04-12 09:54:03 +00007312ac_lo=`expr '(' $ac_mid ')' + 1`
7313fi
7314rm -f conftest.$ac_objext conftest.$ac_ext
7315done
7316case $ac_lo in
7317?*) ac_cv_sizeof_char=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007318'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7319See \`config.log' for more details." >&5
7320echo "$as_me: error: cannot compute sizeof (char), 77
7321See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007322 { (exit 1); exit 1; }; } ;;
7323esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007324else
7325 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007326 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7327See \`config.log' for more details." >&5
7328echo "$as_me: error: cannot run test program while cross compiling
7329See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007330 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007331else
Martin v. Löwis11437992002-04-12 09:54:03 +00007332 cat >conftest.$ac_ext <<_ACEOF
7333#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007334/* confdefs.h. */
7335_ACEOF
7336cat confdefs.h >>conftest.$ac_ext
7337cat >>conftest.$ac_ext <<_ACEOF
7338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007339$ac_includes_default
7340long longval () { return (long) (sizeof (char)); }
7341unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007342#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007343#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007344int
7345main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007346{
Martin v. Löwis11437992002-04-12 09:54:03 +00007347
7348 FILE *f = fopen ("conftest.val", "w");
7349 if (! f)
7350 exit (1);
7351 if (((long) (sizeof (char))) < 0)
7352 {
7353 long i = longval ();
7354 if (i != ((long) (sizeof (char))))
7355 exit (1);
7356 fprintf (f, "%ld\n", i);
7357 }
7358 else
7359 {
7360 unsigned long i = ulongval ();
7361 if (i != ((long) (sizeof (char))))
7362 exit (1);
7363 fprintf (f, "%lu\n", i);
7364 }
7365 exit (ferror (f) || fclose (f) != 0);
7366
7367 ;
7368 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007369}
Martin v. Löwis11437992002-04-12 09:54:03 +00007370_ACEOF
7371rm -f conftest$ac_exeext
7372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7373 (eval $ac_link) 2>&5
7374 ac_status=$?
7375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7378 (eval $ac_try) 2>&5
7379 ac_status=$?
7380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7381 (exit $ac_status); }; }; then
7382 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007383else
Martin v. Löwis11437992002-04-12 09:54:03 +00007384 echo "$as_me: program exited with status $ac_status" >&5
7385echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007386sed 's/^/| /' conftest.$ac_ext >&5
7387
Martin v. Löwis11437992002-04-12 09:54:03 +00007388( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007389{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
7390See \`config.log' for more details." >&5
7391echo "$as_me: error: cannot compute sizeof (char), 77
7392See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007393 { (exit 1); exit 1; }; }
7394fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007395rm -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 +00007396fi
7397fi
7398rm -f conftest.val
7399else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007400 ac_cv_sizeof_char=0
7401fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007402fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007403echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
7404echo "${ECHO_T}$ac_cv_sizeof_char" >&6
7405cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007406#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00007407_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007408
7409
Martin v. Löwis11437992002-04-12 09:54:03 +00007410echo "$as_me:$LINENO: checking for short" >&5
7411echo $ECHO_N "checking for short... $ECHO_C" >&6
7412if test "${ac_cv_type_short+set}" = set; then
7413 echo $ECHO_N "(cached) $ECHO_C" >&6
7414else
7415 cat >conftest.$ac_ext <<_ACEOF
7416#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007417/* confdefs.h. */
7418_ACEOF
7419cat confdefs.h >>conftest.$ac_ext
7420cat >>conftest.$ac_ext <<_ACEOF
7421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007422$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007423int
7424main ()
7425{
7426if ((short *) 0)
7427 return 0;
7428if (sizeof (short))
7429 return 0;
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
7435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7436 (eval $ac_compile) 2>&5
7437 ac_status=$?
7438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); } &&
7440 { ac_try='test -s conftest.$ac_objext'
7441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442 (eval $ac_try) 2>&5
7443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); }; }; then
7446 ac_cv_type_short=yes
7447else
7448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007449sed 's/^/| /' conftest.$ac_ext >&5
7450
Martin v. Löwis11437992002-04-12 09:54:03 +00007451ac_cv_type_short=no
7452fi
7453rm -f conftest.$ac_objext conftest.$ac_ext
7454fi
7455echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7456echo "${ECHO_T}$ac_cv_type_short" >&6
7457
7458echo "$as_me:$LINENO: checking size of short" >&5
7459echo $ECHO_N "checking size of short... $ECHO_C" >&6
7460if test "${ac_cv_sizeof_short+set}" = set; then
7461 echo $ECHO_N "(cached) $ECHO_C" >&6
7462else
7463 if test "$ac_cv_type_short" = yes; then
7464 # The cast to unsigned long works around a bug in the HP C Compiler
7465 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7466 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7467 # This bug is HP SR number 8606223364.
7468 if test "$cross_compiling" = yes; then
7469 # Depending upon the size, compute the lo and hi bounds.
7470cat >conftest.$ac_ext <<_ACEOF
7471#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007472/* confdefs.h. */
7473_ACEOF
7474cat confdefs.h >>conftest.$ac_ext
7475cat >>conftest.$ac_ext <<_ACEOF
7476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007477$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007478int
7479main ()
7480{
7481static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7482test_array [0] = 0
7483
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7490 (eval $ac_compile) 2>&5
7491 ac_status=$?
7492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7493 (exit $ac_status); } &&
7494 { ac_try='test -s conftest.$ac_objext'
7495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7496 (eval $ac_try) 2>&5
7497 ac_status=$?
7498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7499 (exit $ac_status); }; }; then
7500 ac_lo=0 ac_mid=0
7501 while :; do
7502 cat >conftest.$ac_ext <<_ACEOF
7503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007504/* confdefs.h. */
7505_ACEOF
7506cat confdefs.h >>conftest.$ac_ext
7507cat >>conftest.$ac_ext <<_ACEOF
7508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007509$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007510int
7511main ()
7512{
7513static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7514test_array [0] = 0
7515
7516 ;
7517 return 0;
7518}
7519_ACEOF
7520rm -f conftest.$ac_objext
7521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7522 (eval $ac_compile) 2>&5
7523 ac_status=$?
7524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7525 (exit $ac_status); } &&
7526 { ac_try='test -s conftest.$ac_objext'
7527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7528 (eval $ac_try) 2>&5
7529 ac_status=$?
7530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531 (exit $ac_status); }; }; then
7532 ac_hi=$ac_mid; break
7533else
7534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007535sed 's/^/| /' conftest.$ac_ext >&5
7536
Martin v. Löwis11437992002-04-12 09:54:03 +00007537ac_lo=`expr $ac_mid + 1`
7538 if test $ac_lo -le $ac_mid; then
7539 ac_lo= ac_hi=
7540 break
7541 fi
7542 ac_mid=`expr 2 '*' $ac_mid + 1`
7543fi
7544rm -f conftest.$ac_objext conftest.$ac_ext
7545 done
7546else
7547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007548sed 's/^/| /' conftest.$ac_ext >&5
7549
Martin v. Löwis11437992002-04-12 09:54:03 +00007550cat >conftest.$ac_ext <<_ACEOF
7551#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007552/* confdefs.h. */
7553_ACEOF
7554cat confdefs.h >>conftest.$ac_ext
7555cat >>conftest.$ac_ext <<_ACEOF
7556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007557$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007558int
7559main ()
7560{
7561static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7562test_array [0] = 0
7563
7564 ;
7565 return 0;
7566}
7567_ACEOF
7568rm -f conftest.$ac_objext
7569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7570 (eval $ac_compile) 2>&5
7571 ac_status=$?
7572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7573 (exit $ac_status); } &&
7574 { ac_try='test -s conftest.$ac_objext'
7575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7576 (eval $ac_try) 2>&5
7577 ac_status=$?
7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579 (exit $ac_status); }; }; then
7580 ac_hi=-1 ac_mid=-1
7581 while :; do
7582 cat >conftest.$ac_ext <<_ACEOF
7583#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007584/* confdefs.h. */
7585_ACEOF
7586cat confdefs.h >>conftest.$ac_ext
7587cat >>conftest.$ac_ext <<_ACEOF
7588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007589$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007590int
7591main ()
7592{
7593static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7594test_array [0] = 0
7595
7596 ;
7597 return 0;
7598}
7599_ACEOF
7600rm -f conftest.$ac_objext
7601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7602 (eval $ac_compile) 2>&5
7603 ac_status=$?
7604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7605 (exit $ac_status); } &&
7606 { ac_try='test -s conftest.$ac_objext'
7607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7608 (eval $ac_try) 2>&5
7609 ac_status=$?
7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7611 (exit $ac_status); }; }; then
7612 ac_lo=$ac_mid; break
7613else
7614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007615sed 's/^/| /' conftest.$ac_ext >&5
7616
Martin v. Löwis11437992002-04-12 09:54:03 +00007617ac_hi=`expr '(' $ac_mid ')' - 1`
7618 if test $ac_mid -le $ac_hi; then
7619 ac_lo= ac_hi=
7620 break
7621 fi
7622 ac_mid=`expr 2 '*' $ac_mid`
7623fi
7624rm -f conftest.$ac_objext conftest.$ac_ext
7625 done
7626else
7627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007628sed 's/^/| /' conftest.$ac_ext >&5
7629
Martin v. Löwis11437992002-04-12 09:54:03 +00007630ac_lo= ac_hi=
7631fi
7632rm -f conftest.$ac_objext conftest.$ac_ext
7633fi
7634rm -f conftest.$ac_objext conftest.$ac_ext
7635# Binary search between lo and hi bounds.
7636while test "x$ac_lo" != "x$ac_hi"; do
7637 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7638 cat >conftest.$ac_ext <<_ACEOF
7639#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007640/* confdefs.h. */
7641_ACEOF
7642cat confdefs.h >>conftest.$ac_ext
7643cat >>conftest.$ac_ext <<_ACEOF
7644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007645$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007646int
7647main ()
7648{
7649static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7650test_array [0] = 0
7651
7652 ;
7653 return 0;
7654}
7655_ACEOF
7656rm -f conftest.$ac_objext
7657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7658 (eval $ac_compile) 2>&5
7659 ac_status=$?
7660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7661 (exit $ac_status); } &&
7662 { ac_try='test -s conftest.$ac_objext'
7663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7664 (eval $ac_try) 2>&5
7665 ac_status=$?
7666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667 (exit $ac_status); }; }; then
7668 ac_hi=$ac_mid
7669else
7670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007671sed 's/^/| /' conftest.$ac_ext >&5
7672
Martin v. Löwis11437992002-04-12 09:54:03 +00007673ac_lo=`expr '(' $ac_mid ')' + 1`
7674fi
7675rm -f conftest.$ac_objext conftest.$ac_ext
7676done
7677case $ac_lo in
7678?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007679'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7680See \`config.log' for more details." >&5
7681echo "$as_me: error: cannot compute sizeof (short), 77
7682See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 { (exit 1); exit 1; }; } ;;
7684esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007685else
7686 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007687 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7688See \`config.log' for more details." >&5
7689echo "$as_me: error: cannot run test program while cross compiling
7690See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007691 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692else
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 cat >conftest.$ac_ext <<_ACEOF
7694#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007695/* confdefs.h. */
7696_ACEOF
7697cat confdefs.h >>conftest.$ac_ext
7698cat >>conftest.$ac_ext <<_ACEOF
7699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007700$ac_includes_default
7701long longval () { return (long) (sizeof (short)); }
7702unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007703#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007704#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007705int
7706main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007707{
Martin v. Löwis11437992002-04-12 09:54:03 +00007708
7709 FILE *f = fopen ("conftest.val", "w");
7710 if (! f)
7711 exit (1);
7712 if (((long) (sizeof (short))) < 0)
7713 {
7714 long i = longval ();
7715 if (i != ((long) (sizeof (short))))
7716 exit (1);
7717 fprintf (f, "%ld\n", i);
7718 }
7719 else
7720 {
7721 unsigned long i = ulongval ();
7722 if (i != ((long) (sizeof (short))))
7723 exit (1);
7724 fprintf (f, "%lu\n", i);
7725 }
7726 exit (ferror (f) || fclose (f) != 0);
7727
7728 ;
7729 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007730}
Martin v. Löwis11437992002-04-12 09:54:03 +00007731_ACEOF
7732rm -f conftest$ac_exeext
7733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7734 (eval $ac_link) 2>&5
7735 ac_status=$?
7736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7737 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7739 (eval $ac_try) 2>&5
7740 ac_status=$?
7741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742 (exit $ac_status); }; }; then
7743 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007744else
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 echo "$as_me: program exited with status $ac_status" >&5
7746echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007747sed 's/^/| /' conftest.$ac_ext >&5
7748
Martin v. Löwis11437992002-04-12 09:54:03 +00007749( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007750{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7751See \`config.log' for more details." >&5
7752echo "$as_me: error: cannot compute sizeof (short), 77
7753See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 { (exit 1); exit 1; }; }
7755fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007756rm -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 +00007757fi
7758fi
7759rm -f conftest.val
7760else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007761 ac_cv_sizeof_short=0
7762fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007763fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007764echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7765echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7766cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007767#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007768_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007769
7770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771echo "$as_me:$LINENO: checking for float" >&5
7772echo $ECHO_N "checking for float... $ECHO_C" >&6
7773if test "${ac_cv_type_float+set}" = set; then
7774 echo $ECHO_N "(cached) $ECHO_C" >&6
7775else
7776 cat >conftest.$ac_ext <<_ACEOF
7777#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007778/* confdefs.h. */
7779_ACEOF
7780cat confdefs.h >>conftest.$ac_ext
7781cat >>conftest.$ac_ext <<_ACEOF
7782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007783$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007784int
7785main ()
7786{
7787if ((float *) 0)
7788 return 0;
7789if (sizeof (float))
7790 return 0;
7791 ;
7792 return 0;
7793}
7794_ACEOF
7795rm -f conftest.$ac_objext
7796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7797 (eval $ac_compile) 2>&5
7798 ac_status=$?
7799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7800 (exit $ac_status); } &&
7801 { ac_try='test -s conftest.$ac_objext'
7802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7803 (eval $ac_try) 2>&5
7804 ac_status=$?
7805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 (exit $ac_status); }; }; then
7807 ac_cv_type_float=yes
7808else
7809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007810sed 's/^/| /' conftest.$ac_ext >&5
7811
Martin v. Löwis11437992002-04-12 09:54:03 +00007812ac_cv_type_float=no
7813fi
7814rm -f conftest.$ac_objext conftest.$ac_ext
7815fi
7816echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7817echo "${ECHO_T}$ac_cv_type_float" >&6
7818
7819echo "$as_me:$LINENO: checking size of float" >&5
7820echo $ECHO_N "checking size of float... $ECHO_C" >&6
7821if test "${ac_cv_sizeof_float+set}" = set; then
7822 echo $ECHO_N "(cached) $ECHO_C" >&6
7823else
7824 if test "$ac_cv_type_float" = yes; then
7825 # The cast to unsigned long works around a bug in the HP C Compiler
7826 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7827 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7828 # This bug is HP SR number 8606223364.
7829 if test "$cross_compiling" = yes; then
7830 # Depending upon the size, compute the lo and hi bounds.
7831cat >conftest.$ac_ext <<_ACEOF
7832#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007833/* confdefs.h. */
7834_ACEOF
7835cat confdefs.h >>conftest.$ac_ext
7836cat >>conftest.$ac_ext <<_ACEOF
7837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007838$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007839int
7840main ()
7841{
7842static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7843test_array [0] = 0
7844
7845 ;
7846 return 0;
7847}
7848_ACEOF
7849rm -f conftest.$ac_objext
7850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7851 (eval $ac_compile) 2>&5
7852 ac_status=$?
7853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7854 (exit $ac_status); } &&
7855 { ac_try='test -s conftest.$ac_objext'
7856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7857 (eval $ac_try) 2>&5
7858 ac_status=$?
7859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7860 (exit $ac_status); }; }; then
7861 ac_lo=0 ac_mid=0
7862 while :; do
7863 cat >conftest.$ac_ext <<_ACEOF
7864#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007865/* confdefs.h. */
7866_ACEOF
7867cat confdefs.h >>conftest.$ac_ext
7868cat >>conftest.$ac_ext <<_ACEOF
7869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007871int
7872main ()
7873{
7874static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7875test_array [0] = 0
7876
7877 ;
7878 return 0;
7879}
7880_ACEOF
7881rm -f conftest.$ac_objext
7882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7883 (eval $ac_compile) 2>&5
7884 ac_status=$?
7885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7886 (exit $ac_status); } &&
7887 { ac_try='test -s conftest.$ac_objext'
7888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7889 (eval $ac_try) 2>&5
7890 ac_status=$?
7891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7892 (exit $ac_status); }; }; then
7893 ac_hi=$ac_mid; break
7894else
7895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007896sed 's/^/| /' conftest.$ac_ext >&5
7897
Martin v. Löwis11437992002-04-12 09:54:03 +00007898ac_lo=`expr $ac_mid + 1`
7899 if test $ac_lo -le $ac_mid; then
7900 ac_lo= ac_hi=
7901 break
7902 fi
7903 ac_mid=`expr 2 '*' $ac_mid + 1`
7904fi
7905rm -f conftest.$ac_objext conftest.$ac_ext
7906 done
7907else
7908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007909sed 's/^/| /' conftest.$ac_ext >&5
7910
Martin v. Löwis11437992002-04-12 09:54:03 +00007911cat >conftest.$ac_ext <<_ACEOF
7912#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* confdefs.h. */
7914_ACEOF
7915cat confdefs.h >>conftest.$ac_ext
7916cat >>conftest.$ac_ext <<_ACEOF
7917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007918$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007919int
7920main ()
7921{
7922static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7923test_array [0] = 0
7924
7925 ;
7926 return 0;
7927}
7928_ACEOF
7929rm -f conftest.$ac_objext
7930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7931 (eval $ac_compile) 2>&5
7932 ac_status=$?
7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934 (exit $ac_status); } &&
7935 { ac_try='test -s conftest.$ac_objext'
7936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7937 (eval $ac_try) 2>&5
7938 ac_status=$?
7939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7940 (exit $ac_status); }; }; then
7941 ac_hi=-1 ac_mid=-1
7942 while :; do
7943 cat >conftest.$ac_ext <<_ACEOF
7944#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007945/* confdefs.h. */
7946_ACEOF
7947cat confdefs.h >>conftest.$ac_ext
7948cat >>conftest.$ac_ext <<_ACEOF
7949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007950$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007951int
7952main ()
7953{
7954static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7955test_array [0] = 0
7956
7957 ;
7958 return 0;
7959}
7960_ACEOF
7961rm -f conftest.$ac_objext
7962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7963 (eval $ac_compile) 2>&5
7964 ac_status=$?
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); } &&
7967 { ac_try='test -s conftest.$ac_objext'
7968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7969 (eval $ac_try) 2>&5
7970 ac_status=$?
7971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7972 (exit $ac_status); }; }; then
7973 ac_lo=$ac_mid; break
7974else
7975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007976sed 's/^/| /' conftest.$ac_ext >&5
7977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978ac_hi=`expr '(' $ac_mid ')' - 1`
7979 if test $ac_mid -le $ac_hi; then
7980 ac_lo= ac_hi=
7981 break
7982 fi
7983 ac_mid=`expr 2 '*' $ac_mid`
7984fi
7985rm -f conftest.$ac_objext conftest.$ac_ext
7986 done
7987else
7988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007989sed 's/^/| /' conftest.$ac_ext >&5
7990
Martin v. Löwis11437992002-04-12 09:54:03 +00007991ac_lo= ac_hi=
7992fi
7993rm -f conftest.$ac_objext conftest.$ac_ext
7994fi
7995rm -f conftest.$ac_objext conftest.$ac_ext
7996# Binary search between lo and hi bounds.
7997while test "x$ac_lo" != "x$ac_hi"; do
7998 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7999 cat >conftest.$ac_ext <<_ACEOF
8000#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008001/* confdefs.h. */
8002_ACEOF
8003cat confdefs.h >>conftest.$ac_ext
8004cat >>conftest.$ac_ext <<_ACEOF
8005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008006$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008007int
8008main ()
8009{
8010static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8011test_array [0] = 0
8012
8013 ;
8014 return 0;
8015}
8016_ACEOF
8017rm -f conftest.$ac_objext
8018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8019 (eval $ac_compile) 2>&5
8020 ac_status=$?
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 (exit $ac_status); } &&
8023 { ac_try='test -s conftest.$ac_objext'
8024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; }; then
8029 ac_hi=$ac_mid
8030else
8031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008032sed 's/^/| /' conftest.$ac_ext >&5
8033
Martin v. Löwis11437992002-04-12 09:54:03 +00008034ac_lo=`expr '(' $ac_mid ')' + 1`
8035fi
8036rm -f conftest.$ac_objext conftest.$ac_ext
8037done
8038case $ac_lo in
8039?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008040'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8041See \`config.log' for more details." >&5
8042echo "$as_me: error: cannot compute sizeof (float), 77
8043See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 { (exit 1); exit 1; }; } ;;
8045esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008046else
8047 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008048 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8049See \`config.log' for more details." >&5
8050echo "$as_me: error: cannot run test program while cross compiling
8051See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008053else
Martin v. Löwis11437992002-04-12 09:54:03 +00008054 cat >conftest.$ac_ext <<_ACEOF
8055#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008056/* confdefs.h. */
8057_ACEOF
8058cat confdefs.h >>conftest.$ac_ext
8059cat >>conftest.$ac_ext <<_ACEOF
8060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008061$ac_includes_default
8062long longval () { return (long) (sizeof (float)); }
8063unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008064#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008065#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008066int
8067main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008068{
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
8070 FILE *f = fopen ("conftest.val", "w");
8071 if (! f)
8072 exit (1);
8073 if (((long) (sizeof (float))) < 0)
8074 {
8075 long i = longval ();
8076 if (i != ((long) (sizeof (float))))
8077 exit (1);
8078 fprintf (f, "%ld\n", i);
8079 }
8080 else
8081 {
8082 unsigned long i = ulongval ();
8083 if (i != ((long) (sizeof (float))))
8084 exit (1);
8085 fprintf (f, "%lu\n", i);
8086 }
8087 exit (ferror (f) || fclose (f) != 0);
8088
8089 ;
8090 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008091}
Martin v. Löwis11437992002-04-12 09:54:03 +00008092_ACEOF
8093rm -f conftest$ac_exeext
8094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8095 (eval $ac_link) 2>&5
8096 ac_status=$?
8097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8100 (eval $ac_try) 2>&5
8101 ac_status=$?
8102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103 (exit $ac_status); }; }; then
8104 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008105else
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 echo "$as_me: program exited with status $ac_status" >&5
8107echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008108sed 's/^/| /' conftest.$ac_ext >&5
8109
Martin v. Löwis11437992002-04-12 09:54:03 +00008110( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008111{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8112See \`config.log' for more details." >&5
8113echo "$as_me: error: cannot compute sizeof (float), 77
8114See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 { (exit 1); exit 1; }; }
8116fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008117rm -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 +00008118fi
8119fi
8120rm -f conftest.val
8121else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008122 ac_cv_sizeof_float=0
8123fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008125echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8126echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8127cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008128#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008129_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008130
8131
Martin v. Löwis11437992002-04-12 09:54:03 +00008132echo "$as_me:$LINENO: checking for double" >&5
8133echo $ECHO_N "checking for double... $ECHO_C" >&6
8134if test "${ac_cv_type_double+set}" = set; then
8135 echo $ECHO_N "(cached) $ECHO_C" >&6
8136else
8137 cat >conftest.$ac_ext <<_ACEOF
8138#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008139/* confdefs.h. */
8140_ACEOF
8141cat confdefs.h >>conftest.$ac_ext
8142cat >>conftest.$ac_ext <<_ACEOF
8143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008144$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008145int
8146main ()
8147{
8148if ((double *) 0)
8149 return 0;
8150if (sizeof (double))
8151 return 0;
8152 ;
8153 return 0;
8154}
8155_ACEOF
8156rm -f conftest.$ac_objext
8157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8158 (eval $ac_compile) 2>&5
8159 ac_status=$?
8160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161 (exit $ac_status); } &&
8162 { ac_try='test -s conftest.$ac_objext'
8163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8164 (eval $ac_try) 2>&5
8165 ac_status=$?
8166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8167 (exit $ac_status); }; }; then
8168 ac_cv_type_double=yes
8169else
8170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008171sed 's/^/| /' conftest.$ac_ext >&5
8172
Martin v. Löwis11437992002-04-12 09:54:03 +00008173ac_cv_type_double=no
8174fi
8175rm -f conftest.$ac_objext conftest.$ac_ext
8176fi
8177echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8178echo "${ECHO_T}$ac_cv_type_double" >&6
8179
8180echo "$as_me:$LINENO: checking size of double" >&5
8181echo $ECHO_N "checking size of double... $ECHO_C" >&6
8182if test "${ac_cv_sizeof_double+set}" = set; then
8183 echo $ECHO_N "(cached) $ECHO_C" >&6
8184else
8185 if test "$ac_cv_type_double" = yes; then
8186 # The cast to unsigned long works around a bug in the HP C Compiler
8187 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8188 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8189 # This bug is HP SR number 8606223364.
8190 if test "$cross_compiling" = yes; then
8191 # Depending upon the size, compute the lo and hi bounds.
8192cat >conftest.$ac_ext <<_ACEOF
8193#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008194/* confdefs.h. */
8195_ACEOF
8196cat confdefs.h >>conftest.$ac_ext
8197cat >>conftest.$ac_ext <<_ACEOF
8198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008199$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008200int
8201main ()
8202{
8203static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8204test_array [0] = 0
8205
8206 ;
8207 return 0;
8208}
8209_ACEOF
8210rm -f conftest.$ac_objext
8211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8212 (eval $ac_compile) 2>&5
8213 ac_status=$?
8214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8215 (exit $ac_status); } &&
8216 { ac_try='test -s conftest.$ac_objext'
8217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8218 (eval $ac_try) 2>&5
8219 ac_status=$?
8220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8221 (exit $ac_status); }; }; then
8222 ac_lo=0 ac_mid=0
8223 while :; do
8224 cat >conftest.$ac_ext <<_ACEOF
8225#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008226/* confdefs.h. */
8227_ACEOF
8228cat confdefs.h >>conftest.$ac_ext
8229cat >>conftest.$ac_ext <<_ACEOF
8230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008231$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008232int
8233main ()
8234{
8235static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8236test_array [0] = 0
8237
8238 ;
8239 return 0;
8240}
8241_ACEOF
8242rm -f conftest.$ac_objext
8243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8244 (eval $ac_compile) 2>&5
8245 ac_status=$?
8246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8247 (exit $ac_status); } &&
8248 { ac_try='test -s conftest.$ac_objext'
8249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8250 (eval $ac_try) 2>&5
8251 ac_status=$?
8252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8253 (exit $ac_status); }; }; then
8254 ac_hi=$ac_mid; break
8255else
8256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008257sed 's/^/| /' conftest.$ac_ext >&5
8258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259ac_lo=`expr $ac_mid + 1`
8260 if test $ac_lo -le $ac_mid; then
8261 ac_lo= ac_hi=
8262 break
8263 fi
8264 ac_mid=`expr 2 '*' $ac_mid + 1`
8265fi
8266rm -f conftest.$ac_objext conftest.$ac_ext
8267 done
8268else
8269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008270sed 's/^/| /' conftest.$ac_ext >&5
8271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272cat >conftest.$ac_ext <<_ACEOF
8273#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008274/* confdefs.h. */
8275_ACEOF
8276cat confdefs.h >>conftest.$ac_ext
8277cat >>conftest.$ac_ext <<_ACEOF
8278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008279$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008280int
8281main ()
8282{
8283static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8284test_array [0] = 0
8285
8286 ;
8287 return 0;
8288}
8289_ACEOF
8290rm -f conftest.$ac_objext
8291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8292 (eval $ac_compile) 2>&5
8293 ac_status=$?
8294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8295 (exit $ac_status); } &&
8296 { ac_try='test -s conftest.$ac_objext'
8297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8298 (eval $ac_try) 2>&5
8299 ac_status=$?
8300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8301 (exit $ac_status); }; }; then
8302 ac_hi=-1 ac_mid=-1
8303 while :; do
8304 cat >conftest.$ac_ext <<_ACEOF
8305#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008306/* confdefs.h. */
8307_ACEOF
8308cat confdefs.h >>conftest.$ac_ext
8309cat >>conftest.$ac_ext <<_ACEOF
8310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008311$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008312int
8313main ()
8314{
8315static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8316test_array [0] = 0
8317
8318 ;
8319 return 0;
8320}
8321_ACEOF
8322rm -f conftest.$ac_objext
8323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8324 (eval $ac_compile) 2>&5
8325 ac_status=$?
8326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327 (exit $ac_status); } &&
8328 { ac_try='test -s conftest.$ac_objext'
8329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8330 (eval $ac_try) 2>&5
8331 ac_status=$?
8332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8333 (exit $ac_status); }; }; then
8334 ac_lo=$ac_mid; break
8335else
8336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008337sed 's/^/| /' conftest.$ac_ext >&5
8338
Martin v. Löwis11437992002-04-12 09:54:03 +00008339ac_hi=`expr '(' $ac_mid ')' - 1`
8340 if test $ac_mid -le $ac_hi; then
8341 ac_lo= ac_hi=
8342 break
8343 fi
8344 ac_mid=`expr 2 '*' $ac_mid`
8345fi
8346rm -f conftest.$ac_objext conftest.$ac_ext
8347 done
8348else
8349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008350sed 's/^/| /' conftest.$ac_ext >&5
8351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352ac_lo= ac_hi=
8353fi
8354rm -f conftest.$ac_objext conftest.$ac_ext
8355fi
8356rm -f conftest.$ac_objext conftest.$ac_ext
8357# Binary search between lo and hi bounds.
8358while test "x$ac_lo" != "x$ac_hi"; do
8359 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8360 cat >conftest.$ac_ext <<_ACEOF
8361#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008362/* confdefs.h. */
8363_ACEOF
8364cat confdefs.h >>conftest.$ac_ext
8365cat >>conftest.$ac_ext <<_ACEOF
8366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008367$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008368int
8369main ()
8370{
8371static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8372test_array [0] = 0
8373
8374 ;
8375 return 0;
8376}
8377_ACEOF
8378rm -f conftest.$ac_objext
8379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8380 (eval $ac_compile) 2>&5
8381 ac_status=$?
8382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383 (exit $ac_status); } &&
8384 { ac_try='test -s conftest.$ac_objext'
8385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8386 (eval $ac_try) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); }; }; then
8390 ac_hi=$ac_mid
8391else
8392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008393sed 's/^/| /' conftest.$ac_ext >&5
8394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395ac_lo=`expr '(' $ac_mid ')' + 1`
8396fi
8397rm -f conftest.$ac_objext conftest.$ac_ext
8398done
8399case $ac_lo in
8400?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008401'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8402See \`config.log' for more details." >&5
8403echo "$as_me: error: cannot compute sizeof (double), 77
8404See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 { (exit 1); exit 1; }; } ;;
8406esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008407else
8408 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008409 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8410See \`config.log' for more details." >&5
8411echo "$as_me: error: cannot run test program while cross compiling
8412See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008414else
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 cat >conftest.$ac_ext <<_ACEOF
8416#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008417/* confdefs.h. */
8418_ACEOF
8419cat confdefs.h >>conftest.$ac_ext
8420cat >>conftest.$ac_ext <<_ACEOF
8421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008422$ac_includes_default
8423long longval () { return (long) (sizeof (double)); }
8424unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008425#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008426#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008427int
8428main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008429{
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
8431 FILE *f = fopen ("conftest.val", "w");
8432 if (! f)
8433 exit (1);
8434 if (((long) (sizeof (double))) < 0)
8435 {
8436 long i = longval ();
8437 if (i != ((long) (sizeof (double))))
8438 exit (1);
8439 fprintf (f, "%ld\n", i);
8440 }
8441 else
8442 {
8443 unsigned long i = ulongval ();
8444 if (i != ((long) (sizeof (double))))
8445 exit (1);
8446 fprintf (f, "%lu\n", i);
8447 }
8448 exit (ferror (f) || fclose (f) != 0);
8449
8450 ;
8451 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008452}
Martin v. Löwis11437992002-04-12 09:54:03 +00008453_ACEOF
8454rm -f conftest$ac_exeext
8455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8456 (eval $ac_link) 2>&5
8457 ac_status=$?
8458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8461 (eval $ac_try) 2>&5
8462 ac_status=$?
8463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464 (exit $ac_status); }; }; then
8465 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008466else
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 echo "$as_me: program exited with status $ac_status" >&5
8468echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008469sed 's/^/| /' conftest.$ac_ext >&5
8470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008472{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8473See \`config.log' for more details." >&5
8474echo "$as_me: error: cannot compute sizeof (double), 77
8475See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 { (exit 1); exit 1; }; }
8477fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008478rm -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 +00008479fi
8480fi
8481rm -f conftest.val
8482else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008483 ac_cv_sizeof_double=0
8484fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008486echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8487echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8488cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008489#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008490_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008491
8492
Martin v. Löwis11437992002-04-12 09:54:03 +00008493echo "$as_me:$LINENO: checking for fpos_t" >&5
8494echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8495if test "${ac_cv_type_fpos_t+set}" = set; then
8496 echo $ECHO_N "(cached) $ECHO_C" >&6
8497else
8498 cat >conftest.$ac_ext <<_ACEOF
8499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008500/* confdefs.h. */
8501_ACEOF
8502cat confdefs.h >>conftest.$ac_ext
8503cat >>conftest.$ac_ext <<_ACEOF
8504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008505$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
8509if ((fpos_t *) 0)
8510 return 0;
8511if (sizeof (fpos_t))
8512 return 0;
8513 ;
8514 return 0;
8515}
8516_ACEOF
8517rm -f conftest.$ac_objext
8518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8519 (eval $ac_compile) 2>&5
8520 ac_status=$?
8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522 (exit $ac_status); } &&
8523 { ac_try='test -s conftest.$ac_objext'
8524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8525 (eval $ac_try) 2>&5
8526 ac_status=$?
8527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528 (exit $ac_status); }; }; then
8529 ac_cv_type_fpos_t=yes
8530else
8531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008532sed 's/^/| /' conftest.$ac_ext >&5
8533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534ac_cv_type_fpos_t=no
8535fi
8536rm -f conftest.$ac_objext conftest.$ac_ext
8537fi
8538echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8539echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8540
8541echo "$as_me:$LINENO: checking size of fpos_t" >&5
8542echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8543if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8544 echo $ECHO_N "(cached) $ECHO_C" >&6
8545else
8546 if test "$ac_cv_type_fpos_t" = yes; then
8547 # The cast to unsigned long works around a bug in the HP C Compiler
8548 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8549 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8550 # This bug is HP SR number 8606223364.
8551 if test "$cross_compiling" = yes; then
8552 # Depending upon the size, compute the lo and hi bounds.
8553cat >conftest.$ac_ext <<_ACEOF
8554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008555/* confdefs.h. */
8556_ACEOF
8557cat confdefs.h >>conftest.$ac_ext
8558cat >>conftest.$ac_ext <<_ACEOF
8559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008560$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008561int
8562main ()
8563{
8564static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8565test_array [0] = 0
8566
8567 ;
8568 return 0;
8569}
8570_ACEOF
8571rm -f conftest.$ac_objext
8572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8573 (eval $ac_compile) 2>&5
8574 ac_status=$?
8575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8576 (exit $ac_status); } &&
8577 { ac_try='test -s conftest.$ac_objext'
8578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8579 (eval $ac_try) 2>&5
8580 ac_status=$?
8581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8582 (exit $ac_status); }; }; then
8583 ac_lo=0 ac_mid=0
8584 while :; do
8585 cat >conftest.$ac_ext <<_ACEOF
8586#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008587/* confdefs.h. */
8588_ACEOF
8589cat confdefs.h >>conftest.$ac_ext
8590cat >>conftest.$ac_ext <<_ACEOF
8591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008592$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008593int
8594main ()
8595{
8596static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8597test_array [0] = 0
8598
8599 ;
8600 return 0;
8601}
8602_ACEOF
8603rm -f conftest.$ac_objext
8604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8605 (eval $ac_compile) 2>&5
8606 ac_status=$?
8607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8608 (exit $ac_status); } &&
8609 { ac_try='test -s conftest.$ac_objext'
8610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8611 (eval $ac_try) 2>&5
8612 ac_status=$?
8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614 (exit $ac_status); }; }; then
8615 ac_hi=$ac_mid; break
8616else
8617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008618sed 's/^/| /' conftest.$ac_ext >&5
8619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620ac_lo=`expr $ac_mid + 1`
8621 if test $ac_lo -le $ac_mid; then
8622 ac_lo= ac_hi=
8623 break
8624 fi
8625 ac_mid=`expr 2 '*' $ac_mid + 1`
8626fi
8627rm -f conftest.$ac_objext conftest.$ac_ext
8628 done
8629else
8630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008631sed 's/^/| /' conftest.$ac_ext >&5
8632
Martin v. Löwis11437992002-04-12 09:54:03 +00008633cat >conftest.$ac_ext <<_ACEOF
8634#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008635/* confdefs.h. */
8636_ACEOF
8637cat confdefs.h >>conftest.$ac_ext
8638cat >>conftest.$ac_ext <<_ACEOF
8639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008640$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008641int
8642main ()
8643{
8644static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8645test_array [0] = 0
8646
8647 ;
8648 return 0;
8649}
8650_ACEOF
8651rm -f conftest.$ac_objext
8652if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8653 (eval $ac_compile) 2>&5
8654 ac_status=$?
8655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8656 (exit $ac_status); } &&
8657 { ac_try='test -s conftest.$ac_objext'
8658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8659 (eval $ac_try) 2>&5
8660 ac_status=$?
8661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8662 (exit $ac_status); }; }; then
8663 ac_hi=-1 ac_mid=-1
8664 while :; do
8665 cat >conftest.$ac_ext <<_ACEOF
8666#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* confdefs.h. */
8668_ACEOF
8669cat confdefs.h >>conftest.$ac_ext
8670cat >>conftest.$ac_ext <<_ACEOF
8671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008673int
8674main ()
8675{
8676static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8677test_array [0] = 0
8678
8679 ;
8680 return 0;
8681}
8682_ACEOF
8683rm -f conftest.$ac_objext
8684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8685 (eval $ac_compile) 2>&5
8686 ac_status=$?
8687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8688 (exit $ac_status); } &&
8689 { ac_try='test -s conftest.$ac_objext'
8690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8691 (eval $ac_try) 2>&5
8692 ac_status=$?
8693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8694 (exit $ac_status); }; }; then
8695 ac_lo=$ac_mid; break
8696else
8697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008698sed 's/^/| /' conftest.$ac_ext >&5
8699
Martin v. Löwis11437992002-04-12 09:54:03 +00008700ac_hi=`expr '(' $ac_mid ')' - 1`
8701 if test $ac_mid -le $ac_hi; then
8702 ac_lo= ac_hi=
8703 break
8704 fi
8705 ac_mid=`expr 2 '*' $ac_mid`
8706fi
8707rm -f conftest.$ac_objext conftest.$ac_ext
8708 done
8709else
8710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008711sed 's/^/| /' conftest.$ac_ext >&5
8712
Martin v. Löwis11437992002-04-12 09:54:03 +00008713ac_lo= ac_hi=
8714fi
8715rm -f conftest.$ac_objext conftest.$ac_ext
8716fi
8717rm -f conftest.$ac_objext conftest.$ac_ext
8718# Binary search between lo and hi bounds.
8719while test "x$ac_lo" != "x$ac_hi"; do
8720 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8721 cat >conftest.$ac_ext <<_ACEOF
8722#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008723/* confdefs.h. */
8724_ACEOF
8725cat confdefs.h >>conftest.$ac_ext
8726cat >>conftest.$ac_ext <<_ACEOF
8727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008728$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008729int
8730main ()
8731{
8732static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8733test_array [0] = 0
8734
8735 ;
8736 return 0;
8737}
8738_ACEOF
8739rm -f conftest.$ac_objext
8740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8741 (eval $ac_compile) 2>&5
8742 ac_status=$?
8743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8744 (exit $ac_status); } &&
8745 { ac_try='test -s conftest.$ac_objext'
8746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8747 (eval $ac_try) 2>&5
8748 ac_status=$?
8749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750 (exit $ac_status); }; }; then
8751 ac_hi=$ac_mid
8752else
8753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008754sed 's/^/| /' conftest.$ac_ext >&5
8755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756ac_lo=`expr '(' $ac_mid ')' + 1`
8757fi
8758rm -f conftest.$ac_objext conftest.$ac_ext
8759done
8760case $ac_lo in
8761?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008762'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8763See \`config.log' for more details." >&5
8764echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8765See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 { (exit 1); exit 1; }; } ;;
8767esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008768else
8769 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008770 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8771See \`config.log' for more details." >&5
8772echo "$as_me: error: cannot run test program while cross compiling
8773See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008775else
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 cat >conftest.$ac_ext <<_ACEOF
8777#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008778/* confdefs.h. */
8779_ACEOF
8780cat confdefs.h >>conftest.$ac_ext
8781cat >>conftest.$ac_ext <<_ACEOF
8782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783$ac_includes_default
8784long longval () { return (long) (sizeof (fpos_t)); }
8785unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008786#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008787#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008788int
8789main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008790{
Martin v. Löwis11437992002-04-12 09:54:03 +00008791
8792 FILE *f = fopen ("conftest.val", "w");
8793 if (! f)
8794 exit (1);
8795 if (((long) (sizeof (fpos_t))) < 0)
8796 {
8797 long i = longval ();
8798 if (i != ((long) (sizeof (fpos_t))))
8799 exit (1);
8800 fprintf (f, "%ld\n", i);
8801 }
8802 else
8803 {
8804 unsigned long i = ulongval ();
8805 if (i != ((long) (sizeof (fpos_t))))
8806 exit (1);
8807 fprintf (f, "%lu\n", i);
8808 }
8809 exit (ferror (f) || fclose (f) != 0);
8810
8811 ;
8812 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008813}
Martin v. Löwis11437992002-04-12 09:54:03 +00008814_ACEOF
8815rm -f conftest$ac_exeext
8816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8817 (eval $ac_link) 2>&5
8818 ac_status=$?
8819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8820 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8822 (eval $ac_try) 2>&5
8823 ac_status=$?
8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825 (exit $ac_status); }; }; then
8826 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008827else
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 echo "$as_me: program exited with status $ac_status" >&5
8829echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008830sed 's/^/| /' conftest.$ac_ext >&5
8831
Martin v. Löwis11437992002-04-12 09:54:03 +00008832( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008833{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8834See \`config.log' for more details." >&5
8835echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8836See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 { (exit 1); exit 1; }; }
8838fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008839rm -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 +00008840fi
8841fi
8842rm -f conftest.val
8843else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008844 ac_cv_sizeof_fpos_t=0
8845fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008847echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8848echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8849cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008850#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008851_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008852
Michael W. Hudson54241132001-12-07 15:38:26 +00008853
8854
Martin v. Löwis11437992002-04-12 09:54:03 +00008855echo "$as_me:$LINENO: checking for long long support" >&5
8856echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008857have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008858cat >conftest.$ac_ext <<_ACEOF
8859#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008865
Martin v. Löwis11437992002-04-12 09:54:03 +00008866int
8867main ()
8868{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008869long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ;
8871 return 0;
8872}
8873_ACEOF
8874rm -f conftest.$ac_objext
8875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8876 (eval $ac_compile) 2>&5
8877 ac_status=$?
8878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8879 (exit $ac_status); } &&
8880 { ac_try='test -s conftest.$ac_objext'
8881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8882 (eval $ac_try) 2>&5
8883 ac_status=$?
8884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8885 (exit $ac_status); }; }; then
8886
8887
8888cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008889#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
8891
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008892 have_long_long=yes
8893
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008894else
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008896sed 's/^/| /' conftest.$ac_ext >&5
8897
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008898fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008899rm -f conftest.$ac_objext conftest.$ac_ext
8900echo "$as_me:$LINENO: result: $have_long_long" >&5
8901echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008902if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008903echo "$as_me:$LINENO: checking for long long" >&5
8904echo $ECHO_N "checking for long long... $ECHO_C" >&6
8905if test "${ac_cv_type_long_long+set}" = set; then
8906 echo $ECHO_N "(cached) $ECHO_C" >&6
8907else
8908 cat >conftest.$ac_ext <<_ACEOF
8909#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008910/* confdefs.h. */
8911_ACEOF
8912cat confdefs.h >>conftest.$ac_ext
8913cat >>conftest.$ac_ext <<_ACEOF
8914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008915$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008916int
8917main ()
8918{
8919if ((long long *) 0)
8920 return 0;
8921if (sizeof (long long))
8922 return 0;
8923 ;
8924 return 0;
8925}
8926_ACEOF
8927rm -f conftest.$ac_objext
8928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8929 (eval $ac_compile) 2>&5
8930 ac_status=$?
8931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8932 (exit $ac_status); } &&
8933 { ac_try='test -s conftest.$ac_objext'
8934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8935 (eval $ac_try) 2>&5
8936 ac_status=$?
8937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8938 (exit $ac_status); }; }; then
8939 ac_cv_type_long_long=yes
8940else
8941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008942sed 's/^/| /' conftest.$ac_ext >&5
8943
Martin v. Löwis11437992002-04-12 09:54:03 +00008944ac_cv_type_long_long=no
8945fi
8946rm -f conftest.$ac_objext conftest.$ac_ext
8947fi
8948echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8949echo "${ECHO_T}$ac_cv_type_long_long" >&6
8950
8951echo "$as_me:$LINENO: checking size of long long" >&5
8952echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8953if test "${ac_cv_sizeof_long_long+set}" = set; then
8954 echo $ECHO_N "(cached) $ECHO_C" >&6
8955else
8956 if test "$ac_cv_type_long_long" = yes; then
8957 # The cast to unsigned long works around a bug in the HP C Compiler
8958 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8959 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8960 # This bug is HP SR number 8606223364.
8961 if test "$cross_compiling" = yes; then
8962 # Depending upon the size, compute the lo and hi bounds.
8963cat >conftest.$ac_ext <<_ACEOF
8964#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008965/* confdefs.h. */
8966_ACEOF
8967cat confdefs.h >>conftest.$ac_ext
8968cat >>conftest.$ac_ext <<_ACEOF
8969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008970$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008971int
8972main ()
8973{
8974static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8975test_array [0] = 0
8976
8977 ;
8978 return 0;
8979}
8980_ACEOF
8981rm -f conftest.$ac_objext
8982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8983 (eval $ac_compile) 2>&5
8984 ac_status=$?
8985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986 (exit $ac_status); } &&
8987 { ac_try='test -s conftest.$ac_objext'
8988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8989 (eval $ac_try) 2>&5
8990 ac_status=$?
8991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992 (exit $ac_status); }; }; then
8993 ac_lo=0 ac_mid=0
8994 while :; do
8995 cat >conftest.$ac_ext <<_ACEOF
8996#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008997/* confdefs.h. */
8998_ACEOF
8999cat confdefs.h >>conftest.$ac_ext
9000cat >>conftest.$ac_ext <<_ACEOF
9001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009002$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009003int
9004main ()
9005{
9006static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9007test_array [0] = 0
9008
9009 ;
9010 return 0;
9011}
9012_ACEOF
9013rm -f conftest.$ac_objext
9014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9015 (eval $ac_compile) 2>&5
9016 ac_status=$?
9017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9018 (exit $ac_status); } &&
9019 { ac_try='test -s conftest.$ac_objext'
9020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9021 (eval $ac_try) 2>&5
9022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); }; }; then
9025 ac_hi=$ac_mid; break
9026else
9027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009028sed 's/^/| /' conftest.$ac_ext >&5
9029
Martin v. Löwis11437992002-04-12 09:54:03 +00009030ac_lo=`expr $ac_mid + 1`
9031 if test $ac_lo -le $ac_mid; then
9032 ac_lo= ac_hi=
9033 break
9034 fi
9035 ac_mid=`expr 2 '*' $ac_mid + 1`
9036fi
9037rm -f conftest.$ac_objext conftest.$ac_ext
9038 done
9039else
9040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009041sed 's/^/| /' conftest.$ac_ext >&5
9042
Martin v. Löwis11437992002-04-12 09:54:03 +00009043cat >conftest.$ac_ext <<_ACEOF
9044#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009045/* confdefs.h. */
9046_ACEOF
9047cat confdefs.h >>conftest.$ac_ext
9048cat >>conftest.$ac_ext <<_ACEOF
9049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009051int
9052main ()
9053{
9054static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9055test_array [0] = 0
9056
9057 ;
9058 return 0;
9059}
9060_ACEOF
9061rm -f conftest.$ac_objext
9062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9063 (eval $ac_compile) 2>&5
9064 ac_status=$?
9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9066 (exit $ac_status); } &&
9067 { ac_try='test -s conftest.$ac_objext'
9068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9069 (eval $ac_try) 2>&5
9070 ac_status=$?
9071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072 (exit $ac_status); }; }; then
9073 ac_hi=-1 ac_mid=-1
9074 while :; do
9075 cat >conftest.$ac_ext <<_ACEOF
9076#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009077/* confdefs.h. */
9078_ACEOF
9079cat confdefs.h >>conftest.$ac_ext
9080cat >>conftest.$ac_ext <<_ACEOF
9081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009082$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009083int
9084main ()
9085{
9086static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9087test_array [0] = 0
9088
9089 ;
9090 return 0;
9091}
9092_ACEOF
9093rm -f conftest.$ac_objext
9094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9095 (eval $ac_compile) 2>&5
9096 ac_status=$?
9097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9098 (exit $ac_status); } &&
9099 { ac_try='test -s conftest.$ac_objext'
9100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9101 (eval $ac_try) 2>&5
9102 ac_status=$?
9103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9104 (exit $ac_status); }; }; then
9105 ac_lo=$ac_mid; break
9106else
9107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009108sed 's/^/| /' conftest.$ac_ext >&5
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110ac_hi=`expr '(' $ac_mid ')' - 1`
9111 if test $ac_mid -le $ac_hi; then
9112 ac_lo= ac_hi=
9113 break
9114 fi
9115 ac_mid=`expr 2 '*' $ac_mid`
9116fi
9117rm -f conftest.$ac_objext conftest.$ac_ext
9118 done
9119else
9120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009121sed 's/^/| /' conftest.$ac_ext >&5
9122
Martin v. Löwis11437992002-04-12 09:54:03 +00009123ac_lo= ac_hi=
9124fi
9125rm -f conftest.$ac_objext conftest.$ac_ext
9126fi
9127rm -f conftest.$ac_objext conftest.$ac_ext
9128# Binary search between lo and hi bounds.
9129while test "x$ac_lo" != "x$ac_hi"; do
9130 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9131 cat >conftest.$ac_ext <<_ACEOF
9132#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009133/* confdefs.h. */
9134_ACEOF
9135cat confdefs.h >>conftest.$ac_ext
9136cat >>conftest.$ac_ext <<_ACEOF
9137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009138$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009139int
9140main ()
9141{
9142static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9143test_array [0] = 0
9144
9145 ;
9146 return 0;
9147}
9148_ACEOF
9149rm -f conftest.$ac_objext
9150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9151 (eval $ac_compile) 2>&5
9152 ac_status=$?
9153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9154 (exit $ac_status); } &&
9155 { ac_try='test -s conftest.$ac_objext'
9156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9157 (eval $ac_try) 2>&5
9158 ac_status=$?
9159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160 (exit $ac_status); }; }; then
9161 ac_hi=$ac_mid
9162else
9163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009164sed 's/^/| /' conftest.$ac_ext >&5
9165
Martin v. Löwis11437992002-04-12 09:54:03 +00009166ac_lo=`expr '(' $ac_mid ')' + 1`
9167fi
9168rm -f conftest.$ac_objext conftest.$ac_ext
9169done
9170case $ac_lo in
9171?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009172'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9173See \`config.log' for more details." >&5
9174echo "$as_me: error: cannot compute sizeof (long long), 77
9175See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 { (exit 1); exit 1; }; } ;;
9177esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009178else
9179 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009180 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9181See \`config.log' for more details." >&5
9182echo "$as_me: error: cannot run test program while cross compiling
9183See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009185else
Martin v. Löwis11437992002-04-12 09:54:03 +00009186 cat >conftest.$ac_ext <<_ACEOF
9187#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009188/* confdefs.h. */
9189_ACEOF
9190cat confdefs.h >>conftest.$ac_ext
9191cat >>conftest.$ac_ext <<_ACEOF
9192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009193$ac_includes_default
9194long longval () { return (long) (sizeof (long long)); }
9195unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009196#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009197#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009198int
9199main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009200{
Martin v. Löwis11437992002-04-12 09:54:03 +00009201
9202 FILE *f = fopen ("conftest.val", "w");
9203 if (! f)
9204 exit (1);
9205 if (((long) (sizeof (long long))) < 0)
9206 {
9207 long i = longval ();
9208 if (i != ((long) (sizeof (long long))))
9209 exit (1);
9210 fprintf (f, "%ld\n", i);
9211 }
9212 else
9213 {
9214 unsigned long i = ulongval ();
9215 if (i != ((long) (sizeof (long long))))
9216 exit (1);
9217 fprintf (f, "%lu\n", i);
9218 }
9219 exit (ferror (f) || fclose (f) != 0);
9220
9221 ;
9222 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009223}
Martin v. Löwis11437992002-04-12 09:54:03 +00009224_ACEOF
9225rm -f conftest$ac_exeext
9226if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9227 (eval $ac_link) 2>&5
9228 ac_status=$?
9229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9230 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9232 (eval $ac_try) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); }; }; then
9236 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237else
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me: program exited with status $ac_status" >&5
9239echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009240sed 's/^/| /' conftest.$ac_ext >&5
9241
Martin v. Löwis11437992002-04-12 09:54:03 +00009242( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009243{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9244See \`config.log' for more details." >&5
9245echo "$as_me: error: cannot compute sizeof (long long), 77
9246See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 { (exit 1); exit 1; }; }
9248fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009249rm -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 +00009250fi
9251fi
9252rm -f conftest.val
9253else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009254 ac_cv_sizeof_long_long=0
9255fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009256fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009257echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9258echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9259cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009260#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009261_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009262
Michael W. Hudson54241132001-12-07 15:38:26 +00009263
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009264fi
9265
Martin v. Löwis11437992002-04-12 09:54:03 +00009266echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9267echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009268have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009269cat >conftest.$ac_ext <<_ACEOF
9270#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009271/* confdefs.h. */
9272_ACEOF
9273cat confdefs.h >>conftest.$ac_ext
9274cat >>conftest.$ac_ext <<_ACEOF
9275/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009276
Martin v. Löwis11437992002-04-12 09:54:03 +00009277int
9278main ()
9279{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009280uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ;
9282 return 0;
9283}
9284_ACEOF
9285rm -f conftest.$ac_objext
9286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9287 (eval $ac_compile) 2>&5
9288 ac_status=$?
9289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9290 (exit $ac_status); } &&
9291 { ac_try='test -s conftest.$ac_objext'
9292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9293 (eval $ac_try) 2>&5
9294 ac_status=$?
9295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9296 (exit $ac_status); }; }; then
9297
9298
9299cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009300#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009301_ACEOF
9302
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009303 have_uintptr_t=yes
9304
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009305else
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009307sed 's/^/| /' conftest.$ac_ext >&5
9308
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009310rm -f conftest.$ac_objext conftest.$ac_ext
9311echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9312echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009313if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009314echo "$as_me:$LINENO: checking for uintptr_t" >&5
9315echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9316if test "${ac_cv_type_uintptr_t+set}" = set; then
9317 echo $ECHO_N "(cached) $ECHO_C" >&6
9318else
9319 cat >conftest.$ac_ext <<_ACEOF
9320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009321/* confdefs.h. */
9322_ACEOF
9323cat confdefs.h >>conftest.$ac_ext
9324cat >>conftest.$ac_ext <<_ACEOF
9325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009326$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009327int
9328main ()
9329{
9330if ((uintptr_t *) 0)
9331 return 0;
9332if (sizeof (uintptr_t))
9333 return 0;
9334 ;
9335 return 0;
9336}
9337_ACEOF
9338rm -f conftest.$ac_objext
9339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9340 (eval $ac_compile) 2>&5
9341 ac_status=$?
9342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9343 (exit $ac_status); } &&
9344 { ac_try='test -s conftest.$ac_objext'
9345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9346 (eval $ac_try) 2>&5
9347 ac_status=$?
9348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9349 (exit $ac_status); }; }; then
9350 ac_cv_type_uintptr_t=yes
9351else
9352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009353sed 's/^/| /' conftest.$ac_ext >&5
9354
Martin v. Löwis11437992002-04-12 09:54:03 +00009355ac_cv_type_uintptr_t=no
9356fi
9357rm -f conftest.$ac_objext conftest.$ac_ext
9358fi
9359echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9360echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9361
9362echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9363echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9364if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9365 echo $ECHO_N "(cached) $ECHO_C" >&6
9366else
9367 if test "$ac_cv_type_uintptr_t" = yes; then
9368 # The cast to unsigned long works around a bug in the HP C Compiler
9369 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9370 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9371 # This bug is HP SR number 8606223364.
9372 if test "$cross_compiling" = yes; then
9373 # Depending upon the size, compute the lo and hi bounds.
9374cat >conftest.$ac_ext <<_ACEOF
9375#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009376/* confdefs.h. */
9377_ACEOF
9378cat confdefs.h >>conftest.$ac_ext
9379cat >>conftest.$ac_ext <<_ACEOF
9380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009381$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009382int
9383main ()
9384{
9385static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9386test_array [0] = 0
9387
9388 ;
9389 return 0;
9390}
9391_ACEOF
9392rm -f conftest.$ac_objext
9393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9394 (eval $ac_compile) 2>&5
9395 ac_status=$?
9396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9397 (exit $ac_status); } &&
9398 { ac_try='test -s conftest.$ac_objext'
9399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9400 (eval $ac_try) 2>&5
9401 ac_status=$?
9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9403 (exit $ac_status); }; }; then
9404 ac_lo=0 ac_mid=0
9405 while :; do
9406 cat >conftest.$ac_ext <<_ACEOF
9407#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009408/* confdefs.h. */
9409_ACEOF
9410cat confdefs.h >>conftest.$ac_ext
9411cat >>conftest.$ac_ext <<_ACEOF
9412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009413$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009414int
9415main ()
9416{
9417static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9418test_array [0] = 0
9419
9420 ;
9421 return 0;
9422}
9423_ACEOF
9424rm -f conftest.$ac_objext
9425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9426 (eval $ac_compile) 2>&5
9427 ac_status=$?
9428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9429 (exit $ac_status); } &&
9430 { ac_try='test -s conftest.$ac_objext'
9431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9432 (eval $ac_try) 2>&5
9433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); }; }; then
9436 ac_hi=$ac_mid; break
9437else
9438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009439sed 's/^/| /' conftest.$ac_ext >&5
9440
Martin v. Löwis11437992002-04-12 09:54:03 +00009441ac_lo=`expr $ac_mid + 1`
9442 if test $ac_lo -le $ac_mid; then
9443 ac_lo= ac_hi=
9444 break
9445 fi
9446 ac_mid=`expr 2 '*' $ac_mid + 1`
9447fi
9448rm -f conftest.$ac_objext conftest.$ac_ext
9449 done
9450else
9451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009452sed 's/^/| /' conftest.$ac_ext >&5
9453
Martin v. Löwis11437992002-04-12 09:54:03 +00009454cat >conftest.$ac_ext <<_ACEOF
9455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* confdefs.h. */
9457_ACEOF
9458cat confdefs.h >>conftest.$ac_ext
9459cat >>conftest.$ac_ext <<_ACEOF
9460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009462int
9463main ()
9464{
9465static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9466test_array [0] = 0
9467
9468 ;
9469 return 0;
9470}
9471_ACEOF
9472rm -f conftest.$ac_objext
9473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9474 (eval $ac_compile) 2>&5
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); } &&
9478 { ac_try='test -s conftest.$ac_objext'
9479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9480 (eval $ac_try) 2>&5
9481 ac_status=$?
9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483 (exit $ac_status); }; }; then
9484 ac_hi=-1 ac_mid=-1
9485 while :; do
9486 cat >conftest.$ac_ext <<_ACEOF
9487#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009488/* confdefs.h. */
9489_ACEOF
9490cat confdefs.h >>conftest.$ac_ext
9491cat >>conftest.$ac_ext <<_ACEOF
9492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009493$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009494int
9495main ()
9496{
9497static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9498test_array [0] = 0
9499
9500 ;
9501 return 0;
9502}
9503_ACEOF
9504rm -f conftest.$ac_objext
9505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9506 (eval $ac_compile) 2>&5
9507 ac_status=$?
9508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9509 (exit $ac_status); } &&
9510 { ac_try='test -s conftest.$ac_objext'
9511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9512 (eval $ac_try) 2>&5
9513 ac_status=$?
9514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9515 (exit $ac_status); }; }; then
9516 ac_lo=$ac_mid; break
9517else
9518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009519sed 's/^/| /' conftest.$ac_ext >&5
9520
Martin v. Löwis11437992002-04-12 09:54:03 +00009521ac_hi=`expr '(' $ac_mid ')' - 1`
9522 if test $ac_mid -le $ac_hi; then
9523 ac_lo= ac_hi=
9524 break
9525 fi
9526 ac_mid=`expr 2 '*' $ac_mid`
9527fi
9528rm -f conftest.$ac_objext conftest.$ac_ext
9529 done
9530else
9531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009532sed 's/^/| /' conftest.$ac_ext >&5
9533
Martin v. Löwis11437992002-04-12 09:54:03 +00009534ac_lo= ac_hi=
9535fi
9536rm -f conftest.$ac_objext conftest.$ac_ext
9537fi
9538rm -f conftest.$ac_objext conftest.$ac_ext
9539# Binary search between lo and hi bounds.
9540while test "x$ac_lo" != "x$ac_hi"; do
9541 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9542 cat >conftest.$ac_ext <<_ACEOF
9543#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* confdefs.h. */
9545_ACEOF
9546cat confdefs.h >>conftest.$ac_ext
9547cat >>conftest.$ac_ext <<_ACEOF
9548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009550int
9551main ()
9552{
9553static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9554test_array [0] = 0
9555
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560rm -f conftest.$ac_objext
9561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9562 (eval $ac_compile) 2>&5
9563 ac_status=$?
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9565 (exit $ac_status); } &&
9566 { ac_try='test -s conftest.$ac_objext'
9567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9568 (eval $ac_try) 2>&5
9569 ac_status=$?
9570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9571 (exit $ac_status); }; }; then
9572 ac_hi=$ac_mid
9573else
9574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009575sed 's/^/| /' conftest.$ac_ext >&5
9576
Martin v. Löwis11437992002-04-12 09:54:03 +00009577ac_lo=`expr '(' $ac_mid ')' + 1`
9578fi
9579rm -f conftest.$ac_objext conftest.$ac_ext
9580done
9581case $ac_lo in
9582?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009583'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9584See \`config.log' for more details." >&5
9585echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9586See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 { (exit 1); exit 1; }; } ;;
9588esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009589else
9590 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00009591 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9592See \`config.log' for more details." >&5
9593echo "$as_me: error: cannot run test program while cross compiling
9594See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009596else
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 cat >conftest.$ac_ext <<_ACEOF
9598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* confdefs.h. */
9600_ACEOF
9601cat confdefs.h >>conftest.$ac_ext
9602cat >>conftest.$ac_ext <<_ACEOF
9603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604$ac_includes_default
9605long longval () { return (long) (sizeof (uintptr_t)); }
9606unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009607#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009608#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009611{
Martin v. Löwis11437992002-04-12 09:54:03 +00009612
9613 FILE *f = fopen ("conftest.val", "w");
9614 if (! f)
9615 exit (1);
9616 if (((long) (sizeof (uintptr_t))) < 0)
9617 {
9618 long i = longval ();
9619 if (i != ((long) (sizeof (uintptr_t))))
9620 exit (1);
9621 fprintf (f, "%ld\n", i);
9622 }
9623 else
9624 {
9625 unsigned long i = ulongval ();
9626 if (i != ((long) (sizeof (uintptr_t))))
9627 exit (1);
9628 fprintf (f, "%lu\n", i);
9629 }
9630 exit (ferror (f) || fclose (f) != 0);
9631
9632 ;
9633 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009634}
Martin v. Löwis11437992002-04-12 09:54:03 +00009635_ACEOF
9636rm -f conftest$ac_exeext
9637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9638 (eval $ac_link) 2>&5
9639 ac_status=$?
9640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9643 (eval $ac_try) 2>&5
9644 ac_status=$?
9645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646 (exit $ac_status); }; }; then
9647 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009648else
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 echo "$as_me: program exited with status $ac_status" >&5
9650echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009651sed 's/^/| /' conftest.$ac_ext >&5
9652
Martin v. Löwis11437992002-04-12 09:54:03 +00009653( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009654{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9655See \`config.log' for more details." >&5
9656echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9657See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 { (exit 1); exit 1; }; }
9659fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009660rm -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 +00009661fi
9662fi
9663rm -f conftest.val
9664else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009665 ac_cv_sizeof_uintptr_t=0
9666fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009668echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9669echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9670cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009671#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009672_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009673
Michael W. Hudson54241132001-12-07 15:38:26 +00009674
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009675fi
9676
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009677# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009678echo "$as_me:$LINENO: checking size of off_t" >&5
9679echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9680if test "${ac_cv_sizeof_off_t+set}" = set; then
9681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009682else
9683 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009684 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009685else
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 cat >conftest.$ac_ext <<_ACEOF
9687#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009688/* confdefs.h. */
9689_ACEOF
9690cat confdefs.h >>conftest.$ac_ext
9691cat >>conftest.$ac_ext <<_ACEOF
9692/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009693#include <stdio.h>
9694#include <sys/types.h>
9695main()
9696{
9697 FILE *f=fopen("conftestval", "w");
9698 if (!f) exit(1);
9699 fprintf(f, "%d\n", sizeof(off_t));
9700 exit(0);
9701}
Martin v. Löwis11437992002-04-12 09:54:03 +00009702_ACEOF
9703rm -f conftest$ac_exeext
9704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9705 (eval $ac_link) 2>&5
9706 ac_status=$?
9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9710 (eval $ac_try) 2>&5
9711 ac_status=$?
9712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009714 ac_cv_sizeof_off_t=`cat conftestval`
9715else
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 echo "$as_me: program exited with status $ac_status" >&5
9717echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009718sed 's/^/| /' conftest.$ac_ext >&5
9719
Martin v. Löwis11437992002-04-12 09:54:03 +00009720( exit $ac_status )
9721ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009722fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009723rm -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 +00009724fi
9725
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009726fi
9727
Martin v. Löwis11437992002-04-12 09:54:03 +00009728echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9729echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9730
9731cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009732#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009733_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009734
Michael W. Hudson54241132001-12-07 15:38:26 +00009735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9737echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009738if test "$have_long_long" = yes -a \
9739 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9740 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009741
Martin v. Löwis11437992002-04-12 09:54:03 +00009742cat >>confdefs.h <<\_ACEOF
9743#define HAVE_LARGEFILE_SUPPORT 1
9744_ACEOF
9745
9746 echo "$as_me:$LINENO: result: yes" >&5
9747echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009748else
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 echo "$as_me:$LINENO: result: no" >&5
9750echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009751fi
9752
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009753# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009754echo "$as_me:$LINENO: checking size of time_t" >&5
9755echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9756if test "${ac_cv_sizeof_time_t+set}" = set; then
9757 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009758else
9759 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009760 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009761else
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 cat >conftest.$ac_ext <<_ACEOF
9763#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009764/* confdefs.h. */
9765_ACEOF
9766cat confdefs.h >>conftest.$ac_ext
9767cat >>conftest.$ac_ext <<_ACEOF
9768/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009769#include <stdio.h>
9770#include <time.h>
9771main()
9772{
9773 FILE *f=fopen("conftestval", "w");
9774 if (!f) exit(1);
9775 fprintf(f, "%d\n", sizeof(time_t));
9776 exit(0);
9777}
Martin v. Löwis11437992002-04-12 09:54:03 +00009778_ACEOF
9779rm -f conftest$ac_exeext
9780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9781 (eval $ac_link) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9786 (eval $ac_try) 2>&5
9787 ac_status=$?
9788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009790 ac_cv_sizeof_time_t=`cat conftestval`
9791else
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 echo "$as_me: program exited with status $ac_status" >&5
9793echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009794sed 's/^/| /' conftest.$ac_ext >&5
9795
Martin v. Löwis11437992002-04-12 09:54:03 +00009796( exit $ac_status )
9797ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009798fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009799rm -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 +00009800fi
9801
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009802fi
9803
Martin v. Löwis11437992002-04-12 09:54:03 +00009804echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9805echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9806
9807cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009808#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009809_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009810
Michael W. Hudson54241132001-12-07 15:38:26 +00009811
9812
Trent Mick635f6fb2000-08-23 21:33:05 +00009813# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009814ac_save_cc="$CC"
9815if test "$ac_cv_kpthread" = "yes"
9816then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009817elif test "$ac_cv_kthread" = "yes"
9818then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009819elif test "$ac_cv_pthread" = "yes"
9820then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009821fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009822echo "$as_me:$LINENO: checking for pthread_t" >&5
9823echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009824have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009825cat >conftest.$ac_ext <<_ACEOF
9826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009827/* confdefs.h. */
9828_ACEOF
9829cat confdefs.h >>conftest.$ac_ext
9830cat >>conftest.$ac_ext <<_ACEOF
9831/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009832#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009833int
9834main ()
9835{
Guido van Rossum12580492000-09-24 16:47:19 +00009836pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext
9842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9843 (eval $ac_compile) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); } &&
9847 { ac_try='test -s conftest.$ac_objext'
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009853 have_pthread_t=yes
9854else
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Trent Mick635f6fb2000-08-23 21:33:05 +00009858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009859rm -f conftest.$ac_objext conftest.$ac_ext
9860echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9861echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009862if test "$have_pthread_t" = yes ; then
9863 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9865echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9866 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9867 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009868else
9869 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009870 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009871else
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 cat >conftest.$ac_ext <<_ACEOF
9873#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* confdefs.h. */
9875_ACEOF
9876cat confdefs.h >>conftest.$ac_ext
9877cat >>conftest.$ac_ext <<_ACEOF
9878/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009879#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009880#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009881 main()
9882 {
9883 FILE *f=fopen("conftestval", "w");
9884 if (!f) exit(1);
9885 fprintf(f, "%d\n", sizeof(pthread_t));
9886 exit(0);
9887 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009888_ACEOF
9889rm -f conftest$ac_exeext
9890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9891 (eval $ac_link) 2>&5
9892 ac_status=$?
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9896 (eval $ac_try) 2>&5
9897 ac_status=$?
9898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009900 ac_cv_sizeof_pthread_t=`cat conftestval`
9901else
Martin v. Löwis11437992002-04-12 09:54:03 +00009902 echo "$as_me: program exited with status $ac_status" >&5
9903echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009904sed 's/^/| /' conftest.$ac_ext >&5
9905
Martin v. Löwis11437992002-04-12 09:54:03 +00009906( exit $ac_status )
9907ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009908fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009909rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009910fi
9911
Trent Mick635f6fb2000-08-23 21:33:05 +00009912fi
9913
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9915echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9916
9917cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009918#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009919_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009920
9921fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009922CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009923
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9925echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009926# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9927if test "${enable_toolbox_glue+set}" = set; then
9928 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009929
Martin v. Löwis11437992002-04-12 09:54:03 +00009930fi;
Jack Jansene578a632001-08-15 01:27:14 +00009931
9932if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009933then
Jack Jansene578a632001-08-15 01:27:14 +00009934 case $ac_sys_system/$ac_sys_release in
9935 Darwin/*)
9936 enable_toolbox_glue="yes";;
9937 *)
9938 enable_toolbox_glue="no";;
9939 esac
9940fi
9941case "$enable_toolbox_glue" in
9942yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009943 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009944 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009945 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009946
9947cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009948#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009949_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009950
9951 ;;
9952*)
9953 extra_frameworks=""
9954 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009955 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009956 ;;
9957esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009958echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9959echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009960
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009961
9962case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009963 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009964 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009965 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009966 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009967 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009968 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009969 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009970 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009971 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009972 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009973esac
9974
Martin v. Löwis11437992002-04-12 09:54:03 +00009975echo "$as_me:$LINENO: checking for --enable-framework" >&5
9976echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009977if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009978then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009979 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009981 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009982 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009983
Martin v. Löwis11437992002-04-12 09:54:03 +00009984cat >>confdefs.h <<\_ACEOF
9985#define WITH_NEXT_FRAMEWORK 1
9986_ACEOF
9987
9988 echo "$as_me:$LINENO: result: yes" >&5
9989echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009990else
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 echo "$as_me:$LINENO: result: no" >&5
9992echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009993fi
9994
Martin v. Löwis11437992002-04-12 09:54:03 +00009995echo "$as_me:$LINENO: checking for dyld" >&5
9996echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009997case $ac_sys_system/$ac_sys_release in
9998 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009999
Martin v. Löwis11437992002-04-12 09:54:03 +000010000cat >>confdefs.h <<\_ACEOF
10001#define WITH_DYLD 1
10002_ACEOF
10003
10004 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10005echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010006 ;;
10007 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 echo "$as_me:$LINENO: result: no" >&5
10009echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010010 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010011esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010012
Guido van Rossum0a516c91994-09-12 10:58:40 +000010013# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010014
Michael W. Hudson54241132001-12-07 15:38:26 +000010015
10016
10017
10018
Guido van Rossum0a516c91994-09-12 10:58:40 +000010019# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010020# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010021echo "$as_me:$LINENO: checking SO" >&5
10022echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010023if test -z "$SO"
10024then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010025 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010026 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010027 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010028 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010029 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010030else
10031 # this might also be a termcap variable, see #610332
10032 echo
10033 echo '====================================================================='
10034 echo '+ +'
10035 echo '+ WARNING: You have set SO in your environment. +'
10036 echo '+ Do you really mean to change the extension for shared libraries? +'
10037 echo '+ Continuing in 10 seconds to let you to ponder. +'
10038 echo '+ +'
10039 echo '====================================================================='
10040 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010042echo "$as_me:$LINENO: result: $SO" >&5
10043echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010044# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +000010045# -- "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 +000010046# (Shared libraries in this instance are shared modules to be loaded into
10047# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010048echo "$as_me:$LINENO: checking LDSHARED" >&5
10049echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010050if test -z "$LDSHARED"
10051then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010052 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010053 AIX*)
10054 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010055 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010056 ;;
10057 BeOS*)
10058 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010059 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010060 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010061 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010062 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010063 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010065 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010066 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010067 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010068 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010069 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010070 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
10071 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010072 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010073 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10074 if test "$enable_framework" ; then
10075 # Link against the framework. All externals should be defined.
10076 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10077 else
10078 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010079 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010080 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +000010081 Darwin/*)
10082 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10083 if test "$enable_framework" ; then
10084 # Link against the framework. All externals should be defined.
10085 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
10086 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010087 # No framework, use the Python app as bundle-loader
10088 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010089 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010090 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010091 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +000010092 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010093 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010094 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010095 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010096 then
10097 LDSHARED="cc -shared ${LDFLAGS}"
10098 else
10099 LDSHARED="ld -Bshareable ${LDFLAGS}"
10100 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010101 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010102 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010103 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010104 then LDSHARED='$(CC) -shared'
10105 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010106 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010107 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010108 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010109 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010110 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010111 *) LDSHARED="ld";;
10112 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010114echo "$as_me:$LINENO: result: $LDSHARED" >&5
10115echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010116BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010117# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010118# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010119echo "$as_me:$LINENO: checking CCSHARED" >&5
10120echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010121if test -z "$CCSHARED"
10122then
Guido van Rossum07397971997-04-29 21:49:50 +000010123 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010124 SunOS*) if test "$GCC" = yes;
10125 then CCSHARED="-fPIC";
10126 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010127 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010128 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010129 else CCSHARED="+z";
10130 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010131 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010132 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010133 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010134 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010135 if test "$GCC" = "yes"
10136 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010137 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010138 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010139 SCO_SV*)
10140 if test "$GCC" = "yes"
10141 then CCSHARED="-fPIC"
10142 else CCSHARED="-Kpic -belf"
10143 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010144 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010145 IRIX*/6*) case $CC in
10146 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010147 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010148 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010149 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010150 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010152echo "$as_me:$LINENO: result: $CCSHARED" >&5
10153echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010154# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010155# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010156echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10157echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010158if test -z "$LINKFORSHARED"
10159then
Guido van Rossum07397971997-04-29 21:49:50 +000010160 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010161 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010162 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010163 LINKFORSHARED="-Wl,-E -Wl,+s";;
10164# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010165 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010166 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010167 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +000010169 # -u __dummy makes the linker aware of the objc runtime
10170 # in System.framework; otherwise, __objcInit (referenced in
10171 # crt1.o) gets erroneously defined as common, which breaks dynamic
10172 # loading of any modules which reference it in System.framework.
10173 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
10174 # not used by the core itself but which needs to be in the core so
10175 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010176 # -prebind is no longer used, because it actually seems to give a
10177 # slowdown in stead of a speedup, maybe due to the large number of
10178 # dynamic loads Python does.
10179 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +000010180 if test "$enable_framework"
10181 then
10182 LINKFORSHARED="$LINKFORSHARED -framework Python"
10183 fi
10184 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010185 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010186 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010187 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010189 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10190 then
10191 LINKFORSHARED="-Wl,--export-dynamic"
10192 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010193 SunOS/5*) case $CC in
10194 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010195 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010196 then
10197 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010198 fi;;
10199 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010200 CYGWIN*)
10201 if test $enable_shared = "no"
10202 then
10203 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10204 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010205 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010206fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010207echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10208echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010209
Michael W. Hudson54241132001-12-07 15:38:26 +000010210
Martin v. Löwis11437992002-04-12 09:54:03 +000010211echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10212echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010213if test ! "$LIBRARY" = "$LDLIBRARY"
10214then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010215 case $ac_sys_system in
10216 CYGWIN*)
10217 # Cygwin needs CCSHARED when building extension DLLs
10218 # but not when building the interpreter DLL.
10219 CFLAGSFORSHARED='';;
10220 *)
10221 CFLAGSFORSHARED='$(CCSHARED)'
10222 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010224echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10225echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010226
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010227# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10228# library (with --enable-shared).
10229# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010230# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10231# if it is not required, since it creates a dependency of the shared library
10232# to LIBS. This, in turn, means that applications linking the shared libpython
10233# don't need to link LIBS explicitly. The default should be only changed
10234# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010235
10236echo "$as_me:$LINENO: checking SHLIBS" >&5
10237echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10238case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010239 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010240 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010241esac
10242echo "$as_me:$LINENO: result: $SHLIBS" >&5
10243echo "${ECHO_T}$SHLIBS" >&6
10244
10245
Guido van Rossum627b2d71993-12-24 10:39:16 +000010246# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010247
10248echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10249echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10250if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010252else
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010254LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010255cat >conftest.$ac_ext <<_ACEOF
10256#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* confdefs.h. */
10258_ACEOF
10259cat confdefs.h >>conftest.$ac_ext
10260cat >>conftest.$ac_ext <<_ACEOF
10261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010263/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010264#ifdef __cplusplus
10265extern "C"
10266#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010267/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 builtin and then its argument prototype would still apply. */
10269char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010270int
10271main ()
10272{
10273dlopen ();
10274 ;
10275 return 0;
10276}
10277_ACEOF
10278rm -f conftest.$ac_objext conftest$ac_exeext
10279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10280 (eval $ac_link) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); } &&
10284 { ac_try='test -s conftest$ac_exeext'
10285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10286 (eval $ac_try) 2>&5
10287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); }; }; then
10290 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010291else
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010293sed 's/^/| /' conftest.$ac_ext >&5
10294
Martin v. Löwis11437992002-04-12 09:54:03 +000010295ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10298LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010300echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10301echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10302if test $ac_cv_lib_dl_dlopen = yes; then
10303 cat >>confdefs.h <<_ACEOF
10304#define HAVE_LIBDL 1
10305_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010306
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010307 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010309fi
10310 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
10312echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10313echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10314if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010318LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010319cat >conftest.$ac_ext <<_ACEOF
10320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010321/* confdefs.h. */
10322_ACEOF
10323cat confdefs.h >>conftest.$ac_ext
10324cat >>conftest.$ac_ext <<_ACEOF
10325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010326
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010327/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010328#ifdef __cplusplus
10329extern "C"
10330#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010331/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 builtin and then its argument prototype would still apply. */
10333char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010334int
10335main ()
10336{
10337shl_load ();
10338 ;
10339 return 0;
10340}
10341_ACEOF
10342rm -f conftest.$ac_objext conftest$ac_exeext
10343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10344 (eval $ac_link) 2>&5
10345 ac_status=$?
10346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10347 (exit $ac_status); } &&
10348 { ac_try='test -s conftest$ac_exeext'
10349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10350 (eval $ac_try) 2>&5
10351 ac_status=$?
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); }; }; then
10354 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010355else
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010357sed 's/^/| /' conftest.$ac_ext >&5
10358
Martin v. Löwis11437992002-04-12 09:54:03 +000010359ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010361rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10362LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010364echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10365echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10366if test $ac_cv_lib_dld_shl_load = yes; then
10367 cat >>confdefs.h <<_ACEOF
10368#define HAVE_LIBDLD 1
10369_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010370
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010371 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010372
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010373fi
10374 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010375
10376# only check for sem_ini if thread support is requested
10377if test "$with_threads" = "yes" -o -z "$with_threads"; then
10378 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010379echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10380if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010382else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010383 ac_func_search_save_LIBS=$LIBS
10384ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010385cat >conftest.$ac_ext <<_ACEOF
10386#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* confdefs.h. */
10388_ACEOF
10389cat confdefs.h >>conftest.$ac_ext
10390cat >>conftest.$ac_ext <<_ACEOF
10391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#ifdef __cplusplus
10395extern "C"
10396#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 builtin and then its argument prototype would still apply. */
10399char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010400int
10401main ()
10402{
10403sem_init ();
10404 ;
10405 return 0;
10406}
10407_ACEOF
10408rm -f conftest.$ac_objext conftest$ac_exeext
10409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10410 (eval $ac_link) 2>&5
10411 ac_status=$?
10412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10413 (exit $ac_status); } &&
10414 { ac_try='test -s conftest$ac_exeext'
10415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10416 (eval $ac_try) 2>&5
10417 ac_status=$?
10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10419 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010420 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010421else
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010423sed 's/^/| /' conftest.$ac_ext >&5
10424
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010427if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010428 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010429 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10430 cat >conftest.$ac_ext <<_ACEOF
10431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* confdefs.h. */
10433_ACEOF
10434cat confdefs.h >>conftest.$ac_ext
10435cat >>conftest.$ac_ext <<_ACEOF
10436/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010437
10438/* Override any gcc2 internal prototype to avoid an error. */
10439#ifdef __cplusplus
10440extern "C"
10441#endif
10442/* We use char because int might match the return type of a gcc2
10443 builtin and then its argument prototype would still apply. */
10444char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010445int
10446main ()
10447{
10448sem_init ();
10449 ;
10450 return 0;
10451}
Martin v. Löwis11437992002-04-12 09:54:03 +000010452_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010453rm -f conftest.$ac_objext conftest$ac_exeext
10454if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10455 (eval $ac_link) 2>&5
10456 ac_status=$?
10457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458 (exit $ac_status); } &&
10459 { ac_try='test -s conftest$ac_exeext'
10460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10461 (eval $ac_try) 2>&5
10462 ac_status=$?
10463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10464 (exit $ac_status); }; }; then
10465 ac_cv_search_sem_init="-l$ac_lib"
10466break
10467else
10468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010469sed 's/^/| /' conftest.$ac_ext >&5
10470
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010471fi
10472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10473 done
10474fi
10475LIBS=$ac_func_search_save_LIBS
10476fi
10477echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10478echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10479if test "$ac_cv_search_sem_init" != no; then
10480 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010481
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010482fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010483 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010484 # posix4 on Solaris 2.6
10485 # pthread (first!) on Linux
10486fi
10487
Martin v. Löwis19d17342003-06-14 21:03:05 +000010488# check if we need libintl for locale functions
10489echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10490echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10491if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10492 echo $ECHO_N "(cached) $ECHO_C" >&6
10493else
10494 ac_check_lib_save_LIBS=$LIBS
10495LIBS="-lintl $LIBS"
10496cat >conftest.$ac_ext <<_ACEOF
10497#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010498/* confdefs.h. */
10499_ACEOF
10500cat confdefs.h >>conftest.$ac_ext
10501cat >>conftest.$ac_ext <<_ACEOF
10502/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010503
10504/* Override any gcc2 internal prototype to avoid an error. */
10505#ifdef __cplusplus
10506extern "C"
10507#endif
10508/* We use char because int might match the return type of a gcc2
10509 builtin and then its argument prototype would still apply. */
10510char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010511int
10512main ()
10513{
10514textdomain ();
10515 ;
10516 return 0;
10517}
10518_ACEOF
10519rm -f conftest.$ac_objext conftest$ac_exeext
10520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10521 (eval $ac_link) 2>&5
10522 ac_status=$?
10523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10524 (exit $ac_status); } &&
10525 { ac_try='test -s conftest$ac_exeext'
10526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10527 (eval $ac_try) 2>&5
10528 ac_status=$?
10529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10530 (exit $ac_status); }; }; then
10531 ac_cv_lib_intl_textdomain=yes
10532else
10533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010534sed 's/^/| /' conftest.$ac_ext >&5
10535
Martin v. Löwis19d17342003-06-14 21:03:05 +000010536ac_cv_lib_intl_textdomain=no
10537fi
10538rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10539LIBS=$ac_check_lib_save_LIBS
10540fi
10541echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10542echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10543if test $ac_cv_lib_intl_textdomain = yes; then
10544
10545cat >>confdefs.h <<\_ACEOF
10546#define WITH_LIBINTL 1
10547_ACEOF
10548
10549fi
10550
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010551
10552# checks for system dependent C++ extensions support
10553case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10555echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10556 cat >conftest.$ac_ext <<_ACEOF
10557#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* confdefs.h. */
10559_ACEOF
10560cat confdefs.h >>conftest.$ac_ext
10561cat >>conftest.$ac_ext <<_ACEOF
10562/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010563#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010564int
10565main ()
10566{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010567loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ;
10569 return 0;
10570}
10571_ACEOF
10572rm -f conftest.$ac_objext conftest$ac_exeext
10573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10574 (eval $ac_link) 2>&5
10575 ac_status=$?
10576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10577 (exit $ac_status); } &&
10578 { ac_try='test -s conftest$ac_exeext'
10579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10580 (eval $ac_try) 2>&5
10581 ac_status=$?
10582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10583 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010584
Martin v. Löwis11437992002-04-12 09:54:03 +000010585cat >>confdefs.h <<\_ACEOF
10586#define AIX_GENUINE_CPLUSPLUS 1
10587_ACEOF
10588
10589 echo "$as_me:$LINENO: result: yes" >&5
10590echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010591else
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010593sed 's/^/| /' conftest.$ac_ext >&5
10594
Martin v. Löwis11437992002-04-12 09:54:03 +000010595echo "$as_me:$LINENO: result: no" >&5
10596echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010597fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010598rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010599 *) ;;
10600esac
10601
Guido van Rossum70c7f481998-03-26 18:44:10 +000010602# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010603# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010604# BeOS' sockets are stashed in libnet.
10605case "$ac_sys_system" in
10606IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010607*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010608echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10609echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10610if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10611 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010612else
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010614LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010615cat >conftest.$ac_ext <<_ACEOF
10616#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010617/* confdefs.h. */
10618_ACEOF
10619cat confdefs.h >>conftest.$ac_ext
10620cat >>conftest.$ac_ext <<_ACEOF
10621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010623/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010624#ifdef __cplusplus
10625extern "C"
10626#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010627/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010628 builtin and then its argument prototype would still apply. */
10629char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010630int
10631main ()
10632{
10633t_open ();
10634 ;
10635 return 0;
10636}
10637_ACEOF
10638rm -f conftest.$ac_objext conftest$ac_exeext
10639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10640 (eval $ac_link) 2>&5
10641 ac_status=$?
10642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10643 (exit $ac_status); } &&
10644 { ac_try='test -s conftest$ac_exeext'
10645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10646 (eval $ac_try) 2>&5
10647 ac_status=$?
10648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10649 (exit $ac_status); }; }; then
10650 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010651else
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010653sed 's/^/| /' conftest.$ac_ext >&5
10654
Martin v. Löwis11437992002-04-12 09:54:03 +000010655ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010657rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10658LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010660echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10661echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10662if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010663 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010664fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010665 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010666echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10667echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10668if test "${ac_cv_lib_socket_socket+set}" = set; then
10669 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670else
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010672LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010673cat >conftest.$ac_ext <<_ACEOF
10674#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010675/* confdefs.h. */
10676_ACEOF
10677cat confdefs.h >>conftest.$ac_ext
10678cat >>conftest.$ac_ext <<_ACEOF
10679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010681/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010682#ifdef __cplusplus
10683extern "C"
10684#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010685/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 builtin and then its argument prototype would still apply. */
10687char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010688int
10689main ()
10690{
10691socket ();
10692 ;
10693 return 0;
10694}
10695_ACEOF
10696rm -f conftest.$ac_objext conftest$ac_exeext
10697if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10698 (eval $ac_link) 2>&5
10699 ac_status=$?
10700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10701 (exit $ac_status); } &&
10702 { ac_try='test -s conftest$ac_exeext'
10703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10704 (eval $ac_try) 2>&5
10705 ac_status=$?
10706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10707 (exit $ac_status); }; }; then
10708 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010709else
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010711sed 's/^/| /' conftest.$ac_ext >&5
10712
Martin v. Löwis11437992002-04-12 09:54:03 +000010713ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10716LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010718echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10719echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10720if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010721 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010722fi
10723 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010724;;
10725esac
10726case "$ac_sys_system" in
10727BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010728echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10729echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10730if test "${ac_cv_lib_net_socket+set}" = set; then
10731 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010732else
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010734LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010735cat >conftest.$ac_ext <<_ACEOF
10736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010737/* confdefs.h. */
10738_ACEOF
10739cat confdefs.h >>conftest.$ac_ext
10740cat >>conftest.$ac_ext <<_ACEOF
10741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010742
Guido van Rossumad678af1998-10-02 14:42:15 +000010743/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010744#ifdef __cplusplus
10745extern "C"
10746#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010747/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 builtin and then its argument prototype would still apply. */
10749char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010750int
10751main ()
10752{
10753socket ();
10754 ;
10755 return 0;
10756}
10757_ACEOF
10758rm -f conftest.$ac_objext conftest$ac_exeext
10759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10760 (eval $ac_link) 2>&5
10761 ac_status=$?
10762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763 (exit $ac_status); } &&
10764 { ac_try='test -s conftest$ac_exeext'
10765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10766 (eval $ac_try) 2>&5
10767 ac_status=$?
10768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10769 (exit $ac_status); }; }; then
10770 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010771else
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010773sed 's/^/| /' conftest.$ac_ext >&5
10774
Martin v. Löwis11437992002-04-12 09:54:03 +000010775ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010776fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10778LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010780echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10781echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10782if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010783 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010784fi
10785 # BeOS
10786;;
10787esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010788
Martin v. Löwis11437992002-04-12 09:54:03 +000010789echo "$as_me:$LINENO: checking for --with-libs" >&5
10790echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10791
Guido van Rossuma68acba1996-07-31 17:36:39 +000010792# Check whether --with-libs or --without-libs was given.
10793if test "${with_libs+set}" = set; then
10794 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
10796echo "$as_me:$LINENO: result: $withval" >&5
10797echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010798LIBS="$withval $LIBS"
10799
10800else
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 echo "$as_me:$LINENO: result: no" >&5
10802echo "${ECHO_T}no" >&6
10803fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010804
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010805# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010806
10807
Martin v. Löwis11437992002-04-12 09:54:03 +000010808echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10809echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10810
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010811# Check whether --with-signal-module or --without-signal-module was given.
10812if test "${with_signal_module+set}" = set; then
10813 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010814
Martin v. Löwis11437992002-04-12 09:54:03 +000010815fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010816
10817if test -z "$with_signal_module"
10818then with_signal_module="yes"
10819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010820echo "$as_me:$LINENO: result: $with_signal_module" >&5
10821echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010822
10823if test "${with_signal_module}" = "yes"; then
10824 USE_SIGNAL_MODULE=""
10825 SIGNAL_OBJS=""
10826else
10827 USE_SIGNAL_MODULE="#"
10828 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10829fi
10830
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010831# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010832
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010833USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010834
Martin v. Löwis11437992002-04-12 09:54:03 +000010835echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10836echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10837
Guido van Rossumec2f0731997-01-22 20:54:01 +000010838
10839# Check whether --with-dec-threads or --without-dec-threads was given.
10840if test "${with_dec_threads+set}" = set; then
10841 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010842
10843echo "$as_me:$LINENO: result: $withval" >&5
10844echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010845LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010846if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010847 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010848fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010849else
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 echo "$as_me:$LINENO: result: no" >&5
10851echo "${ECHO_T}no" >&6
10852fi;
10853
10854# Templates for things AC_DEFINEd more than once.
10855# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010856
10857
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
10859
10860
10861
10862
10863echo "$as_me:$LINENO: checking for --with-threads" >&5
10864echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10865
Guido van Rossumec2f0731997-01-22 20:54:01 +000010866# Check whether --with-threads or --without-threads was given.
10867if test "${with_threads+set}" = set; then
10868 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010869
Martin v. Löwis11437992002-04-12 09:54:03 +000010870fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010871
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010872# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010874# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010875if test "${with_thread+set}" = set; then
10876 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010877 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010878fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010879
10880if test -z "$with_threads"
10881then with_threads="yes"
10882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010883echo "$as_me:$LINENO: result: $with_threads" >&5
10884echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010885
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010886
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010887if test "$with_threads" = "no"
10888then
10889 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010890elif test "$ac_cv_pthread_is_default" = yes
10891then
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010893#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010894_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010895
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010896 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010898#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010899_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010900
10901 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010902 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010903elif test "$ac_cv_kpthread" = "yes"
10904then
10905 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010906 if test "$ac_cv_cxx_thread" = "yes"; then
10907 CXX="$CXX -Kpthread"
10908 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010910#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010911_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010912
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010913 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010914 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010915elif test "$ac_cv_kthread" = "yes"
10916then
10917 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010918 if test "$ac_cv_cxx_thread" = "yes"; then
10919 CXX="$CXX -Kthread"
10920 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010921 cat >>confdefs.h <<\_ACEOF
10922#define WITH_THREAD 1
10923_ACEOF
10924
10925 posix_threads=yes
10926 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010927elif test "$ac_cv_pthread" = "yes"
10928then
10929 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010930 if test "$ac_cv_cxx_thread" = "yes"; then
10931 CXX="$CXX -pthread"
10932 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010933 cat >>confdefs.h <<\_ACEOF
10934#define WITH_THREAD 1
10935_ACEOF
10936
10937 posix_threads=yes
10938 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010939else
10940 if test ! -z "$with_threads" -a -d "$with_threads"
10941 then LDFLAGS="$LDFLAGS -L$with_threads"
10942 fi
10943 if test ! -z "$withval" -a -d "$withval"
10944 then LDFLAGS="$LDFLAGS -L$withval"
10945 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010946
10947 # According to the POSIX spec, a pthreads implementation must
10948 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10950echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10951 cat >conftest.$ac_ext <<_ACEOF
10952#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* confdefs.h. */
10954_ACEOF
10955cat confdefs.h >>conftest.$ac_ext
10956cat >>conftest.$ac_ext <<_ACEOF
10957/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010958
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010959#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010960#ifdef _POSIX_THREADS
10961yes
10962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010963
10964_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010966 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010967 unistd_defines_pthreads=yes
10968else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010969 unistd_defines_pthreads=no
10970fi
10971rm -f conftest*
10972
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10974echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010977#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010979
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 if test "${ac_cv_header_cthreads_h+set}" = set; then
10981 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10982echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10983if test "${ac_cv_header_cthreads_h+set}" = set; then
10984 echo $ECHO_N "(cached) $ECHO_C" >&6
10985fi
10986echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10987echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010988else
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 # Is the header compilable?
10990echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10991echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10992cat >conftest.$ac_ext <<_ACEOF
10993#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010994/* confdefs.h. */
10995_ACEOF
10996cat confdefs.h >>conftest.$ac_ext
10997cat >>conftest.$ac_ext <<_ACEOF
10998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010999$ac_includes_default
11000#include <cthreads.h>
11001_ACEOF
11002rm -f conftest.$ac_objext
11003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11004 (eval $ac_compile) 2>&5
11005 ac_status=$?
11006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007 (exit $ac_status); } &&
11008 { ac_try='test -s conftest.$ac_objext'
11009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11010 (eval $ac_try) 2>&5
11011 ac_status=$?
11012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11013 (exit $ac_status); }; }; then
11014 ac_header_compiler=yes
11015else
11016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011017sed 's/^/| /' conftest.$ac_ext >&5
11018
Martin v. Löwis11437992002-04-12 09:54:03 +000011019ac_header_compiler=no
11020fi
11021rm -f conftest.$ac_objext conftest.$ac_ext
11022echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11023echo "${ECHO_T}$ac_header_compiler" >&6
11024
11025# Is the header present?
11026echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11027echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11028cat >conftest.$ac_ext <<_ACEOF
11029#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011030/* confdefs.h. */
11031_ACEOF
11032cat confdefs.h >>conftest.$ac_ext
11033cat >>conftest.$ac_ext <<_ACEOF
11034/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011035#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011036_ACEOF
11037if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11038 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11039 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011040 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 rm -f conftest.er1
11042 cat conftest.err >&5
11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); } >/dev/null; then
11045 if test -s conftest.err; then
11046 ac_cpp_err=$ac_c_preproc_warn_flag
11047 else
11048 ac_cpp_err=
11049 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 ac_cpp_err=yes
11052fi
11053if test -z "$ac_cpp_err"; then
11054 ac_header_preproc=yes
11055else
11056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011057sed 's/^/| /' conftest.$ac_ext >&5
11058
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011061rm -f conftest.err conftest.$ac_ext
11062echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11063echo "${ECHO_T}$ac_header_preproc" >&6
11064
11065# So? What about this header?
11066case $ac_header_compiler:$ac_header_preproc in
11067 yes:no )
11068 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11069echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11070 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011071echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11072 (
11073 cat <<\_ASBOX
11074## ------------------------------------ ##
11075## Report this to bug-autoconf@gnu.org. ##
11076## ------------------------------------ ##
11077_ASBOX
11078 ) |
11079 sed "s/^/$as_me: WARNING: /" >&2
11080 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 no:yes )
11082 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11083echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
11084 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11085echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11086 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011087echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
11088 (
11089 cat <<\_ASBOX
11090## ------------------------------------ ##
11091## Report this to bug-autoconf@gnu.org. ##
11092## ------------------------------------ ##
11093_ASBOX
11094 ) |
11095 sed "s/^/$as_me: WARNING: /" >&2
11096 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011097esac
11098echo "$as_me:$LINENO: checking for cthreads.h" >&5
11099echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11100if test "${ac_cv_header_cthreads_h+set}" = set; then
11101 echo $ECHO_N "(cached) $ECHO_C" >&6
11102else
11103 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011105echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11106echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11107
11108fi
11109if test $ac_cv_header_cthreads_h = yes; then
11110 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011111#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011112_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011113
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011115#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011116_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118
11119cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011120#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011121_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011122
11123 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011124 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011125else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011126
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11128 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11129echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11130if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11131 echo $ECHO_N "(cached) $ECHO_C" >&6
11132fi
11133echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11134echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011135else
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 # Is the header compilable?
11137echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11138echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11139cat >conftest.$ac_ext <<_ACEOF
11140#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011141/* confdefs.h. */
11142_ACEOF
11143cat confdefs.h >>conftest.$ac_ext
11144cat >>conftest.$ac_ext <<_ACEOF
11145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011146$ac_includes_default
11147#include <mach/cthreads.h>
11148_ACEOF
11149rm -f conftest.$ac_objext
11150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11151 (eval $ac_compile) 2>&5
11152 ac_status=$?
11153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11154 (exit $ac_status); } &&
11155 { ac_try='test -s conftest.$ac_objext'
11156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11157 (eval $ac_try) 2>&5
11158 ac_status=$?
11159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160 (exit $ac_status); }; }; then
11161 ac_header_compiler=yes
11162else
11163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011164sed 's/^/| /' conftest.$ac_ext >&5
11165
Martin v. Löwis11437992002-04-12 09:54:03 +000011166ac_header_compiler=no
11167fi
11168rm -f conftest.$ac_objext conftest.$ac_ext
11169echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11170echo "${ECHO_T}$ac_header_compiler" >&6
11171
11172# Is the header present?
11173echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11174echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11175cat >conftest.$ac_ext <<_ACEOF
11176#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* confdefs.h. */
11178_ACEOF
11179cat confdefs.h >>conftest.$ac_ext
11180cat >>conftest.$ac_ext <<_ACEOF
11181/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011182#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
11184if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11185 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11186 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011187 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 rm -f conftest.er1
11189 cat conftest.err >&5
11190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191 (exit $ac_status); } >/dev/null; then
11192 if test -s conftest.err; then
11193 ac_cpp_err=$ac_c_preproc_warn_flag
11194 else
11195 ac_cpp_err=
11196 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011197else
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 ac_cpp_err=yes
11199fi
11200if test -z "$ac_cpp_err"; then
11201 ac_header_preproc=yes
11202else
11203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011204sed 's/^/| /' conftest.$ac_ext >&5
11205
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011208rm -f conftest.err conftest.$ac_ext
11209echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11210echo "${ECHO_T}$ac_header_preproc" >&6
11211
11212# So? What about this header?
11213case $ac_header_compiler:$ac_header_preproc in
11214 yes:no )
11215 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11216echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11217 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011218echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11219 (
11220 cat <<\_ASBOX
11221## ------------------------------------ ##
11222## Report this to bug-autoconf@gnu.org. ##
11223## ------------------------------------ ##
11224_ASBOX
11225 ) |
11226 sed "s/^/$as_me: WARNING: /" >&2
11227 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 no:yes )
11229 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11230echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
11231 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11232echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11233 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011234echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
11235 (
11236 cat <<\_ASBOX
11237## ------------------------------------ ##
11238## Report this to bug-autoconf@gnu.org. ##
11239## ------------------------------------ ##
11240_ASBOX
11241 ) |
11242 sed "s/^/$as_me: WARNING: /" >&2
11243 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011244esac
11245echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11246echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11247if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11248 echo $ECHO_N "(cached) $ECHO_C" >&6
11249else
11250 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011252echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11253echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11254
11255fi
11256if test $ac_cv_header_mach_cthreads_h = yes; then
11257 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011258#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011259_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011260
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011262#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011263_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011264
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
11266cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011267#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011268_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011269
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011270 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011271else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011272
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 echo "$as_me:$LINENO: checking for --with-pth" >&5
11274echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11275
11276# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011277if test "${with_pth+set}" = set; then
11278 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011279 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011280echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011281 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011282#define WITH_THREAD 1
11283_ACEOF
11284
11285
11286cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011287#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011288_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011289
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011290 LIBS="-lpth $LIBS"
11291 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011292else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011293 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011294echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011295
11296 # Just looking for pthread_create in libpthread is not enough:
11297 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11298 # So we really have to include pthread.h, and then link.
11299 _libs=$LIBS
11300 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11302echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11303 cat >conftest.$ac_ext <<_ACEOF
11304#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011305/* confdefs.h. */
11306_ACEOF
11307cat confdefs.h >>conftest.$ac_ext
11308cat >>conftest.$ac_ext <<_ACEOF
11309/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011310#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011311
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011312void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011313int
11314main ()
11315{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011316
11317pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ;
11319 return 0;
11320}
11321_ACEOF
11322rm -f conftest.$ac_objext conftest$ac_exeext
11323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11324 (eval $ac_link) 2>&5
11325 ac_status=$?
11326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11327 (exit $ac_status); } &&
11328 { ac_try='test -s conftest$ac_exeext'
11329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11330 (eval $ac_try) 2>&5
11331 ac_status=$?
11332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11333 (exit $ac_status); }; }; then
11334
11335 echo "$as_me:$LINENO: result: yes" >&5
11336echo "${ECHO_T}yes" >&6
11337 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011338#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011339_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011340
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011341 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011342 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011343else
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011345sed 's/^/| /' conftest.$ac_ext >&5
11346
Martin v. Löwis11437992002-04-12 09:54:03 +000011347
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011348 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11350echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11351if test "${ac_cv_func_pthread_detach+set}" = set; then
11352 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011353else
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 cat >conftest.$ac_ext <<_ACEOF
11355#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011356/* confdefs.h. */
11357_ACEOF
11358cat confdefs.h >>conftest.$ac_ext
11359cat >>conftest.$ac_ext <<_ACEOF
11360/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011361/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011362 which can conflict with char pthread_detach (); below.
11363 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011364 <limits.h> exists even on freestanding compilers. Under hpux,
11365 including <limits.h> includes <sys/time.h> and causes problems
11366 checking for functions defined therein. */
11367#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011368# include <limits.h>
11369#else
11370# include <assert.h>
11371#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011372/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011373#ifdef __cplusplus
11374extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011375{
Martin v. Löwis11437992002-04-12 09:54:03 +000011376#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011377/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 builtin and then its argument prototype would still apply. */
11379char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011380/* The GNU C library defines this for functions which it implements
11381 to always fail with ENOSYS. Some functions are actually named
11382 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011383#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011384choke me
11385#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011386char (*f) () = pthread_detach;
11387#endif
11388#ifdef __cplusplus
11389}
Guido van Rossumad678af1998-10-02 14:42:15 +000011390#endif
11391
Skip Montanaro6dead952003-09-25 14:50:04 +000011392int
11393main ()
11394{
11395return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 ;
11397 return 0;
11398}
11399_ACEOF
11400rm -f conftest.$ac_objext conftest$ac_exeext
11401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11402 (eval $ac_link) 2>&5
11403 ac_status=$?
11404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11405 (exit $ac_status); } &&
11406 { ac_try='test -s conftest$ac_exeext'
11407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11408 (eval $ac_try) 2>&5
11409 ac_status=$?
11410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11411 (exit $ac_status); }; }; then
11412 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011413else
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011415sed 's/^/| /' conftest.$ac_ext >&5
11416
Martin v. Löwis11437992002-04-12 09:54:03 +000011417ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011419rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011420fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011421echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11422echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11423if test $ac_cv_func_pthread_detach = yes; then
11424 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011425#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011426_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011427
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011428 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011429 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011430else
Guido van Rossumad678af1998-10-02 14:42:15 +000011431
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011432 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11433 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11434echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11435if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11436 echo $ECHO_N "(cached) $ECHO_C" >&6
11437fi
11438echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11439echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11440else
11441 # Is the header compilable?
11442echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11443echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11444cat >conftest.$ac_ext <<_ACEOF
11445#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011446/* confdefs.h. */
11447_ACEOF
11448cat confdefs.h >>conftest.$ac_ext
11449cat >>conftest.$ac_ext <<_ACEOF
11450/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011451$ac_includes_default
11452#include <atheos/threads.h>
11453_ACEOF
11454rm -f conftest.$ac_objext
11455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11456 (eval $ac_compile) 2>&5
11457 ac_status=$?
11458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11459 (exit $ac_status); } &&
11460 { ac_try='test -s conftest.$ac_objext'
11461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11462 (eval $ac_try) 2>&5
11463 ac_status=$?
11464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465 (exit $ac_status); }; }; then
11466 ac_header_compiler=yes
11467else
11468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011469sed 's/^/| /' conftest.$ac_ext >&5
11470
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011471ac_header_compiler=no
11472fi
11473rm -f conftest.$ac_objext conftest.$ac_ext
11474echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11475echo "${ECHO_T}$ac_header_compiler" >&6
11476
11477# Is the header present?
11478echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11479echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11480cat >conftest.$ac_ext <<_ACEOF
11481#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* confdefs.h. */
11483_ACEOF
11484cat confdefs.h >>conftest.$ac_ext
11485cat >>conftest.$ac_ext <<_ACEOF
11486/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011487#include <atheos/threads.h>
11488_ACEOF
11489if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11490 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11491 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011492 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011493 rm -f conftest.er1
11494 cat conftest.err >&5
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); } >/dev/null; then
11497 if test -s conftest.err; then
11498 ac_cpp_err=$ac_c_preproc_warn_flag
11499 else
11500 ac_cpp_err=
11501 fi
11502else
11503 ac_cpp_err=yes
11504fi
11505if test -z "$ac_cpp_err"; then
11506 ac_header_preproc=yes
11507else
11508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011509sed 's/^/| /' conftest.$ac_ext >&5
11510
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011511 ac_header_preproc=no
11512fi
11513rm -f conftest.err conftest.$ac_ext
11514echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11515echo "${ECHO_T}$ac_header_preproc" >&6
11516
11517# So? What about this header?
11518case $ac_header_compiler:$ac_header_preproc in
11519 yes:no )
11520 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11521echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11522 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011523echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11524 (
11525 cat <<\_ASBOX
11526## ------------------------------------ ##
11527## Report this to bug-autoconf@gnu.org. ##
11528## ------------------------------------ ##
11529_ASBOX
11530 ) |
11531 sed "s/^/$as_me: WARNING: /" >&2
11532 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011533 no:yes )
11534 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11535echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
11536 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11537echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11538 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011539echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
11540 (
11541 cat <<\_ASBOX
11542## ------------------------------------ ##
11543## Report this to bug-autoconf@gnu.org. ##
11544## ------------------------------------ ##
11545_ASBOX
11546 ) |
11547 sed "s/^/$as_me: WARNING: /" >&2
11548 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011549esac
11550echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11551echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11552if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
11554else
11555 ac_cv_header_atheos_threads_h=$ac_header_preproc
11556fi
11557echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11558echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11559
11560fi
11561if test $ac_cv_header_atheos_threads_h = yes; then
11562 cat >>confdefs.h <<\_ACEOF
11563#define WITH_THREAD 1
11564_ACEOF
11565
11566
11567cat >>confdefs.h <<\_ACEOF
11568#define ATHEOS_THREADS 1
11569_ACEOF
11570
11571 THREADOBJ="Python/thread.o"
11572else
11573
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11575 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11576echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11577if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11578 echo $ECHO_N "(cached) $ECHO_C" >&6
11579fi
11580echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11581echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011582else
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 # Is the header compilable?
11584echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11585echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11586cat >conftest.$ac_ext <<_ACEOF
11587#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011588/* confdefs.h. */
11589_ACEOF
11590cat confdefs.h >>conftest.$ac_ext
11591cat >>conftest.$ac_ext <<_ACEOF
11592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011593$ac_includes_default
11594#include <kernel/OS.h>
11595_ACEOF
11596rm -f conftest.$ac_objext
11597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11598 (eval $ac_compile) 2>&5
11599 ac_status=$?
11600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11601 (exit $ac_status); } &&
11602 { ac_try='test -s conftest.$ac_objext'
11603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11604 (eval $ac_try) 2>&5
11605 ac_status=$?
11606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607 (exit $ac_status); }; }; then
11608 ac_header_compiler=yes
11609else
11610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011611sed 's/^/| /' conftest.$ac_ext >&5
11612
Martin v. Löwis11437992002-04-12 09:54:03 +000011613ac_header_compiler=no
11614fi
11615rm -f conftest.$ac_objext conftest.$ac_ext
11616echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11617echo "${ECHO_T}$ac_header_compiler" >&6
11618
11619# Is the header present?
11620echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11621echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11622cat >conftest.$ac_ext <<_ACEOF
11623#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011624/* confdefs.h. */
11625_ACEOF
11626cat confdefs.h >>conftest.$ac_ext
11627cat >>conftest.$ac_ext <<_ACEOF
11628/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011629#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011630_ACEOF
11631if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11632 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11633 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011634 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 rm -f conftest.er1
11636 cat conftest.err >&5
11637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11638 (exit $ac_status); } >/dev/null; then
11639 if test -s conftest.err; then
11640 ac_cpp_err=$ac_c_preproc_warn_flag
11641 else
11642 ac_cpp_err=
11643 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011644else
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 ac_cpp_err=yes
11646fi
11647if test -z "$ac_cpp_err"; then
11648 ac_header_preproc=yes
11649else
11650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011651sed 's/^/| /' conftest.$ac_ext >&5
11652
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011655rm -f conftest.err conftest.$ac_ext
11656echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11657echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011658
Martin v. Löwis11437992002-04-12 09:54:03 +000011659# So? What about this header?
11660case $ac_header_compiler:$ac_header_preproc in
11661 yes:no )
11662 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11663echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11664 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011665echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11666 (
11667 cat <<\_ASBOX
11668## ------------------------------------ ##
11669## Report this to bug-autoconf@gnu.org. ##
11670## ------------------------------------ ##
11671_ASBOX
11672 ) |
11673 sed "s/^/$as_me: WARNING: /" >&2
11674 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 no:yes )
11676 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11677echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11678 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11679echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11680 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011681echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11682 (
11683 cat <<\_ASBOX
11684## ------------------------------------ ##
11685## Report this to bug-autoconf@gnu.org. ##
11686## ------------------------------------ ##
11687_ASBOX
11688 ) |
11689 sed "s/^/$as_me: WARNING: /" >&2
11690 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011691esac
11692echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11693echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11694if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11695 echo $ECHO_N "(cached) $ECHO_C" >&6
11696else
11697 ac_cv_header_kernel_OS_h=$ac_header_preproc
11698fi
11699echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11700echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11701
11702fi
11703if test $ac_cv_header_kernel_OS_h = yes; then
11704 cat >>confdefs.h <<\_ACEOF
11705#define WITH_THREAD 1
11706_ACEOF
11707
11708
11709cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011710#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011711_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011712
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011713 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011714else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011715
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11717echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11718if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11719 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011720else
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011722LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011723cat >conftest.$ac_ext <<_ACEOF
11724#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011730
Greg Steinadf63d62000-07-05 10:38:09 +000011731/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011732#ifdef __cplusplus
11733extern "C"
11734#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011735/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 builtin and then its argument prototype would still apply. */
11737char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011738int
11739main ()
11740{
11741pthread_create ();
11742 ;
11743 return 0;
11744}
11745_ACEOF
11746rm -f conftest.$ac_objext conftest$ac_exeext
11747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11748 (eval $ac_link) 2>&5
11749 ac_status=$?
11750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11751 (exit $ac_status); } &&
11752 { ac_try='test -s conftest$ac_exeext'
11753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11754 (eval $ac_try) 2>&5
11755 ac_status=$?
11756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757 (exit $ac_status); }; }; then
11758 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011759else
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011761sed 's/^/| /' conftest.$ac_ext >&5
11762
Martin v. Löwis11437992002-04-12 09:54:03 +000011763ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011764fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11766LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011768echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11769echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11770if test $ac_cv_lib_pthreads_pthread_create = yes; then
11771 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011772#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011773_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011774
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011775 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011776 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011777 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011778else
Greg Steinadf63d62000-07-05 10:38:09 +000011779
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11781echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11782if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11783 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011784else
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011786LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011787cat >conftest.$ac_ext <<_ACEOF
11788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011789/* confdefs.h. */
11790_ACEOF
11791cat confdefs.h >>conftest.$ac_ext
11792cat >>conftest.$ac_ext <<_ACEOF
11793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011794
Guido van Rossum49545951997-12-02 19:28:29 +000011795/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011796#ifdef __cplusplus
11797extern "C"
11798#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011799/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011800 builtin and then its argument prototype would still apply. */
11801char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011802int
11803main ()
11804{
11805pthread_create ();
11806 ;
11807 return 0;
11808}
11809_ACEOF
11810rm -f conftest.$ac_objext conftest$ac_exeext
11811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11812 (eval $ac_link) 2>&5
11813 ac_status=$?
11814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11815 (exit $ac_status); } &&
11816 { ac_try='test -s conftest$ac_exeext'
11817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11818 (eval $ac_try) 2>&5
11819 ac_status=$?
11820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11821 (exit $ac_status); }; }; then
11822 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011823else
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011825sed 's/^/| /' conftest.$ac_ext >&5
11826
Martin v. Löwis11437992002-04-12 09:54:03 +000011827ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011828fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011829rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11830LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011832echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11833echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11834if test $ac_cv_lib_c_r_pthread_create = yes; then
11835 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011836#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011837_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011838
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011839 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011840 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011841 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011842else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011843
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11845echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11846if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011848else
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011850LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011851cat >conftest.$ac_ext <<_ACEOF
11852#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* confdefs.h. */
11854_ACEOF
11855cat confdefs.h >>conftest.$ac_ext
11856cat >>conftest.$ac_ext <<_ACEOF
11857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011859/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011860#ifdef __cplusplus
11861extern "C"
11862#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011863/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 builtin and then its argument prototype would still apply. */
11865char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011866int
11867main ()
11868{
11869__d6_pthread_create ();
11870 ;
11871 return 0;
11872}
11873_ACEOF
11874rm -f conftest.$ac_objext conftest$ac_exeext
11875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11876 (eval $ac_link) 2>&5
11877 ac_status=$?
11878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879 (exit $ac_status); } &&
11880 { ac_try='test -s conftest$ac_exeext'
11881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882 (eval $ac_try) 2>&5
11883 ac_status=$?
11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885 (exit $ac_status); }; }; then
11886 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011887else
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011889sed 's/^/| /' conftest.$ac_ext >&5
11890
Martin v. Löwis11437992002-04-12 09:54:03 +000011891ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011893rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11894LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011896echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11897echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11898if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11899 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011900#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011901_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011902
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011903 echo Systems with __d6_pthread_create are not supported anymore.
11904 echo See README
11905 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011906 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011907 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011908 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011909else
Guido van Rossum49545951997-12-02 19:28:29 +000011910
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11912echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11913if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011915else
Martin v. Löwis11437992002-04-12 09:54:03 +000011916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011917LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011918cat >conftest.$ac_ext <<_ACEOF
11919#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011920/* confdefs.h. */
11921_ACEOF
11922cat confdefs.h >>conftest.$ac_ext
11923cat >>conftest.$ac_ext <<_ACEOF
11924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011926/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011927#ifdef __cplusplus
11928extern "C"
11929#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011930/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 builtin and then its argument prototype would still apply. */
11932char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011933int
11934main ()
11935{
11936__pthread_create_system ();
11937 ;
11938 return 0;
11939}
11940_ACEOF
11941rm -f conftest.$ac_objext conftest$ac_exeext
11942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11943 (eval $ac_link) 2>&5
11944 ac_status=$?
11945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11946 (exit $ac_status); } &&
11947 { ac_try='test -s conftest$ac_exeext'
11948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11949 (eval $ac_try) 2>&5
11950 ac_status=$?
11951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952 (exit $ac_status); }; }; then
11953 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011954else
Martin v. Löwis11437992002-04-12 09:54:03 +000011955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011956sed 's/^/| /' conftest.$ac_ext >&5
11957
Martin v. Löwis11437992002-04-12 09:54:03 +000011958ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11961LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011963echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11964echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11965if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11966 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011967#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011968_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011969
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011970 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011971 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011972 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011973else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011974
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11976echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11977if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011979else
Martin v. Löwis11437992002-04-12 09:54:03 +000011980 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011981LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011982cat >conftest.$ac_ext <<_ACEOF
11983#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011984/* confdefs.h. */
11985_ACEOF
11986cat confdefs.h >>conftest.$ac_ext
11987cat >>conftest.$ac_ext <<_ACEOF
11988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011989
Guido van Rossumb93a8621998-05-07 13:27:32 +000011990/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011991#ifdef __cplusplus
11992extern "C"
11993#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011994/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011995 builtin and then its argument prototype would still apply. */
11996char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011997int
11998main ()
11999{
12000pthread_create ();
12001 ;
12002 return 0;
12003}
12004_ACEOF
12005rm -f conftest.$ac_objext conftest$ac_exeext
12006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12007 (eval $ac_link) 2>&5
12008 ac_status=$?
12009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010 (exit $ac_status); } &&
12011 { ac_try='test -s conftest$ac_exeext'
12012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12013 (eval $ac_try) 2>&5
12014 ac_status=$?
12015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12016 (exit $ac_status); }; }; then
12017 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012018else
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012020sed 's/^/| /' conftest.$ac_ext >&5
12021
Martin v. Löwis11437992002-04-12 09:54:03 +000012022ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012023fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012024rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12025LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012027echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12028echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12029if test $ac_cv_lib_cma_pthread_create = yes; then
12030 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012031#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012032_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012034 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012035 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012036 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012037else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012038
Martin v. Löwis130fb172001-07-19 11:00:41 +000012039 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012040fi
12041
Guido van Rossum627b2d71993-12-24 10:39:16 +000012042
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012043fi
12044
Guido van Rossum0be3e491997-05-22 20:33:33 +000012045fi
12046
Guido van Rossum49545951997-12-02 19:28:29 +000012047fi
12048
Guido van Rossumb93a8621998-05-07 13:27:32 +000012049fi
12050
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012051fi
12052
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012053
Michael W. Hudson54241132001-12-07 15:38:26 +000012054fi
12055
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012056
12057fi
12058
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12061fi;
12062fi
12063
12064
12065fi
12066
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012067
Michael W. Hudson54241132001-12-07 15:38:26 +000012068
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12070echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12071if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012073else
Martin v. Löwis11437992002-04-12 09:54:03 +000012074 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012075LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012076cat >conftest.$ac_ext <<_ACEOF
12077#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012078/* confdefs.h. */
12079_ACEOF
12080cat confdefs.h >>conftest.$ac_ext
12081cat >>conftest.$ac_ext <<_ACEOF
12082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012084/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012085#ifdef __cplusplus
12086extern "C"
12087#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012088/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 builtin and then its argument prototype would still apply. */
12090char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012091int
12092main ()
12093{
12094usconfig ();
12095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext conftest$ac_exeext
12100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12101 (eval $ac_link) 2>&5
12102 ac_status=$?
12103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104 (exit $ac_status); } &&
12105 { ac_try='test -s conftest$ac_exeext'
12106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12107 (eval $ac_try) 2>&5
12108 ac_status=$?
12109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110 (exit $ac_status); }; }; then
12111 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012112else
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012114sed 's/^/| /' conftest.$ac_ext >&5
12115
Martin v. Löwis11437992002-04-12 09:54:03 +000012116ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012118rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12119LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012121echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12122echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12123if test $ac_cv_lib_mpc_usconfig = yes; then
12124 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012126_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012127
Martin v. Löwis130fb172001-07-19 11:00:41 +000012128 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012129 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012130 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012131fi
12132
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012133
Neal Norwitza978ab02002-11-02 16:58:05 +000012134 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12136echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12137if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12138 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012139else
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012141LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012142cat >conftest.$ac_ext <<_ACEOF
12143#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012144/* confdefs.h. */
12145_ACEOF
12146cat confdefs.h >>conftest.$ac_ext
12147cat >>conftest.$ac_ext <<_ACEOF
12148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012150/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012151#ifdef __cplusplus
12152extern "C"
12153#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012154/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 builtin and then its argument prototype would still apply. */
12156char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012157int
12158main ()
12159{
12160thr_create ();
12161 ;
12162 return 0;
12163}
12164_ACEOF
12165rm -f conftest.$ac_objext conftest$ac_exeext
12166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12167 (eval $ac_link) 2>&5
12168 ac_status=$?
12169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12170 (exit $ac_status); } &&
12171 { ac_try='test -s conftest$ac_exeext'
12172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12173 (eval $ac_try) 2>&5
12174 ac_status=$?
12175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176 (exit $ac_status); }; }; then
12177 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012178else
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012180sed 's/^/| /' conftest.$ac_ext >&5
12181
Martin v. Löwis11437992002-04-12 09:54:03 +000012182ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12185LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012187echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12188echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12189if test $ac_cv_lib_thread_thr_create = yes; then
12190 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012191#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012192_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012193
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012194 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012195 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012196 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012197fi
12198
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012199 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012200
Martin v. Löwis130fb172001-07-19 11:00:41 +000012201 if test "$USE_THREAD_MODULE" != "#"
12202 then
12203 # If the above checks didn't disable threads, (at least) OSF1
12204 # needs this '-threads' argument during linking.
12205 case $ac_sys_system in
12206 OSF1) LDLAST=-threads;;
12207 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012208 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012209fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012210
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012211if test "$posix_threads" = "yes"; then
12212 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012213
12214cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012215#define _POSIX_THREADS 1
12216_ACEOF
12217
12218 fi
12219
12220 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12221 case $ac_sys_system/$ac_sys_release in
12222 SunOS/5.6)
12223cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012224#define HAVE_PTHREAD_DESTRUCTOR 1
12225_ACEOF
12226
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012227 ;;
12228 SunOS/5.8)
12229cat >>confdefs.h <<\_ACEOF
12230#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12231_ACEOF
12232
12233 ;;
12234 esac
12235
12236 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12237echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12238 if test "${ac_cv_pthread_system_supported+set}" = set; then
12239 echo $ECHO_N "(cached) $ECHO_C" >&6
12240else
12241 if test "$cross_compiling" = yes; then
12242 ac_cv_pthread_system_supported=no
12243else
12244 cat >conftest.$ac_ext <<_ACEOF
12245#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012246/* confdefs.h. */
12247_ACEOF
12248cat confdefs.h >>conftest.$ac_ext
12249cat >>conftest.$ac_ext <<_ACEOF
12250/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012251#include <pthread.h>
12252 void *foo(void *parm) {
12253 return NULL;
12254 }
12255 main() {
12256 pthread_attr_t attr;
12257 pthread_t id;
12258 if (pthread_attr_init(&attr)) exit(-1);
12259 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12260 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12261 exit(0);
12262 }
12263_ACEOF
12264rm -f conftest$ac_exeext
12265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12266 (eval $ac_link) 2>&5
12267 ac_status=$?
12268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12271 (eval $ac_try) 2>&5
12272 ac_status=$?
12273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274 (exit $ac_status); }; }; then
12275 ac_cv_pthread_system_supported=yes
12276else
12277 echo "$as_me: program exited with status $ac_status" >&5
12278echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012279sed 's/^/| /' conftest.$ac_ext >&5
12280
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012281( exit $ac_status )
12282ac_cv_pthread_system_supported=no
12283fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012284rm -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 +000012285fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012286
Guido van Rossum627b2d71993-12-24 10:39:16 +000012287fi
12288
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012289 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12290echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12291 if test "$ac_cv_pthread_system_supported" = "yes"; then
12292
12293cat >>confdefs.h <<\_ACEOF
12294#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12295_ACEOF
12296
12297 fi
12298
12299for ac_func in pthread_sigmask
12300do
12301as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12302echo "$as_me:$LINENO: checking for $ac_func" >&5
12303echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12304if eval "test \"\${$as_ac_var+set}\" = set"; then
12305 echo $ECHO_N "(cached) $ECHO_C" >&6
12306else
12307 cat >conftest.$ac_ext <<_ACEOF
12308#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012309/* confdefs.h. */
12310_ACEOF
12311cat confdefs.h >>conftest.$ac_ext
12312cat >>conftest.$ac_ext <<_ACEOF
12313/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012314/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012315 which can conflict with char $ac_func (); below.
12316 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012317 <limits.h> exists even on freestanding compilers. Under hpux,
12318 including <limits.h> includes <sys/time.h> and causes problems
12319 checking for functions defined therein. */
12320#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012321# include <limits.h>
12322#else
12323# include <assert.h>
12324#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012325/* Override any gcc2 internal prototype to avoid an error. */
12326#ifdef __cplusplus
12327extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012328{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012329#endif
12330/* We use char because int might match the return type of a gcc2
12331 builtin and then its argument prototype would still apply. */
12332char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012333/* The GNU C library defines this for functions which it implements
12334 to always fail with ENOSYS. Some functions are actually named
12335 something starting with __ and the normal name is an alias. */
12336#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12337choke me
12338#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012339char (*f) () = $ac_func;
12340#endif
12341#ifdef __cplusplus
12342}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012343#endif
12344
Skip Montanaro6dead952003-09-25 14:50:04 +000012345int
12346main ()
12347{
12348return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012349 ;
12350 return 0;
12351}
12352_ACEOF
12353rm -f conftest.$ac_objext conftest$ac_exeext
12354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12355 (eval $ac_link) 2>&5
12356 ac_status=$?
12357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12358 (exit $ac_status); } &&
12359 { ac_try='test -s conftest$ac_exeext'
12360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12361 (eval $ac_try) 2>&5
12362 ac_status=$?
12363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12364 (exit $ac_status); }; }; then
12365 eval "$as_ac_var=yes"
12366else
12367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012368sed 's/^/| /' conftest.$ac_ext >&5
12369
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012370eval "$as_ac_var=no"
12371fi
12372rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12373fi
12374echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12375echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12376if test `eval echo '${'$as_ac_var'}'` = yes; then
12377 cat >>confdefs.h <<_ACEOF
12378#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12379_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012380 case $ac_sys_system in
12381 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012382
Jason Tishlerfac083d2003-07-22 15:20:49 +000012383cat >>confdefs.h <<\_ACEOF
12384#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12385_ACEOF
12386
12387 ;;
12388 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012389fi
12390done
12391
12392fi
12393
12394
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012395# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012396
12397
12398echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12399echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012400# Check whether --enable-ipv6 or --disable-ipv6 was given.
12401if test "${enable_ipv6+set}" = set; then
12402 enableval="$enable_ipv6"
12403 case "$enableval" in
12404 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012405 echo "$as_me:$LINENO: result: no" >&5
12406echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012407 ipv6=no
12408 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 *) echo "$as_me:$LINENO: result: yes" >&5
12410echo "${ECHO_T}yes" >&6
12411 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012412#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012413_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012414
12415 ipv6=yes
12416 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012418else
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012420 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 echo "$as_me:$LINENO: result: no" >&5
12422echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012423 ipv6=no
12424
12425else
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 cat >conftest.$ac_ext <<_ACEOF
12427#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* confdefs.h. */
12429_ACEOF
12430cat confdefs.h >>conftest.$ac_ext
12431cat >>conftest.$ac_ext <<_ACEOF
12432/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012433 /* AF_INET6 available check */
12434#include <sys/types.h>
12435#include <sys/socket.h>
12436main()
12437{
12438 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12439 exit(1);
12440 else
12441 exit(0);
12442}
12443
Martin v. Löwis11437992002-04-12 09:54:03 +000012444_ACEOF
12445rm -f conftest$ac_exeext
12446if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12447 (eval $ac_link) 2>&5
12448 ac_status=$?
12449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12450 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12452 (eval $ac_try) 2>&5
12453 ac_status=$?
12454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12455 (exit $ac_status); }; }; then
12456 echo "$as_me:$LINENO: result: yes" >&5
12457echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012458 ipv6=yes
12459else
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 echo "$as_me: program exited with status $ac_status" >&5
12461echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012462sed 's/^/| /' conftest.$ac_ext >&5
12463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464( exit $ac_status )
12465echo "$as_me:$LINENO: result: no" >&5
12466echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012467 ipv6=no
12468fi
Skip Montanaro6dead952003-09-25 14:50:04 +000012469rm -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 +000012470fi
12471
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012472if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12474echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12475 cat >conftest.$ac_ext <<_ACEOF
12476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* confdefs.h. */
12478_ACEOF
12479cat confdefs.h >>conftest.$ac_ext
12480cat >>conftest.$ac_ext <<_ACEOF
12481/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012482#include <sys/types.h>
12483#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012487struct sockaddr_in6 x;
12488x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 ;
12490 return 0;
12491}
12492_ACEOF
12493rm -f conftest.$ac_objext
12494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12495 (eval $ac_compile) 2>&5
12496 ac_status=$?
12497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12498 (exit $ac_status); } &&
12499 { ac_try='test -s conftest.$ac_objext'
12500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12501 (eval $ac_try) 2>&5
12502 ac_status=$?
12503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504 (exit $ac_status); }; }; then
12505 echo "$as_me:$LINENO: result: yes" >&5
12506echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012507 ipv6=yes
12508else
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012510sed 's/^/| /' conftest.$ac_ext >&5
12511
Martin v. Löwis11437992002-04-12 09:54:03 +000012512echo "$as_me:$LINENO: result: no" >&5
12513echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012514 ipv6=no
12515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012516rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012517fi
12518
12519if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012521#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012522_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012523
12524fi
12525
Martin v. Löwis11437992002-04-12 09:54:03 +000012526fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012527
12528ipv6type=unknown
12529ipv6lib=none
12530ipv6trylibc=no
12531
12532if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12534echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012535 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12536 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012537 case $i in
12538 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 cat >conftest.$ac_ext <<_ACEOF
12540#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012541/* confdefs.h. */
12542_ACEOF
12543cat confdefs.h >>conftest.$ac_ext
12544cat >>conftest.$ac_ext <<_ACEOF
12545/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012546
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012547#include <netinet/in.h>
12548#ifdef IPV6_INRIA_VERSION
12549yes
12550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012551_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012553 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012554 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012555fi
12556rm -f conftest*
12557
12558 ;;
12559 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012560 cat >conftest.$ac_ext <<_ACEOF
12561#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012567
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012568#include <netinet/in.h>
12569#ifdef __KAME__
12570yes
12571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012572_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012573if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012574 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012575 ipv6type=$i;
12576 ipv6lib=inet6
12577 ipv6libdir=/usr/local/v6/lib
12578 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012579fi
12580rm -f conftest*
12581
12582 ;;
12583 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 cat >conftest.$ac_ext <<_ACEOF
12585#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012586/* confdefs.h. */
12587_ACEOF
12588cat confdefs.h >>conftest.$ac_ext
12589cat >>conftest.$ac_ext <<_ACEOF
12590/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012591
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012592#include <features.h>
12593#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12594yes
12595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012596_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012598 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012599 ipv6type=$i;
12600 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012601fi
12602rm -f conftest*
12603
12604 ;;
12605 linux-inet6)
12606 if test -d /usr/inet6; then
12607 ipv6type=$i
12608 ipv6lib=inet6
12609 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012610 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012611 fi
12612 ;;
12613 solaris)
12614 if test -f /etc/netconfig; then
12615 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12616 ipv6type=$i
12617 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012618 fi
12619 fi
12620 ;;
12621 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 cat >conftest.$ac_ext <<_ACEOF
12623#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012629
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012630#include <sys/param.h>
12631#ifdef _TOSHIBA_INET6
12632yes
12633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012634_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012636 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012637 ipv6type=$i;
12638 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012639 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012640fi
12641rm -f conftest*
12642
12643 ;;
12644 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 cat >conftest.$ac_ext <<_ACEOF
12646#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* confdefs.h. */
12648_ACEOF
12649cat confdefs.h >>conftest.$ac_ext
12650cat >>conftest.$ac_ext <<_ACEOF
12651/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012652
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012653#include </usr/local/v6/include/sys/v6config.h>
12654#ifdef __V6D__
12655yes
12656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012657_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012659 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012660 ipv6type=$i;
12661 ipv6lib=v6;
12662 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012663 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012664fi
12665rm -f conftest*
12666
12667 ;;
12668 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 cat >conftest.$ac_ext <<_ACEOF
12670#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012671/* confdefs.h. */
12672_ACEOF
12673cat confdefs.h >>conftest.$ac_ext
12674cat >>conftest.$ac_ext <<_ACEOF
12675/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012676
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012677#include <sys/param.h>
12678#ifdef _ZETA_MINAMI_INET6
12679yes
12680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012681_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012683 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012684 ipv6type=$i;
12685 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012686 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012687fi
12688rm -f conftest*
12689
12690 ;;
12691 esac
12692 if test "$ipv6type" != "unknown"; then
12693 break
12694 fi
12695 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 echo "$as_me:$LINENO: result: $ipv6type" >&5
12697echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012698fi
12699
12700if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12701 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12702 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12703 echo "using lib$ipv6lib"
12704 else
12705 if test $ipv6trylibc = "yes"; then
12706 echo "using libc"
12707 else
12708 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12709 echo "You need to fetch lib$ipv6lib.a from appropriate"
12710 echo 'ipv6 kit and compile beforehand.'
12711 exit 1
12712 fi
12713 fi
12714fi
12715
Jack Jansen7b8c7542002-04-14 20:12:41 +000012716# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012717echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12718echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012719
12720# Check whether --with-universal-newlines or --without-universal-newlines was given.
12721if test "${with_universal_newlines+set}" = set; then
12722 withval="$with_universal_newlines"
12723
12724fi;
12725
12726if test -z "$with_universal_newlines"
12727then with_universal_newlines="yes"
12728fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012729if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012730then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012731 echo --without-universal-newlines is unsupported, see README
12732 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012733else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012734
12735cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012736#define WITH_UNIVERSAL_NEWLINES 1
12737_ACEOF
12738
12739fi
12740echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12741echo "${ECHO_T}$with_universal_newlines" >&6
12742
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012743# Check for --with-doc-strings
12744echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12745echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12746
12747# Check whether --with-doc-strings or --without-doc-strings was given.
12748if test "${with_doc_strings+set}" = set; then
12749 withval="$with_doc_strings"
12750
12751fi;
12752
12753if test -z "$with_doc_strings"
12754then with_doc_strings="yes"
12755fi
12756if test "$with_doc_strings" != "no"
12757then
12758
12759cat >>confdefs.h <<\_ACEOF
12760#define WITH_DOC_STRINGS 1
12761_ACEOF
12762
12763fi
12764echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12765echo "${ECHO_T}$with_doc_strings" >&6
12766
Neil Schemenauera35c6882001-02-27 04:45:05 +000012767# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012768echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12769echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12770
Neil Schemenauera35c6882001-02-27 04:45:05 +000012771# Check whether --with-pymalloc or --without-pymalloc was given.
12772if test "${with_pymalloc+set}" = set; then
12773 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012774
Martin v. Löwis11437992002-04-12 09:54:03 +000012775fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012776
Neil Schemenauer16c22972002-03-22 15:34:49 +000012777if test -z "$with_pymalloc"
12778then with_pymalloc="yes"
12779fi
12780if test "$with_pymalloc" != "no"
12781then
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
12783cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012784#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012785_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012786
12787fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012788echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12789echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012790
Barry Warsawef82cd72000-06-30 16:21:01 +000012791# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012792echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12793echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12794
Barry Warsawef82cd72000-06-30 16:21:01 +000012795# Check whether --with-wctype-functions or --without-wctype-functions was given.
12796if test "${with_wctype_functions+set}" = set; then
12797 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Barry Warsawef82cd72000-06-30 16:21:01 +000012799if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012800then
12801
12802cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012803#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012804_ACEOF
12805
12806 echo "$as_me:$LINENO: result: yes" >&5
12807echo "${ECHO_T}yes" >&6
12808else echo "$as_me:$LINENO: result: no" >&5
12809echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012810fi
12811else
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 echo "$as_me:$LINENO: result: no" >&5
12813echo "${ECHO_T}no" >&6
12814fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012816# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012817
Guido van Rossum98935bf2001-09-05 19:13:16 +000012818DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012819
Martin v. Löwis11437992002-04-12 09:54:03 +000012820echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12821echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12822
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012823# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012824if test "${with_sgi_dl+set}" = set; then
12825 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012826
12827echo "$as_me:$LINENO: result: $withval" >&5
12828echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012829echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012830exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012831
12832cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012834_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012835
Guido van Rossume97ee181999-12-20 21:27:22 +000012836DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012837dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012838if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012839then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012840else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12841echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12842 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012843fi
12844DLINCLDIR=${dldir}
12845LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012846else
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 echo "$as_me:$LINENO: result: no" >&5
12848echo "${ECHO_T}no" >&6
12849fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012850
Martin v. Löwis11437992002-04-12 09:54:03 +000012851echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12852echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012854# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012855if test "${with_dl_dld+set}" = set; then
12856 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
12858echo "$as_me:$LINENO: result: $withval" >&5
12859echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012860echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012861exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
12863cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012864#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012865_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012866
Guido van Rossume97ee181999-12-20 21:27:22 +000012867DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012868dldir=`echo "$withval" | sed 's/,.*//'`
12869dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012870if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012871then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012872else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12873echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12874 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012875fi
12876DLINCLDIR=${dldir}
12877LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012878else
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 echo "$as_me:$LINENO: result: no" >&5
12880echo "${ECHO_T}no" >&6
12881fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012882
Guido van Rossume97ee181999-12-20 21:27:22 +000012883# the dlopen() function means we might want to use dynload_shlib.o. some
12884# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Thomas Wouters3a584202000-08-05 23:28:51 +000012886for ac_func in dlopen
12887do
Martin v. Löwis11437992002-04-12 09:54:03 +000012888as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12889echo "$as_me:$LINENO: checking for $ac_func" >&5
12890echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12891if eval "test \"\${$as_ac_var+set}\" = set"; then
12892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012893else
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 cat >conftest.$ac_ext <<_ACEOF
12895#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* confdefs.h. */
12897_ACEOF
12898cat confdefs.h >>conftest.$ac_ext
12899cat >>conftest.$ac_ext <<_ACEOF
12900/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012901/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012902 which can conflict with char $ac_func (); below.
12903 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012904 <limits.h> exists even on freestanding compilers. Under hpux,
12905 including <limits.h> includes <sys/time.h> and causes problems
12906 checking for functions defined therein. */
12907#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012908# include <limits.h>
12909#else
12910# include <assert.h>
12911#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012912/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012913#ifdef __cplusplus
12914extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012915{
Martin v. Löwis11437992002-04-12 09:54:03 +000012916#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012917/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 builtin and then its argument prototype would still apply. */
12919char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012920/* The GNU C library defines this for functions which it implements
12921 to always fail with ENOSYS. Some functions are actually named
12922 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012923#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012924choke me
12925#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012926char (*f) () = $ac_func;
12927#endif
12928#ifdef __cplusplus
12929}
Guido van Rossume97ee181999-12-20 21:27:22 +000012930#endif
12931
Skip Montanaro6dead952003-09-25 14:50:04 +000012932int
12933main ()
12934{
12935return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ;
12937 return 0;
12938}
12939_ACEOF
12940rm -f conftest.$ac_objext conftest$ac_exeext
12941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12942 (eval $ac_link) 2>&5
12943 ac_status=$?
12944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12945 (exit $ac_status); } &&
12946 { ac_try='test -s conftest$ac_exeext'
12947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12948 (eval $ac_try) 2>&5
12949 ac_status=$?
12950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12951 (exit $ac_status); }; }; then
12952 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012953else
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012955sed 's/^/| /' conftest.$ac_ext >&5
12956
Martin v. Löwis11437992002-04-12 09:54:03 +000012957eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012961echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12962echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12963if test `eval echo '${'$as_ac_var'}'` = yes; then
12964 cat >>confdefs.h <<_ACEOF
12965#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12966_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012967
Guido van Rossume97ee181999-12-20 21:27:22 +000012968fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012969done
Guido van Rossume97ee181999-12-20 21:27:22 +000012970
Michael W. Hudson54241132001-12-07 15:38:26 +000012971
Guido van Rossume97ee181999-12-20 21:27:22 +000012972# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12973# loading of modules.
12974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12976echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012977if test -z "$DYNLOADFILE"
12978then
12979 case $ac_sys_system/$ac_sys_release in
12980 AIX*) DYNLOADFILE="dynload_aix.o";;
12981 BeOS*) DYNLOADFILE="dynload_beos.o";;
12982 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012983 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012984 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012985 *)
12986 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12987 # out any dynamic loading
12988 if test "$ac_cv_func_dlopen" = yes
12989 then DYNLOADFILE="dynload_shlib.o"
12990 else DYNLOADFILE="dynload_stub.o"
12991 fi
12992 ;;
12993 esac
12994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012995echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12996echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012997if test "$DYNLOADFILE" != "dynload_stub.o"
12998then
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
13000cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013001#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013002_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013003
13004fi
13005
Neil Schemenauer4e425612001-06-19 15:44:15 +000013006# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13007
Michael W. Hudson54241132001-12-07 15:38:26 +000013008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13010echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013011if test -z "$MACHDEP_OBJS"
13012then
Jack Jansene578a632001-08-15 01:27:14 +000013013 MACHDEP_OBJS=$extra_machdep_objs
13014else
13015 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013016fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013017echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13018echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013019
Guido van Rossum627b2d71993-12-24 10:39:16 +000013020# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
Martin v. Löwisd5843682002-11-21 20:41:28 +000013092for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013093 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013094 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
13095 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013096 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013097 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013098 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013099 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013100 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013101 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013102 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013103 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013104do
Martin v. Löwis11437992002-04-12 09:54:03 +000013105as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13106echo "$as_me:$LINENO: checking for $ac_func" >&5
13107echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13108if eval "test \"\${$as_ac_var+set}\" = set"; then
13109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013110else
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 cat >conftest.$ac_ext <<_ACEOF
13112#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* confdefs.h. */
13114_ACEOF
13115cat confdefs.h >>conftest.$ac_ext
13116cat >>conftest.$ac_ext <<_ACEOF
13117/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013118/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013119 which can conflict with char $ac_func (); below.
13120 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013121 <limits.h> exists even on freestanding compilers. Under hpux,
13122 including <limits.h> includes <sys/time.h> and causes problems
13123 checking for functions defined therein. */
13124#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013125# include <limits.h>
13126#else
13127# include <assert.h>
13128#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013129/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013130#ifdef __cplusplus
13131extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013132{
Martin v. Löwis11437992002-04-12 09:54:03 +000013133#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013134/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 builtin and then its argument prototype would still apply. */
13136char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013137/* The GNU C library defines this for functions which it implements
13138 to always fail with ENOSYS. Some functions are actually named
13139 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013140#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013141choke me
13142#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013143char (*f) () = $ac_func;
13144#endif
13145#ifdef __cplusplus
13146}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013147#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148
Skip Montanaro6dead952003-09-25 14:50:04 +000013149int
13150main ()
13151{
13152return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext conftest$ac_exeext
13158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13159 (eval $ac_link) 2>&5
13160 ac_status=$?
13161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162 (exit $ac_status); } &&
13163 { ac_try='test -s conftest$ac_exeext'
13164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13165 (eval $ac_try) 2>&5
13166 ac_status=$?
13167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13168 (exit $ac_status); }; }; then
13169 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013170else
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013172sed 's/^/| /' conftest.$ac_ext >&5
13173
Martin v. Löwis11437992002-04-12 09:54:03 +000013174eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013178echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13179echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13180if test `eval echo '${'$as_ac_var'}'` = yes; then
13181 cat >>confdefs.h <<_ACEOF
13182#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13183_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013184
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013185fi
13186done
13187
Michael W. Hudson54241132001-12-07 15:38:26 +000013188
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013189# For some functions, having a definition is not sufficient, since
13190# we want to take their address.
13191echo "$as_me:$LINENO: checking for chroot" >&5
13192echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13193cat >conftest.$ac_ext <<_ACEOF
13194#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013195/* confdefs.h. */
13196_ACEOF
13197cat confdefs.h >>conftest.$ac_ext
13198cat >>conftest.$ac_ext <<_ACEOF
13199/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013200#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013201int
13202main ()
13203{
13204void *x=chroot
13205 ;
13206 return 0;
13207}
13208_ACEOF
13209rm -f conftest.$ac_objext
13210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13211 (eval $ac_compile) 2>&5
13212 ac_status=$?
13213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214 (exit $ac_status); } &&
13215 { ac_try='test -s conftest.$ac_objext'
13216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13217 (eval $ac_try) 2>&5
13218 ac_status=$?
13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220 (exit $ac_status); }; }; then
13221
13222cat >>confdefs.h <<\_ACEOF
13223#define HAVE_CHROOT 1
13224_ACEOF
13225
13226 echo "$as_me:$LINENO: result: yes" >&5
13227echo "${ECHO_T}yes" >&6
13228else
13229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013230sed 's/^/| /' conftest.$ac_ext >&5
13231
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013232echo "$as_me:$LINENO: result: no" >&5
13233echo "${ECHO_T}no" >&6
13234
13235fi
13236rm -f conftest.$ac_objext conftest.$ac_ext
13237echo "$as_me:$LINENO: checking for link" >&5
13238echo $ECHO_N "checking for link... $ECHO_C" >&6
13239cat >conftest.$ac_ext <<_ACEOF
13240#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013241/* confdefs.h. */
13242_ACEOF
13243cat confdefs.h >>conftest.$ac_ext
13244cat >>conftest.$ac_ext <<_ACEOF
13245/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013246#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013247int
13248main ()
13249{
13250void *x=link
13251 ;
13252 return 0;
13253}
13254_ACEOF
13255rm -f conftest.$ac_objext
13256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13257 (eval $ac_compile) 2>&5
13258 ac_status=$?
13259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260 (exit $ac_status); } &&
13261 { ac_try='test -s conftest.$ac_objext'
13262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13263 (eval $ac_try) 2>&5
13264 ac_status=$?
13265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13266 (exit $ac_status); }; }; then
13267
13268cat >>confdefs.h <<\_ACEOF
13269#define HAVE_LINK 1
13270_ACEOF
13271
13272 echo "$as_me:$LINENO: result: yes" >&5
13273echo "${ECHO_T}yes" >&6
13274else
13275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013276sed 's/^/| /' conftest.$ac_ext >&5
13277
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013278echo "$as_me:$LINENO: result: no" >&5
13279echo "${ECHO_T}no" >&6
13280
13281fi
13282rm -f conftest.$ac_objext conftest.$ac_ext
13283echo "$as_me:$LINENO: checking for symlink" >&5
13284echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13285cat >conftest.$ac_ext <<_ACEOF
13286#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013287/* confdefs.h. */
13288_ACEOF
13289cat confdefs.h >>conftest.$ac_ext
13290cat >>conftest.$ac_ext <<_ACEOF
13291/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013292#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013293int
13294main ()
13295{
13296void *x=symlink
13297 ;
13298 return 0;
13299}
13300_ACEOF
13301rm -f conftest.$ac_objext
13302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13303 (eval $ac_compile) 2>&5
13304 ac_status=$?
13305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13306 (exit $ac_status); } &&
13307 { ac_try='test -s conftest.$ac_objext'
13308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13309 (eval $ac_try) 2>&5
13310 ac_status=$?
13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312 (exit $ac_status); }; }; then
13313
13314cat >>confdefs.h <<\_ACEOF
13315#define HAVE_SYMLINK 1
13316_ACEOF
13317
13318 echo "$as_me:$LINENO: result: yes" >&5
13319echo "${ECHO_T}yes" >&6
13320else
13321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013322sed 's/^/| /' conftest.$ac_ext >&5
13323
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013324echo "$as_me:$LINENO: result: no" >&5
13325echo "${ECHO_T}no" >&6
13326
13327fi
13328rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013329echo "$as_me:$LINENO: checking for fchdir" >&5
13330echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13331cat >conftest.$ac_ext <<_ACEOF
13332#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013333/* confdefs.h. */
13334_ACEOF
13335cat confdefs.h >>conftest.$ac_ext
13336cat >>conftest.$ac_ext <<_ACEOF
13337/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013338#include <unistd.h>
13339int
13340main ()
13341{
13342void *x=fchdir
13343 ;
13344 return 0;
13345}
13346_ACEOF
13347rm -f conftest.$ac_objext
13348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13349 (eval $ac_compile) 2>&5
13350 ac_status=$?
13351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13352 (exit $ac_status); } &&
13353 { ac_try='test -s conftest.$ac_objext'
13354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13355 (eval $ac_try) 2>&5
13356 ac_status=$?
13357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13358 (exit $ac_status); }; }; then
13359
13360cat >>confdefs.h <<\_ACEOF
13361#define HAVE_FCHDIR 1
13362_ACEOF
13363
13364 echo "$as_me:$LINENO: result: yes" >&5
13365echo "${ECHO_T}yes" >&6
13366else
13367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013368sed 's/^/| /' conftest.$ac_ext >&5
13369
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013370echo "$as_me:$LINENO: result: no" >&5
13371echo "${ECHO_T}no" >&6
13372
13373fi
13374rm -f conftest.$ac_objext conftest.$ac_ext
13375echo "$as_me:$LINENO: checking for fsync" >&5
13376echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13377cat >conftest.$ac_ext <<_ACEOF
13378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013379/* confdefs.h. */
13380_ACEOF
13381cat confdefs.h >>conftest.$ac_ext
13382cat >>conftest.$ac_ext <<_ACEOF
13383/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013384#include <unistd.h>
13385int
13386main ()
13387{
13388void *x=fsync
13389 ;
13390 return 0;
13391}
13392_ACEOF
13393rm -f conftest.$ac_objext
13394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13395 (eval $ac_compile) 2>&5
13396 ac_status=$?
13397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13398 (exit $ac_status); } &&
13399 { ac_try='test -s conftest.$ac_objext'
13400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13401 (eval $ac_try) 2>&5
13402 ac_status=$?
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); }; }; then
13405
13406cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013407#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013408_ACEOF
13409
13410 echo "$as_me:$LINENO: result: yes" >&5
13411echo "${ECHO_T}yes" >&6
13412else
13413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013414sed 's/^/| /' conftest.$ac_ext >&5
13415
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013416echo "$as_me:$LINENO: result: no" >&5
13417echo "${ECHO_T}no" >&6
13418
13419fi
13420rm -f conftest.$ac_objext conftest.$ac_ext
13421echo "$as_me:$LINENO: checking for fdatasync" >&5
13422echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13423cat >conftest.$ac_ext <<_ACEOF
13424#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013425/* confdefs.h. */
13426_ACEOF
13427cat confdefs.h >>conftest.$ac_ext
13428cat >>conftest.$ac_ext <<_ACEOF
13429/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013430#include <unistd.h>
13431int
13432main ()
13433{
13434void *x=fdatasync
13435 ;
13436 return 0;
13437}
13438_ACEOF
13439rm -f conftest.$ac_objext
13440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13441 (eval $ac_compile) 2>&5
13442 ac_status=$?
13443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13444 (exit $ac_status); } &&
13445 { ac_try='test -s conftest.$ac_objext'
13446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13447 (eval $ac_try) 2>&5
13448 ac_status=$?
13449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450 (exit $ac_status); }; }; then
13451
13452cat >>confdefs.h <<\_ACEOF
13453#define HAVE_FDATASYNC 1
13454_ACEOF
13455
13456 echo "$as_me:$LINENO: result: yes" >&5
13457echo "${ECHO_T}yes" >&6
13458else
13459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013460sed 's/^/| /' conftest.$ac_ext >&5
13461
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013462echo "$as_me:$LINENO: result: no" >&5
13463echo "${ECHO_T}no" >&6
13464
13465fi
13466rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013467
Martin v. Löwisd5843682002-11-21 20:41:28 +000013468# On some systems (eg. FreeBSD 5), we would find a definition of the
13469# functions ctermid_r, setgroups in the library, but no prototype
13470# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13471# address to avoid compiler warnings and potential miscompilations
13472# because of the missing prototypes.
13473
13474echo "$as_me:$LINENO: checking for ctermid_r" >&5
13475echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13476cat >conftest.$ac_ext <<_ACEOF
13477#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013478/* confdefs.h. */
13479_ACEOF
13480cat confdefs.h >>conftest.$ac_ext
13481cat >>conftest.$ac_ext <<_ACEOF
13482/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013483
13484#include "confdefs.h"
13485#include <stdio.h>
13486
Martin v. Löwisd5843682002-11-21 20:41:28 +000013487int
13488main ()
13489{
13490void* p = ctermid_r
13491 ;
13492 return 0;
13493}
13494_ACEOF
13495rm -f conftest.$ac_objext
13496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13497 (eval $ac_compile) 2>&5
13498 ac_status=$?
13499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13500 (exit $ac_status); } &&
13501 { ac_try='test -s conftest.$ac_objext'
13502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13503 (eval $ac_try) 2>&5
13504 ac_status=$?
13505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506 (exit $ac_status); }; }; then
13507
13508cat >>confdefs.h <<\_ACEOF
13509#define HAVE_CTERMID_R 1
13510_ACEOF
13511
13512 echo "$as_me:$LINENO: result: yes" >&5
13513echo "${ECHO_T}yes" >&6
13514else
13515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013516sed 's/^/| /' conftest.$ac_ext >&5
13517
Martin v. Löwisd5843682002-11-21 20:41:28 +000013518echo "$as_me:$LINENO: result: no" >&5
13519echo "${ECHO_T}no" >&6
13520
13521fi
13522rm -f conftest.$ac_objext conftest.$ac_ext
13523
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013524echo "$as_me:$LINENO: checking for flock" >&5
13525echo $ECHO_N "checking for flock... $ECHO_C" >&6
13526cat >conftest.$ac_ext <<_ACEOF
13527#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* confdefs.h. */
13529_ACEOF
13530cat confdefs.h >>conftest.$ac_ext
13531cat >>conftest.$ac_ext <<_ACEOF
13532/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013533
13534#include "confdefs.h"
13535#include <sys/file.h>
13536
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013537int
13538main ()
13539{
13540void* p = flock
13541 ;
13542 return 0;
13543}
13544_ACEOF
13545rm -f conftest.$ac_objext
13546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13547 (eval $ac_compile) 2>&5
13548 ac_status=$?
13549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13550 (exit $ac_status); } &&
13551 { ac_try='test -s conftest.$ac_objext'
13552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13553 (eval $ac_try) 2>&5
13554 ac_status=$?
13555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13556 (exit $ac_status); }; }; then
13557
13558cat >>confdefs.h <<\_ACEOF
13559#define HAVE_FLOCK 1
13560_ACEOF
13561
13562 echo "$as_me:$LINENO: result: yes" >&5
13563echo "${ECHO_T}yes" >&6
13564else
13565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013566sed 's/^/| /' conftest.$ac_ext >&5
13567
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013568echo "$as_me:$LINENO: result: no" >&5
13569echo "${ECHO_T}no" >&6
13570
13571fi
13572rm -f conftest.$ac_objext conftest.$ac_ext
13573
13574echo "$as_me:$LINENO: checking for getpagesize" >&5
13575echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13576cat >conftest.$ac_ext <<_ACEOF
13577#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013578/* confdefs.h. */
13579_ACEOF
13580cat confdefs.h >>conftest.$ac_ext
13581cat >>conftest.$ac_ext <<_ACEOF
13582/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013583
13584#include "confdefs.h"
13585#include <unistd.h>
13586
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013587int
13588main ()
13589{
13590void* p = getpagesize
13591 ;
13592 return 0;
13593}
13594_ACEOF
13595rm -f conftest.$ac_objext
13596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13597 (eval $ac_compile) 2>&5
13598 ac_status=$?
13599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13600 (exit $ac_status); } &&
13601 { ac_try='test -s conftest.$ac_objext'
13602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13603 (eval $ac_try) 2>&5
13604 ac_status=$?
13605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13606 (exit $ac_status); }; }; then
13607
13608cat >>confdefs.h <<\_ACEOF
13609#define HAVE_GETPAGESIZE 1
13610_ACEOF
13611
13612 echo "$as_me:$LINENO: result: yes" >&5
13613echo "${ECHO_T}yes" >&6
13614else
13615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013616sed 's/^/| /' conftest.$ac_ext >&5
13617
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013618echo "$as_me:$LINENO: result: no" >&5
13619echo "${ECHO_T}no" >&6
13620
13621fi
13622rm -f conftest.$ac_objext conftest.$ac_ext
13623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013624for ac_prog in true
13625do
13626 # Extract the first word of "$ac_prog", so it can be a program name with args.
13627set dummy $ac_prog; ac_word=$2
13628echo "$as_me:$LINENO: checking for $ac_word" >&5
13629echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13630if test "${ac_cv_prog_TRUE+set}" = set; then
13631 echo $ECHO_N "(cached) $ECHO_C" >&6
13632else
13633 if test -n "$TRUE"; then
13634 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13635else
13636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13637for as_dir in $PATH
13638do
13639 IFS=$as_save_IFS
13640 test -z "$as_dir" && as_dir=.
13641 for ac_exec_ext in '' $ac_executable_extensions; do
13642 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13643 ac_cv_prog_TRUE="$ac_prog"
13644 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13645 break 2
13646 fi
13647done
13648done
13649
13650fi
13651fi
13652TRUE=$ac_cv_prog_TRUE
13653if test -n "$TRUE"; then
13654 echo "$as_me:$LINENO: result: $TRUE" >&5
13655echo "${ECHO_T}$TRUE" >&6
13656else
13657 echo "$as_me:$LINENO: result: no" >&5
13658echo "${ECHO_T}no" >&6
13659fi
13660
13661 test -n "$TRUE" && break
13662done
13663test -n "$TRUE" || TRUE="/bin/true"
13664
13665
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013666echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13667echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13668if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13669 echo $ECHO_N "(cached) $ECHO_C" >&6
13670else
13671 ac_check_lib_save_LIBS=$LIBS
13672LIBS="-lc $LIBS"
13673cat >conftest.$ac_ext <<_ACEOF
13674#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013675/* confdefs.h. */
13676_ACEOF
13677cat confdefs.h >>conftest.$ac_ext
13678cat >>conftest.$ac_ext <<_ACEOF
13679/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013680
13681/* Override any gcc2 internal prototype to avoid an error. */
13682#ifdef __cplusplus
13683extern "C"
13684#endif
13685/* We use char because int might match the return type of a gcc2
13686 builtin and then its argument prototype would still apply. */
13687char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013688int
13689main ()
13690{
13691inet_aton ();
13692 ;
13693 return 0;
13694}
13695_ACEOF
13696rm -f conftest.$ac_objext conftest$ac_exeext
13697if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13698 (eval $ac_link) 2>&5
13699 ac_status=$?
13700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13701 (exit $ac_status); } &&
13702 { ac_try='test -s conftest$ac_exeext'
13703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13704 (eval $ac_try) 2>&5
13705 ac_status=$?
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); }; }; then
13708 ac_cv_lib_c_inet_aton=yes
13709else
13710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013711sed 's/^/| /' conftest.$ac_ext >&5
13712
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013713ac_cv_lib_c_inet_aton=no
13714fi
13715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13716LIBS=$ac_check_lib_save_LIBS
13717fi
13718echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13719echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13720if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013721 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013722else
13723
13724echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13725echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13726if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13727 echo $ECHO_N "(cached) $ECHO_C" >&6
13728else
13729 ac_check_lib_save_LIBS=$LIBS
13730LIBS="-lresolv $LIBS"
13731cat >conftest.$ac_ext <<_ACEOF
13732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013733/* confdefs.h. */
13734_ACEOF
13735cat confdefs.h >>conftest.$ac_ext
13736cat >>conftest.$ac_ext <<_ACEOF
13737/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013738
13739/* Override any gcc2 internal prototype to avoid an error. */
13740#ifdef __cplusplus
13741extern "C"
13742#endif
13743/* We use char because int might match the return type of a gcc2
13744 builtin and then its argument prototype would still apply. */
13745char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013746int
13747main ()
13748{
13749inet_aton ();
13750 ;
13751 return 0;
13752}
13753_ACEOF
13754rm -f conftest.$ac_objext conftest$ac_exeext
13755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13756 (eval $ac_link) 2>&5
13757 ac_status=$?
13758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759 (exit $ac_status); } &&
13760 { ac_try='test -s conftest$ac_exeext'
13761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13762 (eval $ac_try) 2>&5
13763 ac_status=$?
13764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13765 (exit $ac_status); }; }; then
13766 ac_cv_lib_resolv_inet_aton=yes
13767else
13768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013769sed 's/^/| /' conftest.$ac_ext >&5
13770
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013771ac_cv_lib_resolv_inet_aton=no
13772fi
13773rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13774LIBS=$ac_check_lib_save_LIBS
13775fi
13776echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13777echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13778if test $ac_cv_lib_resolv_inet_aton = yes; then
13779 cat >>confdefs.h <<_ACEOF
13780#define HAVE_LIBRESOLV 1
13781_ACEOF
13782
13783 LIBS="-lresolv $LIBS"
13784
13785fi
13786
13787
13788fi
13789
13790
Martin v. Löwise9416172003-05-03 10:12:45 +000013791echo "$as_me:$LINENO: checking for hstrerror" >&5
13792echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13793cat >conftest.$ac_ext <<_ACEOF
13794#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* confdefs.h. */
13796_ACEOF
13797cat confdefs.h >>conftest.$ac_ext
13798cat >>conftest.$ac_ext <<_ACEOF
13799/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013800
13801#include "confdefs.h"
13802#include <netdb.h>
13803
Martin v. Löwise9416172003-05-03 10:12:45 +000013804int
13805main ()
13806{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013807void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013808 ;
13809 return 0;
13810}
13811_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013812rm -f conftest.$ac_objext conftest$ac_exeext
13813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13814 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013815 ac_status=$?
13816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013818 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13820 (eval $ac_try) 2>&5
13821 ac_status=$?
13822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13823 (exit $ac_status); }; }; then
13824
13825cat >>confdefs.h <<\_ACEOF
13826#define HAVE_HSTRERROR 1
13827_ACEOF
13828
13829 echo "$as_me:$LINENO: result: yes" >&5
13830echo "${ECHO_T}yes" >&6
13831else
13832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013833sed 's/^/| /' conftest.$ac_ext >&5
13834
Martin v. Löwise9416172003-05-03 10:12:45 +000013835echo "$as_me:$LINENO: result: no" >&5
13836echo "${ECHO_T}no" >&6
13837
13838fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013840
13841echo "$as_me:$LINENO: checking for inet_aton" >&5
13842echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13843cat >conftest.$ac_ext <<_ACEOF
13844#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013845/* confdefs.h. */
13846_ACEOF
13847cat confdefs.h >>conftest.$ac_ext
13848cat >>conftest.$ac_ext <<_ACEOF
13849/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013850
13851#include "confdefs.h"
13852#include <sys/socket.h>
13853#include <netinet/in.h>
13854#include <arpa/inet.h>
13855
Martin v. Löwise9416172003-05-03 10:12:45 +000013856int
13857main ()
13858{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013859void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013860 ;
13861 return 0;
13862}
13863_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013864rm -f conftest.$ac_objext conftest$ac_exeext
13865if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13866 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013867 ac_status=$?
13868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013870 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13872 (eval $ac_try) 2>&5
13873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); }; }; then
13876
13877cat >>confdefs.h <<\_ACEOF
13878#define HAVE_INET_ATON 1
13879_ACEOF
13880
13881 echo "$as_me:$LINENO: result: yes" >&5
13882echo "${ECHO_T}yes" >&6
13883else
13884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013885sed 's/^/| /' conftest.$ac_ext >&5
13886
Martin v. Löwise9416172003-05-03 10:12:45 +000013887echo "$as_me:$LINENO: result: no" >&5
13888echo "${ECHO_T}no" >&6
13889
13890fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013891rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013892
13893echo "$as_me:$LINENO: checking for inet_pton" >&5
13894echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13895cat >conftest.$ac_ext <<_ACEOF
13896#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013897/* confdefs.h. */
13898_ACEOF
13899cat confdefs.h >>conftest.$ac_ext
13900cat >>conftest.$ac_ext <<_ACEOF
13901/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013902
13903#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013904#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013905#include <sys/socket.h>
13906#include <netinet/in.h>
13907#include <arpa/inet.h>
13908
Martin v. Löwise9416172003-05-03 10:12:45 +000013909int
13910main ()
13911{
13912void* p = inet_pton
13913 ;
13914 return 0;
13915}
13916_ACEOF
13917rm -f conftest.$ac_objext
13918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13919 (eval $ac_compile) 2>&5
13920 ac_status=$?
13921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13922 (exit $ac_status); } &&
13923 { ac_try='test -s conftest.$ac_objext'
13924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13925 (eval $ac_try) 2>&5
13926 ac_status=$?
13927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13928 (exit $ac_status); }; }; then
13929
13930cat >>confdefs.h <<\_ACEOF
13931#define HAVE_INET_PTON 1
13932_ACEOF
13933
13934 echo "$as_me:$LINENO: result: yes" >&5
13935echo "${ECHO_T}yes" >&6
13936else
13937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013938sed 's/^/| /' conftest.$ac_ext >&5
13939
Martin v. Löwise9416172003-05-03 10:12:45 +000013940echo "$as_me:$LINENO: result: no" >&5
13941echo "${ECHO_T}no" >&6
13942
13943fi
13944rm -f conftest.$ac_objext conftest.$ac_ext
13945
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013946# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013947echo "$as_me:$LINENO: checking for setgroups" >&5
13948echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13949cat >conftest.$ac_ext <<_ACEOF
13950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013951/* confdefs.h. */
13952_ACEOF
13953cat confdefs.h >>conftest.$ac_ext
13954cat >>conftest.$ac_ext <<_ACEOF
13955/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013956
13957#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013958#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013959#ifdef HAVE_GRP_H
13960#include <grp.h>
13961#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013962
Martin v. Löwisd5843682002-11-21 20:41:28 +000013963int
13964main ()
13965{
13966void* p = setgroups
13967 ;
13968 return 0;
13969}
13970_ACEOF
13971rm -f conftest.$ac_objext
13972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13973 (eval $ac_compile) 2>&5
13974 ac_status=$?
13975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13976 (exit $ac_status); } &&
13977 { ac_try='test -s conftest.$ac_objext'
13978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13979 (eval $ac_try) 2>&5
13980 ac_status=$?
13981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13982 (exit $ac_status); }; }; then
13983
13984cat >>confdefs.h <<\_ACEOF
13985#define HAVE_SETGROUPS 1
13986_ACEOF
13987
13988 echo "$as_me:$LINENO: result: yes" >&5
13989echo "${ECHO_T}yes" >&6
13990else
13991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013992sed 's/^/| /' conftest.$ac_ext >&5
13993
Martin v. Löwisd5843682002-11-21 20:41:28 +000013994echo "$as_me:$LINENO: result: no" >&5
13995echo "${ECHO_T}no" >&6
13996
13997fi
13998rm -f conftest.$ac_objext conftest.$ac_ext
13999
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014000# check for openpty and forkpty
14001
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014003for ac_func in openpty
14004do
Martin v. Löwis11437992002-04-12 09:54:03 +000014005as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14006echo "$as_me:$LINENO: checking for $ac_func" >&5
14007echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14008if eval "test \"\${$as_ac_var+set}\" = set"; then
14009 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014010else
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 cat >conftest.$ac_ext <<_ACEOF
14012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014013/* confdefs.h. */
14014_ACEOF
14015cat confdefs.h >>conftest.$ac_ext
14016cat >>conftest.$ac_ext <<_ACEOF
14017/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014018/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014019 which can conflict with char $ac_func (); below.
14020 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014021 <limits.h> exists even on freestanding compilers. Under hpux,
14022 including <limits.h> includes <sys/time.h> and causes problems
14023 checking for functions defined therein. */
14024#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014025# include <limits.h>
14026#else
14027# include <assert.h>
14028#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014029/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014030#ifdef __cplusplus
14031extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014032{
Martin v. Löwis11437992002-04-12 09:54:03 +000014033#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014034/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 builtin and then its argument prototype would still apply. */
14036char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014037/* The GNU C library defines this for functions which it implements
14038 to always fail with ENOSYS. Some functions are actually named
14039 something starting with __ and the normal name is an alias. */
14040#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14041choke me
14042#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014043char (*f) () = $ac_func;
14044#endif
14045#ifdef __cplusplus
14046}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014047#endif
14048
Skip Montanaro6dead952003-09-25 14:50:04 +000014049int
14050main ()
14051{
14052return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ;
14054 return 0;
14055}
14056_ACEOF
14057rm -f conftest.$ac_objext conftest$ac_exeext
14058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14059 (eval $ac_link) 2>&5
14060 ac_status=$?
14061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14062 (exit $ac_status); } &&
14063 { ac_try='test -s conftest$ac_exeext'
14064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14065 (eval $ac_try) 2>&5
14066 ac_status=$?
14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068 (exit $ac_status); }; }; then
14069 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014070else
Martin v. Löwis11437992002-04-12 09:54:03 +000014071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014072sed 's/^/| /' conftest.$ac_ext >&5
14073
Martin v. Löwis11437992002-04-12 09:54:03 +000014074eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014075fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014076rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014078echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14079echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14080if test `eval echo '${'$as_ac_var'}'` = yes; then
14081 cat >>confdefs.h <<_ACEOF
14082#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14083_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014084
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014085else
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14087echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14088if test "${ac_cv_lib_util_openpty+set}" = set; then
14089 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014090else
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014092LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014093cat >conftest.$ac_ext <<_ACEOF
14094#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014095/* confdefs.h. */
14096_ACEOF
14097cat confdefs.h >>conftest.$ac_ext
14098cat >>conftest.$ac_ext <<_ACEOF
14099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014100
Fred Drake8cef4cf2000-06-28 16:40:38 +000014101/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014102#ifdef __cplusplus
14103extern "C"
14104#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014105/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 builtin and then its argument prototype would still apply. */
14107char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014108int
14109main ()
14110{
14111openpty ();
14112 ;
14113 return 0;
14114}
14115_ACEOF
14116rm -f conftest.$ac_objext conftest$ac_exeext
14117if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14118 (eval $ac_link) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); } &&
14122 { ac_try='test -s conftest$ac_exeext'
14123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124 (eval $ac_try) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); }; }; then
14128 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014129else
Martin v. Löwis11437992002-04-12 09:54:03 +000014130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014131sed 's/^/| /' conftest.$ac_ext >&5
14132
Martin v. Löwis11437992002-04-12 09:54:03 +000014133ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14136LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014138echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14139echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14140if test $ac_cv_lib_util_openpty = yes; then
14141 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014142#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014143_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014144 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014145fi
14146
14147fi
14148done
14149
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
Fred Drake8cef4cf2000-06-28 16:40:38 +000014151for ac_func in forkpty
14152do
Martin v. Löwis11437992002-04-12 09:54:03 +000014153as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14154echo "$as_me:$LINENO: checking for $ac_func" >&5
14155echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14156if eval "test \"\${$as_ac_var+set}\" = set"; then
14157 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014158else
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 cat >conftest.$ac_ext <<_ACEOF
14160#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014161/* confdefs.h. */
14162_ACEOF
14163cat confdefs.h >>conftest.$ac_ext
14164cat >>conftest.$ac_ext <<_ACEOF
14165/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014166/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014167 which can conflict with char $ac_func (); below.
14168 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014169 <limits.h> exists even on freestanding compilers. Under hpux,
14170 including <limits.h> includes <sys/time.h> and causes problems
14171 checking for functions defined therein. */
14172#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014173# include <limits.h>
14174#else
14175# include <assert.h>
14176#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014177/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014178#ifdef __cplusplus
14179extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014180{
Martin v. Löwis11437992002-04-12 09:54:03 +000014181#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014182/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 builtin and then its argument prototype would still apply. */
14184char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014185/* The GNU C library defines this for functions which it implements
14186 to always fail with ENOSYS. Some functions are actually named
14187 something starting with __ and the normal name is an alias. */
14188#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14189choke me
14190#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014191char (*f) () = $ac_func;
14192#endif
14193#ifdef __cplusplus
14194}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014195#endif
14196
Skip Montanaro6dead952003-09-25 14:50:04 +000014197int
14198main ()
14199{
14200return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 ;
14202 return 0;
14203}
14204_ACEOF
14205rm -f conftest.$ac_objext conftest$ac_exeext
14206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14207 (eval $ac_link) 2>&5
14208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); } &&
14211 { ac_try='test -s conftest$ac_exeext'
14212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14213 (eval $ac_try) 2>&5
14214 ac_status=$?
14215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216 (exit $ac_status); }; }; then
14217 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014218else
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014220sed 's/^/| /' conftest.$ac_ext >&5
14221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014224rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14227echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14228if test `eval echo '${'$as_ac_var'}'` = yes; then
14229 cat >>confdefs.h <<_ACEOF
14230#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14231_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014232
Fred Drake8cef4cf2000-06-28 16:40:38 +000014233else
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14235echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14236if test "${ac_cv_lib_util_forkpty+set}" = set; then
14237 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014238else
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014240LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014241cat >conftest.$ac_ext <<_ACEOF
14242#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014243/* confdefs.h. */
14244_ACEOF
14245cat confdefs.h >>conftest.$ac_ext
14246cat >>conftest.$ac_ext <<_ACEOF
14247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
Fred Drake8cef4cf2000-06-28 16:40:38 +000014249/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014250#ifdef __cplusplus
14251extern "C"
14252#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014253/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 builtin and then its argument prototype would still apply. */
14255char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014256int
14257main ()
14258{
14259forkpty ();
14260 ;
14261 return 0;
14262}
14263_ACEOF
14264rm -f conftest.$ac_objext conftest$ac_exeext
14265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14266 (eval $ac_link) 2>&5
14267 ac_status=$?
14268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); } &&
14270 { ac_try='test -s conftest$ac_exeext'
14271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14272 (eval $ac_try) 2>&5
14273 ac_status=$?
14274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275 (exit $ac_status); }; }; then
14276 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014277else
Martin v. Löwis11437992002-04-12 09:54:03 +000014278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014279sed 's/^/| /' conftest.$ac_ext >&5
14280
Martin v. Löwis11437992002-04-12 09:54:03 +000014281ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14284LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014286echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14287echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14288if test $ac_cv_lib_util_forkpty = yes; then
14289 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014290#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014291_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014292 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014293fi
14294
14295fi
14296done
14297
Jack Jansendd19cf82001-12-06 22:36:17 +000014298
Michael W. Hudson54241132001-12-07 15:38:26 +000014299# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
14301
14302
14303
14304
14305
Fred Drake8cef4cf2000-06-28 16:40:38 +000014306for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14307do
Martin v. Löwis11437992002-04-12 09:54:03 +000014308as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14309echo "$as_me:$LINENO: checking for $ac_func" >&5
14310echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14311if eval "test \"\${$as_ac_var+set}\" = set"; then
14312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014313else
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 cat >conftest.$ac_ext <<_ACEOF
14315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014316/* confdefs.h. */
14317_ACEOF
14318cat confdefs.h >>conftest.$ac_ext
14319cat >>conftest.$ac_ext <<_ACEOF
14320/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014322 which can conflict with char $ac_func (); below.
14323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014324 <limits.h> exists even on freestanding compilers. Under hpux,
14325 including <limits.h> includes <sys/time.h> and causes problems
14326 checking for functions defined therein. */
14327#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014328# include <limits.h>
14329#else
14330# include <assert.h>
14331#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014332/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014333#ifdef __cplusplus
14334extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014335{
Martin v. Löwis11437992002-04-12 09:54:03 +000014336#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014337/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 builtin and then its argument prototype would still apply. */
14339char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014340/* The GNU C library defines this for functions which it implements
14341 to always fail with ENOSYS. Some functions are actually named
14342 something starting with __ and the normal name is an alias. */
14343#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14344choke me
14345#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014346char (*f) () = $ac_func;
14347#endif
14348#ifdef __cplusplus
14349}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014350#endif
14351
Skip Montanaro6dead952003-09-25 14:50:04 +000014352int
14353main ()
14354{
14355return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 ;
14357 return 0;
14358}
14359_ACEOF
14360rm -f conftest.$ac_objext conftest$ac_exeext
14361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14362 (eval $ac_link) 2>&5
14363 ac_status=$?
14364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14365 (exit $ac_status); } &&
14366 { ac_try='test -s conftest$ac_exeext'
14367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14368 (eval $ac_try) 2>&5
14369 ac_status=$?
14370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371 (exit $ac_status); }; }; then
14372 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014373else
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014375sed 's/^/| /' conftest.$ac_ext >&5
14376
Martin v. Löwis11437992002-04-12 09:54:03 +000014377eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014381echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14383if test `eval echo '${'$as_ac_var'}'` = yes; then
14384 cat >>confdefs.h <<_ACEOF
14385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14386_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014387
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014388fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014389done
14390
Michael W. Hudson54241132001-12-07 15:38:26 +000014391
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
14393
14394
14395
14396
Martin v. Löwis1142de32002-03-29 16:28:31 +000014397for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014398do
Martin v. Löwis11437992002-04-12 09:54:03 +000014399as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14400echo "$as_me:$LINENO: checking for $ac_func" >&5
14401echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14402if eval "test \"\${$as_ac_var+set}\" = set"; then
14403 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014404else
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 cat >conftest.$ac_ext <<_ACEOF
14406#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014407/* confdefs.h. */
14408_ACEOF
14409cat confdefs.h >>conftest.$ac_ext
14410cat >>conftest.$ac_ext <<_ACEOF
14411/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014412/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014413 which can conflict with char $ac_func (); below.
14414 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014415 <limits.h> exists even on freestanding compilers. Under hpux,
14416 including <limits.h> includes <sys/time.h> and causes problems
14417 checking for functions defined therein. */
14418#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014419# include <limits.h>
14420#else
14421# include <assert.h>
14422#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014423/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014424#ifdef __cplusplus
14425extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014426{
Martin v. Löwis11437992002-04-12 09:54:03 +000014427#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014428/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 builtin and then its argument prototype would still apply. */
14430char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014431/* The GNU C library defines this for functions which it implements
14432 to always fail with ENOSYS. Some functions are actually named
14433 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014435choke me
14436#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014437char (*f) () = $ac_func;
14438#endif
14439#ifdef __cplusplus
14440}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014441#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014442
Skip Montanaro6dead952003-09-25 14:50:04 +000014443int
14444main ()
14445{
14446return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 ;
14448 return 0;
14449}
14450_ACEOF
14451rm -f conftest.$ac_objext conftest$ac_exeext
14452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14453 (eval $ac_link) 2>&5
14454 ac_status=$?
14455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14456 (exit $ac_status); } &&
14457 { ac_try='test -s conftest$ac_exeext'
14458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14459 (eval $ac_try) 2>&5
14460 ac_status=$?
14461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14462 (exit $ac_status); }; }; then
14463 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014464else
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014466sed 's/^/| /' conftest.$ac_ext >&5
14467
Martin v. Löwis11437992002-04-12 09:54:03 +000014468eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014470rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000014471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014472echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14473echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14474if test `eval echo '${'$as_ac_var'}'` = yes; then
14475 cat >>confdefs.h <<_ACEOF
14476#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14477_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000014478
Martin v. Löwis1142de32002-03-29 16:28:31 +000014479else
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014481fi
14482done
14483
14484
Martin v. Löwis11437992002-04-12 09:54:03 +000014485
Martin v. Löwis1142de32002-03-29 16:28:31 +000014486for ac_func in getpgrp
14487do
Martin v. Löwis11437992002-04-12 09:54:03 +000014488as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14489echo "$as_me:$LINENO: checking for $ac_func" >&5
14490echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14491if eval "test \"\${$as_ac_var+set}\" = set"; then
14492 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000014493else
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 cat >conftest.$ac_ext <<_ACEOF
14495#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014496/* confdefs.h. */
14497_ACEOF
14498cat confdefs.h >>conftest.$ac_ext
14499cat >>conftest.$ac_ext <<_ACEOF
14500/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000014501/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014502 which can conflict with char $ac_func (); below.
14503 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014504 <limits.h> exists even on freestanding compilers. Under hpux,
14505 including <limits.h> includes <sys/time.h> and causes problems
14506 checking for functions defined therein. */
14507#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014508# include <limits.h>
14509#else
14510# include <assert.h>
14511#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014512/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014513#ifdef __cplusplus
14514extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014515{
Martin v. Löwis11437992002-04-12 09:54:03 +000014516#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014517/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014518 builtin and then its argument prototype would still apply. */
14519char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000014520/* The GNU C library defines this for functions which it implements
14521 to always fail with ENOSYS. Some functions are actually named
14522 something starting with __ and the normal name is an alias. */
14523#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14524choke me
14525#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014526char (*f) () = $ac_func;
14527#endif
14528#ifdef __cplusplus
14529}
Martin v. Löwis1142de32002-03-29 16:28:31 +000014530#endif
14531
Skip Montanaro6dead952003-09-25 14:50:04 +000014532int
14533main ()
14534{
14535return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 ;
14537 return 0;
14538}
14539_ACEOF
14540rm -f conftest.$ac_objext conftest$ac_exeext
14541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14542 (eval $ac_link) 2>&5
14543 ac_status=$?
14544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); } &&
14546 { ac_try='test -s conftest$ac_exeext'
14547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14548 (eval $ac_try) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); }; }; then
14552 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014553else
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014555sed 's/^/| /' conftest.$ac_ext >&5
14556
Martin v. Löwis11437992002-04-12 09:54:03 +000014557eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014559rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014561echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14562echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14563if test `eval echo '${'$as_ac_var'}'` = yes; then
14564 cat >>confdefs.h <<_ACEOF
14565#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14566_ACEOF
14567 cat >conftest.$ac_ext <<_ACEOF
14568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014569/* confdefs.h. */
14570_ACEOF
14571cat confdefs.h >>conftest.$ac_ext
14572cat >>conftest.$ac_ext <<_ACEOF
14573/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014574#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014575int
14576main ()
14577{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014578getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 ;
14580 return 0;
14581}
14582_ACEOF
14583rm -f conftest.$ac_objext
14584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14585 (eval $ac_compile) 2>&5
14586 ac_status=$?
14587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588 (exit $ac_status); } &&
14589 { ac_try='test -s conftest.$ac_objext'
14590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14591 (eval $ac_try) 2>&5
14592 ac_status=$?
14593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594 (exit $ac_status); }; }; then
14595
14596cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014598_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
Guido van Rossumf78abae1997-01-21 22:02:36 +000014601else
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014603sed 's/^/| /' conftest.$ac_ext >&5
14604
Guido van Rossum627b2d71993-12-24 10:39:16 +000014605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014606rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014607
Guido van Rossum627b2d71993-12-24 10:39:16 +000014608fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014609done
Guido van Rossum627b2d71993-12-24 10:39:16 +000014610
Jack Jansen150753c2003-03-29 22:07:47 +000014611
14612for ac_func in setpgrp
14613do
14614as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14615echo "$as_me:$LINENO: checking for $ac_func" >&5
14616echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14617if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 cat >conftest.$ac_ext <<_ACEOF
14621#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014622/* confdefs.h. */
14623_ACEOF
14624cat confdefs.h >>conftest.$ac_ext
14625cat >>conftest.$ac_ext <<_ACEOF
14626/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014627/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014628 which can conflict with char $ac_func (); below.
14629 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014630 <limits.h> exists even on freestanding compilers. Under hpux,
14631 including <limits.h> includes <sys/time.h> and causes problems
14632 checking for functions defined therein. */
14633#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014634# include <limits.h>
14635#else
14636# include <assert.h>
14637#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014638/* Override any gcc2 internal prototype to avoid an error. */
14639#ifdef __cplusplus
14640extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014641{
Martin v. Löwis11437992002-04-12 09:54:03 +000014642#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014643/* We use char because int might match the return type of a gcc2
14644 builtin and then its argument prototype would still apply. */
14645char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000014646/* The GNU C library defines this for functions which it implements
14647 to always fail with ENOSYS. Some functions are actually named
14648 something starting with __ and the normal name is an alias. */
14649#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14650choke me
14651#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014652char (*f) () = $ac_func;
14653#endif
14654#ifdef __cplusplus
14655}
Jack Jansen150753c2003-03-29 22:07:47 +000014656#endif
14657
Skip Montanaro6dead952003-09-25 14:50:04 +000014658int
14659main ()
14660{
14661return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 ;
14663 return 0;
14664}
14665_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014666rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14668 (eval $ac_link) 2>&5
14669 ac_status=$?
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014671 (exit $ac_status); } &&
14672 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14674 (eval $ac_try) 2>&5
14675 ac_status=$?
14676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14677 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014678 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014679else
Jack Jansen150753c2003-03-29 22:07:47 +000014680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014681sed 's/^/| /' conftest.$ac_ext >&5
14682
Jack Jansen150753c2003-03-29 22:07:47 +000014683eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014684fi
Jack Jansen150753c2003-03-29 22:07:47 +000014685rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014686fi
Jack Jansen150753c2003-03-29 22:07:47 +000014687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14688echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14689if test `eval echo '${'$as_ac_var'}'` = yes; then
14690 cat >>confdefs.h <<_ACEOF
14691#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14692_ACEOF
14693 cat >conftest.$ac_ext <<_ACEOF
14694#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014695/* confdefs.h. */
14696_ACEOF
14697cat confdefs.h >>conftest.$ac_ext
14698cat >>conftest.$ac_ext <<_ACEOF
14699/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014700#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014701int
14702main ()
14703{
14704setpgrp(0,0);
14705 ;
14706 return 0;
14707}
14708_ACEOF
14709rm -f conftest.$ac_objext
14710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14711 (eval $ac_compile) 2>&5
14712 ac_status=$?
14713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14714 (exit $ac_status); } &&
14715 { ac_try='test -s conftest.$ac_objext'
14716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14717 (eval $ac_try) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014721
14722cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014723#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014724_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014725
Jack Jansen150753c2003-03-29 22:07:47 +000014726
14727else
14728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014729sed 's/^/| /' conftest.$ac_ext >&5
14730
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014731fi
Jack Jansen150753c2003-03-29 22:07:47 +000014732rm -f conftest.$ac_objext conftest.$ac_ext
14733
14734fi
14735done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014736
Martin v. Löwis11437992002-04-12 09:54:03 +000014737
Thomas Wouters3a584202000-08-05 23:28:51 +000014738for ac_func in gettimeofday
14739do
Martin v. Löwis11437992002-04-12 09:54:03 +000014740as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14741echo "$as_me:$LINENO: checking for $ac_func" >&5
14742echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14743if eval "test \"\${$as_ac_var+set}\" = set"; then
14744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014745else
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 cat >conftest.$ac_ext <<_ACEOF
14747#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014748/* confdefs.h. */
14749_ACEOF
14750cat confdefs.h >>conftest.$ac_ext
14751cat >>conftest.$ac_ext <<_ACEOF
14752/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014753/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014754 which can conflict with char $ac_func (); below.
14755 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014756 <limits.h> exists even on freestanding compilers. Under hpux,
14757 including <limits.h> includes <sys/time.h> and causes problems
14758 checking for functions defined therein. */
14759#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014760# include <limits.h>
14761#else
14762# include <assert.h>
14763#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014764/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014765#ifdef __cplusplus
14766extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014767{
Martin v. Löwis11437992002-04-12 09:54:03 +000014768#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014769/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014770 builtin and then its argument prototype would still apply. */
14771char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014772/* The GNU C library defines this for functions which it implements
14773 to always fail with ENOSYS. Some functions are actually named
14774 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014775#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014776choke me
14777#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014778char (*f) () = $ac_func;
14779#endif
14780#ifdef __cplusplus
14781}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014782#endif
14783
Skip Montanaro6dead952003-09-25 14:50:04 +000014784int
14785main ()
14786{
14787return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 ;
14789 return 0;
14790}
14791_ACEOF
14792rm -f conftest.$ac_objext conftest$ac_exeext
14793if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14794 (eval $ac_link) 2>&5
14795 ac_status=$?
14796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14797 (exit $ac_status); } &&
14798 { ac_try='test -s conftest$ac_exeext'
14799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14800 (eval $ac_try) 2>&5
14801 ac_status=$?
14802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14803 (exit $ac_status); }; }; then
14804 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014805else
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014807sed 's/^/| /' conftest.$ac_ext >&5
14808
Martin v. Löwis11437992002-04-12 09:54:03 +000014809eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014811rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014812fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014813echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14814echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14815if test `eval echo '${'$as_ac_var'}'` = yes; then
14816 cat >>confdefs.h <<_ACEOF
14817#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14818_ACEOF
14819 cat >conftest.$ac_ext <<_ACEOF
14820#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014821/* confdefs.h. */
14822_ACEOF
14823cat confdefs.h >>conftest.$ac_ext
14824cat >>conftest.$ac_ext <<_ACEOF
14825/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014826#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014827int
14828main ()
14829{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014830gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014831 ;
14832 return 0;
14833}
14834_ACEOF
14835rm -f conftest.$ac_objext
14836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14837 (eval $ac_compile) 2>&5
14838 ac_status=$?
14839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14840 (exit $ac_status); } &&
14841 { ac_try='test -s conftest.$ac_objext'
14842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14843 (eval $ac_try) 2>&5
14844 ac_status=$?
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014847 :
14848else
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014850sed 's/^/| /' conftest.$ac_ext >&5
14851
Martin v. Löwis11437992002-04-12 09:54:03 +000014852
14853cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014854#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014855_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014856
Martin v. Löwis11437992002-04-12 09:54:03 +000014857
Guido van Rossum627b2d71993-12-24 10:39:16 +000014858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014859rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014861fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014862done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014863
Michael W. Hudson54241132001-12-07 15:38:26 +000014864
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014865echo "$as_me:$LINENO: checking for major" >&5
14866echo $ECHO_N "checking for major... $ECHO_C" >&6
14867cat >conftest.$ac_ext <<_ACEOF
14868#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014869/* confdefs.h. */
14870_ACEOF
14871cat confdefs.h >>conftest.$ac_ext
14872cat >>conftest.$ac_ext <<_ACEOF
14873/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014874
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014875#if defined(MAJOR_IN_MKDEV)
14876#include <sys/mkdev.h>
14877#elif defined(MAJOR_IN_SYSMACROS)
14878#include <sys/sysmacros.h>
14879#else
14880#include <sys/types.h>
14881#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014882
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014883int
14884main ()
14885{
14886
14887 makedev(major(0),minor(0));
14888
14889 ;
14890 return 0;
14891}
14892_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014893rm -f conftest.$ac_objext conftest$ac_exeext
14894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14895 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014896 ac_status=$?
14897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014899 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14901 (eval $ac_try) 2>&5
14902 ac_status=$?
14903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14904 (exit $ac_status); }; }; then
14905
14906
14907cat >>confdefs.h <<\_ACEOF
14908#define HAVE_DEVICE_MACROS 1
14909_ACEOF
14910
14911 echo "$as_me:$LINENO: result: yes" >&5
14912echo "${ECHO_T}yes" >&6
14913
14914else
14915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014916sed 's/^/| /' conftest.$ac_ext >&5
14917
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014918
14919 echo "$as_me:$LINENO: result: no" >&5
14920echo "${ECHO_T}no" >&6
14921
14922fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014924
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014925# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014926# for [no]getaddrinfo in netdb.h.
14927echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14928echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14929cat >conftest.$ac_ext <<_ACEOF
14930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014931/* confdefs.h. */
14932_ACEOF
14933cat confdefs.h >>conftest.$ac_ext
14934cat >>conftest.$ac_ext <<_ACEOF
14935/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014936
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014937#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014938#include <sys/socket.h>
14939#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014940#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014941
Martin v. Löwis11437992002-04-12 09:54:03 +000014942int
14943main ()
14944{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014945
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014946getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014947
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 ;
14949 return 0;
14950}
14951_ACEOF
14952rm -f conftest.$ac_objext conftest$ac_exeext
14953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14954 (eval $ac_link) 2>&5
14955 ac_status=$?
14956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14957 (exit $ac_status); } &&
14958 { ac_try='test -s conftest$ac_exeext'
14959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14960 (eval $ac_try) 2>&5
14961 ac_status=$?
14962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14963 (exit $ac_status); }; }; then
14964
14965echo "$as_me:$LINENO: result: yes" >&5
14966echo "${ECHO_T}yes" >&6
14967echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14968echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014969if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 echo "$as_me:$LINENO: result: buggy" >&5
14971echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014972buggygetaddrinfo=yes
14973else
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 cat >conftest.$ac_ext <<_ACEOF
14975#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014976/* confdefs.h. */
14977_ACEOF
14978cat confdefs.h >>conftest.$ac_ext
14979cat >>conftest.$ac_ext <<_ACEOF
14980/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014981
14982#include <sys/types.h>
14983#include <netdb.h>
14984#include <string.h>
14985#include <sys/socket.h>
14986#include <netinet/in.h>
14987
14988main()
14989{
14990 int passive, gaierr, inet4 = 0, inet6 = 0;
14991 struct addrinfo hints, *ai, *aitop;
14992 char straddr[INET6_ADDRSTRLEN], strport[16];
14993
14994 for (passive = 0; passive <= 1; passive++) {
14995 memset(&hints, 0, sizeof(hints));
14996 hints.ai_family = AF_UNSPEC;
14997 hints.ai_flags = passive ? AI_PASSIVE : 0;
14998 hints.ai_socktype = SOCK_STREAM;
14999 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15000 (void)gai_strerror(gaierr);
15001 goto bad;
15002 }
15003 for (ai = aitop; ai; ai = ai->ai_next) {
15004 if (ai->ai_addr == NULL ||
15005 ai->ai_addrlen == 0 ||
15006 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15007 straddr, sizeof(straddr), strport, sizeof(strport),
15008 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15009 goto bad;
15010 }
15011 switch (ai->ai_family) {
15012 case AF_INET:
15013 if (strcmp(strport, "54321") != 0) {
15014 goto bad;
15015 }
15016 if (passive) {
15017 if (strcmp(straddr, "0.0.0.0") != 0) {
15018 goto bad;
15019 }
15020 } else {
15021 if (strcmp(straddr, "127.0.0.1") != 0) {
15022 goto bad;
15023 }
15024 }
15025 inet4++;
15026 break;
15027 case AF_INET6:
15028 if (strcmp(strport, "54321") != 0) {
15029 goto bad;
15030 }
15031 if (passive) {
15032 if (strcmp(straddr, "::") != 0) {
15033 goto bad;
15034 }
15035 } else {
15036 if (strcmp(straddr, "::1") != 0) {
15037 goto bad;
15038 }
15039 }
15040 inet6++;
15041 break;
15042 case AF_UNSPEC:
15043 goto bad;
15044 break;
15045 default:
15046 /* another family support? */
15047 break;
15048 }
15049 }
15050 }
15051
15052 if (!(inet4 == 0 || inet4 == 2))
15053 goto bad;
15054 if (!(inet6 == 0 || inet6 == 2))
15055 goto bad;
15056
15057 if (aitop)
15058 freeaddrinfo(aitop);
15059 exit(0);
15060
15061 bad:
15062 if (aitop)
15063 freeaddrinfo(aitop);
15064 exit(1);
15065}
15066
Martin v. Löwis11437992002-04-12 09:54:03 +000015067_ACEOF
15068rm -f conftest$ac_exeext
15069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15070 (eval $ac_link) 2>&5
15071 ac_status=$?
15072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15075 (eval $ac_try) 2>&5
15076 ac_status=$?
15077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15078 (exit $ac_status); }; }; then
15079 echo "$as_me:$LINENO: result: good" >&5
15080echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015081buggygetaddrinfo=no
15082else
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 echo "$as_me: program exited with status $ac_status" >&5
15084echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015085sed 's/^/| /' conftest.$ac_ext >&5
15086
Martin v. Löwis11437992002-04-12 09:54:03 +000015087( exit $ac_status )
15088echo "$as_me:$LINENO: result: buggy" >&5
15089echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015090buggygetaddrinfo=yes
15091fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015092rm -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 +000015093fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015094else
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015096sed 's/^/| /' conftest.$ac_ext >&5
15097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098
15099echo "$as_me:$LINENO: result: no" >&5
15100echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015101buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015102
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015104rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015105
15106if test "$buggygetaddrinfo" = "yes"; then
15107 if test "$ipv6" = "yes"; then
15108 echo 'Fatal: You must get working getaddrinfo() function.'
15109 echo ' or you can specify "--disable-ipv6"'.
15110 exit 1
15111 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015112else
Martin v. Löwis11437992002-04-12 09:54:03 +000015113
15114cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015115#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015116_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015117
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015119
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015120for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015121do
Martin v. Löwis11437992002-04-12 09:54:03 +000015122as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15123echo "$as_me:$LINENO: checking for $ac_func" >&5
15124echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15125if eval "test \"\${$as_ac_var+set}\" = set"; then
15126 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015127else
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 cat >conftest.$ac_ext <<_ACEOF
15129#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015130/* confdefs.h. */
15131_ACEOF
15132cat confdefs.h >>conftest.$ac_ext
15133cat >>conftest.$ac_ext <<_ACEOF
15134/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015135/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015136 which can conflict with char $ac_func (); below.
15137 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015138 <limits.h> exists even on freestanding compilers. Under hpux,
15139 including <limits.h> includes <sys/time.h> and causes problems
15140 checking for functions defined therein. */
15141#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015142# include <limits.h>
15143#else
15144# include <assert.h>
15145#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015146/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015147#ifdef __cplusplus
15148extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015149{
Martin v. Löwis11437992002-04-12 09:54:03 +000015150#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015151/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 builtin and then its argument prototype would still apply. */
15153char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015154/* The GNU C library defines this for functions which it implements
15155 to always fail with ENOSYS. Some functions are actually named
15156 something starting with __ and the normal name is an alias. */
15157#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15158choke me
15159#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015160char (*f) () = $ac_func;
15161#endif
15162#ifdef __cplusplus
15163}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015164#endif
15165
Skip Montanaro6dead952003-09-25 14:50:04 +000015166int
15167main ()
15168{
15169return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 ;
15171 return 0;
15172}
15173_ACEOF
15174rm -f conftest.$ac_objext conftest$ac_exeext
15175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15176 (eval $ac_link) 2>&5
15177 ac_status=$?
15178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179 (exit $ac_status); } &&
15180 { ac_try='test -s conftest$ac_exeext'
15181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15182 (eval $ac_try) 2>&5
15183 ac_status=$?
15184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185 (exit $ac_status); }; }; then
15186 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015187else
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015189sed 's/^/| /' conftest.$ac_ext >&5
15190
Martin v. Löwis11437992002-04-12 09:54:03 +000015191eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015193rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015195echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15196echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15197if test `eval echo '${'$as_ac_var'}'` = yes; then
15198 cat >>confdefs.h <<_ACEOF
15199#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15200_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015201
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015202fi
15203done
15204
Michael W. Hudson54241132001-12-07 15:38:26 +000015205
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015206# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015207echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15208echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15209if test "${ac_cv_header_time+set}" = set; then
15210 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015211else
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 cat >conftest.$ac_ext <<_ACEOF
15213#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015214/* confdefs.h. */
15215_ACEOF
15216cat confdefs.h >>conftest.$ac_ext
15217cat >>conftest.$ac_ext <<_ACEOF
15218/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219#include <sys/types.h>
15220#include <sys/time.h>
15221#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
Martin v. Löwis11437992002-04-12 09:54:03 +000015223int
15224main ()
15225{
15226if ((struct tm *) 0)
15227return 0;
15228 ;
15229 return 0;
15230}
15231_ACEOF
15232rm -f conftest.$ac_objext
15233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15234 (eval $ac_compile) 2>&5
15235 ac_status=$?
15236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237 (exit $ac_status); } &&
15238 { ac_try='test -s conftest.$ac_objext'
15239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15240 (eval $ac_try) 2>&5
15241 ac_status=$?
15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015244 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015245else
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015247sed 's/^/| /' conftest.$ac_ext >&5
15248
Martin v. Löwis11437992002-04-12 09:54:03 +000015249ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015251rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015253echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15254echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015255if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015256
15257cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015258#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015259_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015260
15261fi
15262
Martin v. Löwis11437992002-04-12 09:54:03 +000015263echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15264echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15265if test "${ac_cv_struct_tm+set}" = set; then
15266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267else
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 cat >conftest.$ac_ext <<_ACEOF
15269#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015270/* confdefs.h. */
15271_ACEOF
15272cat confdefs.h >>conftest.$ac_ext
15273cat >>conftest.$ac_ext <<_ACEOF
15274/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275#include <sys/types.h>
15276#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015277
Martin v. Löwis11437992002-04-12 09:54:03 +000015278int
15279main ()
15280{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015281struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 ;
15283 return 0;
15284}
15285_ACEOF
15286rm -f conftest.$ac_objext
15287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15288 (eval $ac_compile) 2>&5
15289 ac_status=$?
15290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15291 (exit $ac_status); } &&
15292 { ac_try='test -s conftest.$ac_objext'
15293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15294 (eval $ac_try) 2>&5
15295 ac_status=$?
15296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15297 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015298 ac_cv_struct_tm=time.h
15299else
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015301sed 's/^/| /' conftest.$ac_ext >&5
15302
Martin v. Löwis11437992002-04-12 09:54:03 +000015303ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015305rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015307echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15308echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015309if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015310
15311cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015312#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015313_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015314
15315fi
15316
Martin v. Löwis11437992002-04-12 09:54:03 +000015317echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15318echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15319if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015321else
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 cat >conftest.$ac_ext <<_ACEOF
15323#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015324/* confdefs.h. */
15325_ACEOF
15326cat confdefs.h >>conftest.$ac_ext
15327cat >>conftest.$ac_ext <<_ACEOF
15328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015329#include <sys/types.h>
15330#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015331
15332
Martin v. Löwis11437992002-04-12 09:54:03 +000015333int
15334main ()
15335{
15336static struct tm ac_aggr;
15337if (ac_aggr.tm_zone)
15338return 0;
15339 ;
15340 return 0;
15341}
15342_ACEOF
15343rm -f conftest.$ac_objext
15344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15345 (eval $ac_compile) 2>&5
15346 ac_status=$?
15347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348 (exit $ac_status); } &&
15349 { ac_try='test -s conftest.$ac_objext'
15350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15351 (eval $ac_try) 2>&5
15352 ac_status=$?
15353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15354 (exit $ac_status); }; }; then
15355 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015356else
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015358sed 's/^/| /' conftest.$ac_ext >&5
15359
15360cat >conftest.$ac_ext <<_ACEOF
15361#line $LINENO "configure"
15362/* confdefs.h. */
15363_ACEOF
15364cat confdefs.h >>conftest.$ac_ext
15365cat >>conftest.$ac_ext <<_ACEOF
15366/* end confdefs.h. */
15367#include <sys/types.h>
15368#include <$ac_cv_struct_tm>
15369
15370
15371int
15372main ()
15373{
15374static struct tm ac_aggr;
15375if (sizeof ac_aggr.tm_zone)
15376return 0;
15377 ;
15378 return 0;
15379}
15380_ACEOF
15381rm -f conftest.$ac_objext
15382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15383 (eval $ac_compile) 2>&5
15384 ac_status=$?
15385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15386 (exit $ac_status); } &&
15387 { ac_try='test -s conftest.$ac_objext'
15388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15389 (eval $ac_try) 2>&5
15390 ac_status=$?
15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); }; }; then
15393 ac_cv_member_struct_tm_tm_zone=yes
15394else
15395 echo "$as_me: failed program was:" >&5
15396sed 's/^/| /' conftest.$ac_ext >&5
15397
Martin v. Löwis11437992002-04-12 09:54:03 +000015398ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015400rm -f conftest.$ac_objext conftest.$ac_ext
15401fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015402rm -f conftest.$ac_objext conftest.$ac_ext
15403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015404echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15405echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
15406if test $ac_cv_member_struct_tm_tm_zone = yes; then
15407
15408cat >>confdefs.h <<_ACEOF
15409#define HAVE_STRUCT_TM_TM_ZONE 1
15410_ACEOF
15411
15412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015413fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015414
Martin v. Löwis11437992002-04-12 09:54:03 +000015415if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15416
15417cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015418#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015419_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015420
15421else
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 echo "$as_me:$LINENO: checking for tzname" >&5
15423echo $ECHO_N "checking for tzname... $ECHO_C" >&6
15424if test "${ac_cv_var_tzname+set}" = set; then
15425 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015426else
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 cat >conftest.$ac_ext <<_ACEOF
15428#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015429/* confdefs.h. */
15430_ACEOF
15431cat confdefs.h >>conftest.$ac_ext
15432cat >>conftest.$ac_ext <<_ACEOF
15433/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015434#include <time.h>
15435#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015436extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015438
Martin v. Löwis11437992002-04-12 09:54:03 +000015439int
15440main ()
15441{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015442atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 ;
15444 return 0;
15445}
15446_ACEOF
15447rm -f conftest.$ac_objext conftest$ac_exeext
15448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15449 (eval $ac_link) 2>&5
15450 ac_status=$?
15451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452 (exit $ac_status); } &&
15453 { ac_try='test -s conftest$ac_exeext'
15454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15455 (eval $ac_try) 2>&5
15456 ac_status=$?
15457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015459 ac_cv_var_tzname=yes
15460else
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015462sed 's/^/| /' conftest.$ac_ext >&5
15463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015468echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15469echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015470 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015471
15472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015473#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015474_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015476 fi
15477fi
15478
Martin v. Löwis11437992002-04-12 09:54:03 +000015479echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
15480echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
15481if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
15482 echo $ECHO_N "(cached) $ECHO_C" >&6
15483else
15484 cat >conftest.$ac_ext <<_ACEOF
15485#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015486/* confdefs.h. */
15487_ACEOF
15488cat confdefs.h >>conftest.$ac_ext
15489cat >>conftest.$ac_ext <<_ACEOF
15490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015491$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015492int
15493main ()
15494{
15495static struct stat ac_aggr;
15496if (ac_aggr.st_rdev)
15497return 0;
15498 ;
15499 return 0;
15500}
15501_ACEOF
15502rm -f conftest.$ac_objext
15503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15504 (eval $ac_compile) 2>&5
15505 ac_status=$?
15506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15507 (exit $ac_status); } &&
15508 { ac_try='test -s conftest.$ac_objext'
15509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15510 (eval $ac_try) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); }; }; then
15514 ac_cv_member_struct_stat_st_rdev=yes
15515else
15516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015517sed 's/^/| /' conftest.$ac_ext >&5
15518
15519cat >conftest.$ac_ext <<_ACEOF
15520#line $LINENO "configure"
15521/* confdefs.h. */
15522_ACEOF
15523cat confdefs.h >>conftest.$ac_ext
15524cat >>conftest.$ac_ext <<_ACEOF
15525/* end confdefs.h. */
15526$ac_includes_default
15527int
15528main ()
15529{
15530static struct stat ac_aggr;
15531if (sizeof ac_aggr.st_rdev)
15532return 0;
15533 ;
15534 return 0;
15535}
15536_ACEOF
15537rm -f conftest.$ac_objext
15538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15539 (eval $ac_compile) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); } &&
15543 { ac_try='test -s conftest.$ac_objext'
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
15549 ac_cv_member_struct_stat_st_rdev=yes
15550else
15551 echo "$as_me: failed program was:" >&5
15552sed 's/^/| /' conftest.$ac_ext >&5
15553
Martin v. Löwis11437992002-04-12 09:54:03 +000015554ac_cv_member_struct_stat_st_rdev=no
15555fi
15556rm -f conftest.$ac_objext conftest.$ac_ext
15557fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015558rm -f conftest.$ac_objext conftest.$ac_ext
15559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015560echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
15561echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
15562if test $ac_cv_member_struct_stat_st_rdev = yes; then
15563
15564cat >>confdefs.h <<_ACEOF
15565#define HAVE_STRUCT_STAT_ST_RDEV 1
15566_ACEOF
15567
15568
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015569fi
15570
Martin v. Löwis11437992002-04-12 09:54:03 +000015571echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
15572echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
15573if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
15574 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015575else
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 cat >conftest.$ac_ext <<_ACEOF
15577#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015578/* confdefs.h. */
15579_ACEOF
15580cat confdefs.h >>conftest.$ac_ext
15581cat >>conftest.$ac_ext <<_ACEOF
15582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015583$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015584int
15585main ()
15586{
15587static struct stat ac_aggr;
15588if (ac_aggr.st_blksize)
15589return 0;
15590 ;
15591 return 0;
15592}
15593_ACEOF
15594rm -f conftest.$ac_objext
15595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15596 (eval $ac_compile) 2>&5
15597 ac_status=$?
15598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15599 (exit $ac_status); } &&
15600 { ac_try='test -s conftest.$ac_objext'
15601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15602 (eval $ac_try) 2>&5
15603 ac_status=$?
15604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15605 (exit $ac_status); }; }; then
15606 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015607else
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015609sed 's/^/| /' conftest.$ac_ext >&5
15610
15611cat >conftest.$ac_ext <<_ACEOF
15612#line $LINENO "configure"
15613/* confdefs.h. */
15614_ACEOF
15615cat confdefs.h >>conftest.$ac_ext
15616cat >>conftest.$ac_ext <<_ACEOF
15617/* end confdefs.h. */
15618$ac_includes_default
15619int
15620main ()
15621{
15622static struct stat ac_aggr;
15623if (sizeof ac_aggr.st_blksize)
15624return 0;
15625 ;
15626 return 0;
15627}
15628_ACEOF
15629rm -f conftest.$ac_objext
15630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15631 (eval $ac_compile) 2>&5
15632 ac_status=$?
15633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15634 (exit $ac_status); } &&
15635 { ac_try='test -s conftest.$ac_objext'
15636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15637 (eval $ac_try) 2>&5
15638 ac_status=$?
15639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640 (exit $ac_status); }; }; then
15641 ac_cv_member_struct_stat_st_blksize=yes
15642else
15643 echo "$as_me: failed program was:" >&5
15644sed 's/^/| /' conftest.$ac_ext >&5
15645
Martin v. Löwis11437992002-04-12 09:54:03 +000015646ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015648rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015649fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015650rm -f conftest.$ac_objext conftest.$ac_ext
15651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015652echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
15653echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
15654if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015655
Martin v. Löwis11437992002-04-12 09:54:03 +000015656cat >>confdefs.h <<_ACEOF
15657#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15658_ACEOF
15659
15660
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015661fi
15662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
15664echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
15665if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
15666 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015667else
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 cat >conftest.$ac_ext <<_ACEOF
15669#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015670/* confdefs.h. */
15671_ACEOF
15672cat confdefs.h >>conftest.$ac_ext
15673cat >>conftest.$ac_ext <<_ACEOF
15674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015675$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015676int
15677main ()
15678{
15679static struct stat ac_aggr;
15680if (ac_aggr.st_blocks)
15681return 0;
15682 ;
15683 return 0;
15684}
15685_ACEOF
15686rm -f conftest.$ac_objext
15687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15688 (eval $ac_compile) 2>&5
15689 ac_status=$?
15690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691 (exit $ac_status); } &&
15692 { ac_try='test -s conftest.$ac_objext'
15693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694 (eval $ac_try) 2>&5
15695 ac_status=$?
15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697 (exit $ac_status); }; }; then
15698 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015699else
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015701sed 's/^/| /' conftest.$ac_ext >&5
15702
15703cat >conftest.$ac_ext <<_ACEOF
15704#line $LINENO "configure"
15705/* confdefs.h. */
15706_ACEOF
15707cat confdefs.h >>conftest.$ac_ext
15708cat >>conftest.$ac_ext <<_ACEOF
15709/* end confdefs.h. */
15710$ac_includes_default
15711int
15712main ()
15713{
15714static struct stat ac_aggr;
15715if (sizeof ac_aggr.st_blocks)
15716return 0;
15717 ;
15718 return 0;
15719}
15720_ACEOF
15721rm -f conftest.$ac_objext
15722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15723 (eval $ac_compile) 2>&5
15724 ac_status=$?
15725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15726 (exit $ac_status); } &&
15727 { ac_try='test -s conftest.$ac_objext'
15728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15729 (eval $ac_try) 2>&5
15730 ac_status=$?
15731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15732 (exit $ac_status); }; }; then
15733 ac_cv_member_struct_stat_st_blocks=yes
15734else
15735 echo "$as_me: failed program was:" >&5
15736sed 's/^/| /' conftest.$ac_ext >&5
15737
Martin v. Löwis11437992002-04-12 09:54:03 +000015738ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015740rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015741fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015742rm -f conftest.$ac_objext conftest.$ac_ext
15743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015744echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15745echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15746if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015747
Martin v. Löwis11437992002-04-12 09:54:03 +000015748cat >>confdefs.h <<_ACEOF
15749#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15750_ACEOF
15751
15752
15753cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015754#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015755_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015756
15757else
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015759fi
15760
Michael W. Hudson54241132001-12-07 15:38:26 +000015761
Martin v. Löwis11437992002-04-12 09:54:03 +000015762
15763echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15764echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15765if test "${ac_cv_header_time_altzone+set}" = set; then
15766 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015767else
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 cat >conftest.$ac_ext <<_ACEOF
15769#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* confdefs.h. */
15771_ACEOF
15772cat confdefs.h >>conftest.$ac_ext
15773cat >>conftest.$ac_ext <<_ACEOF
15774/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015775#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015776int
15777main ()
15778{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015779return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 ;
15781 return 0;
15782}
15783_ACEOF
15784rm -f conftest.$ac_objext
15785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15786 (eval $ac_compile) 2>&5
15787 ac_status=$?
15788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15789 (exit $ac_status); } &&
15790 { ac_try='test -s conftest.$ac_objext'
15791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15792 (eval $ac_try) 2>&5
15793 ac_status=$?
15794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015796 ac_cv_header_time_altzone=yes
15797else
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015799sed 's/^/| /' conftest.$ac_ext >&5
15800
Martin v. Löwis11437992002-04-12 09:54:03 +000015801ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015803rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015804fi
15805
Martin v. Löwis11437992002-04-12 09:54:03 +000015806echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15807echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015808if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015809
15810cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015811#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015812_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015813
15814fi
15815
Guido van Rossumda88dad1995-01-26 00:46:29 +000015816was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015817echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15818echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15819cat >conftest.$ac_ext <<_ACEOF
15820#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015821/* confdefs.h. */
15822_ACEOF
15823cat confdefs.h >>conftest.$ac_ext
15824cat >>conftest.$ac_ext <<_ACEOF
15825/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015826
15827#include <sys/types.h>
15828#include <sys/select.h>
15829#include <sys/time.h>
15830
Martin v. Löwis11437992002-04-12 09:54:03 +000015831int
15832main ()
15833{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015834;
Martin v. Löwis11437992002-04-12 09:54:03 +000015835 ;
15836 return 0;
15837}
15838_ACEOF
15839rm -f conftest.$ac_objext
15840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15841 (eval $ac_compile) 2>&5
15842 ac_status=$?
15843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15844 (exit $ac_status); } &&
15845 { ac_try='test -s conftest.$ac_objext'
15846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15847 (eval $ac_try) 2>&5
15848 ac_status=$?
15849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15850 (exit $ac_status); }; }; then
15851
15852
15853cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015854#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015855_ACEOF
15856
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015857 was_it_defined=yes
15858
Guido van Rossumf78abae1997-01-21 22:02:36 +000015859else
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015861sed 's/^/| /' conftest.$ac_ext >&5
15862
Guido van Rossum7f43da71994-08-01 12:15:30 +000015863fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015864rm -f conftest.$ac_objext conftest.$ac_ext
15865echo "$as_me:$LINENO: result: $was_it_defined" >&5
15866echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868echo "$as_me:$LINENO: checking for addrinfo" >&5
15869echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15870if test "${ac_cv_struct_addrinfo+set}" = set; then
15871 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015872else
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 cat >conftest.$ac_ext <<_ACEOF
15874#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015875/* confdefs.h. */
15876_ACEOF
15877cat confdefs.h >>conftest.$ac_ext
15878cat >>conftest.$ac_ext <<_ACEOF
15879/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015880
15881# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015882int
15883main ()
15884{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015885struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 ;
15887 return 0;
15888}
15889_ACEOF
15890rm -f conftest.$ac_objext
15891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15892 (eval $ac_compile) 2>&5
15893 ac_status=$?
15894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15895 (exit $ac_status); } &&
15896 { ac_try='test -s conftest.$ac_objext'
15897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15898 (eval $ac_try) 2>&5
15899 ac_status=$?
15900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15901 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015902 ac_cv_struct_addrinfo=yes
15903else
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015905sed 's/^/| /' conftest.$ac_ext >&5
15906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015908fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015909rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015910fi
15911
Martin v. Löwis11437992002-04-12 09:54:03 +000015912echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15913echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015914if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015915
15916cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015917#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015918_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015919
15920fi
15921
Martin v. Löwis11437992002-04-12 09:54:03 +000015922echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15923echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15924if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015926else
Martin v. Löwis11437992002-04-12 09:54:03 +000015927 cat >conftest.$ac_ext <<_ACEOF
15928#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015929/* confdefs.h. */
15930_ACEOF
15931cat confdefs.h >>conftest.$ac_ext
15932cat >>conftest.$ac_ext <<_ACEOF
15933/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015934
15935# include <sys/types.h>
15936# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015937int
15938main ()
15939{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015940struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 ;
15942 return 0;
15943}
15944_ACEOF
15945rm -f conftest.$ac_objext
15946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15947 (eval $ac_compile) 2>&5
15948 ac_status=$?
15949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15950 (exit $ac_status); } &&
15951 { ac_try='test -s conftest.$ac_objext'
15952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15953 (eval $ac_try) 2>&5
15954 ac_status=$?
15955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15956 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015957 ac_cv_struct_sockaddr_storage=yes
15958else
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015960sed 's/^/| /' conftest.$ac_ext >&5
15961
Martin v. Löwis11437992002-04-12 09:54:03 +000015962ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015964rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015965fi
15966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15968echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015969if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015972#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015973_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015974
15975fi
15976
Guido van Rossum627b2d71993-12-24 10:39:16 +000015977# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015978
Michael W. Hudson54241132001-12-07 15:38:26 +000015979
Martin v. Löwis11437992002-04-12 09:54:03 +000015980echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15981echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15982if test "${ac_cv_c_char_unsigned+set}" = set; then
15983 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015984else
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 cat >conftest.$ac_ext <<_ACEOF
15986#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015987/* confdefs.h. */
15988_ACEOF
15989cat confdefs.h >>conftest.$ac_ext
15990cat >>conftest.$ac_ext <<_ACEOF
15991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015992$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015993int
15994main ()
15995{
15996static int test_array [1 - 2 * !(((char) -1) < 0)];
15997test_array [0] = 0
15998
15999 ;
16000 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016001}
Martin v. Löwis11437992002-04-12 09:54:03 +000016002_ACEOF
16003rm -f conftest.$ac_objext
16004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16005 (eval $ac_compile) 2>&5
16006 ac_status=$?
16007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16008 (exit $ac_status); } &&
16009 { ac_try='test -s conftest.$ac_objext'
16010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16011 (eval $ac_try) 2>&5
16012 ac_status=$?
16013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016015 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016016else
16017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016018sed 's/^/| /' conftest.$ac_ext >&5
16019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016022rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016023fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016024echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16025echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016026if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016028#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016029_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016030
16031fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16034echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16035if test "${ac_cv_c_const+set}" = set; then
16036 echo $ECHO_N "(cached) $ECHO_C" >&6
16037else
16038 cat >conftest.$ac_ext <<_ACEOF
16039#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016040/* confdefs.h. */
16041_ACEOF
16042cat confdefs.h >>conftest.$ac_ext
16043cat >>conftest.$ac_ext <<_ACEOF
16044/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016045
Martin v. Löwis11437992002-04-12 09:54:03 +000016046int
16047main ()
16048{
16049/* FIXME: Include the comments suggested by Paul. */
16050#ifndef __cplusplus
16051 /* Ultrix mips cc rejects this. */
16052 typedef int charset[2];
16053 const charset x;
16054 /* SunOS 4.1.1 cc rejects this. */
16055 char const *const *ccp;
16056 char **p;
16057 /* NEC SVR4.0.2 mips cc rejects this. */
16058 struct point {int x, y;};
16059 static struct point const zero = {0,0};
16060 /* AIX XL C 1.02.0.0 rejects this.
16061 It does not let you subtract one const X* pointer from another in
16062 an arm of an if-expression whose if-part is not a constant
16063 expression */
16064 const char *g = "string";
16065 ccp = &g + (g ? g-g : 0);
16066 /* HPUX 7.0 cc rejects these. */
16067 ++ccp;
16068 p = (char**) ccp;
16069 ccp = (char const *const *) p;
16070 { /* SCO 3.2v4 cc rejects this. */
16071 char *t;
16072 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016073
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 *t++ = 0;
16075 }
16076 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16077 int x[] = {25, 17};
16078 const int *foo = &x[0];
16079 ++foo;
16080 }
16081 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16082 typedef const int *iptr;
16083 iptr p = 0;
16084 ++p;
16085 }
16086 { /* AIX XL C 1.02.0.0 rejects this saying
16087 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16088 struct s { int j; const int *ap[3]; };
16089 struct s *b; b->j = 5;
16090 }
16091 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16092 const int foo = 10;
16093 }
16094#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096 ;
16097 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016098}
Martin v. Löwis11437992002-04-12 09:54:03 +000016099_ACEOF
16100rm -f conftest.$ac_objext
16101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16102 (eval $ac_compile) 2>&5
16103 ac_status=$?
16104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16105 (exit $ac_status); } &&
16106 { ac_try='test -s conftest.$ac_objext'
16107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16108 (eval $ac_try) 2>&5
16109 ac_status=$?
16110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16111 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016112 ac_cv_c_const=yes
16113else
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016115sed 's/^/| /' conftest.$ac_ext >&5
16116
Martin v. Löwis11437992002-04-12 09:54:03 +000016117ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016119rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016121echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16122echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016123if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016124
16125cat >>confdefs.h <<\_ACEOF
16126#define const
16127_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016128
16129fi
16130
Michael W. Hudson54241132001-12-07 15:38:26 +000016131
Guido van Rossumda88dad1995-01-26 00:46:29 +000016132works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016133echo "$as_me:$LINENO: checking for working volatile" >&5
16134echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16135cat >conftest.$ac_ext <<_ACEOF
16136#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016137/* confdefs.h. */
16138_ACEOF
16139cat confdefs.h >>conftest.$ac_ext
16140cat >>conftest.$ac_ext <<_ACEOF
16141/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016142
Martin v. Löwis11437992002-04-12 09:54:03 +000016143int
16144main ()
16145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016146volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016147 ;
16148 return 0;
16149}
16150_ACEOF
16151rm -f conftest.$ac_objext
16152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16153 (eval $ac_compile) 2>&5
16154 ac_status=$?
16155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16156 (exit $ac_status); } &&
16157 { ac_try='test -s conftest.$ac_objext'
16158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16159 (eval $ac_try) 2>&5
16160 ac_status=$?
16161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16162 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016163 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016164else
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016166sed 's/^/| /' conftest.$ac_ext >&5
16167
Martin v. Löwis11437992002-04-12 09:54:03 +000016168
16169cat >>confdefs.h <<\_ACEOF
16170#define volatile
16171_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016172
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016173
Guido van Rossum627b2d71993-12-24 10:39:16 +000016174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016175rm -f conftest.$ac_objext conftest.$ac_ext
16176echo "$as_me:$LINENO: result: $works" >&5
16177echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016178
Guido van Rossumda88dad1995-01-26 00:46:29 +000016179works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016180echo "$as_me:$LINENO: checking for working signed char" >&5
16181echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16182cat >conftest.$ac_ext <<_ACEOF
16183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016184/* confdefs.h. */
16185_ACEOF
16186cat confdefs.h >>conftest.$ac_ext
16187cat >>conftest.$ac_ext <<_ACEOF
16188/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016189
Martin v. Löwis11437992002-04-12 09:54:03 +000016190int
16191main ()
16192{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016193signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 ;
16195 return 0;
16196}
16197_ACEOF
16198rm -f conftest.$ac_objext
16199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16200 (eval $ac_compile) 2>&5
16201 ac_status=$?
16202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16203 (exit $ac_status); } &&
16204 { ac_try='test -s conftest.$ac_objext'
16205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16206 (eval $ac_try) 2>&5
16207 ac_status=$?
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016210 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016211else
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016213sed 's/^/| /' conftest.$ac_ext >&5
16214
Martin v. Löwis11437992002-04-12 09:54:03 +000016215
16216cat >>confdefs.h <<\_ACEOF
16217#define signed
16218_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016219
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016220
Guido van Rossum7f43da71994-08-01 12:15:30 +000016221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016222rm -f conftest.$ac_objext conftest.$ac_ext
16223echo "$as_me:$LINENO: result: $works" >&5
16224echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016225
Guido van Rossumda88dad1995-01-26 00:46:29 +000016226have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016227echo "$as_me:$LINENO: checking for prototypes" >&5
16228echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
16229cat >conftest.$ac_ext <<_ACEOF
16230#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016231/* confdefs.h. */
16232_ACEOF
16233cat confdefs.h >>conftest.$ac_ext
16234cat >>conftest.$ac_ext <<_ACEOF
16235/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016236int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016237int
16238main ()
16239{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016240return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 ;
16242 return 0;
16243}
16244_ACEOF
16245rm -f conftest.$ac_objext
16246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16247 (eval $ac_compile) 2>&5
16248 ac_status=$?
16249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16250 (exit $ac_status); } &&
16251 { ac_try='test -s conftest.$ac_objext'
16252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16253 (eval $ac_try) 2>&5
16254 ac_status=$?
16255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16256 (exit $ac_status); }; }; then
16257
16258
16259cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016260#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016261_ACEOF
16262
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016263 have_prototypes=yes
16264
Guido van Rossumf78abae1997-01-21 22:02:36 +000016265else
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016267sed 's/^/| /' conftest.$ac_ext >&5
16268
Guido van Rossum7f43da71994-08-01 12:15:30 +000016269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016270rm -f conftest.$ac_objext conftest.$ac_ext
16271echo "$as_me:$LINENO: result: $have_prototypes" >&5
16272echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016273
Guido van Rossumda88dad1995-01-26 00:46:29 +000016274works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016275echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
16276echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
16277cat >conftest.$ac_ext <<_ACEOF
16278#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016279/* confdefs.h. */
16280_ACEOF
16281cat confdefs.h >>conftest.$ac_ext
16282cat >>conftest.$ac_ext <<_ACEOF
16283/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016284
16285#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016286int foo(int x, ...) {
16287 va_list va;
16288 va_start(va, x);
16289 va_arg(va, int);
16290 va_arg(va, char *);
16291 va_arg(va, double);
16292 return 0;
16293}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016294
Martin v. Löwis11437992002-04-12 09:54:03 +000016295int
16296main ()
16297{
Guido van Rossum90eea071996-08-30 20:58:57 +000016298return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 ;
16300 return 0;
16301}
16302_ACEOF
16303rm -f conftest.$ac_objext
16304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16305 (eval $ac_compile) 2>&5
16306 ac_status=$?
16307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16308 (exit $ac_status); } &&
16309 { ac_try='test -s conftest.$ac_objext'
16310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16311 (eval $ac_try) 2>&5
16312 ac_status=$?
16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314 (exit $ac_status); }; }; then
16315
16316
16317cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016318#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016319_ACEOF
16320
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016321 works=yes
16322
Guido van Rossumf78abae1997-01-21 22:02:36 +000016323else
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016325sed 's/^/| /' conftest.$ac_ext >&5
16326
Guido van Rossum627b2d71993-12-24 10:39:16 +000016327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016328rm -f conftest.$ac_objext conftest.$ac_ext
16329echo "$as_me:$LINENO: result: $works" >&5
16330echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016331
Guido van Rossumda88dad1995-01-26 00:46:29 +000016332if test "$have_prototypes" = yes; then
16333bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016334echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
16335echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
16336cat >conftest.$ac_ext <<_ACEOF
16337#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016338/* confdefs.h. */
16339_ACEOF
16340cat confdefs.h >>conftest.$ac_ext
16341cat >>conftest.$ac_ext <<_ACEOF
16342/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016343#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016344int
16345main ()
16346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016347char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 ;
16349 return 0;
16350}
16351_ACEOF
16352rm -f conftest.$ac_objext
16353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16354 (eval $ac_compile) 2>&5
16355 ac_status=$?
16356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16357 (exit $ac_status); } &&
16358 { ac_try='test -s conftest.$ac_objext'
16359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16360 (eval $ac_try) 2>&5
16361 ac_status=$?
16362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16363 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016364 :
16365else
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016367sed 's/^/| /' conftest.$ac_ext >&5
16368
Martin v. Löwis11437992002-04-12 09:54:03 +000016369
16370cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016371#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016372_ACEOF
16373
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016374 bad_prototypes=yes
16375
Guido van Rossum627b2d71993-12-24 10:39:16 +000016376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016377rm -f conftest.$ac_objext conftest.$ac_ext
16378echo "$as_me:$LINENO: result: $bad_prototypes" >&5
16379echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016380fi
16381
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016382# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000016383echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
16384echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
16385cat >conftest.$ac_ext <<_ACEOF
16386#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016387/* confdefs.h. */
16388_ACEOF
16389cat confdefs.h >>conftest.$ac_ext
16390cat >>conftest.$ac_ext <<_ACEOF
16391/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016392#include <sys/types.h>
16393#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016394int
16395main ()
16396{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016397struct sockaddr x;
16398x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016399 ;
16400 return 0;
16401}
16402_ACEOF
16403rm -f conftest.$ac_objext
16404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16405 (eval $ac_compile) 2>&5
16406 ac_status=$?
16407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16408 (exit $ac_status); } &&
16409 { ac_try='test -s conftest.$ac_objext'
16410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16411 (eval $ac_try) 2>&5
16412 ac_status=$?
16413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16414 (exit $ac_status); }; }; then
16415 echo "$as_me:$LINENO: result: yes" >&5
16416echo "${ECHO_T}yes" >&6
16417
16418cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016419#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016420_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016421
16422else
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016424sed 's/^/| /' conftest.$ac_ext >&5
16425
Martin v. Löwis11437992002-04-12 09:54:03 +000016426echo "$as_me:$LINENO: result: no" >&5
16427echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016428fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016429rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016430
Guido van Rossumda88dad1995-01-26 00:46:29 +000016431va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016432echo "$as_me:$LINENO: checking whether va_list is an array" >&5
16433echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
16434cat >conftest.$ac_ext <<_ACEOF
16435#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016436/* confdefs.h. */
16437_ACEOF
16438cat confdefs.h >>conftest.$ac_ext
16439cat >>conftest.$ac_ext <<_ACEOF
16440/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016441
16442#ifdef HAVE_STDARG_PROTOTYPES
16443#include <stdarg.h>
16444#else
16445#include <varargs.h>
16446#endif
16447
Martin v. Löwis11437992002-04-12 09:54:03 +000016448int
16449main ()
16450{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016451va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000016452 ;
16453 return 0;
16454}
16455_ACEOF
16456rm -f conftest.$ac_objext
16457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16458 (eval $ac_compile) 2>&5
16459 ac_status=$?
16460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16461 (exit $ac_status); } &&
16462 { ac_try='test -s conftest.$ac_objext'
16463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16464 (eval $ac_try) 2>&5
16465 ac_status=$?
16466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16467 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016468 :
16469else
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016471sed 's/^/| /' conftest.$ac_ext >&5
16472
Martin v. Löwis11437992002-04-12 09:54:03 +000016473
16474
16475cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016476#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016477_ACEOF
16478
Guido van Rossumda88dad1995-01-26 00:46:29 +000016479 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016480
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016481fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016482rm -f conftest.$ac_objext conftest.$ac_ext
16483echo "$as_me:$LINENO: result: $va_list_is_array" >&5
16484echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016485
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016486# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016487
16488
16489
16490echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
16491echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
16492if test "${ac_cv_func_gethostbyname_r+set}" = set; then
16493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016494else
Martin v. Löwis11437992002-04-12 09:54:03 +000016495 cat >conftest.$ac_ext <<_ACEOF
16496#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016497/* confdefs.h. */
16498_ACEOF
16499cat confdefs.h >>conftest.$ac_ext
16500cat >>conftest.$ac_ext <<_ACEOF
16501/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016502/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016503 which can conflict with char gethostbyname_r (); below.
16504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016505 <limits.h> exists even on freestanding compilers. Under hpux,
16506 including <limits.h> includes <sys/time.h> and causes problems
16507 checking for functions defined therein. */
16508#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016509# include <limits.h>
16510#else
16511# include <assert.h>
16512#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016513/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016514#ifdef __cplusplus
16515extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016516{
Martin v. Löwis11437992002-04-12 09:54:03 +000016517#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016518/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 builtin and then its argument prototype would still apply. */
16520char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016521/* The GNU C library defines this for functions which it implements
16522 to always fail with ENOSYS. Some functions are actually named
16523 something starting with __ and the normal name is an alias. */
16524#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
16525choke me
16526#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016527char (*f) () = gethostbyname_r;
16528#endif
16529#ifdef __cplusplus
16530}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016531#endif
16532
Skip Montanaro6dead952003-09-25 14:50:04 +000016533int
16534main ()
16535{
16536return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 ;
16538 return 0;
16539}
16540_ACEOF
16541rm -f conftest.$ac_objext conftest$ac_exeext
16542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16543 (eval $ac_link) 2>&5
16544 ac_status=$?
16545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16546 (exit $ac_status); } &&
16547 { ac_try='test -s conftest$ac_exeext'
16548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16549 (eval $ac_try) 2>&5
16550 ac_status=$?
16551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16552 (exit $ac_status); }; }; then
16553 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016554else
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016556sed 's/^/| /' conftest.$ac_ext >&5
16557
Martin v. Löwis11437992002-04-12 09:54:03 +000016558ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016560rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016562echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
16563echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
16564if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016565
Martin v. Löwis11437992002-04-12 09:54:03 +000016566 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016567#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016568_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016569
Martin v. Löwis11437992002-04-12 09:54:03 +000016570 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
16571echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016572 OLD_CFLAGS=$CFLAGS
16573 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 cat >conftest.$ac_ext <<_ACEOF
16575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016576/* confdefs.h. */
16577_ACEOF
16578cat confdefs.h >>conftest.$ac_ext
16579cat >>conftest.$ac_ext <<_ACEOF
16580/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016581
16582# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016583
Martin v. Löwis11437992002-04-12 09:54:03 +000016584int
16585main ()
16586{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016587
16588 char *name;
16589 struct hostent *he, *res;
16590 char buffer[2048];
16591 int buflen = 2048;
16592 int h_errnop;
16593
16594 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016595
16596 ;
16597 return 0;
16598}
16599_ACEOF
16600rm -f conftest.$ac_objext
16601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16602 (eval $ac_compile) 2>&5
16603 ac_status=$?
16604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16605 (exit $ac_status); } &&
16606 { ac_try='test -s conftest.$ac_objext'
16607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16608 (eval $ac_try) 2>&5
16609 ac_status=$?
16610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611 (exit $ac_status); }; }; then
16612
16613 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016614#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016615_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016616
Martin v. Löwis11437992002-04-12 09:54:03 +000016617
16618cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016619#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016620_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622 echo "$as_me:$LINENO: result: yes" >&5
16623echo "${ECHO_T}yes" >&6
16624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016625else
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016627sed 's/^/| /' conftest.$ac_ext >&5
16628
Martin v. Löwis11437992002-04-12 09:54:03 +000016629
16630 echo "$as_me:$LINENO: result: no" >&5
16631echo "${ECHO_T}no" >&6
16632 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
16633echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
16634 cat >conftest.$ac_ext <<_ACEOF
16635#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016636/* confdefs.h. */
16637_ACEOF
16638cat confdefs.h >>conftest.$ac_ext
16639cat >>conftest.$ac_ext <<_ACEOF
16640/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016641
16642# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016643
Martin v. Löwis11437992002-04-12 09:54:03 +000016644int
16645main ()
16646{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016647
16648 char *name;
16649 struct hostent *he;
16650 char buffer[2048];
16651 int buflen = 2048;
16652 int h_errnop;
16653
16654 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016655
16656 ;
16657 return 0;
16658}
16659_ACEOF
16660rm -f conftest.$ac_objext
16661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16662 (eval $ac_compile) 2>&5
16663 ac_status=$?
16664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16665 (exit $ac_status); } &&
16666 { ac_try='test -s conftest.$ac_objext'
16667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16668 (eval $ac_try) 2>&5
16669 ac_status=$?
16670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16671 (exit $ac_status); }; }; then
16672
16673 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016674#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016675_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016676
Martin v. Löwis11437992002-04-12 09:54:03 +000016677
16678cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016679#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016680_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016681
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 echo "$as_me:$LINENO: result: yes" >&5
16683echo "${ECHO_T}yes" >&6
16684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016685else
Martin v. Löwis11437992002-04-12 09:54:03 +000016686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016687sed 's/^/| /' conftest.$ac_ext >&5
16688
Martin v. Löwis11437992002-04-12 09:54:03 +000016689
16690 echo "$as_me:$LINENO: result: no" >&5
16691echo "${ECHO_T}no" >&6
16692 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16693echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16694 cat >conftest.$ac_ext <<_ACEOF
16695#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016696/* confdefs.h. */
16697_ACEOF
16698cat confdefs.h >>conftest.$ac_ext
16699cat >>conftest.$ac_ext <<_ACEOF
16700/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016701
16702# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016703
Martin v. Löwis11437992002-04-12 09:54:03 +000016704int
16705main ()
16706{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016707
16708 char *name;
16709 struct hostent *he;
16710 struct hostent_data data;
16711
16712 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016713
16714 ;
16715 return 0;
16716}
16717_ACEOF
16718rm -f conftest.$ac_objext
16719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16720 (eval $ac_compile) 2>&5
16721 ac_status=$?
16722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16723 (exit $ac_status); } &&
16724 { ac_try='test -s conftest.$ac_objext'
16725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16726 (eval $ac_try) 2>&5
16727 ac_status=$?
16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729 (exit $ac_status); }; }; then
16730
16731 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016732#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016733_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735
16736cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016737#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016738_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016739
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 echo "$as_me:$LINENO: result: yes" >&5
16741echo "${ECHO_T}yes" >&6
16742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016743else
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016745sed 's/^/| /' conftest.$ac_ext >&5
16746
Martin v. Löwis11437992002-04-12 09:54:03 +000016747
16748 echo "$as_me:$LINENO: result: no" >&5
16749echo "${ECHO_T}no" >&6
16750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016752rm -f conftest.$ac_objext conftest.$ac_ext
16753
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016755rm -f conftest.$ac_objext conftest.$ac_ext
16756
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016758rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016759 CFLAGS=$OLD_CFLAGS
16760
16761else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763
16764for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016765do
Martin v. Löwis11437992002-04-12 09:54:03 +000016766as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16767echo "$as_me:$LINENO: checking for $ac_func" >&5
16768echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16769if eval "test \"\${$as_ac_var+set}\" = set"; then
16770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016771else
Martin v. Löwis11437992002-04-12 09:54:03 +000016772 cat >conftest.$ac_ext <<_ACEOF
16773#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016774/* confdefs.h. */
16775_ACEOF
16776cat confdefs.h >>conftest.$ac_ext
16777cat >>conftest.$ac_ext <<_ACEOF
16778/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016779/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016780 which can conflict with char $ac_func (); below.
16781 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016782 <limits.h> exists even on freestanding compilers. Under hpux,
16783 including <limits.h> includes <sys/time.h> and causes problems
16784 checking for functions defined therein. */
16785#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016786# include <limits.h>
16787#else
16788# include <assert.h>
16789#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016790/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016791#ifdef __cplusplus
16792extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016793{
Martin v. Löwis11437992002-04-12 09:54:03 +000016794#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016795/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016796 builtin and then its argument prototype would still apply. */
16797char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016798/* The GNU C library defines this for functions which it implements
16799 to always fail with ENOSYS. Some functions are actually named
16800 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016801#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016802choke me
16803#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016804char (*f) () = $ac_func;
16805#endif
16806#ifdef __cplusplus
16807}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016808#endif
16809
Skip Montanaro6dead952003-09-25 14:50:04 +000016810int
16811main ()
16812{
16813return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 ;
16815 return 0;
16816}
16817_ACEOF
16818rm -f conftest.$ac_objext conftest$ac_exeext
16819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16820 (eval $ac_link) 2>&5
16821 ac_status=$?
16822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16823 (exit $ac_status); } &&
16824 { ac_try='test -s conftest$ac_exeext'
16825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16826 (eval $ac_try) 2>&5
16827 ac_status=$?
16828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16829 (exit $ac_status); }; }; then
16830 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016831else
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016833sed 's/^/| /' conftest.$ac_ext >&5
16834
Martin v. Löwis11437992002-04-12 09:54:03 +000016835eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016837rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016839echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16840echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16841if test `eval echo '${'$as_ac_var'}'` = yes; then
16842 cat >>confdefs.h <<_ACEOF
16843#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16844_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016845
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016846fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016847done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016848
Michael W. Hudson54241132001-12-07 15:38:26 +000016849
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016850fi
16851
Michael W. Hudson54241132001-12-07 15:38:26 +000016852
16853
16854
16855
16856
16857
Guido van Rossum627b2d71993-12-24 10:39:16 +000016858# checks for system services
16859# (none yet)
16860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016861# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016862echo "$as_me:$LINENO: checking for __fpu_control" >&5
16863echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16864if test "${ac_cv_func___fpu_control+set}" = set; then
16865 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016866else
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 cat >conftest.$ac_ext <<_ACEOF
16868#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016869/* confdefs.h. */
16870_ACEOF
16871cat confdefs.h >>conftest.$ac_ext
16872cat >>conftest.$ac_ext <<_ACEOF
16873/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016874/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016875 which can conflict with char __fpu_control (); below.
16876 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016877 <limits.h> exists even on freestanding compilers. Under hpux,
16878 including <limits.h> includes <sys/time.h> and causes problems
16879 checking for functions defined therein. */
16880#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016881# include <limits.h>
16882#else
16883# include <assert.h>
16884#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016885/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016886#ifdef __cplusplus
16887extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016888{
Martin v. Löwis11437992002-04-12 09:54:03 +000016889#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016890/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016891 builtin and then its argument prototype would still apply. */
16892char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016893/* The GNU C library defines this for functions which it implements
16894 to always fail with ENOSYS. Some functions are actually named
16895 something starting with __ and the normal name is an alias. */
16896#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16897choke me
16898#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016899char (*f) () = __fpu_control;
16900#endif
16901#ifdef __cplusplus
16902}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016903#endif
16904
Skip Montanaro6dead952003-09-25 14:50:04 +000016905int
16906main ()
16907{
16908return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 ;
16910 return 0;
16911}
16912_ACEOF
16913rm -f conftest.$ac_objext conftest$ac_exeext
16914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16915 (eval $ac_link) 2>&5
16916 ac_status=$?
16917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16918 (exit $ac_status); } &&
16919 { ac_try='test -s conftest$ac_exeext'
16920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16921 (eval $ac_try) 2>&5
16922 ac_status=$?
16923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16924 (exit $ac_status); }; }; then
16925 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016926else
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016928sed 's/^/| /' conftest.$ac_ext >&5
16929
Martin v. Löwis11437992002-04-12 09:54:03 +000016930ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016931fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016932rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016934echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16935echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16936if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016937 :
16938else
Martin v. Löwis11437992002-04-12 09:54:03 +000016939
16940echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16941echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16942if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016944else
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016946LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016947cat >conftest.$ac_ext <<_ACEOF
16948#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016949/* confdefs.h. */
16950_ACEOF
16951cat confdefs.h >>conftest.$ac_ext
16952cat >>conftest.$ac_ext <<_ACEOF
16953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016954
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016955/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016956#ifdef __cplusplus
16957extern "C"
16958#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016959/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 builtin and then its argument prototype would still apply. */
16961char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016962int
16963main ()
16964{
16965__fpu_control ();
16966 ;
16967 return 0;
16968}
16969_ACEOF
16970rm -f conftest.$ac_objext conftest$ac_exeext
16971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16972 (eval $ac_link) 2>&5
16973 ac_status=$?
16974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16975 (exit $ac_status); } &&
16976 { ac_try='test -s conftest$ac_exeext'
16977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16978 (eval $ac_try) 2>&5
16979 ac_status=$?
16980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16981 (exit $ac_status); }; }; then
16982 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016983else
Martin v. Löwis11437992002-04-12 09:54:03 +000016984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016985sed 's/^/| /' conftest.$ac_ext >&5
16986
Martin v. Löwis11437992002-04-12 09:54:03 +000016987ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16990LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016992echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16993echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16994if test $ac_cv_lib_ieee___fpu_control = yes; then
16995 cat >>confdefs.h <<_ACEOF
16996#define HAVE_LIBIEEE 1
16997_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016998
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016999 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017000
Guido van Rossum627b2d71993-12-24 10:39:16 +000017001fi
17002
Michael W. Hudson54241132001-12-07 15:38:26 +000017003
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017004fi
17005
Michael W. Hudson54241132001-12-07 15:38:26 +000017006
Guido van Rossum7f253911997-05-09 02:42:48 +000017007# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017008echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17009echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17010
Guido van Rossum7f253911997-05-09 02:42:48 +000017011# Check whether --with-fpectl or --without-fpectl was given.
17012if test "${with_fpectl+set}" = set; then
17013 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017014
Guido van Rossum7f253911997-05-09 02:42:48 +000017015if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017016then
17017
17018cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017019#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017020_ACEOF
17021
17022 echo "$as_me:$LINENO: result: yes" >&5
17023echo "${ECHO_T}yes" >&6
17024else echo "$as_me:$LINENO: result: no" >&5
17025echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017026fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017027else
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 echo "$as_me:$LINENO: result: no" >&5
17029echo "${ECHO_T}no" >&6
17030fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017031
Guido van Rossum7f43da71994-08-01 12:15:30 +000017032# check for --with-libm=...
17033
Guido van Rossum563e7081996-09-10 18:20:48 +000017034case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017035Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017036BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017037*) LIBM=-lm
17038esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017039echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17040echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17041
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017042# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017043if test "${with_libm+set}" = set; then
17044 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017045
Guido van Rossum7f253911997-05-09 02:42:48 +000017046if test "$withval" = no
17047then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17049echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017050elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017051then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017052 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17053echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17054else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17055echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17056 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017057fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017058else
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17060echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17061fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017062
17063# check for --with-libc=...
17064
Martin v. Löwis11437992002-04-12 09:54:03 +000017065echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
17066echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
17067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017068# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017069if test "${with_libc+set}" = set; then
17070 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000017071
Guido van Rossum7f253911997-05-09 02:42:48 +000017072if test "$withval" = no
17073then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 echo "$as_me:$LINENO: result: force LIBC empty" >&5
17075echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017076elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017077then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
17079echo "${ECHO_T}set LIBC=\"$withval\"" >&6
17080else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
17081echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
17082 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017083fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017084else
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
17086echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
17087fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017088
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017089# check for hypot() in math library
17090LIBS_SAVE=$LIBS
17091LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000017092
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017093for ac_func in hypot
17094do
Martin v. Löwis11437992002-04-12 09:54:03 +000017095as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17096echo "$as_me:$LINENO: checking for $ac_func" >&5
17097echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17098if eval "test \"\${$as_ac_var+set}\" = set"; then
17099 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017100else
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 cat >conftest.$ac_ext <<_ACEOF
17102#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017103/* confdefs.h. */
17104_ACEOF
17105cat confdefs.h >>conftest.$ac_ext
17106cat >>conftest.$ac_ext <<_ACEOF
17107/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017108/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017109 which can conflict with char $ac_func (); below.
17110 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017111 <limits.h> exists even on freestanding compilers. Under hpux,
17112 including <limits.h> includes <sys/time.h> and causes problems
17113 checking for functions defined therein. */
17114#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017115# include <limits.h>
17116#else
17117# include <assert.h>
17118#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017119/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017120#ifdef __cplusplus
17121extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017122{
Martin v. Löwis11437992002-04-12 09:54:03 +000017123#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017124/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 builtin and then its argument prototype would still apply. */
17126char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017127/* The GNU C library defines this for functions which it implements
17128 to always fail with ENOSYS. Some functions are actually named
17129 something starting with __ and the normal name is an alias. */
17130#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17131choke me
17132#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017133char (*f) () = $ac_func;
17134#endif
17135#ifdef __cplusplus
17136}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017137#endif
17138
Skip Montanaro6dead952003-09-25 14:50:04 +000017139int
17140main ()
17141{
17142return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 ;
17144 return 0;
17145}
17146_ACEOF
17147rm -f conftest.$ac_objext conftest$ac_exeext
17148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17149 (eval $ac_link) 2>&5
17150 ac_status=$?
17151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17152 (exit $ac_status); } &&
17153 { ac_try='test -s conftest$ac_exeext'
17154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17155 (eval $ac_try) 2>&5
17156 ac_status=$?
17157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17158 (exit $ac_status); }; }; then
17159 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017160else
Martin v. Löwis11437992002-04-12 09:54:03 +000017161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017162sed 's/^/| /' conftest.$ac_ext >&5
17163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017168echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17169echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17170if test `eval echo '${'$as_ac_var'}'` = yes; then
17171 cat >>confdefs.h <<_ACEOF
17172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17173_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017174
Michael W. Hudson54241132001-12-07 15:38:26 +000017175else
Martin v. Löwis11437992002-04-12 09:54:03 +000017176 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017177fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000017178done
17179
Michael W. Hudson54241132001-12-07 15:38:26 +000017180
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017181LIBS=$LIBS_SAVE
17182
Guido van Rossumef2255b2000-03-10 22:30:29 +000017183# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017184if test "${ac_cv_header_wchar_h+set}" = set; then
17185 echo "$as_me:$LINENO: checking for wchar.h" >&5
17186echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17187if test "${ac_cv_header_wchar_h+set}" = set; then
17188 echo $ECHO_N "(cached) $ECHO_C" >&6
17189fi
17190echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17191echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017192else
Martin v. Löwis11437992002-04-12 09:54:03 +000017193 # Is the header compilable?
17194echo "$as_me:$LINENO: checking wchar.h usability" >&5
17195echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
17196cat >conftest.$ac_ext <<_ACEOF
17197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017198/* confdefs.h. */
17199_ACEOF
17200cat confdefs.h >>conftest.$ac_ext
17201cat >>conftest.$ac_ext <<_ACEOF
17202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017203$ac_includes_default
17204#include <wchar.h>
17205_ACEOF
17206rm -f conftest.$ac_objext
17207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17208 (eval $ac_compile) 2>&5
17209 ac_status=$?
17210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17211 (exit $ac_status); } &&
17212 { ac_try='test -s conftest.$ac_objext'
17213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17214 (eval $ac_try) 2>&5
17215 ac_status=$?
17216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217 (exit $ac_status); }; }; then
17218 ac_header_compiler=yes
17219else
17220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017221sed 's/^/| /' conftest.$ac_ext >&5
17222
Martin v. Löwis11437992002-04-12 09:54:03 +000017223ac_header_compiler=no
17224fi
17225rm -f conftest.$ac_objext conftest.$ac_ext
17226echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17227echo "${ECHO_T}$ac_header_compiler" >&6
17228
17229# Is the header present?
17230echo "$as_me:$LINENO: checking wchar.h presence" >&5
17231echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
17232cat >conftest.$ac_ext <<_ACEOF
17233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017234/* confdefs.h. */
17235_ACEOF
17236cat confdefs.h >>conftest.$ac_ext
17237cat >>conftest.$ac_ext <<_ACEOF
17238/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017239#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017240_ACEOF
17241if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17242 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17243 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017244 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000017245 rm -f conftest.er1
17246 cat conftest.err >&5
17247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17248 (exit $ac_status); } >/dev/null; then
17249 if test -s conftest.err; then
17250 ac_cpp_err=$ac_c_preproc_warn_flag
17251 else
17252 ac_cpp_err=
17253 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017254else
Martin v. Löwis11437992002-04-12 09:54:03 +000017255 ac_cpp_err=yes
17256fi
17257if test -z "$ac_cpp_err"; then
17258 ac_header_preproc=yes
17259else
17260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017261sed 's/^/| /' conftest.$ac_ext >&5
17262
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017265rm -f conftest.err conftest.$ac_ext
17266echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17267echo "${ECHO_T}$ac_header_preproc" >&6
17268
17269# So? What about this header?
17270case $ac_header_compiler:$ac_header_preproc in
17271 yes:no )
17272 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
17273echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17274 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017275echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17276 (
17277 cat <<\_ASBOX
17278## ------------------------------------ ##
17279## Report this to bug-autoconf@gnu.org. ##
17280## ------------------------------------ ##
17281_ASBOX
17282 ) |
17283 sed "s/^/$as_me: WARNING: /" >&2
17284 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017285 no:yes )
17286 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
17287echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
17288 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
17289echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
17290 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017291echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
17292 (
17293 cat <<\_ASBOX
17294## ------------------------------------ ##
17295## Report this to bug-autoconf@gnu.org. ##
17296## ------------------------------------ ##
17297_ASBOX
17298 ) |
17299 sed "s/^/$as_me: WARNING: /" >&2
17300 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017301esac
17302echo "$as_me:$LINENO: checking for wchar.h" >&5
17303echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
17304if test "${ac_cv_header_wchar_h+set}" = set; then
17305 echo $ECHO_N "(cached) $ECHO_C" >&6
17306else
17307 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000017308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017309echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
17310echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
17311
17312fi
17313if test $ac_cv_header_wchar_h = yes; then
17314
17315
17316cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017317#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017318_ACEOF
17319
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017320 wchar_h="yes"
17321
Guido van Rossumef2255b2000-03-10 22:30:29 +000017322else
Martin v. Löwis11437992002-04-12 09:54:03 +000017323 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017324
17325fi
17326
Michael W. Hudson54241132001-12-07 15:38:26 +000017327
Martin v. Löwis11437992002-04-12 09:54:03 +000017328
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017329# determine wchar_t size
17330if test "$wchar_h" = yes
17331then
Martin v. Löwis11437992002-04-12 09:54:03 +000017332 echo "$as_me:$LINENO: checking for wchar_t" >&5
17333echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
17334if test "${ac_cv_type_wchar_t+set}" = set; then
17335 echo $ECHO_N "(cached) $ECHO_C" >&6
17336else
17337 cat >conftest.$ac_ext <<_ACEOF
17338#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017339/* confdefs.h. */
17340_ACEOF
17341cat confdefs.h >>conftest.$ac_ext
17342cat >>conftest.$ac_ext <<_ACEOF
17343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017344#include <wchar.h>
17345
Martin v. Löwis11437992002-04-12 09:54:03 +000017346int
17347main ()
17348{
17349if ((wchar_t *) 0)
17350 return 0;
17351if (sizeof (wchar_t))
17352 return 0;
17353 ;
17354 return 0;
17355}
17356_ACEOF
17357rm -f conftest.$ac_objext
17358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17359 (eval $ac_compile) 2>&5
17360 ac_status=$?
17361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17362 (exit $ac_status); } &&
17363 { ac_try='test -s conftest.$ac_objext'
17364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17365 (eval $ac_try) 2>&5
17366 ac_status=$?
17367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17368 (exit $ac_status); }; }; then
17369 ac_cv_type_wchar_t=yes
17370else
17371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017372sed 's/^/| /' conftest.$ac_ext >&5
17373
Martin v. Löwis11437992002-04-12 09:54:03 +000017374ac_cv_type_wchar_t=no
17375fi
17376rm -f conftest.$ac_objext conftest.$ac_ext
17377fi
17378echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
17379echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
17380
17381echo "$as_me:$LINENO: checking size of wchar_t" >&5
17382echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
17383if test "${ac_cv_sizeof_wchar_t+set}" = set; then
17384 echo $ECHO_N "(cached) $ECHO_C" >&6
17385else
17386 if test "$ac_cv_type_wchar_t" = yes; then
17387 # The cast to unsigned long works around a bug in the HP C Compiler
17388 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17389 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17390 # This bug is HP SR number 8606223364.
17391 if test "$cross_compiling" = yes; then
17392 # Depending upon the size, compute the lo and hi bounds.
17393cat >conftest.$ac_ext <<_ACEOF
17394#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017395/* confdefs.h. */
17396_ACEOF
17397cat confdefs.h >>conftest.$ac_ext
17398cat >>conftest.$ac_ext <<_ACEOF
17399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017400#include <wchar.h>
17401
Martin v. Löwis11437992002-04-12 09:54:03 +000017402int
17403main ()
17404{
17405static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
17406test_array [0] = 0
17407
17408 ;
17409 return 0;
17410}
17411_ACEOF
17412rm -f conftest.$ac_objext
17413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17414 (eval $ac_compile) 2>&5
17415 ac_status=$?
17416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417 (exit $ac_status); } &&
17418 { ac_try='test -s conftest.$ac_objext'
17419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17420 (eval $ac_try) 2>&5
17421 ac_status=$?
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); }; }; then
17424 ac_lo=0 ac_mid=0
17425 while :; do
17426 cat >conftest.$ac_ext <<_ACEOF
17427#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017428/* confdefs.h. */
17429_ACEOF
17430cat confdefs.h >>conftest.$ac_ext
17431cat >>conftest.$ac_ext <<_ACEOF
17432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017433#include <wchar.h>
17434
Martin v. Löwis11437992002-04-12 09:54:03 +000017435int
17436main ()
17437{
17438static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17439test_array [0] = 0
17440
17441 ;
17442 return 0;
17443}
17444_ACEOF
17445rm -f conftest.$ac_objext
17446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17447 (eval $ac_compile) 2>&5
17448 ac_status=$?
17449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17450 (exit $ac_status); } &&
17451 { ac_try='test -s conftest.$ac_objext'
17452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17453 (eval $ac_try) 2>&5
17454 ac_status=$?
17455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456 (exit $ac_status); }; }; then
17457 ac_hi=$ac_mid; break
17458else
17459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017460sed 's/^/| /' conftest.$ac_ext >&5
17461
Martin v. Löwis11437992002-04-12 09:54:03 +000017462ac_lo=`expr $ac_mid + 1`
17463 if test $ac_lo -le $ac_mid; then
17464 ac_lo= ac_hi=
17465 break
17466 fi
17467 ac_mid=`expr 2 '*' $ac_mid + 1`
17468fi
17469rm -f conftest.$ac_objext conftest.$ac_ext
17470 done
17471else
17472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017473sed 's/^/| /' conftest.$ac_ext >&5
17474
Martin v. Löwis11437992002-04-12 09:54:03 +000017475cat >conftest.$ac_ext <<_ACEOF
17476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017477/* confdefs.h. */
17478_ACEOF
17479cat confdefs.h >>conftest.$ac_ext
17480cat >>conftest.$ac_ext <<_ACEOF
17481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017482#include <wchar.h>
17483
Martin v. Löwis11437992002-04-12 09:54:03 +000017484int
17485main ()
17486{
17487static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
17488test_array [0] = 0
17489
17490 ;
17491 return 0;
17492}
17493_ACEOF
17494rm -f conftest.$ac_objext
17495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17496 (eval $ac_compile) 2>&5
17497 ac_status=$?
17498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17499 (exit $ac_status); } &&
17500 { ac_try='test -s conftest.$ac_objext'
17501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17502 (eval $ac_try) 2>&5
17503 ac_status=$?
17504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17505 (exit $ac_status); }; }; then
17506 ac_hi=-1 ac_mid=-1
17507 while :; do
17508 cat >conftest.$ac_ext <<_ACEOF
17509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017510/* confdefs.h. */
17511_ACEOF
17512cat confdefs.h >>conftest.$ac_ext
17513cat >>conftest.$ac_ext <<_ACEOF
17514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017515#include <wchar.h>
17516
Martin v. Löwis11437992002-04-12 09:54:03 +000017517int
17518main ()
17519{
17520static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
17521test_array [0] = 0
17522
17523 ;
17524 return 0;
17525}
17526_ACEOF
17527rm -f conftest.$ac_objext
17528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17529 (eval $ac_compile) 2>&5
17530 ac_status=$?
17531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17532 (exit $ac_status); } &&
17533 { ac_try='test -s conftest.$ac_objext'
17534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17535 (eval $ac_try) 2>&5
17536 ac_status=$?
17537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17538 (exit $ac_status); }; }; then
17539 ac_lo=$ac_mid; break
17540else
17541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017542sed 's/^/| /' conftest.$ac_ext >&5
17543
Martin v. Löwis11437992002-04-12 09:54:03 +000017544ac_hi=`expr '(' $ac_mid ')' - 1`
17545 if test $ac_mid -le $ac_hi; then
17546 ac_lo= ac_hi=
17547 break
17548 fi
17549 ac_mid=`expr 2 '*' $ac_mid`
17550fi
17551rm -f conftest.$ac_objext conftest.$ac_ext
17552 done
17553else
17554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017555sed 's/^/| /' conftest.$ac_ext >&5
17556
Martin v. Löwis11437992002-04-12 09:54:03 +000017557ac_lo= ac_hi=
17558fi
17559rm -f conftest.$ac_objext conftest.$ac_ext
17560fi
17561rm -f conftest.$ac_objext conftest.$ac_ext
17562# Binary search between lo and hi bounds.
17563while test "x$ac_lo" != "x$ac_hi"; do
17564 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17565 cat >conftest.$ac_ext <<_ACEOF
17566#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017567/* confdefs.h. */
17568_ACEOF
17569cat confdefs.h >>conftest.$ac_ext
17570cat >>conftest.$ac_ext <<_ACEOF
17571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017572#include <wchar.h>
17573
Martin v. Löwis11437992002-04-12 09:54:03 +000017574int
17575main ()
17576{
17577static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
17578test_array [0] = 0
17579
17580 ;
17581 return 0;
17582}
17583_ACEOF
17584rm -f conftest.$ac_objext
17585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17586 (eval $ac_compile) 2>&5
17587 ac_status=$?
17588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17589 (exit $ac_status); } &&
17590 { ac_try='test -s conftest.$ac_objext'
17591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17592 (eval $ac_try) 2>&5
17593 ac_status=$?
17594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17595 (exit $ac_status); }; }; then
17596 ac_hi=$ac_mid
17597else
17598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017599sed 's/^/| /' conftest.$ac_ext >&5
17600
Martin v. Löwis11437992002-04-12 09:54:03 +000017601ac_lo=`expr '(' $ac_mid ')' + 1`
17602fi
17603rm -f conftest.$ac_objext conftest.$ac_ext
17604done
17605case $ac_lo in
17606?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017607'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17608See \`config.log' for more details." >&5
17609echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17610See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017611 { (exit 1); exit 1; }; } ;;
17612esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017613else
17614 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017615 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17616See \`config.log' for more details." >&5
17617echo "$as_me: error: cannot run test program while cross compiling
17618See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000017620else
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 cat >conftest.$ac_ext <<_ACEOF
17622#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017623/* confdefs.h. */
17624_ACEOF
17625cat confdefs.h >>conftest.$ac_ext
17626cat >>conftest.$ac_ext <<_ACEOF
17627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017628#include <wchar.h>
17629
17630long longval () { return (long) (sizeof (wchar_t)); }
17631unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000017632#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017633#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017634int
17635main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017636{
Martin v. Löwis11437992002-04-12 09:54:03 +000017637
17638 FILE *f = fopen ("conftest.val", "w");
17639 if (! f)
17640 exit (1);
17641 if (((long) (sizeof (wchar_t))) < 0)
17642 {
17643 long i = longval ();
17644 if (i != ((long) (sizeof (wchar_t))))
17645 exit (1);
17646 fprintf (f, "%ld\n", i);
17647 }
17648 else
17649 {
17650 unsigned long i = ulongval ();
17651 if (i != ((long) (sizeof (wchar_t))))
17652 exit (1);
17653 fprintf (f, "%lu\n", i);
17654 }
17655 exit (ferror (f) || fclose (f) != 0);
17656
17657 ;
17658 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017659}
Martin v. Löwis11437992002-04-12 09:54:03 +000017660_ACEOF
17661rm -f conftest$ac_exeext
17662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17663 (eval $ac_link) 2>&5
17664 ac_status=$?
17665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17668 (eval $ac_try) 2>&5
17669 ac_status=$?
17670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17671 (exit $ac_status); }; }; then
17672 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017673else
Martin v. Löwis11437992002-04-12 09:54:03 +000017674 echo "$as_me: program exited with status $ac_status" >&5
17675echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017676sed 's/^/| /' conftest.$ac_ext >&5
17677
Martin v. Löwis11437992002-04-12 09:54:03 +000017678( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017679{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17680See \`config.log' for more details." >&5
17681echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17682See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 { (exit 1); exit 1; }; }
17684fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017685rm -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 +000017686fi
17687fi
17688rm -f conftest.val
17689else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017690 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017691fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017692fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017693echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17694echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17695cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017696#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017697_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017698
Michael W. Hudson54241132001-12-07 15:38:26 +000017699
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017700fi
17701
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017702echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17703echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17704have_ucs4_tcl=no
17705cat >conftest.$ac_ext <<_ACEOF
17706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017707/* confdefs.h. */
17708_ACEOF
17709cat confdefs.h >>conftest.$ac_ext
17710cat >>conftest.$ac_ext <<_ACEOF
17711/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017712
17713#include <tcl.h>
17714#if TCL_UTF_MAX != 6
17715# error "NOT UCS4_TCL"
17716#endif
17717int
17718main ()
17719{
17720
17721 ;
17722 return 0;
17723}
17724_ACEOF
17725rm -f conftest.$ac_objext
17726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17727 (eval $ac_compile) 2>&5
17728 ac_status=$?
17729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17730 (exit $ac_status); } &&
17731 { ac_try='test -s conftest.$ac_objext'
17732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17733 (eval $ac_try) 2>&5
17734 ac_status=$?
17735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736 (exit $ac_status); }; }; then
17737
17738
17739cat >>confdefs.h <<\_ACEOF
17740#define HAVE_UCS4_TCL 1
17741_ACEOF
17742
17743 have_ucs4_tcl=yes
17744
17745else
17746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017747sed 's/^/| /' conftest.$ac_ext >&5
17748
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017749fi
17750rm -f conftest.$ac_objext conftest.$ac_ext
17751echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17752echo "${ECHO_T}$have_ucs4_tcl" >&6
17753
Skip Montanaro6dead952003-09-25 14:50:04 +000017754# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017755if test "$wchar_h" = yes
17756then
17757 # check whether wchar_t is signed or not
17758 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17759echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17760 if test "${ac_cv_wchar_t_signed+set}" = set; then
17761 echo $ECHO_N "(cached) $ECHO_C" >&6
17762else
17763
17764 if test "$cross_compiling" = yes; then
17765 ac_cv_wchar_t_signed=yes
17766else
17767 cat >conftest.$ac_ext <<_ACEOF
17768#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017769/* confdefs.h. */
17770_ACEOF
17771cat confdefs.h >>conftest.$ac_ext
17772cat >>conftest.$ac_ext <<_ACEOF
17773/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017774
17775 #include <wchar.h>
17776 int main()
17777 {
17778 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17779 }
17780
17781_ACEOF
17782rm -f conftest$ac_exeext
17783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17784 (eval $ac_link) 2>&5
17785 ac_status=$?
17786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17787 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17789 (eval $ac_try) 2>&5
17790 ac_status=$?
17791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17792 (exit $ac_status); }; }; then
17793 ac_cv_wchar_t_signed=yes
17794else
17795 echo "$as_me: program exited with status $ac_status" >&5
17796echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017797sed 's/^/| /' conftest.$ac_ext >&5
17798
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017799( exit $ac_status )
17800ac_cv_wchar_t_signed=no
17801fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017802rm -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 +000017803fi
17804fi
17805
17806 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17807echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17808fi
17809
Martin v. Löwis11437992002-04-12 09:54:03 +000017810echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17811echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017812# Check whether --enable-unicode or --disable-unicode was given.
17813if test "${enable_unicode+set}" = set; then
17814 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017815
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017816else
17817 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017818fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017819
17820if test $enable_unicode = yes
17821then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017822 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017823 case "$have_ucs4_tcl" in
17824 yes) enable_unicode="ucs4"
17825 ;;
17826 *) enable_unicode="ucs2"
17827 ;;
17828 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017829fi
17830
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017831
17832
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017833case "$enable_unicode" in
17834ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017836#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017837_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017838
17839 ;;
17840ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017842#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017843_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017844
17845 ;;
17846esac
17847
Michael W. Hudson54241132001-12-07 15:38:26 +000017848
Martin v. Löwis11437992002-04-12 09:54:03 +000017849
17850
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017851
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017852if test "$enable_unicode" = "no"
17853then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017854 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 echo "$as_me:$LINENO: result: not used" >&5
17856echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017857else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017858 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017859
17860cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017861#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017862_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017863
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017864
17865 # wchar_t is only usable if it maps to an unsigned type
17866 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17867 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017868 then
17869 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017870
Martin v. Löwis11437992002-04-12 09:54:03 +000017871cat >>confdefs.h <<\_ACEOF
17872#define HAVE_USABLE_WCHAR_T 1
17873_ACEOF
17874
17875 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017876#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017877_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017878
17879 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17880 then
17881 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017883#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017884_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017885
17886 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17887 then
17888 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017890#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017891_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017892
17893 else
17894 PY_UNICODE_TYPE="no type found"
17895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17897echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017898fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017899
17900# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017901echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17902echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17903if test "${ac_cv_c_bigendian+set}" = set; then
17904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017905else
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 # See if sys/param.h defines the BYTE_ORDER macro.
17907cat >conftest.$ac_ext <<_ACEOF
17908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017909/* confdefs.h. */
17910_ACEOF
17911cat confdefs.h >>conftest.$ac_ext
17912cat >>conftest.$ac_ext <<_ACEOF
17913/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017914#include <sys/types.h>
17915#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017916
Martin v. Löwis11437992002-04-12 09:54:03 +000017917int
17918main ()
17919{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017920#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17921 bogus endian macros
17922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017923
17924 ;
17925 return 0;
17926}
17927_ACEOF
17928rm -f conftest.$ac_objext
17929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17930 (eval $ac_compile) 2>&5
17931 ac_status=$?
17932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17933 (exit $ac_status); } &&
17934 { ac_try='test -s conftest.$ac_objext'
17935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17936 (eval $ac_try) 2>&5
17937 ac_status=$?
17938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17939 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017940 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017941cat >conftest.$ac_ext <<_ACEOF
17942#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017943/* confdefs.h. */
17944_ACEOF
17945cat confdefs.h >>conftest.$ac_ext
17946cat >>conftest.$ac_ext <<_ACEOF
17947/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017948#include <sys/types.h>
17949#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017950
Martin v. Löwis11437992002-04-12 09:54:03 +000017951int
17952main ()
17953{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017954#if BYTE_ORDER != BIG_ENDIAN
17955 not big endian
17956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017957
17958 ;
17959 return 0;
17960}
17961_ACEOF
17962rm -f conftest.$ac_objext
17963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17964 (eval $ac_compile) 2>&5
17965 ac_status=$?
17966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17967 (exit $ac_status); } &&
17968 { ac_try='test -s conftest.$ac_objext'
17969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17970 (eval $ac_try) 2>&5
17971 ac_status=$?
17972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17973 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017974 ac_cv_c_bigendian=yes
17975else
Martin v. Löwis11437992002-04-12 09:54:03 +000017976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017977sed 's/^/| /' conftest.$ac_ext >&5
17978
Martin v. Löwis11437992002-04-12 09:54:03 +000017979ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017981rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017982else
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017984sed 's/^/| /' conftest.$ac_ext >&5
17985
Martin v. Löwis11437992002-04-12 09:54:03 +000017986# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017987if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017988 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017989 ac_cv_c_bigendian=unknown
17990 cat >conftest.$ac_ext <<_ACEOF
17991#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017992/* confdefs.h. */
17993_ACEOF
17994cat confdefs.h >>conftest.$ac_ext
17995cat >>conftest.$ac_ext <<_ACEOF
17996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017997short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17998short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17999void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
18000short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18001short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18002void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018003int
18004main ()
18005{
18006 _ascii (); _ebcdic ();
18007 ;
18008 return 0;
18009}
18010_ACEOF
18011rm -f conftest.$ac_objext
18012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18013 (eval $ac_compile) 2>&5
18014 ac_status=$?
18015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18016 (exit $ac_status); } &&
18017 { ac_try='test -s conftest.$ac_objext'
18018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18019 (eval $ac_try) 2>&5
18020 ac_status=$?
18021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18022 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018023 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018024 ac_cv_c_bigendian=yes
18025fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018026if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 if test "$ac_cv_c_bigendian" = unknown; then
18028 ac_cv_c_bigendian=no
18029 else
18030 # finding both strings is unlikely to happen, but who knows?
18031 ac_cv_c_bigendian=unknown
18032 fi
18033fi
18034else
18035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018036sed 's/^/| /' conftest.$ac_ext >&5
18037
Martin v. Löwis11437992002-04-12 09:54:03 +000018038fi
18039rm -f conftest.$ac_objext conftest.$ac_ext
18040else
18041 cat >conftest.$ac_ext <<_ACEOF
18042#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018043/* confdefs.h. */
18044_ACEOF
18045cat confdefs.h >>conftest.$ac_ext
18046cat >>conftest.$ac_ext <<_ACEOF
18047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018048int
18049main ()
18050{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018051 /* Are we little or big endian? From Harbison&Steele. */
18052 union
18053 {
18054 long l;
18055 char c[sizeof (long)];
18056 } u;
18057 u.l = 1;
18058 exit (u.c[sizeof (long) - 1] == 1);
18059}
Martin v. Löwis11437992002-04-12 09:54:03 +000018060_ACEOF
18061rm -f conftest$ac_exeext
18062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18063 (eval $ac_link) 2>&5
18064 ac_status=$?
18065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18068 (eval $ac_try) 2>&5
18069 ac_status=$?
18070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18071 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018072 ac_cv_c_bigendian=no
18073else
Martin v. Löwis11437992002-04-12 09:54:03 +000018074 echo "$as_me: program exited with status $ac_status" >&5
18075echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018076sed 's/^/| /' conftest.$ac_ext >&5
18077
Martin v. Löwis11437992002-04-12 09:54:03 +000018078( exit $ac_status )
18079ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000018080fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018081rm -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 +000018082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018083fi
18084rm -f conftest.$ac_objext conftest.$ac_ext
18085fi
18086echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
18087echo "${ECHO_T}$ac_cv_c_bigendian" >&6
18088case $ac_cv_c_bigendian in
18089 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000018090
Martin v. Löwis11437992002-04-12 09:54:03 +000018091cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018092#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018093_ACEOF
18094 ;;
18095 no)
18096 ;;
18097 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018098 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018099presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018100echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018101presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
18102 { (exit 1); exit 1; }; } ;;
18103esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000018104
Michael W. Hudson54241132001-12-07 15:38:26 +000018105
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018106# Check whether right shifting a negative integer extends the sign bit
18107# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000018108echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
18109echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
18110if test "${ac_cv_rshift_extends_sign+set}" = set; then
18111 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018112else
Martin v. Löwis11437992002-04-12 09:54:03 +000018113
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018114if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018115 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018116else
Martin v. Löwis11437992002-04-12 09:54:03 +000018117 cat >conftest.$ac_ext <<_ACEOF
18118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018119/* confdefs.h. */
18120_ACEOF
18121cat confdefs.h >>conftest.$ac_ext
18122cat >>conftest.$ac_ext <<_ACEOF
18123/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018124
18125int main()
18126{
Vladimir Marangozova6180282000-07-12 05:05:06 +000018127 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018128}
18129
Martin v. Löwis11437992002-04-12 09:54:03 +000018130_ACEOF
18131rm -f conftest$ac_exeext
18132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18133 (eval $ac_link) 2>&5
18134 ac_status=$?
18135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18138 (eval $ac_try) 2>&5
18139 ac_status=$?
18140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18141 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000018142 ac_cv_rshift_extends_sign=yes
18143else
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 echo "$as_me: program exited with status $ac_status" >&5
18145echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018146sed 's/^/| /' conftest.$ac_ext >&5
18147
Martin v. Löwis11437992002-04-12 09:54:03 +000018148( exit $ac_status )
18149ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000018150fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018151rm -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 +000018152fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000018153fi
18154
Martin v. Löwis11437992002-04-12 09:54:03 +000018155echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
18156echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000018157if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018158then
Martin v. Löwis11437992002-04-12 09:54:03 +000018159
18160cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018161#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018162_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018163
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018164fi
18165
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018166# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018167echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
18168echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
18169if test "${ac_cv_have_getc_unlocked+set}" = set; then
18170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018171else
Martin v. Löwis11437992002-04-12 09:54:03 +000018172
18173cat >conftest.$ac_ext <<_ACEOF
18174#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018175/* confdefs.h. */
18176_ACEOF
18177cat confdefs.h >>conftest.$ac_ext
18178cat >>conftest.$ac_ext <<_ACEOF
18179/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018180#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018181int
18182main ()
18183{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018184
18185 FILE *f = fopen("/dev/null", "r");
18186 flockfile(f);
18187 getc_unlocked(f);
18188 funlockfile(f);
18189
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 ;
18191 return 0;
18192}
18193_ACEOF
18194rm -f conftest.$ac_objext conftest$ac_exeext
18195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18196 (eval $ac_link) 2>&5
18197 ac_status=$?
18198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18199 (exit $ac_status); } &&
18200 { ac_try='test -s conftest$ac_exeext'
18201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18202 (eval $ac_try) 2>&5
18203 ac_status=$?
18204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018206 ac_cv_have_getc_unlocked=yes
18207else
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018209sed 's/^/| /' conftest.$ac_ext >&5
18210
Martin v. Löwis11437992002-04-12 09:54:03 +000018211ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018214fi
18215
Martin v. Löwis11437992002-04-12 09:54:03 +000018216echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
18217echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018218if test "$ac_cv_have_getc_unlocked" = yes
18219then
Martin v. Löwis11437992002-04-12 09:54:03 +000018220
18221cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018222#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018223_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000018224
18225fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000018226
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018227# check for readline 2.2
18228cat >conftest.$ac_ext <<_ACEOF
18229#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018230/* confdefs.h. */
18231_ACEOF
18232cat confdefs.h >>conftest.$ac_ext
18233cat >>conftest.$ac_ext <<_ACEOF
18234/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018235#include <readline/readline.h>
18236_ACEOF
18237if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18238 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18239 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018240 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018241 rm -f conftest.er1
18242 cat conftest.err >&5
18243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18244 (exit $ac_status); } >/dev/null; then
18245 if test -s conftest.err; then
18246 ac_cpp_err=$ac_c_preproc_warn_flag
18247 else
18248 ac_cpp_err=
18249 fi
18250else
18251 ac_cpp_err=yes
18252fi
18253if test -z "$ac_cpp_err"; then
18254 have_readline=yes
18255else
18256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018257sed 's/^/| /' conftest.$ac_ext >&5
18258
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018259 have_readline=no
18260fi
18261rm -f conftest.err conftest.$ac_ext
18262if test $have_readline = yes
18263then
18264 cat >conftest.$ac_ext <<_ACEOF
18265#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018266/* confdefs.h. */
18267_ACEOF
18268cat confdefs.h >>conftest.$ac_ext
18269cat >>conftest.$ac_ext <<_ACEOF
18270/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018271#include <readline/readline.h>
18272
18273_ACEOF
18274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000018275 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018276
18277cat >>confdefs.h <<\_ACEOF
18278#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
18279_ACEOF
18280
18281fi
18282rm -f conftest*
18283
18284fi
18285
Martin v. Löwis0daad592001-09-30 21:09:59 +000018286# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000018287echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
18288echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
18289if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
18290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000018291else
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000018293LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018294cat >conftest.$ac_ext <<_ACEOF
18295#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018296/* confdefs.h. */
18297_ACEOF
18298cat confdefs.h >>conftest.$ac_ext
18299cat >>conftest.$ac_ext <<_ACEOF
18300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018301
Guido van Rossum353ae582001-07-10 16:45:32 +000018302/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018303#ifdef __cplusplus
18304extern "C"
18305#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000018306/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018307 builtin and then its argument prototype would still apply. */
18308char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018309int
18310main ()
18311{
18312rl_pre_input_hook ();
18313 ;
18314 return 0;
18315}
18316_ACEOF
18317rm -f conftest.$ac_objext conftest$ac_exeext
18318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18319 (eval $ac_link) 2>&5
18320 ac_status=$?
18321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18322 (exit $ac_status); } &&
18323 { ac_try='test -s conftest$ac_exeext'
18324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18325 (eval $ac_try) 2>&5
18326 ac_status=$?
18327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18328 (exit $ac_status); }; }; then
18329 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000018330else
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018332sed 's/^/| /' conftest.$ac_ext >&5
18333
Martin v. Löwis11437992002-04-12 09:54:03 +000018334ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000018335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18337LIBS=$ac_check_lib_save_LIBS
18338fi
18339echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
18340echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
18341if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018342
Martin v. Löwis11437992002-04-12 09:54:03 +000018343cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018344#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018345_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000018346
Martin v. Löwis0daad592001-09-30 21:09:59 +000018347fi
18348
Michael W. Hudson54241132001-12-07 15:38:26 +000018349
Martin v. Löwis0daad592001-09-30 21:09:59 +000018350# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000018351echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
18352echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
18353if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
18354 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000018355else
Martin v. Löwis11437992002-04-12 09:54:03 +000018356 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000018357LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018358cat >conftest.$ac_ext <<_ACEOF
18359#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018360/* confdefs.h. */
18361_ACEOF
18362cat confdefs.h >>conftest.$ac_ext
18363cat >>conftest.$ac_ext <<_ACEOF
18364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018365
Martin v. Löwis0daad592001-09-30 21:09:59 +000018366/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018367#ifdef __cplusplus
18368extern "C"
18369#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000018370/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018371 builtin and then its argument prototype would still apply. */
18372char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018373int
18374main ()
18375{
18376rl_completion_matches ();
18377 ;
18378 return 0;
18379}
18380_ACEOF
18381rm -f conftest.$ac_objext conftest$ac_exeext
18382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18383 (eval $ac_link) 2>&5
18384 ac_status=$?
18385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18386 (exit $ac_status); } &&
18387 { ac_try='test -s conftest$ac_exeext'
18388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18389 (eval $ac_try) 2>&5
18390 ac_status=$?
18391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18392 (exit $ac_status); }; }; then
18393 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000018394else
Martin v. Löwis11437992002-04-12 09:54:03 +000018395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018396sed 's/^/| /' conftest.$ac_ext >&5
18397
Martin v. Löwis11437992002-04-12 09:54:03 +000018398ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000018399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18401LIBS=$ac_check_lib_save_LIBS
18402fi
18403echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
18404echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
18405if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018406
Martin v. Löwis11437992002-04-12 09:54:03 +000018407cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018408#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018409_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000018410
Guido van Rossum353ae582001-07-10 16:45:32 +000018411fi
18412
Jack Jansendd19cf82001-12-06 22:36:17 +000018413
Martin v. Löwis11437992002-04-12 09:54:03 +000018414echo "$as_me:$LINENO: checking for broken nice()" >&5
18415echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
18416if test "${ac_cv_broken_nice+set}" = set; then
18417 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018418else
Martin v. Löwis11437992002-04-12 09:54:03 +000018419
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018420if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000018421 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018422else
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 cat >conftest.$ac_ext <<_ACEOF
18424#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018425/* confdefs.h. */
18426_ACEOF
18427cat confdefs.h >>conftest.$ac_ext
18428cat >>conftest.$ac_ext <<_ACEOF
18429/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018430
18431int main()
18432{
18433 int val1 = nice(1);
18434 if (val1 != -1 && val1 == nice(2))
18435 exit(0);
18436 exit(1);
18437}
18438
Martin v. Löwis11437992002-04-12 09:54:03 +000018439_ACEOF
18440rm -f conftest$ac_exeext
18441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18442 (eval $ac_link) 2>&5
18443 ac_status=$?
18444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18447 (eval $ac_try) 2>&5
18448 ac_status=$?
18449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18450 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018451 ac_cv_broken_nice=yes
18452else
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 echo "$as_me: program exited with status $ac_status" >&5
18454echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018455sed 's/^/| /' conftest.$ac_ext >&5
18456
Martin v. Löwis11437992002-04-12 09:54:03 +000018457( exit $ac_status )
18458ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018459fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018460rm -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 +000018461fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018462fi
18463
Martin v. Löwis11437992002-04-12 09:54:03 +000018464echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
18465echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018466if test "$ac_cv_broken_nice" = yes
18467then
Martin v. Löwis11437992002-04-12 09:54:03 +000018468
18469cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018470#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018471_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018472
18473fi
18474
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018475# tzset(3) exists and works like we expect it to
18476echo "$as_me:$LINENO: checking for working tzset()" >&5
18477echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
18478if test "${ac_cv_working_tzset+set}" = set; then
18479 echo $ECHO_N "(cached) $ECHO_C" >&6
18480else
18481
18482if test "$cross_compiling" = yes; then
18483 ac_cv_working_tzset=no
18484else
18485 cat >conftest.$ac_ext <<_ACEOF
18486#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018487/* confdefs.h. */
18488_ACEOF
18489cat confdefs.h >>conftest.$ac_ext
18490cat >>conftest.$ac_ext <<_ACEOF
18491/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018492
18493#include <stdlib.h>
18494#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018495#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018496int main()
18497{
Brett Cannon18367812003-09-19 00:59:16 +000018498 /* Note that we need to ensure that not only does tzset(3)
18499 do 'something' with localtime, but it works as documented
18500 in the library reference and as expected by the test suite.
18501
18502 Red Hat 6.2 doesn't understand the southern hemisphere
18503 after New Year's Day; it thinks swaps on that day.
18504 */
18505
18506 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
18507 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18508
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018509 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018510 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018511 if (localtime(&groundhogday)->tm_hour != 0)
18512 exit(1);
18513
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018514 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018515 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018516 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018517 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000018518
18519 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18520 tzset();
18521 if (localtime(&groundhogday)->tm_hour != 11)
18522 exit(1);
18523 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18524 exit(1);
18525 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18526 exit(1);
18527
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018528 exit(0);
18529}
18530
18531_ACEOF
18532rm -f conftest$ac_exeext
18533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18534 (eval $ac_link) 2>&5
18535 ac_status=$?
18536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18539 (eval $ac_try) 2>&5
18540 ac_status=$?
18541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18542 (exit $ac_status); }; }; then
18543 ac_cv_working_tzset=yes
18544else
18545 echo "$as_me: program exited with status $ac_status" >&5
18546echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018547sed 's/^/| /' conftest.$ac_ext >&5
18548
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018549( exit $ac_status )
18550ac_cv_working_tzset=no
18551fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018552rm -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 +000018553fi
18554fi
18555
18556echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
18557echo "${ECHO_T}$ac_cv_working_tzset" >&6
18558if test "$ac_cv_working_tzset" = yes
18559then
18560
18561cat >>confdefs.h <<\_ACEOF
18562#define HAVE_WORKING_TZSET 1
18563_ACEOF
18564
18565fi
18566
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018567# Look for subsecond timestamps in struct stat
18568echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
18569echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
18570if test "${ac_cv_stat_tv_nsec+set}" = set; then
18571 echo $ECHO_N "(cached) $ECHO_C" >&6
18572else
18573 cat >conftest.$ac_ext <<_ACEOF
18574#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018575/* confdefs.h. */
18576_ACEOF
18577cat confdefs.h >>conftest.$ac_ext
18578cat >>conftest.$ac_ext <<_ACEOF
18579/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018580#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018581int
18582main ()
18583{
18584
18585struct stat st;
18586st.st_mtim.tv_nsec = 1;
18587
18588 ;
18589 return 0;
18590}
18591_ACEOF
18592rm -f conftest.$ac_objext
18593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18594 (eval $ac_compile) 2>&5
18595 ac_status=$?
18596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18597 (exit $ac_status); } &&
18598 { ac_try='test -s conftest.$ac_objext'
18599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18600 (eval $ac_try) 2>&5
18601 ac_status=$?
18602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18603 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018604 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018605else
18606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018607sed 's/^/| /' conftest.$ac_ext >&5
18608
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018609ac_cv_stat_tv_nsec=no
18610fi
18611rm -f conftest.$ac_objext conftest.$ac_ext
18612fi
18613
18614echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18615echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18616if test "$ac_cv_stat_tv_nsec" = yes
18617then
18618
18619cat >>confdefs.h <<\_ACEOF
18620#define HAVE_STAT_TV_NSEC 1
18621_ACEOF
18622
18623fi
18624
Jack Jansen666b1e72001-10-31 12:11:48 +000018625# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018626echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18627echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18628if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18629 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018630else
Martin v. Löwis11437992002-04-12 09:54:03 +000018631 cat >conftest.$ac_ext <<_ACEOF
18632#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018633/* confdefs.h. */
18634_ACEOF
18635cat confdefs.h >>conftest.$ac_ext
18636cat >>conftest.$ac_ext <<_ACEOF
18637/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018638#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018639int
18640main ()
18641{
Jack Jansen666b1e72001-10-31 12:11:48 +000018642
18643 int rtn;
18644 rtn = mvwdelch(0,0,0);
18645
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 ;
18647 return 0;
18648}
18649_ACEOF
18650rm -f conftest.$ac_objext
18651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18652 (eval $ac_compile) 2>&5
18653 ac_status=$?
18654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18655 (exit $ac_status); } &&
18656 { ac_try='test -s conftest.$ac_objext'
18657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18658 (eval $ac_try) 2>&5
18659 ac_status=$?
18660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18661 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018662 ac_cv_mvwdelch_is_expression=yes
18663else
Martin v. Löwis11437992002-04-12 09:54:03 +000018664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018665sed 's/^/| /' conftest.$ac_ext >&5
18666
Martin v. Löwis11437992002-04-12 09:54:03 +000018667ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018668fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018669rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018670fi
18671
Martin v. Löwis11437992002-04-12 09:54:03 +000018672echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18673echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018674
18675if test "$ac_cv_mvwdelch_is_expression" = yes
18676then
Martin v. Löwis11437992002-04-12 09:54:03 +000018677
18678cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018679#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018680_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018681
18682fi
18683
Martin v. Löwis11437992002-04-12 09:54:03 +000018684echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18685echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18686if test "${ac_cv_window_has_flags+set}" = set; then
18687 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018688else
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 cat >conftest.$ac_ext <<_ACEOF
18690#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018691/* confdefs.h. */
18692_ACEOF
18693cat confdefs.h >>conftest.$ac_ext
18694cat >>conftest.$ac_ext <<_ACEOF
18695/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018696#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018697int
18698main ()
18699{
Jack Jansen666b1e72001-10-31 12:11:48 +000018700
18701 WINDOW *w;
18702 w->_flags = 0;
18703
Martin v. Löwis11437992002-04-12 09:54:03 +000018704 ;
18705 return 0;
18706}
18707_ACEOF
18708rm -f conftest.$ac_objext
18709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18710 (eval $ac_compile) 2>&5
18711 ac_status=$?
18712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18713 (exit $ac_status); } &&
18714 { ac_try='test -s conftest.$ac_objext'
18715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18716 (eval $ac_try) 2>&5
18717 ac_status=$?
18718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18719 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018720 ac_cv_window_has_flags=yes
18721else
Martin v. Löwis11437992002-04-12 09:54:03 +000018722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018723sed 's/^/| /' conftest.$ac_ext >&5
18724
Martin v. Löwis11437992002-04-12 09:54:03 +000018725ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018727rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018728fi
18729
Martin v. Löwis11437992002-04-12 09:54:03 +000018730echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18731echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018732
Jack Jansen666b1e72001-10-31 12:11:48 +000018733
18734if test "$ac_cv_window_has_flags" = yes
18735then
Martin v. Löwis11437992002-04-12 09:54:03 +000018736
18737cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018738#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018739_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018740
18741fi
18742
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018743echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18744echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18745
18746if test -e /dev/ptmx
18747then
18748 echo "$as_me:$LINENO: result: yes" >&5
18749echo "${ECHO_T}yes" >&6
18750
18751cat >>confdefs.h <<\_ACEOF
18752#define HAVE_DEV_PTMX 1
18753_ACEOF
18754
18755else
18756 echo "$as_me:$LINENO: result: no" >&5
18757echo "${ECHO_T}no" >&6
18758fi
18759
Neal Norwitz865400f2003-03-21 01:42:58 +000018760echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18761echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18762
18763if test -e /dev/ptc
18764then
18765 echo "$as_me:$LINENO: result: yes" >&5
18766echo "${ECHO_T}yes" >&6
18767
18768cat >>confdefs.h <<\_ACEOF
18769#define HAVE_DEV_PTC 1
18770_ACEOF
18771
18772else
18773 echo "$as_me:$LINENO: result: no" >&5
18774echo "${ECHO_T}no" >&6
18775fi
18776
Martin v. Löwis11437992002-04-12 09:54:03 +000018777echo "$as_me:$LINENO: checking for socklen_t" >&5
18778echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18779if test "${ac_cv_type_socklen_t+set}" = set; then
18780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018781else
Martin v. Löwis11437992002-04-12 09:54:03 +000018782 cat >conftest.$ac_ext <<_ACEOF
18783#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018784/* confdefs.h. */
18785_ACEOF
18786cat confdefs.h >>conftest.$ac_ext
18787cat >>conftest.$ac_ext <<_ACEOF
18788/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018789
18790#ifdef HAVE_SYS_TYPES_H
18791#include <sys/types.h>
18792#endif
18793#ifdef HAVE_SYS_SOCKET_H
18794#include <sys/socket.h>
18795#endif
18796
18797
Martin v. Löwis11437992002-04-12 09:54:03 +000018798int
18799main ()
18800{
18801if ((socklen_t *) 0)
18802 return 0;
18803if (sizeof (socklen_t))
18804 return 0;
18805 ;
18806 return 0;
18807}
18808_ACEOF
18809rm -f conftest.$ac_objext
18810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18811 (eval $ac_compile) 2>&5
18812 ac_status=$?
18813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18814 (exit $ac_status); } &&
18815 { ac_try='test -s conftest.$ac_objext'
18816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18817 (eval $ac_try) 2>&5
18818 ac_status=$?
18819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018821 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018822else
Martin v. Löwis11437992002-04-12 09:54:03 +000018823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018824sed 's/^/| /' conftest.$ac_ext >&5
18825
Martin v. Löwis11437992002-04-12 09:54:03 +000018826ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018827fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018828rm -f conftest.$ac_objext conftest.$ac_ext
18829fi
18830echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18831echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18832if test $ac_cv_type_socklen_t = yes; then
18833 :
18834else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018835
Martin v. Löwis01c04012002-11-11 14:58:44 +000018836cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018837#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018838_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018839
18840fi
18841
Michael W. Hudson54241132001-12-07 15:38:26 +000018842
Michael W. Hudson54241132001-12-07 15:38:26 +000018843
18844
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018845for h in `(cd $srcdir;echo Python/thread_*.h)`
18846do
18847 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18848done
18849
Michael W. Hudson54241132001-12-07 15:38:26 +000018850
Jack Jansen0b06be72002-06-21 14:48:38 +000018851SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018852echo "$as_me:$LINENO: checking for build directories" >&5
18853echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018854for dir in $SRCDIRS; do
18855 if test ! -d $dir; then
18856 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018857 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018858done
Martin v. Löwis11437992002-04-12 09:54:03 +000018859echo "$as_me:$LINENO: result: done" >&5
18860echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018861
Guido van Rossum627b2d71993-12-24 10:39:16 +000018862# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018863 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018864
Martin v. Löwis11437992002-04-12 09:54:03 +000018865cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018866# This file is a shell script that caches the results of configure
18867# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018868# scripts and configure runs, see configure's option --config-cache.
18869# It is not useful on other systems. If it contains results you don't
18870# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018871#
Martin v. Löwis11437992002-04-12 09:54:03 +000018872# config.status only pays attention to the cache file if you give it
18873# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018874#
Skip Montanaro6dead952003-09-25 14:50:04 +000018875# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018876# loading this file, other *unset* `ac_cv_foo' will be assigned the
18877# following values.
18878
18879_ACEOF
18880
Guido van Rossumf78abae1997-01-21 22:02:36 +000018881# The following way of writing the cache mishandles newlines in values,
18882# but we know of no workaround that is simple, portable, and efficient.
18883# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018884# Ultrix sh set writes to stderr and can't be redirected directly,
18885# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018886{
18887 (set) 2>&1 |
18888 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18889 *ac_space=\ *)
18890 # `set' does not quote correctly, so add quotes (double-quote
18891 # substitution turns \\\\ into \\, and sed turns \\ into \).
18892 sed -n \
18893 "s/'/'\\\\''/g;
18894 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18895 ;;
18896 *)
18897 # `set' quotes correctly as required by POSIX, so do not add quotes.
18898 sed -n \
18899 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18900 ;;
18901 esac;
18902} |
18903 sed '
18904 t clear
18905 : clear
18906 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18907 t end
18908 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18909 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018910if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018911 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018912 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18913 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018914 else
18915 echo "not updating unwritable cache $cache_file"
18916 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018917fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018918rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018919
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018920test "x$prefix" = xNONE && prefix=$ac_default_prefix
18921# Let make expand exec_prefix.
18922test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018923
Martin v. Löwis11437992002-04-12 09:54:03 +000018924# VPATH may cause trouble with some makes, so we remove $(srcdir),
18925# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18926# trailing colons and then remove the whole line if VPATH becomes empty
18927# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018928if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018929 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18930s/:*\$(srcdir):*/:/;
18931s/:*\${srcdir}:*/:/;
18932s/:*@srcdir@:*/:/;
18933s/^\([^=]*=[ ]*\):*/\1/;
18934s/:*$//;
18935s/^[^=]*=[ ]*$//;
18936}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018937fi
18938
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018939DEFS=-DHAVE_CONFIG_H
18940
Skip Montanaro6dead952003-09-25 14:50:04 +000018941ac_libobjs=
18942ac_ltlibobjs=
18943for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18944 # 1. Remove the extension, and $U if already installed.
18945 ac_i=`echo "$ac_i" |
18946 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18947 # 2. Add them.
18948 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18949 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18950done
18951LIBOBJS=$ac_libobjs
18952
18953LTLIBOBJS=$ac_ltlibobjs
18954
18955
Martin v. Löwis11437992002-04-12 09:54:03 +000018956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018957: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018958ac_clean_files_save=$ac_clean_files
18959ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18960{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18961echo "$as_me: creating $CONFIG_STATUS" >&6;}
18962cat >$CONFIG_STATUS <<_ACEOF
18963#! $SHELL
18964# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018965# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018966# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018967# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018968
Martin v. Löwis11437992002-04-12 09:54:03 +000018969debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018970ac_cs_recheck=false
18971ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018972SHELL=\${CONFIG_SHELL-$SHELL}
18973_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018974
Martin v. Löwis11437992002-04-12 09:54:03 +000018975cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018976## --------------------- ##
18977## M4sh Initialization. ##
18978## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018979
Martin v. Löwis11437992002-04-12 09:54:03 +000018980# Be Bourne compatible
18981if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18982 emulate sh
18983 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018984 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18985 # is contrary to our usage. Disable this feature.
18986 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018987elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18988 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018989fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018990
Martin v. Löwis11437992002-04-12 09:54:03 +000018991# Support unset when possible.
18992if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18993 as_unset=unset
18994else
18995 as_unset=false
18996fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018997
Skip Montanaro6dead952003-09-25 14:50:04 +000018998
18999# Work around bugs in pre-3.0 UWIN ksh.
19000$as_unset ENV MAIL MAILPATH
19001PS1='$ '
19002PS2='> '
19003PS4='+ '
19004
19005# NLS nuisances.
19006for as_var in \
19007 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19008 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19009 LC_TELEPHONE LC_TIME
19010do
19011 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19012 eval $as_var=C; export $as_var
19013 else
19014 $as_unset $as_var
19015 fi
19016done
19017
19018# Required to use basename.
19019if expr a : '\(a\)' >/dev/null 2>&1; then
19020 as_expr=expr
19021else
19022 as_expr=false
19023fi
19024
19025if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19026 as_basename=basename
19027else
19028 as_basename=false
19029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019030
19031
19032# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000019033as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019034$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19035 X"$0" : 'X\(//\)$' \| \
19036 X"$0" : 'X\(/\)$' \| \
19037 . : '\(.\)' 2>/dev/null ||
19038echo X/"$0" |
19039 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19040 /^X\/\(\/\/\)$/{ s//\1/; q; }
19041 /^X\/\(\/\).*/{ s//\1/; q; }
19042 s/.*/./; q'`
19043
Skip Montanaro6dead952003-09-25 14:50:04 +000019044
Martin v. Löwis11437992002-04-12 09:54:03 +000019045# PATH needs CR, and LINENO needs CR and PATH.
19046# Avoid depending upon Character Ranges.
19047as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19048as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19049as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19050as_cr_digits='0123456789'
19051as_cr_alnum=$as_cr_Letters$as_cr_digits
19052
19053# The user is always right.
19054if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019055 echo "#! /bin/sh" >conf$$.sh
19056 echo "exit 0" >>conf$$.sh
19057 chmod +x conf$$.sh
19058 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019059 PATH_SEPARATOR=';'
19060 else
19061 PATH_SEPARATOR=:
19062 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019063 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000019064fi
19065
19066
19067 as_lineno_1=$LINENO
19068 as_lineno_2=$LINENO
19069 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19070 test "x$as_lineno_1" != "x$as_lineno_2" &&
19071 test "x$as_lineno_3" = "x$as_lineno_2" || {
19072 # Find who we are. Look in the path if we contain no path at all
19073 # relative or not.
19074 case $0 in
19075 *[\\/]* ) as_myself=$0 ;;
19076 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19077for as_dir in $PATH
19078do
19079 IFS=$as_save_IFS
19080 test -z "$as_dir" && as_dir=.
19081 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19082done
19083
19084 ;;
19085 esac
19086 # We did not find ourselves, most probably we were run as `sh COMMAND'
19087 # in which case we are not to be found in the path.
19088 if test "x$as_myself" = x; then
19089 as_myself=$0
19090 fi
19091 if test ! -f "$as_myself"; then
19092 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19093echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19094 { (exit 1); exit 1; }; }
19095 fi
19096 case $CONFIG_SHELL in
19097 '')
19098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19099for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19100do
19101 IFS=$as_save_IFS
19102 test -z "$as_dir" && as_dir=.
19103 for as_base in sh bash ksh sh5; do
19104 case $as_dir in
19105 /*)
19106 if ("$as_dir/$as_base" -c '
19107 as_lineno_1=$LINENO
19108 as_lineno_2=$LINENO
19109 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19110 test "x$as_lineno_1" != "x$as_lineno_2" &&
19111 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019112 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19113 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019114 CONFIG_SHELL=$as_dir/$as_base
19115 export CONFIG_SHELL
19116 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19117 fi;;
19118 esac
19119 done
19120done
19121;;
Jack Jansendd19cf82001-12-06 22:36:17 +000019122 esac
19123
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19125 # uniformly replaced by the line number. The first 'sed' inserts a
19126 # line-number line before each line; the second 'sed' does the real
19127 # work. The second script uses 'N' to pair each line-number line
19128 # with the numbered line, and appends trailing '-' during
19129 # substitution so that $LINENO is not a special case at line end.
19130 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19131 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
19132 sed '=' <$as_myself |
19133 sed '
19134 N
19135 s,$,-,
19136 : loop
19137 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19138 t loop
19139 s,-$,,
19140 s,^['$as_cr_digits']*\n,,
19141 ' >$as_me.lineno &&
19142 chmod +x $as_me.lineno ||
19143 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19144echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19145 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019146
Martin v. Löwis11437992002-04-12 09:54:03 +000019147 # Don't try to exec as it changes $[0], causing all sort of problems
19148 # (the dirname of $[0] is not the place where we might find the
19149 # original and so on. Autoconf is especially sensible to this).
19150 . ./$as_me.lineno
19151 # Exit status is that of the last command.
19152 exit
19153}
19154
19155
19156case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19157 *c*,-n*) ECHO_N= ECHO_C='
19158' ECHO_T=' ' ;;
19159 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19160 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
19161esac
19162
19163if expr a : '\(a\)' >/dev/null 2>&1; then
19164 as_expr=expr
19165else
19166 as_expr=false
19167fi
19168
19169rm -f conf$$ conf$$.exe conf$$.file
19170echo >conf$$.file
19171if ln -s conf$$.file conf$$ 2>/dev/null; then
19172 # We could just check for DJGPP; but this test a) works b) is more generic
19173 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19174 if test -f conf$$.exe; then
19175 # Don't use ln at all; we don't have any links
19176 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019177 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019178 as_ln_s='ln -s'
19179 fi
19180elif ln conf$$.file conf$$ 2>/dev/null; then
19181 as_ln_s=ln
19182else
19183 as_ln_s='cp -p'
19184fi
19185rm -f conf$$ conf$$.exe conf$$.file
19186
Skip Montanaro6dead952003-09-25 14:50:04 +000019187if mkdir -p . 2>/dev/null; then
19188 as_mkdir_p=:
19189else
19190 as_mkdir_p=false
19191fi
19192
Martin v. Löwis11437992002-04-12 09:54:03 +000019193as_executable_p="test -f"
19194
19195# Sed expression to map a string onto a valid CPP name.
19196as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19197
19198# Sed expression to map a string onto a valid variable name.
19199as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19200
19201
19202# IFS
19203# We need space, tab and new line, in precisely that order.
19204as_nl='
19205'
19206IFS=" $as_nl"
19207
19208# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000019209$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000019210
19211exec 6>&1
19212
19213# Open the log real soon, to keep \$[0] and so on meaningful, and to
19214# report actual input values of CONFIG_FILES etc. instead of their
19215# values after options handling. Logging --version etc. is OK.
19216exec 5>>config.log
19217{
19218 echo
19219 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19220## Running $as_me. ##
19221_ASBOX
19222} >&5
19223cat >&5 <<_CSEOF
19224
Fred Drake9bd44622003-07-30 17:39:48 +000019225This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000019226generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000019227
19228 CONFIG_FILES = $CONFIG_FILES
19229 CONFIG_HEADERS = $CONFIG_HEADERS
19230 CONFIG_LINKS = $CONFIG_LINKS
19231 CONFIG_COMMANDS = $CONFIG_COMMANDS
19232 $ $0 $@
19233
19234_CSEOF
19235echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19236echo >&5
19237_ACEOF
19238
19239# Files that config.status was made for.
19240if test -n "$ac_config_files"; then
19241 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19242fi
19243
19244if test -n "$ac_config_headers"; then
19245 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19246fi
19247
19248if test -n "$ac_config_links"; then
19249 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19250fi
19251
19252if test -n "$ac_config_commands"; then
19253 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19254fi
19255
19256cat >>$CONFIG_STATUS <<\_ACEOF
19257
19258ac_cs_usage="\
19259\`$as_me' instantiates files from templates according to the
19260current configuration.
19261
19262Usage: $0 [OPTIONS] [FILE]...
19263
19264 -h, --help print this help, then exit
19265 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000019266 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000019267 -d, --debug don't remove temporary files
19268 --recheck update $as_me by reconfiguring in the same conditions
19269 --file=FILE[:TEMPLATE]
19270 instantiate the configuration file FILE
19271 --header=FILE[:TEMPLATE]
19272 instantiate the configuration header FILE
19273
19274Configuration files:
19275$config_files
19276
19277Configuration headers:
19278$config_headers
19279
19280Report bugs to <bug-autoconf@gnu.org>."
19281_ACEOF
19282
19283cat >>$CONFIG_STATUS <<_ACEOF
19284ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000019285python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000019286configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000019287 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19288
19289Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19290Free Software Foundation, Inc.
19291This config.status script is free software; the Free Software Foundation
19292gives unlimited permission to copy, distribute and modify it."
19293srcdir=$srcdir
19294INSTALL="$INSTALL"
19295_ACEOF
19296
19297cat >>$CONFIG_STATUS <<\_ACEOF
19298# If no file are specified by the user, then we need to provide default
19299# value. By we need to know if files were specified by the user.
19300ac_need_defaults=:
19301while test $# != 0
19302do
19303 case $1 in
19304 --*=*)
19305 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19306 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019307 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000019308 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019309 -*)
19310 ac_option=$1
19311 ac_optarg=$2
19312 ac_shift=shift
19313 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 *) # This is not an option, so the user has probably given explicit
19315 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000019316 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000019317 ac_need_defaults=false;;
19318 esac
19319
Skip Montanaro6dead952003-09-25 14:50:04 +000019320 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000019321 # Handling of the options.
19322_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019323cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019324 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19325 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019326 --version | --vers* | -V )
19327 echo "$ac_cs_version"; exit 0 ;;
19328 --he | --h)
19329 # Conflict between --help and --header
19330 { { echo "$as_me:$LINENO: error: ambiguous option: $1
19331Try \`$0 --help' for more information." >&5
19332echo "$as_me: error: ambiguous option: $1
19333Try \`$0 --help' for more information." >&2;}
19334 { (exit 1); exit 1; }; };;
19335 --help | --hel | -h )
19336 echo "$ac_cs_usage"; exit 0 ;;
19337 --debug | --d* | -d )
19338 debug=: ;;
19339 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000019340 $ac_shift
19341 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019342 ac_need_defaults=false;;
19343 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000019344 $ac_shift
19345 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000019346 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019347 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19348 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19349 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019350
19351 # This is an error.
19352 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19353Try \`$0 --help' for more information." >&5
19354echo "$as_me: error: unrecognized option: $1
19355Try \`$0 --help' for more information." >&2;}
19356 { (exit 1); exit 1; }; } ;;
19357
19358 *) ac_config_targets="$ac_config_targets $1" ;;
19359
19360 esac
19361 shift
19362done
19363
Skip Montanaro6dead952003-09-25 14:50:04 +000019364ac_configure_extra_args=
19365
19366if $ac_cs_silent; then
19367 exec 6>/dev/null
19368 ac_configure_extra_args="$ac_configure_extra_args --silent"
19369fi
19370
19371_ACEOF
19372cat >>$CONFIG_STATUS <<_ACEOF
19373if \$ac_cs_recheck; then
19374 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19375 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19376fi
19377
Martin v. Löwis11437992002-04-12 09:54:03 +000019378_ACEOF
19379
19380
19381
19382
19383
19384cat >>$CONFIG_STATUS <<\_ACEOF
19385for ac_config_target in $ac_config_targets
19386do
19387 case "$ac_config_target" in
19388 # Handling of arguments.
19389 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
19390 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
19391 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
19392 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19393echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19394 { (exit 1); exit 1; }; };;
19395 esac
19396done
19397
19398# If the user did not use the arguments to specify the items to instantiate,
19399# then the envvar interface is used. Set only those that are not.
19400# We use the long form for the default assignment because of an extremely
19401# bizarre bug on SunOS 4.1.3.
19402if $ac_need_defaults; then
19403 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19404 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19405fi
19406
Skip Montanaro6dead952003-09-25 14:50:04 +000019407# Have a temporary directory for convenience. Make it in the build tree
19408# simply because there is no reason to put it here, and in addition,
19409# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000019410# Create a temporary directory, and hook for its removal unless debugging.
19411$debug ||
19412{
19413 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19414 trap '{ (exit 1); exit 1; }' 1 2 13 15
19415}
19416
19417# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000019418
Martin v. Löwis11437992002-04-12 09:54:03 +000019419{
Skip Montanaro6dead952003-09-25 14:50:04 +000019420 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000019421 test -n "$tmp" && test -d "$tmp"
19422} ||
19423{
Skip Montanaro6dead952003-09-25 14:50:04 +000019424 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000019425 (umask 077 && mkdir $tmp)
19426} ||
19427{
Skip Montanaro6dead952003-09-25 14:50:04 +000019428 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000019429 { (exit 1); exit 1; }
19430}
19431
19432_ACEOF
19433
19434cat >>$CONFIG_STATUS <<_ACEOF
19435
19436#
19437# CONFIG_FILES section.
19438#
19439
19440# No need to generate the scripts if there are no CONFIG_FILES.
19441# This happens for instance when ./config.status config.h
19442if test -n "\$CONFIG_FILES"; then
19443 # Protect against being on the right side of a sed subst in config.status.
19444 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19445 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19446s,@SHELL@,$SHELL,;t t
19447s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19448s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19449s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19450s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19451s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19452s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19453s,@exec_prefix@,$exec_prefix,;t t
19454s,@prefix@,$prefix,;t t
19455s,@program_transform_name@,$program_transform_name,;t t
19456s,@bindir@,$bindir,;t t
19457s,@sbindir@,$sbindir,;t t
19458s,@libexecdir@,$libexecdir,;t t
19459s,@datadir@,$datadir,;t t
19460s,@sysconfdir@,$sysconfdir,;t t
19461s,@sharedstatedir@,$sharedstatedir,;t t
19462s,@localstatedir@,$localstatedir,;t t
19463s,@libdir@,$libdir,;t t
19464s,@includedir@,$includedir,;t t
19465s,@oldincludedir@,$oldincludedir,;t t
19466s,@infodir@,$infodir,;t t
19467s,@mandir@,$mandir,;t t
19468s,@build_alias@,$build_alias,;t t
19469s,@host_alias@,$host_alias,;t t
19470s,@target_alias@,$target_alias,;t t
19471s,@DEFS@,$DEFS,;t t
19472s,@ECHO_C@,$ECHO_C,;t t
19473s,@ECHO_N@,$ECHO_N,;t t
19474s,@ECHO_T@,$ECHO_T,;t t
19475s,@LIBS@,$LIBS,;t t
19476s,@VERSION@,$VERSION,;t t
19477s,@SOVERSION@,$SOVERSION,;t t
19478s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
19479s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
19480s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
19481s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
19482s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
19483s,@MACHDEP@,$MACHDEP,;t t
19484s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000019485s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000019486s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019487s,@CXX@,$CXX,;t t
19488s,@MAINOBJ@,$MAINOBJ,;t t
19489s,@EXEEXT@,$EXEEXT,;t t
19490s,@CC@,$CC,;t t
19491s,@CFLAGS@,$CFLAGS,;t t
19492s,@LDFLAGS@,$LDFLAGS,;t t
19493s,@CPPFLAGS@,$CPPFLAGS,;t t
19494s,@ac_ct_CC@,$ac_ct_CC,;t t
19495s,@OBJEXT@,$OBJEXT,;t t
19496s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019497s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019498s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
19499s,@LIBRARY@,$LIBRARY,;t t
19500s,@LDLIBRARY@,$LDLIBRARY,;t t
19501s,@DLLLIBRARY@,$DLLLIBRARY,;t t
19502s,@BLDLIBRARY@,$BLDLIBRARY,;t t
19503s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
19504s,@INSTSONAME@,$INSTSONAME,;t t
19505s,@RUNSHARED@,$RUNSHARED,;t t
19506s,@LINKCC@,$LINKCC,;t t
19507s,@RANLIB@,$RANLIB,;t t
19508s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19509s,@AR@,$AR,;t t
19510s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19511s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19512s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19513s,@LN@,$LN,;t t
19514s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000019515s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019516s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
19517s,@SO@,$SO,;t t
19518s,@LDSHARED@,$LDSHARED,;t t
19519s,@BLDSHARED@,$BLDSHARED,;t t
19520s,@CCSHARED@,$CCSHARED,;t t
19521s,@LINKFORSHARED@,$LINKFORSHARED,;t t
19522s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000019523s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019524s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
19525s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
19526s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
19527s,@LDLAST@,$LDLAST,;t t
19528s,@THREADOBJ@,$THREADOBJ,;t t
19529s,@DLINCLDIR@,$DLINCLDIR,;t t
19530s,@DYNLOADFILE@,$DYNLOADFILE,;t t
19531s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019532s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019533s,@LIBOBJS@,$LIBOBJS,;t t
19534s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
19535s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
19536s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
19537s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
19538s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
19539s,@LIBM@,$LIBM,;t t
19540s,@LIBC@,$LIBC,;t t
19541s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
19542s,@THREADHEADERS@,$THREADHEADERS,;t t
19543s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019544s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019545CEOF
19546
19547_ACEOF
19548
19549 cat >>$CONFIG_STATUS <<\_ACEOF
19550 # Split the substitutions into bite-sized pieces for seds with
19551 # small command number limits, like on Digital OSF/1 and HP-UX.
19552 ac_max_sed_lines=48
19553 ac_sed_frag=1 # Number of current file.
19554 ac_beg=1 # First line for current file.
19555 ac_end=$ac_max_sed_lines # Line after last line for current file.
19556 ac_more_lines=:
19557 ac_sed_cmds=
19558 while $ac_more_lines; do
19559 if test $ac_beg -gt 1; then
19560 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19561 else
19562 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19563 fi
19564 if test ! -s $tmp/subs.frag; then
19565 ac_more_lines=false
19566 else
19567 # The purpose of the label and of the branching condition is to
19568 # speed up the sed processing (if there are no `@' at all, there
19569 # is no need to browse any of the substitutions).
19570 # These are the two extra sed commands mentioned above.
19571 (echo ':t
19572 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19573 if test -z "$ac_sed_cmds"; then
19574 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19575 else
19576 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19577 fi
19578 ac_sed_frag=`expr $ac_sed_frag + 1`
19579 ac_beg=$ac_end
19580 ac_end=`expr $ac_end + $ac_max_sed_lines`
19581 fi
19582 done
19583 if test -z "$ac_sed_cmds"; then
19584 ac_sed_cmds=cat
19585 fi
19586fi # test -n "$CONFIG_FILES"
19587
19588_ACEOF
19589cat >>$CONFIG_STATUS <<\_ACEOF
19590for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19591 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19592 case $ac_file in
19593 - | *:- | *:-:* ) # input from stdin
19594 cat >$tmp/stdin
19595 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19596 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19597 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19598 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19599 * ) ac_file_in=$ac_file.in ;;
19600 esac
19601
19602 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19603 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19604$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19605 X"$ac_file" : 'X\(//\)[^/]' \| \
19606 X"$ac_file" : 'X\(//\)$' \| \
19607 X"$ac_file" : 'X\(/\)' \| \
19608 . : '\(.\)' 2>/dev/null ||
19609echo X"$ac_file" |
19610 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19611 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19612 /^X\(\/\/\)$/{ s//\1/; q; }
19613 /^X\(\/\).*/{ s//\1/; q; }
19614 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019615 { if $as_mkdir_p; then
19616 mkdir -p "$ac_dir"
19617 else
19618 as_dir="$ac_dir"
19619 as_dirs=
19620 while test ! -d "$as_dir"; do
19621 as_dirs="$as_dir $as_dirs"
19622 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19623$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19624 X"$as_dir" : 'X\(//\)[^/]' \| \
19625 X"$as_dir" : 'X\(//\)$' \| \
19626 X"$as_dir" : 'X\(/\)' \| \
19627 . : '\(.\)' 2>/dev/null ||
19628echo X"$as_dir" |
19629 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19630 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19631 /^X\(\/\/\)$/{ s//\1/; q; }
19632 /^X\(\/\).*/{ s//\1/; q; }
19633 s/.*/./; q'`
19634 done
19635 test ! -n "$as_dirs" || mkdir $as_dirs
19636 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19637echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19638 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019639
19640 ac_builddir=.
19641
19642if test "$ac_dir" != .; then
19643 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19644 # A "../" for each directory in $ac_dir_suffix.
19645 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19646else
19647 ac_dir_suffix= ac_top_builddir=
19648fi
19649
19650case $srcdir in
19651 .) # No --srcdir option. We are building in place.
19652 ac_srcdir=.
19653 if test -z "$ac_top_builddir"; then
19654 ac_top_srcdir=.
19655 else
19656 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19657 fi ;;
19658 [\\/]* | ?:[\\/]* ) # Absolute path.
19659 ac_srcdir=$srcdir$ac_dir_suffix;
19660 ac_top_srcdir=$srcdir ;;
19661 *) # Relative path.
19662 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19663 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19664esac
19665# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19666# absolute.
19667ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000019668ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019669ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19670ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19671
19672
19673 case $INSTALL in
19674 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19675 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19676 esac
19677
19678 if test x"$ac_file" != x-; then
19679 { echo "$as_me:$LINENO: creating $ac_file" >&5
19680echo "$as_me: creating $ac_file" >&6;}
19681 rm -f "$ac_file"
19682 fi
19683 # Let's still pretend it is `configure' which instantiates (i.e., don't
19684 # use $as_me), people would be surprised to read:
19685 # /* config.h. Generated by config.status. */
19686 if test x"$ac_file" = x-; then
19687 configure_input=
19688 else
19689 configure_input="$ac_file. "
19690 fi
19691 configure_input=$configure_input"Generated from `echo $ac_file_in |
19692 sed 's,.*/,,'` by configure."
19693
19694 # First look for the input files in the build tree, otherwise in the
19695 # src tree.
19696 ac_file_inputs=`IFS=:
19697 for f in $ac_file_in; do
19698 case $f in
19699 -) echo $tmp/stdin ;;
19700 [\\/$]*)
19701 # Absolute (can't be DOS-style, as IFS=:)
19702 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19703echo "$as_me: error: cannot find input file: $f" >&2;}
19704 { (exit 1); exit 1; }; }
19705 echo $f;;
19706 *) # Relative
19707 if test -f "$f"; then
19708 # Build tree
19709 echo $f
19710 elif test -f "$srcdir/$f"; then
19711 # Source tree
19712 echo $srcdir/$f
19713 else
19714 # /dev/null tree
19715 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19716echo "$as_me: error: cannot find input file: $f" >&2;}
19717 { (exit 1); exit 1; }; }
19718 fi;;
19719 esac
19720 done` || { (exit 1); exit 1; }
19721_ACEOF
19722cat >>$CONFIG_STATUS <<_ACEOF
19723 sed "$ac_vpsub
19724$extrasub
19725_ACEOF
19726cat >>$CONFIG_STATUS <<\_ACEOF
19727:t
19728/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19729s,@configure_input@,$configure_input,;t t
19730s,@srcdir@,$ac_srcdir,;t t
19731s,@abs_srcdir@,$ac_abs_srcdir,;t t
19732s,@top_srcdir@,$ac_top_srcdir,;t t
19733s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19734s,@builddir@,$ac_builddir,;t t
19735s,@abs_builddir@,$ac_abs_builddir,;t t
19736s,@top_builddir@,$ac_top_builddir,;t t
19737s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19738s,@INSTALL@,$ac_INSTALL,;t t
19739" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19740 rm -f $tmp/stdin
19741 if test x"$ac_file" != x-; then
19742 mv $tmp/out $ac_file
19743 else
19744 cat $tmp/out
19745 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019746 fi
19747
Martin v. Löwis11437992002-04-12 09:54:03 +000019748done
19749_ACEOF
19750cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019751
Martin v. Löwis11437992002-04-12 09:54:03 +000019752#
19753# CONFIG_HEADER section.
19754#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019755
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019756# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19757# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019758#
19759# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019760ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19761ac_dB='[ ].*$,\1#\2'
19762ac_dC=' '
19763ac_dD=',;t'
19764# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19765ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19766ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019767ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019768ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019769
Martin v. Löwis11437992002-04-12 09:54:03 +000019770for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019771 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019772 case $ac_file in
19773 - | *:- | *:-:* ) # input from stdin
19774 cat >$tmp/stdin
19775 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19776 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19777 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19778 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19779 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019780 esac
19781
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19783echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019784
Martin v. Löwis11437992002-04-12 09:54:03 +000019785 # First look for the input files in the build tree, otherwise in the
19786 # src tree.
19787 ac_file_inputs=`IFS=:
19788 for f in $ac_file_in; do
19789 case $f in
19790 -) echo $tmp/stdin ;;
19791 [\\/$]*)
19792 # Absolute (can't be DOS-style, as IFS=:)
19793 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19794echo "$as_me: error: cannot find input file: $f" >&2;}
19795 { (exit 1); exit 1; }; }
19796 echo $f;;
19797 *) # Relative
19798 if test -f "$f"; then
19799 # Build tree
19800 echo $f
19801 elif test -f "$srcdir/$f"; then
19802 # Source tree
19803 echo $srcdir/$f
19804 else
19805 # /dev/null tree
19806 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19807echo "$as_me: error: cannot find input file: $f" >&2;}
19808 { (exit 1); exit 1; }; }
19809 fi;;
19810 esac
19811 done` || { (exit 1); exit 1; }
19812 # Remove the trailing spaces.
19813 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019814
Martin v. Löwis11437992002-04-12 09:54:03 +000019815_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019816
Martin v. Löwis11437992002-04-12 09:54:03 +000019817# Transform confdefs.h into two sed scripts, `conftest.defines' and
19818# `conftest.undefs', that substitutes the proper values into
19819# config.h.in to produce config.h. The first handles `#define'
19820# templates, and the second `#undef' templates.
19821# And first: Protect against being on the right side of a sed subst in
19822# config.status. Protect against being in an unquoted here document
19823# in config.status.
19824rm -f conftest.defines conftest.undefs
19825# Using a here document instead of a string reduces the quoting nightmare.
19826# Putting comments in sed scripts is not portable.
19827#
19828# `end' is used to avoid that the second main sed command (meant for
19829# 0-ary CPP macros) applies to n-ary macro definitions.
19830# See the Autoconf documentation for `clear'.
19831cat >confdef2sed.sed <<\_ACEOF
19832s/[\\&,]/\\&/g
19833s,[\\$`],\\&,g
19834t clear
19835: clear
19836s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19837t end
19838s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19839: end
19840_ACEOF
19841# If some macros were called several times there might be several times
19842# the same #defines, which is useless. Nevertheless, we may not want to
19843# sort them, since we want the *last* AC-DEFINE to be honored.
19844uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19845sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19846rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847
19848# This sed command replaces #undef with comments. This is necessary, for
19849# example, in the case of _POSIX_SOURCE, which is predefined and required
19850# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019851cat >>conftest.undefs <<\_ACEOF
19852s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19853_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019854
Martin v. Löwis11437992002-04-12 09:54:03 +000019855# Break up conftest.defines because some shells have a limit on the size
19856# of here documents, and old seds have small limits too (100 cmds).
19857echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019858echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019859echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19860echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019861rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019862while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019863do
Martin v. Löwis11437992002-04-12 09:54:03 +000019864 # Write a limited-size here document to $tmp/defines.sed.
19865 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19866 # Speed up: don't consider the non `#define' lines.
19867 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19868 # Work around the forget-to-reset-the-flag bug.
19869 echo 't clr' >>$CONFIG_STATUS
19870 echo ': clr' >>$CONFIG_STATUS
19871 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019872 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19874 rm -f $tmp/in
19875 mv $tmp/out $tmp/in
19876' >>$CONFIG_STATUS
19877 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19878 rm -f conftest.defines
19879 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019880done
Martin v. Löwis11437992002-04-12 09:54:03 +000019881rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019882echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019883echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019884
Martin v. Löwis11437992002-04-12 09:54:03 +000019885# Break up conftest.undefs because some shells have a limit on the size
19886# of here documents, and old seds have small limits too (100 cmds).
19887echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19888rm -f conftest.tail
19889while grep . conftest.undefs >/dev/null
19890do
19891 # Write a limited-size here document to $tmp/undefs.sed.
19892 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19893 # Speed up: don't consider the non `#undef'
19894 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19895 # Work around the forget-to-reset-the-flag bug.
19896 echo 't clr' >>$CONFIG_STATUS
19897 echo ': clr' >>$CONFIG_STATUS
19898 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19899 echo 'CEOF
19900 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19901 rm -f $tmp/in
19902 mv $tmp/out $tmp/in
19903' >>$CONFIG_STATUS
19904 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19905 rm -f conftest.undefs
19906 mv conftest.tail conftest.undefs
19907done
19908rm -f conftest.undefs
19909
19910cat >>$CONFIG_STATUS <<\_ACEOF
19911 # Let's still pretend it is `configure' which instantiates (i.e., don't
19912 # use $as_me), people would be surprised to read:
19913 # /* config.h. Generated by config.status. */
19914 if test x"$ac_file" = x-; then
19915 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019916 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019918 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 cat $tmp/in >>$tmp/config.h
19920 rm -f $tmp/in
19921 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019922 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019923 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19924echo "$as_me: $ac_file is unchanged" >&6;}
19925 else
19926 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19927$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19928 X"$ac_file" : 'X\(//\)[^/]' \| \
19929 X"$ac_file" : 'X\(//\)$' \| \
19930 X"$ac_file" : 'X\(/\)' \| \
19931 . : '\(.\)' 2>/dev/null ||
19932echo X"$ac_file" |
19933 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19934 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19935 /^X\(\/\/\)$/{ s//\1/; q; }
19936 /^X\(\/\).*/{ s//\1/; q; }
19937 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019938 { if $as_mkdir_p; then
19939 mkdir -p "$ac_dir"
19940 else
19941 as_dir="$ac_dir"
19942 as_dirs=
19943 while test ! -d "$as_dir"; do
19944 as_dirs="$as_dir $as_dirs"
19945 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19946$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19947 X"$as_dir" : 'X\(//\)[^/]' \| \
19948 X"$as_dir" : 'X\(//\)$' \| \
19949 X"$as_dir" : 'X\(/\)' \| \
19950 . : '\(.\)' 2>/dev/null ||
19951echo X"$as_dir" |
19952 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19953 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19954 /^X\(\/\/\)$/{ s//\1/; q; }
19955 /^X\(\/\).*/{ s//\1/; q; }
19956 s/.*/./; q'`
19957 done
19958 test ! -n "$as_dirs" || mkdir $as_dirs
19959 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19960echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19961 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019962
Martin v. Löwis11437992002-04-12 09:54:03 +000019963 rm -f $ac_file
19964 mv $tmp/config.h $ac_file
19965 fi
19966 else
19967 cat $tmp/config.h
19968 rm -f $tmp/config.h
19969 fi
19970done
19971_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019972
Martin v. Löwis11437992002-04-12 09:54:03 +000019973cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019974
Martin v. Löwis11437992002-04-12 09:54:03 +000019975{ (exit 0); exit 0; }
19976_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019977chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019978ac_clean_files=$ac_clean_files_save
19979
19980
19981# configure is writing to config.log, and then calls config.status.
19982# config.status does its own redirection, appending to config.log.
19983# Unfortunately, on DOS this fails, as config.log is still kept open
19984# by configure, so config.status won't be able to write to it; its
19985# output is simply discarded. So we exec the FD to /dev/null,
19986# effectively closing config.log, so it can be properly (re)opened and
19987# appended to by config.status. When coming back to configure, we
19988# need to make the FD available again.
19989if test "$no_create" != yes; then
19990 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019991 ac_config_status_args=
19992 test "$silent" = yes &&
19993 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019994 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019995 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 exec 5>>config.log
19997 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19998 # would make configure fail if this is the last instruction.
19999 $ac_cs_success || { (exit 1); exit 1; }
20000fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020001
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000020002
20003echo "creating Setup"
20004if test ! -f Modules/Setup
20005then
20006 cp $srcdir/Modules/Setup.dist Modules/Setup
20007fi
20008
20009echo "creating Setup.local"
20010if test ! -f Modules/Setup.local
20011then
20012 echo "# Edit this file for local setup changes" >Modules/Setup.local
20013fi
20014
20015echo "creating Makefile"
20016$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
20017 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000020018 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000020019mv config.c Modules