blob: f1a46c79c7ba518e1d1dcee2f8ce25ce69447ea1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanarob9949db2004-01-17 04:04:13 +00002# From configure.in Revision: 1.445 .
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
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000874 --with-fpectl enable SIGFPE catching
875 --with-libm=STRING math library
876 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000877
878Some influential environment variables:
879 CC C compiler command
880 CFLAGS C compiler flags
881 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
882 nonstandard directory <lib dir>
883 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
884 headers in a nonstandard directory <include dir>
885 CPP C preprocessor
886
887Use these variables to override the choices made by `configure' or to help
888it to find libraries and programs with nonstandard names/locations.
889
890_ACEOF
891fi
892
893if test "$ac_init_help" = "recursive"; then
894 # If there are subdirs, report their specific --help.
895 ac_popdir=`pwd`
896 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
897 test -d $ac_dir || continue
898 ac_builddir=.
899
900if test "$ac_dir" != .; then
901 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
902 # A "../" for each directory in $ac_dir_suffix.
903 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
904else
905 ac_dir_suffix= ac_top_builddir=
906fi
907
908case $srcdir in
909 .) # No --srcdir option. We are building in place.
910 ac_srcdir=.
911 if test -z "$ac_top_builddir"; then
912 ac_top_srcdir=.
913 else
914 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
915 fi ;;
916 [\\/]* | ?:[\\/]* ) # Absolute path.
917 ac_srcdir=$srcdir$ac_dir_suffix;
918 ac_top_srcdir=$srcdir ;;
919 *) # Relative path.
920 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
921 ac_top_srcdir=$ac_top_builddir$srcdir ;;
922esac
923# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
924# absolute.
925ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000926ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000927ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
928ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
929
930 cd $ac_dir
931 # Check for guested configure; otherwise get Cygnus style configure.
932 if test -f $ac_srcdir/configure.gnu; then
933 echo
934 $SHELL $ac_srcdir/configure.gnu --help=recursive
935 elif test -f $ac_srcdir/configure; then
936 echo
937 $SHELL $ac_srcdir/configure --help=recursive
938 elif test -f $ac_srcdir/configure.ac ||
939 test -f $ac_srcdir/configure.in; then
940 echo
941 $ac_configure --help
942 else
943 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
944 fi
945 cd $ac_popdir
946 done
947fi
948
949test -n "$ac_init_help" && exit 0
950if $ac_init_version; then
951 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000952python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000953generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
956Free Software Foundation, Inc.
957This configure script is free software; the Free Software Foundation
958gives unlimited permission to copy, distribute and modify it.
959_ACEOF
960 exit 0
961fi
962exec 5>config.log
963cat >&5 <<_ACEOF
964This file contains any messages produced by compilers while
965running configure, to aid debugging if configure makes a mistake.
966
Fred Drake9bd44622003-07-30 17:39:48 +0000967It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000968generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000969
970 $ $0 $@
971
972_ACEOF
973{
974cat <<_ASUNAME
975## --------- ##
976## Platform. ##
977## --------- ##
978
979hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
980uname -m = `(uname -m) 2>/dev/null || echo unknown`
981uname -r = `(uname -r) 2>/dev/null || echo unknown`
982uname -s = `(uname -s) 2>/dev/null || echo unknown`
983uname -v = `(uname -v) 2>/dev/null || echo unknown`
984
985/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
986/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
987
988/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
989/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
990/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
991hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
992/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
993/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
994/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
995
996_ASUNAME
997
998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
999for as_dir in $PATH
1000do
1001 IFS=$as_save_IFS
1002 test -z "$as_dir" && as_dir=.
1003 echo "PATH: $as_dir"
1004done
1005
1006} >&5
1007
1008cat >&5 <<_ACEOF
1009
1010
1011## ----------- ##
1012## Core tests. ##
1013## ----------- ##
1014
1015_ACEOF
1016
1017
1018# Keep a trace of the command line.
1019# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001020# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001021# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001024ac_configure_args0=
1025ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001026ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001027ac_must_keep_next=false
1028for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001029do
Skip Montanaro6dead952003-09-25 14:50:04 +00001030 for ac_arg
1031 do
1032 case $ac_arg in
1033 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1034 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1035 | -silent | --silent | --silen | --sile | --sil)
1036 continue ;;
1037 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1038 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1039 esac
1040 case $ac_pass in
1041 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1042 2)
1043 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1044 if test $ac_must_keep_next = true; then
1045 ac_must_keep_next=false # Got value, back to normal.
1046 else
1047 case $ac_arg in
1048 *=* | --config-cache | -C | -disable-* | --disable-* \
1049 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1050 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1051 | -with-* | --with-* | -without-* | --without-* | --x)
1052 case "$ac_configure_args0 " in
1053 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1054 esac
1055 ;;
1056 -* ) ac_must_keep_next=true ;;
1057 esac
1058 fi
1059 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1060 # Get rid of the leading space.
1061 ac_sep=" "
1062 ;;
1063 esac
1064 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001065done
Skip Montanaro6dead952003-09-25 14:50:04 +00001066$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1067$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 +00001068
1069# When interrupted or exit'd, cleanup temporary files, and complete
1070# config.log. We remove comments because anyway the quotes in there
1071# would cause problems or look ugly.
1072# WARNING: Be sure not to use single quotes in there, as some shells,
1073# such as our DU 5.0 friend, will then `close' the trap.
1074trap 'exit_status=$?
1075 # Save into config.log some information that might help in debugging.
1076 {
1077 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001078
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 cat <<\_ASBOX
1080## ---------------- ##
1081## Cache variables. ##
1082## ---------------- ##
1083_ASBOX
1084 echo
1085 # The following way of writing the cache mishandles newlines in values,
1086{
1087 (set) 2>&1 |
1088 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1089 *ac_space=\ *)
1090 sed -n \
1091 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1092 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1093 ;;
1094 *)
1095 sed -n \
1096 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1097 ;;
1098 esac;
1099}
1100 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001101
1102 cat <<\_ASBOX
1103## ----------------- ##
1104## Output variables. ##
1105## ----------------- ##
1106_ASBOX
1107 echo
1108 for ac_var in $ac_subst_vars
1109 do
1110 eval ac_val=$`echo $ac_var`
1111 echo "$ac_var='"'"'$ac_val'"'"'"
1112 done | sort
1113 echo
1114
1115 if test -n "$ac_subst_files"; then
1116 cat <<\_ASBOX
1117## ------------- ##
1118## Output files. ##
1119## ------------- ##
1120_ASBOX
1121 echo
1122 for ac_var in $ac_subst_files
1123 do
1124 eval ac_val=$`echo $ac_var`
1125 echo "$ac_var='"'"'$ac_val'"'"'"
1126 done | sort
1127 echo
1128 fi
1129
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 if test -s confdefs.h; then
1131 cat <<\_ASBOX
1132## ----------- ##
1133## confdefs.h. ##
1134## ----------- ##
1135_ASBOX
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 echo
1139 fi
1140 test "$ac_signal" != 0 &&
1141 echo "$as_me: caught signal $ac_signal"
1142 echo "$as_me: exit $exit_status"
1143 } >&5
1144 rm -f core core.* *.core &&
1145 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1146 exit $exit_status
1147 ' 0
1148for ac_signal in 1 2 13 15; do
1149 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1150done
1151ac_signal=0
1152
1153# confdefs.h avoids OS command line length limits that DEFS can exceed.
1154rm -rf conftest* confdefs.h
1155# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1156echo >confdefs.h
1157
1158# Predefined preprocessor variables.
1159
1160cat >>confdefs.h <<_ACEOF
1161#define PACKAGE_NAME "$PACKAGE_NAME"
1162_ACEOF
1163
1164
1165cat >>confdefs.h <<_ACEOF
1166#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1167_ACEOF
1168
1169
1170cat >>confdefs.h <<_ACEOF
1171#define PACKAGE_VERSION "$PACKAGE_VERSION"
1172_ACEOF
1173
1174
1175cat >>confdefs.h <<_ACEOF
1176#define PACKAGE_STRING "$PACKAGE_STRING"
1177_ACEOF
1178
1179
1180cat >>confdefs.h <<_ACEOF
1181#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1182_ACEOF
1183
1184
1185# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186# Prefer explicitly selected file to automatically selected ones.
1187if test -z "$CONFIG_SITE"; then
1188 if test "x$prefix" != xNONE; then
1189 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1190 else
1191 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1192 fi
1193fi
1194for ac_site_file in $CONFIG_SITE; do
1195 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1197echo "$as_me: loading site script $ac_site_file" >&6;}
1198 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 . "$ac_site_file"
1200 fi
1201done
1202
1203if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # Some versions of bash will fail to source /dev/null (special
1205 # files actually), so we avoid doing that.
1206 if test -f "$cache_file"; then
1207 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1208echo "$as_me: loading cache $cache_file" >&6;}
1209 case $cache_file in
1210 [\\/]* | ?:[\\/]* ) . $cache_file;;
1211 *) . ./$cache_file;;
1212 esac
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1216echo "$as_me: creating cache $cache_file" >&6;}
1217 >$cache_file
1218fi
1219
1220# Check that the precious variables saved in the cache have kept the same
1221# value.
1222ac_cache_corrupted=false
1223for ac_var in `(set) 2>&1 |
1224 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1225 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1226 eval ac_new_set=\$ac_env_${ac_var}_set
1227 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1228 eval ac_new_val="\$ac_env_${ac_var}_value"
1229 case $ac_old_set,$ac_new_set in
1230 set,)
1231 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1232echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1233 ac_cache_corrupted=: ;;
1234 ,set)
1235 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1236echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1237 ac_cache_corrupted=: ;;
1238 ,);;
1239 *)
1240 if test "x$ac_old_val" != "x$ac_new_val"; then
1241 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1242echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1243 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1244echo "$as_me: former value: $ac_old_val" >&2;}
1245 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1246echo "$as_me: current value: $ac_new_val" >&2;}
1247 ac_cache_corrupted=:
1248 fi;;
1249 esac
1250 # Pass precious variables to config.status.
1251 if test "$ac_new_set" = set; then
1252 case $ac_new_val in
1253 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1254 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1255 *) ac_arg=$ac_var=$ac_new_val ;;
1256 esac
1257 case " $ac_configure_args " in
1258 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1259 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1260 esac
1261 fi
1262done
1263if $ac_cache_corrupted; then
1264 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1265echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1266 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1267echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1268 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269fi
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1275ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Michael W. Hudson54241132001-12-07 15:38:26 +00001278
1279
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
Martin v. Löwis88afe662002-10-26 13:47:44 +00001294
1295
1296
1297
1298
1299
1300
1301
1302
Skip Montanaro6dead952003-09-25 14:50:04 +00001303
1304 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305
1306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
1309
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001310
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001311
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001312# We don't use PACKAGE_ variables, and they cause conflicts
1313# with other autoconf-based packages that include Python.h
1314grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1315rm confdefs.h
1316mv confdefs.h.new confdefs.h
1317
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001318
Fred Drake9bd44622003-07-30 17:39:48 +00001319VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001320
Martin v. Löwis1142de32002-03-29 16:28:31 +00001321
1322SOVERSION=1.0
1323
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001324# The later defininition of _XOPEN_SOURCE disables certain features
1325# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1326
1327cat >>confdefs.h <<\_ACEOF
1328#define _GNU_SOURCE 1
1329_ACEOF
1330
1331
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001332# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1333# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1334# them.
1335
1336cat >>confdefs.h <<\_ACEOF
1337#define _NETBSD_SOURCE 1
1338_ACEOF
1339
1340
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001341# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1342# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1343# them.
1344
1345cat >>confdefs.h <<\_ACEOF
1346#define __BSD_VISIBLE 1
1347_ACEOF
1348
1349
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001350define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001351
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001352# Arguments passed to configure.
1353
1354CONFIG_ARGS="$ac_configure_args"
1355
Jack Jansene578a632001-08-15 01:27:14 +00001356# Check whether --enable-framework or --disable-framework was given.
1357if test "${enable_framework+set}" = set; then
1358 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
Jack Jansene578a632001-08-15 01:27:14 +00001360 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001362 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001363 esac
1364 case $enableval in
1365 no)
1366 PYTHONFRAMEWORK=
1367 PYTHONFRAMEWORKDIR=no-framework
1368 PYTHONFRAMEWORKPREFIX=
1369 PYTHONFRAMEWORKINSTALLDIR=
1370 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001371 ;;
1372 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001373 PYTHONFRAMEWORK=Python
1374 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001375 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001376 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1377 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Guido van Rossum563e7081996-09-10 18:20:48 +00001380else
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Jack Jansene578a632001-08-15 01:27:14 +00001382 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001383 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORKPREFIX=
1385 PYTHONFRAMEWORKINSTALLDIR=
1386 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001387
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001389
1390
1391
1392
Jack Jansene578a632001-08-15 01:27:14 +00001393
1394##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395## AC_HELP_STRING(--with-dyld,
1396## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001397##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001398# Set name for machine-dependent library files
1399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400echo "$as_me:$LINENO: checking MACHDEP" >&5
1401echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001402if test -z "$MACHDEP"
1403then
Guido van Rossum563e7081996-09-10 18:20:48 +00001404 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001405 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1406 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001407 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001408 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_md_system=`echo $ac_sys_system |
1412 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1413 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001414 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001415 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001416
Guido van Rossum07397971997-04-29 21:49:50 +00001417 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001418 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001419 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001420 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001421 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001422 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001423 esac
1424fi
Guido van Rossum91922671997-10-09 20:24:13 +00001425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001426# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1427# disable features if it is defined, without any means to access these
1428# features as extensions. For these systems, we skip the definition of
1429# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1430# some feature, make sure there is no alternative way to access this
1431# feature. Also, when using wildcards, make sure you have verified the
1432# need for not defining _XOPEN_SOURCE on all systems matching the
1433# wildcard, and that the wildcard does not include future systems
1434# (which may remove their limitations).
1435case $ac_sys_system/$ac_sys_release in
1436 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1437 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001438 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1439 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001440 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001441 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1442 # of union __?sigval. Reported by Stuart Bishop.
1443 SunOS/5.6)
1444 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001445 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1446 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1447 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1448 define_xopen_source=no;;
1449 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001450 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001451 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001453 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1454 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1455 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1456 # This should hopefully be fixed in FreeBSD 4.9
1457 FreeBSD/4.8* | Darwin/6* )
1458 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001459 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1460 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1461 # has another value. By not (re)defining it, the defaults come in place.
1462 AIX/4)
1463 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001464esac
1465
1466if test $define_xopen_source = yes
1467then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001468
1469cat >>confdefs.h <<\_ACEOF
1470#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001471_ACEOF
1472
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001473
1474 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1475 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1476 # several APIs are not declared. Since this is also needed in some
1477 # cases for HP-UX, we define it globally.
1478
1479
1480cat >>confdefs.h <<\_ACEOF
1481#define _XOPEN_SOURCE_EXTENDED 1
1482_ACEOF
1483
1484
1485cat >>confdefs.h <<\_ACEOF
1486#define _POSIX_C_SOURCE 200112L
1487_ACEOF
1488
1489
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001490fi
1491
Guido van Rossum91922671997-10-09 20:24:13 +00001492#
1493# SGI compilers allow the specification of the both the ABI and the
1494# ISA on the command line. Depending on the values of these switches,
1495# different and often incompatable code will be generated.
1496#
1497# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1498# thus supply support for various ABI/ISA combinations. The MACHDEP
1499# variable is also adjusted.
1500#
1501
1502if test ! -z "$SGI_ABI"
1503then
1504 CC="cc $SGI_ABI"
1505 LDFLAGS="$SGI_ABI $LDFLAGS"
1506 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001508echo "$as_me:$LINENO: result: $MACHDEP" >&5
1509echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001510
Jack Jansen83f898c2002-12-30 22:23:40 +00001511# And add extra plat-mac for darwin
1512
Jack Jansen7b59b422003-03-17 15:44:10 +00001513
Jack Jansen83f898c2002-12-30 22:23:40 +00001514echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1515echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1516if test -z "$EXTRAPLATDIR"
1517then
1518 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001519 darwin)
1520 EXTRAPLATDIR="\$(PLATMACDIRS)"
1521 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1522 ;;
1523 *)
1524 EXTRAPLATDIR=""
1525 EXTRAMACHDEPPATH=""
1526 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001527 esac
1528fi
1529echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1530echo "${ECHO_T}$EXTRAPLATDIR" >&6
1531
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001533
1534# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1535# for debug/optimization stuff. BASECFLAGS is for flags that are required
1536# just to get things to compile and link. Users are free to override OPT
1537# when running configure or make. The build should not break if they do.
1538# BASECFLAGS should generally not be messed with, however.
1539
1540# XXX shouldn't some/most/all of this code be merged with the stuff later
1541# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001542echo "$as_me:$LINENO: checking for --without-gcc" >&5
1543echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001546if test "${with_gcc+set}" = set; then
1547 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
Guido van Rossum7f43da71994-08-01 12:15:30 +00001549 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001550 no) CC=cc
1551 without_gcc=yes;;
1552 yes) CC=gcc
1553 without_gcc=no;;
1554 *) CC=$withval
1555 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001556 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001557else
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001559 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001560 AIX*) CC=cc_r
1561 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001562 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001563 case $BE_HOST_CPU in
1564 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001565 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001566 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001567 BASECFLAGS="$BASECFLAGS -export pragma"
1568 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001569 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001570 ;;
1571 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001572 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001573 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001574 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 ;;
1576 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1578echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1579 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001580 ;;
1581 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001582 AR="\$(srcdir)/Modules/ar_beos"
1583 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001584 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001585 Monterey*)
1586 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001587 without_gcc=;;
1588 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001589 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001590fi;
1591echo "$as_me:$LINENO: result: $without_gcc" >&5
1592echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001593
1594
Guido van Rossum95012191999-12-16 17:50:52 +00001595
Fred Drakea1a84e72001-03-06 05:52:16 +00001596MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001597echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1598echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1599
Guido van Rossum95012191999-12-16 17:50:52 +00001600# Check whether --with-cxx or --without-cxx was given.
1601if test "${with_cxx+set}" = set; then
1602 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001603
Martin v. Löwis22352952000-12-13 17:37:02 +00001604 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001605 case $withval in
1606 no) CXX=
1607 with_cxx=no;;
1608 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001609 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001610 with_cxx=$withval;;
1611 esac
1612else
Martin v. Löwis11437992002-04-12 09:54:03 +00001613
Guido van Rossum95012191999-12-16 17:50:52 +00001614 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001615 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001616
Martin v. Löwis11437992002-04-12 09:54:03 +00001617fi;
1618echo "$as_me:$LINENO: result: $with_cxx" >&5
1619echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001620
1621if test "$with_cxx" = "yes"
1622then
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1624echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1625 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001626fi
1627
1628
1629
1630
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001632then
1633 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1634do
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 # 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 +00001636set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001637echo "$as_me:$LINENO: checking for $ac_word" >&5
1638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639if test "${ac_cv_prog_CXX+set}" = set; then
1640 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001641else
1642 if test -n "$CXX"; then
1643 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1644else
Martin v. Löwis11437992002-04-12 09:54:03 +00001645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1646for as_dir in $PATH
1647do
1648 IFS=$as_save_IFS
1649 test -z "$as_dir" && as_dir=.
1650 for ac_exec_ext in '' $ac_executable_extensions; do
1651 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1652 ac_cv_prog_CXX="$ac_prog"
1653 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1654 break 2
1655 fi
1656done
1657done
1658
Martin v. Löwis22352952000-12-13 17:37:02 +00001659fi
1660fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001661CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001662if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 echo "$as_me:$LINENO: result: $CXX" >&5
1664echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001665else
Martin v. Löwis11437992002-04-12 09:54:03 +00001666 echo "$as_me:$LINENO: result: no" >&5
1667echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001668fi
1669
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001671done
1672test -n "$CXX" || CXX="notfound"
1673
1674 if test "$CXX" = "notfound"
1675 then
1676 CXX=
1677 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001678 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001679ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1683 cat >conftest.$ac_ext <<_ACEOF
1684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001685/* confdefs.h. */
1686_ACEOF
1687cat confdefs.h >>conftest.$ac_ext
1688cat >>conftest.$ac_ext <<_ACEOF
1689/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001690
Martin v. Löwis11437992002-04-12 09:54:03 +00001691int
1692main ()
1693{
Michael W. Hudson54241132001-12-07 15:38:26 +00001694
Martin v. Löwis11437992002-04-12 09:54:03 +00001695 ;
1696 return 0;
1697}
1698_ACEOF
1699ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001700ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001701# Try to create an executable without -o first, disregard a.out.
1702# It will help us diagnose broken compilers, and finding out an intuition
1703# of exeext.
1704echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1705echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1706ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1707if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1708 (eval $ac_link_default) 2>&5
1709 ac_status=$?
1710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1711 (exit $ac_status); }; then
1712 # Find the output, starting from the most likely. This scheme is
1713# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1714# resort.
1715
1716# Be careful to initialize this variable, since it used to be cached.
1717# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1718ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001719# b.out is created by i960 compilers.
1720for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1721do
1722 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001724 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1725 ;;
1726 conftest.$ac_ext )
1727 # This is the source file.
1728 ;;
1729 [ab].out )
1730 # We found the default executable, but exeext='' is most
1731 # certainly right.
1732 break;;
1733 *.* )
1734 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1735 # FIXME: I believe we export ac_cv_exeext for Libtool,
1736 # but it would be cool to find out if it's true. Does anybody
1737 # maintain Libtool? --akim.
1738 export ac_cv_exeext
1739 break;;
1740 * )
1741 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 esac
1743done
1744else
1745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1749See \`config.log' for more details." >&5
1750echo "$as_me: error: C++ compiler cannot create executables
1751See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001752 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001754
1755ac_exeext=$ac_cv_exeext
1756echo "$as_me:$LINENO: result: $ac_file" >&5
1757echo "${ECHO_T}$ac_file" >&6
1758
1759# Check the compiler produces executables we can run. If not, either
1760# the compiler is broken, or we cross compile.
1761echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1762echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1763# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764# If not cross compiling, check that we can run a simple program.
1765if test "$cross_compiling" != yes; then
1766 if { ac_try='./$ac_file'
1767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1768 (eval $ac_try) 2>&5
1769 ac_status=$?
1770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1771 (exit $ac_status); }; }; then
1772 cross_compiling=no
1773 else
1774 if test "$cross_compiling" = maybe; then
1775 cross_compiling=yes
1776 else
1777 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001778If you meant to cross compile, use \`--host'.
1779See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001780echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001781If you meant to cross compile, use \`--host'.
1782See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001783 { (exit 1); exit 1; }; }
1784 fi
1785 fi
1786fi
1787echo "$as_me:$LINENO: result: yes" >&5
1788echo "${ECHO_T}yes" >&6
1789
Skip Montanaro6dead952003-09-25 14:50:04 +00001790rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001791ac_clean_files=$ac_clean_files_save
1792# Check the compiler produces executables we can run. If not, either
1793# the compiler is broken, or we cross compile.
1794echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1795echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1796echo "$as_me:$LINENO: result: $cross_compiling" >&5
1797echo "${ECHO_T}$cross_compiling" >&6
1798
1799echo "$as_me:$LINENO: checking for suffix of executables" >&5
1800echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1802 (eval $ac_link) 2>&5
1803 ac_status=$?
1804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1805 (exit $ac_status); }; then
1806 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1807# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1808# work properly (i.e., refer to `conftest.exe'), while it won't with
1809# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001810for ac_file in conftest.exe conftest conftest.*; do
1811 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001812 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001813 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001814 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1815 export ac_cv_exeext
1816 break;;
1817 * ) break;;
1818 esac
1819done
1820else
Skip Montanaro6dead952003-09-25 14:50:04 +00001821 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1822See \`config.log' for more details." >&5
1823echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1824See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001825 { (exit 1); exit 1; }; }
1826fi
1827
1828rm -f conftest$ac_cv_exeext
1829echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1830echo "${ECHO_T}$ac_cv_exeext" >&6
1831
1832rm -f conftest.$ac_ext
1833EXEEXT=$ac_cv_exeext
1834ac_exeext=$EXEEXT
1835
1836 ac_ext=c
1837ac_cpp='$CPP $CPPFLAGS'
1838ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1839ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1840ac_compiler_gnu=$ac_cv_c_compiler_gnu
1841
1842
Martin v. Löwis22352952000-12-13 17:37:02 +00001843
1844 fi
1845fi
1846
Guido van Rossum8b131c51995-03-09 14:10:13 +00001847# If the user switches compilers, we can't believe the cache
1848if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1849then
Martin v. Löwis11437992002-04-12 09:54:03 +00001850 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1851(it is also a good idea to do 'make clean' before compiling)" >&5
1852echo "$as_me: error: cached CC is different -- throw away $cache_file
1853(it is also a good idea to do 'make clean' before compiling)" >&2;}
1854 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001855fi
1856
Martin v. Löwis11437992002-04-12 09:54:03 +00001857ac_ext=c
1858ac_cpp='$CPP $CPPFLAGS'
1859ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1860ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1861ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862if test -n "$ac_tool_prefix"; then
1863 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1864set dummy ${ac_tool_prefix}gcc; ac_word=$2
1865echo "$as_me:$LINENO: checking for $ac_word" >&5
1866echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1867if test "${ac_cv_prog_CC+set}" = set; then
1868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001869else
1870 if test -n "$CC"; then
1871 ac_cv_prog_CC="$CC" # Let the user override the test.
1872else
Martin v. Löwis11437992002-04-12 09:54:03 +00001873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1874for as_dir in $PATH
1875do
1876 IFS=$as_save_IFS
1877 test -z "$as_dir" && as_dir=.
1878 for ac_exec_ext in '' $ac_executable_extensions; do
1879 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1880 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1882 break 2
1883 fi
1884done
1885done
1886
Jack Jansendd19cf82001-12-06 22:36:17 +00001887fi
1888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001889CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001890if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001891 echo "$as_me:$LINENO: result: $CC" >&5
1892echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001893else
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 echo "$as_me:$LINENO: result: no" >&5
1895echo "${ECHO_T}no" >&6
1896fi
1897
1898fi
1899if test -z "$ac_cv_prog_CC"; then
1900 ac_ct_CC=$CC
1901 # Extract the first word of "gcc", so it can be a program name with args.
1902set dummy gcc; ac_word=$2
1903echo "$as_me:$LINENO: checking for $ac_word" >&5
1904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1905if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1906 echo $ECHO_N "(cached) $ECHO_C" >&6
1907else
1908 if test -n "$ac_ct_CC"; then
1909 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1910else
1911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1912for as_dir in $PATH
1913do
1914 IFS=$as_save_IFS
1915 test -z "$as_dir" && as_dir=.
1916 for ac_exec_ext in '' $ac_executable_extensions; do
1917 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1918 ac_cv_prog_ac_ct_CC="gcc"
1919 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1920 break 2
1921 fi
1922done
1923done
1924
1925fi
1926fi
1927ac_ct_CC=$ac_cv_prog_ac_ct_CC
1928if test -n "$ac_ct_CC"; then
1929 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1930echo "${ECHO_T}$ac_ct_CC" >&6
1931else
1932 echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6
1934fi
1935
1936 CC=$ac_ct_CC
1937else
1938 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001939fi
1940
Jack Jansendd19cf82001-12-06 22:36:17 +00001941if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001942 if test -n "$ac_tool_prefix"; then
1943 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1944set dummy ${ac_tool_prefix}cc; ac_word=$2
1945echo "$as_me:$LINENO: checking for $ac_word" >&5
1946echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1947if test "${ac_cv_prog_CC+set}" = set; then
1948 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001949else
1950 if test -n "$CC"; then
1951 ac_cv_prog_CC="$CC" # Let the user override the test.
1952else
Martin v. Löwis11437992002-04-12 09:54:03 +00001953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1954for as_dir in $PATH
1955do
1956 IFS=$as_save_IFS
1957 test -z "$as_dir" && as_dir=.
1958 for ac_exec_ext in '' $ac_executable_extensions; do
1959 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1960 ac_cv_prog_CC="${ac_tool_prefix}cc"
1961 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1962 break 2
1963 fi
1964done
1965done
1966
1967fi
1968fi
1969CC=$ac_cv_prog_CC
1970if test -n "$CC"; then
1971 echo "$as_me:$LINENO: result: $CC" >&5
1972echo "${ECHO_T}$CC" >&6
1973else
1974 echo "$as_me:$LINENO: result: no" >&5
1975echo "${ECHO_T}no" >&6
1976fi
1977
1978fi
1979if test -z "$ac_cv_prog_CC"; then
1980 ac_ct_CC=$CC
1981 # Extract the first word of "cc", so it can be a program name with args.
1982set dummy cc; ac_word=$2
1983echo "$as_me:$LINENO: checking for $ac_word" >&5
1984echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1985if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1986 echo $ECHO_N "(cached) $ECHO_C" >&6
1987else
1988 if test -n "$ac_ct_CC"; then
1989 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1990else
1991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1992for as_dir in $PATH
1993do
1994 IFS=$as_save_IFS
1995 test -z "$as_dir" && as_dir=.
1996 for ac_exec_ext in '' $ac_executable_extensions; do
1997 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1998 ac_cv_prog_ac_ct_CC="cc"
1999 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2000 break 2
2001 fi
2002done
2003done
2004
2005fi
2006fi
2007ac_ct_CC=$ac_cv_prog_ac_ct_CC
2008if test -n "$ac_ct_CC"; then
2009 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2010echo "${ECHO_T}$ac_ct_CC" >&6
2011else
2012 echo "$as_me:$LINENO: result: no" >&5
2013echo "${ECHO_T}no" >&6
2014fi
2015
2016 CC=$ac_ct_CC
2017else
2018 CC="$ac_cv_prog_CC"
2019fi
2020
2021fi
2022if test -z "$CC"; then
2023 # Extract the first word of "cc", so it can be a program name with args.
2024set dummy cc; ac_word=$2
2025echo "$as_me:$LINENO: checking for $ac_word" >&5
2026echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2027if test "${ac_cv_prog_CC+set}" = set; then
2028 echo $ECHO_N "(cached) $ECHO_C" >&6
2029else
2030 if test -n "$CC"; then
2031 ac_cv_prog_CC="$CC" # Let the user override the test.
2032else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002033 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2035for as_dir in $PATH
2036do
2037 IFS=$as_save_IFS
2038 test -z "$as_dir" && as_dir=.
2039 for ac_exec_ext in '' $ac_executable_extensions; do
2040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2041 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2042 ac_prog_rejected=yes
2043 continue
2044 fi
2045 ac_cv_prog_CC="cc"
2046 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2047 break 2
2048 fi
2049done
2050done
2051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002052if test $ac_prog_rejected = yes; then
2053 # We found a bogon in the path, so make sure we never use it.
2054 set dummy $ac_cv_prog_CC
2055 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002056 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002057 # We chose a different compiler from the bogus one.
2058 # However, it has the same basename, so the bogon will be chosen
2059 # first if we set CC to just the basename; use the full file name.
2060 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002061 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002062 fi
2063fi
2064fi
2065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002066CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002068 echo "$as_me:$LINENO: result: $CC" >&5
2069echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070else
Martin v. Löwis11437992002-04-12 09:54:03 +00002071 echo "$as_me:$LINENO: result: no" >&5
2072echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002073fi
2074
Martin v. Löwis11437992002-04-12 09:54:03 +00002075fi
2076if test -z "$CC"; then
2077 if test -n "$ac_tool_prefix"; then
2078 for ac_prog in cl
2079 do
2080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2082echo "$as_me:$LINENO: checking for $ac_word" >&5
2083echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2084if test "${ac_cv_prog_CC+set}" = set; then
2085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002086else
2087 if test -n "$CC"; then
2088 ac_cv_prog_CC="$CC" # Let the user override the test.
2089else
Martin v. Löwis11437992002-04-12 09:54:03 +00002090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2091for as_dir in $PATH
2092do
2093 IFS=$as_save_IFS
2094 test -z "$as_dir" && as_dir=.
2095 for ac_exec_ext in '' $ac_executable_extensions; do
2096 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2097 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2098 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2099 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002100 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002101done
2102done
2103
2104fi
2105fi
2106CC=$ac_cv_prog_CC
2107if test -n "$CC"; then
2108 echo "$as_me:$LINENO: result: $CC" >&5
2109echo "${ECHO_T}$CC" >&6
2110else
2111 echo "$as_me:$LINENO: result: no" >&5
2112echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002113fi
2114
Martin v. Löwis11437992002-04-12 09:54:03 +00002115 test -n "$CC" && break
2116 done
2117fi
2118if test -z "$CC"; then
2119 ac_ct_CC=$CC
2120 for ac_prog in cl
2121do
2122 # Extract the first word of "$ac_prog", so it can be a program name with args.
2123set dummy $ac_prog; ac_word=$2
2124echo "$as_me:$LINENO: checking for $ac_word" >&5
2125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2126if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2127 echo $ECHO_N "(cached) $ECHO_C" >&6
2128else
2129 if test -n "$ac_ct_CC"; then
2130 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2131else
2132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2133for as_dir in $PATH
2134do
2135 IFS=$as_save_IFS
2136 test -z "$as_dir" && as_dir=.
2137 for ac_exec_ext in '' $ac_executable_extensions; do
2138 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2139 ac_cv_prog_ac_ct_CC="$ac_prog"
2140 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2141 break 2
2142 fi
2143done
2144done
Jack Jansendd19cf82001-12-06 22:36:17 +00002145
Martin v. Löwis11437992002-04-12 09:54:03 +00002146fi
2147fi
2148ac_ct_CC=$ac_cv_prog_ac_ct_CC
2149if test -n "$ac_ct_CC"; then
2150 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2151echo "${ECHO_T}$ac_ct_CC" >&6
2152else
2153 echo "$as_me:$LINENO: result: no" >&5
2154echo "${ECHO_T}no" >&6
2155fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
Martin v. Löwis11437992002-04-12 09:54:03 +00002157 test -n "$ac_ct_CC" && break
2158done
Michael W. Hudson54241132001-12-07 15:38:26 +00002159
Martin v. Löwis11437992002-04-12 09:54:03 +00002160 CC=$ac_ct_CC
2161fi
2162
2163fi
2164
2165
Skip Montanaro6dead952003-09-25 14:50:04 +00002166test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2167See \`config.log' for more details." >&5
2168echo "$as_me: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002170 { (exit 1); exit 1; }; }
2171
2172# Provide some information about the compiler.
2173echo "$as_me:$LINENO:" \
2174 "checking for C compiler version" >&5
2175ac_compiler=`set X $ac_compile; echo $2`
2176{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2177 (eval $ac_compiler --version </dev/null >&5) 2>&5
2178 ac_status=$?
2179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180 (exit $ac_status); }
2181{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2182 (eval $ac_compiler -v </dev/null >&5) 2>&5
2183 ac_status=$?
2184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2185 (exit $ac_status); }
2186{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2187 (eval $ac_compiler -V </dev/null >&5) 2>&5
2188 ac_status=$?
2189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2190 (exit $ac_status); }
2191
2192cat >conftest.$ac_ext <<_ACEOF
2193#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002194/* confdefs.h. */
2195_ACEOF
2196cat confdefs.h >>conftest.$ac_ext
2197cat >>conftest.$ac_ext <<_ACEOF
2198/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002199
Martin v. Löwis11437992002-04-12 09:54:03 +00002200int
2201main ()
2202{
2203
2204 ;
2205 return 0;
2206}
2207_ACEOF
2208ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002209ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002210# Try to create an executable without -o first, disregard a.out.
2211# It will help us diagnose broken compilers, and finding out an intuition
2212# of exeext.
2213echo "$as_me:$LINENO: checking for C compiler default output" >&5
2214echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2215ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2216if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2217 (eval $ac_link_default) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); }; then
2221 # Find the output, starting from the most likely. This scheme is
2222# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2223# resort.
2224
2225# Be careful to initialize this variable, since it used to be cached.
2226# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2227ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002228# b.out is created by i960 compilers.
2229for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2230do
2231 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002233 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2234 ;;
2235 conftest.$ac_ext )
2236 # This is the source file.
2237 ;;
2238 [ab].out )
2239 # We found the default executable, but exeext='' is most
2240 # certainly right.
2241 break;;
2242 *.* )
2243 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2244 # FIXME: I believe we export ac_cv_exeext for Libtool,
2245 # but it would be cool to find out if it's true. Does anybody
2246 # maintain Libtool? --akim.
2247 export ac_cv_exeext
2248 break;;
2249 * )
2250 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002251 esac
2252done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002253else
Martin v. Löwis11437992002-04-12 09:54:03 +00002254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002255sed 's/^/| /' conftest.$ac_ext >&5
2256
2257{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2258See \`config.log' for more details." >&5
2259echo "$as_me: error: C compiler cannot create executables
2260See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002261 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002262fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002263
Martin v. Löwis11437992002-04-12 09:54:03 +00002264ac_exeext=$ac_cv_exeext
2265echo "$as_me:$LINENO: result: $ac_file" >&5
2266echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002267
Martin v. Löwis11437992002-04-12 09:54:03 +00002268# Check the compiler produces executables we can run. If not, either
2269# the compiler is broken, or we cross compile.
2270echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2271echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2272# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2273# If not cross compiling, check that we can run a simple program.
2274if test "$cross_compiling" != yes; then
2275 if { ac_try='./$ac_file'
2276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2277 (eval $ac_try) 2>&5
2278 ac_status=$?
2279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2280 (exit $ac_status); }; }; then
2281 cross_compiling=no
2282 else
2283 if test "$cross_compiling" = maybe; then
2284 cross_compiling=yes
2285 else
2286 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002287If you meant to cross compile, use \`--host'.
2288See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002289echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002290If you meant to cross compile, use \`--host'.
2291See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002292 { (exit 1); exit 1; }; }
2293 fi
2294 fi
2295fi
2296echo "$as_me:$LINENO: result: yes" >&5
2297echo "${ECHO_T}yes" >&6
2298
Skip Montanaro6dead952003-09-25 14:50:04 +00002299rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002300ac_clean_files=$ac_clean_files_save
2301# Check the compiler produces executables we can run. If not, either
2302# the compiler is broken, or we cross compile.
2303echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2304echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2305echo "$as_me:$LINENO: result: $cross_compiling" >&5
2306echo "${ECHO_T}$cross_compiling" >&6
2307
2308echo "$as_me:$LINENO: checking for suffix of executables" >&5
2309echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2311 (eval $ac_link) 2>&5
2312 ac_status=$?
2313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2314 (exit $ac_status); }; then
2315 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2316# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2317# work properly (i.e., refer to `conftest.exe'), while it won't with
2318# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002319for ac_file in conftest.exe conftest conftest.*; do
2320 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002321 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002322 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002323 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2324 export ac_cv_exeext
2325 break;;
2326 * ) break;;
2327 esac
2328done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002329else
Skip Montanaro6dead952003-09-25 14:50:04 +00002330 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2331See \`config.log' for more details." >&5
2332echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2333See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002335fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002336
Martin v. Löwis11437992002-04-12 09:54:03 +00002337rm -f conftest$ac_cv_exeext
2338echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2339echo "${ECHO_T}$ac_cv_exeext" >&6
2340
2341rm -f conftest.$ac_ext
2342EXEEXT=$ac_cv_exeext
2343ac_exeext=$EXEEXT
2344echo "$as_me:$LINENO: checking for suffix of object files" >&5
2345echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2346if test "${ac_cv_objext+set}" = set; then
2347 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002348else
Martin v. Löwis11437992002-04-12 09:54:03 +00002349 cat >conftest.$ac_ext <<_ACEOF
2350#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002351/* confdefs.h. */
2352_ACEOF
2353cat confdefs.h >>conftest.$ac_ext
2354cat >>conftest.$ac_ext <<_ACEOF
2355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
Martin v. Löwis11437992002-04-12 09:54:03 +00002357int
2358main ()
2359{
2360
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365rm -f conftest.o conftest.obj
2366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2367 (eval $ac_compile) 2>&5
2368 ac_status=$?
2369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2370 (exit $ac_status); }; then
2371 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2372 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002373 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002374 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2375 break;;
2376 esac
2377done
2378else
2379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002380sed 's/^/| /' conftest.$ac_ext >&5
2381
2382{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&5
2384echo "$as_me: error: cannot compute suffix of object files: cannot compile
2385See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002386 { (exit 1); exit 1; }; }
2387fi
2388
2389rm -f conftest.$ac_cv_objext conftest.$ac_ext
2390fi
2391echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2392echo "${ECHO_T}$ac_cv_objext" >&6
2393OBJEXT=$ac_cv_objext
2394ac_objext=$OBJEXT
2395echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2396echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2397if test "${ac_cv_c_compiler_gnu+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
2399else
2400 cat >conftest.$ac_ext <<_ACEOF
2401#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002402/* confdefs.h. */
2403_ACEOF
2404cat confdefs.h >>conftest.$ac_ext
2405cat >>conftest.$ac_ext <<_ACEOF
2406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
Martin v. Löwis11437992002-04-12 09:54:03 +00002408int
2409main ()
2410{
2411#ifndef __GNUC__
2412 choke me
2413#endif
2414
2415 ;
2416 return 0;
2417}
2418_ACEOF
2419rm -f conftest.$ac_objext
2420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2421 (eval $ac_compile) 2>&5
2422 ac_status=$?
2423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424 (exit $ac_status); } &&
2425 { ac_try='test -s conftest.$ac_objext'
2426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2427 (eval $ac_try) 2>&5
2428 ac_status=$?
2429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430 (exit $ac_status); }; }; then
2431 ac_compiler_gnu=yes
2432else
2433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002434sed 's/^/| /' conftest.$ac_ext >&5
2435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436ac_compiler_gnu=no
2437fi
2438rm -f conftest.$ac_objext conftest.$ac_ext
2439ac_cv_c_compiler_gnu=$ac_compiler_gnu
2440
2441fi
2442echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2443echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2444GCC=`test $ac_compiler_gnu = yes && echo yes`
2445ac_test_CFLAGS=${CFLAGS+set}
2446ac_save_CFLAGS=$CFLAGS
2447CFLAGS="-g"
2448echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2449echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2450if test "${ac_cv_prog_cc_g+set}" = set; then
2451 echo $ECHO_N "(cached) $ECHO_C" >&6
2452else
2453 cat >conftest.$ac_ext <<_ACEOF
2454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002455/* confdefs.h. */
2456_ACEOF
2457cat confdefs.h >>conftest.$ac_ext
2458cat >>conftest.$ac_ext <<_ACEOF
2459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
Martin v. Löwis11437992002-04-12 09:54:03 +00002461int
2462main ()
2463{
2464
2465 ;
2466 return 0;
2467}
2468_ACEOF
2469rm -f conftest.$ac_objext
2470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2471 (eval $ac_compile) 2>&5
2472 ac_status=$?
2473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2474 (exit $ac_status); } &&
2475 { ac_try='test -s conftest.$ac_objext'
2476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2477 (eval $ac_try) 2>&5
2478 ac_status=$?
2479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002481 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002482else
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002484sed 's/^/| /' conftest.$ac_ext >&5
2485
Martin v. Löwis11437992002-04-12 09:54:03 +00002486ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002488rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002490echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2491echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002492if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002494elif test $ac_cv_prog_cc_g = yes; then
2495 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 CFLAGS="-g -O2"
2497 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002498 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002499 fi
2500else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002501 if test "$GCC" = yes; then
2502 CFLAGS="-O2"
2503 else
2504 CFLAGS=
2505 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002507echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2508echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2509if test "${ac_cv_prog_cc_stdc+set}" = set; then
2510 echo $ECHO_N "(cached) $ECHO_C" >&6
2511else
2512 ac_cv_prog_cc_stdc=no
2513ac_save_CC=$CC
2514cat >conftest.$ac_ext <<_ACEOF
2515#line $LINENO "configure"
2516/* confdefs.h. */
2517_ACEOF
2518cat confdefs.h >>conftest.$ac_ext
2519cat >>conftest.$ac_ext <<_ACEOF
2520/* end confdefs.h. */
2521#include <stdarg.h>
2522#include <stdio.h>
2523#include <sys/types.h>
2524#include <sys/stat.h>
2525/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2526struct buf { int x; };
2527FILE * (*rcsopen) (struct buf *, struct stat *, int);
2528static char *e (p, i)
2529 char **p;
2530 int i;
2531{
2532 return p[i];
2533}
2534static char *f (char * (*g) (char **, int), char **p, ...)
2535{
2536 char *s;
2537 va_list v;
2538 va_start (v,p);
2539 s = g (p, va_arg (v,int));
2540 va_end (v);
2541 return s;
2542}
2543int test (int i, double x);
2544struct s1 {int (*f) (int a);};
2545struct s2 {int (*f) (double a);};
2546int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2547int argc;
2548char **argv;
2549int
2550main ()
2551{
2552return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2553 ;
2554 return 0;
2555}
2556_ACEOF
2557# Don't try gcc -ansi; that turns off useful extensions and
2558# breaks some systems' header files.
2559# AIX -qlanglvl=ansi
2560# Ultrix and OSF/1 -std1
2561# HP-UX 10.20 and later -Ae
2562# HP-UX older versions -Aa -D_HPUX_SOURCE
2563# SVR4 -Xc -D__EXTENSIONS__
2564for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2565do
2566 CC="$ac_save_CC $ac_arg"
2567 rm -f conftest.$ac_objext
2568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2569 (eval $ac_compile) 2>&5
2570 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); } &&
2573 { ac_try='test -s conftest.$ac_objext'
2574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2575 (eval $ac_try) 2>&5
2576 ac_status=$?
2577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); }; }; then
2579 ac_cv_prog_cc_stdc=$ac_arg
2580break
2581else
2582 echo "$as_me: failed program was:" >&5
2583sed 's/^/| /' conftest.$ac_ext >&5
2584
2585fi
2586rm -f conftest.$ac_objext
2587done
2588rm -f conftest.$ac_ext conftest.$ac_objext
2589CC=$ac_save_CC
2590
2591fi
2592
2593case "x$ac_cv_prog_cc_stdc" in
2594 x|xno)
2595 echo "$as_me:$LINENO: result: none needed" >&5
2596echo "${ECHO_T}none needed" >&6 ;;
2597 *)
2598 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2599echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2600 CC="$CC $ac_cv_prog_cc_stdc" ;;
2601esac
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603# Some people use a C++ compiler to compile C. Since we use `exit',
2604# in C++ we need to declare it. In case someone uses the same compiler
2605# for both compiling C and C++ we need to have the C++ compiler decide
2606# the declaration of exit, since it's the most demanding environment.
2607cat >conftest.$ac_ext <<_ACEOF
2608#ifndef __cplusplus
2609 choke me
2610#endif
2611_ACEOF
2612rm -f conftest.$ac_objext
2613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2614 (eval $ac_compile) 2>&5
2615 ac_status=$?
2616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617 (exit $ac_status); } &&
2618 { ac_try='test -s conftest.$ac_objext'
2619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2620 (eval $ac_try) 2>&5
2621 ac_status=$?
2622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623 (exit $ac_status); }; }; then
2624 for ac_declaration in \
2625 ''\
2626 '#include <stdlib.h>' \
2627 'extern "C" void std::exit (int) throw (); using std::exit;' \
2628 'extern "C" void std::exit (int); using std::exit;' \
2629 'extern "C" void exit (int) throw ();' \
2630 'extern "C" void exit (int);' \
2631 'void exit (int);'
2632do
2633 cat >conftest.$ac_ext <<_ACEOF
2634#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002635/* confdefs.h. */
2636_ACEOF
2637cat confdefs.h >>conftest.$ac_ext
2638cat >>conftest.$ac_ext <<_ACEOF
2639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002640#include <stdlib.h>
2641$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002642int
2643main ()
2644{
2645exit (42);
2646 ;
2647 return 0;
2648}
2649_ACEOF
2650rm -f conftest.$ac_objext
2651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2652 (eval $ac_compile) 2>&5
2653 ac_status=$?
2654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655 (exit $ac_status); } &&
2656 { ac_try='test -s conftest.$ac_objext'
2657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658 (eval $ac_try) 2>&5
2659 ac_status=$?
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); }; }; then
2662 :
2663else
2664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002665sed 's/^/| /' conftest.$ac_ext >&5
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667continue
2668fi
2669rm -f conftest.$ac_objext conftest.$ac_ext
2670 cat >conftest.$ac_ext <<_ACEOF
2671#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002672/* confdefs.h. */
2673_ACEOF
2674cat confdefs.h >>conftest.$ac_ext
2675cat >>conftest.$ac_ext <<_ACEOF
2676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002677$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002678int
2679main ()
2680{
2681exit (42);
2682 ;
2683 return 0;
2684}
2685_ACEOF
2686rm -f conftest.$ac_objext
2687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2688 (eval $ac_compile) 2>&5
2689 ac_status=$?
2690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691 (exit $ac_status); } &&
2692 { ac_try='test -s conftest.$ac_objext'
2693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694 (eval $ac_try) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); }; }; then
2698 break
2699else
2700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002701sed 's/^/| /' conftest.$ac_ext >&5
2702
Martin v. Löwis11437992002-04-12 09:54:03 +00002703fi
2704rm -f conftest.$ac_objext conftest.$ac_ext
2705done
2706rm -f conftest*
2707if test -n "$ac_declaration"; then
2708 echo '#ifdef __cplusplus' >>confdefs.h
2709 echo $ac_declaration >>confdefs.h
2710 echo '#endif' >>confdefs.h
2711fi
2712
2713else
2714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002715sed 's/^/| /' conftest.$ac_ext >&5
2716
Martin v. Löwis11437992002-04-12 09:54:03 +00002717fi
2718rm -f conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002725
2726# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002727
2728ac_ext=c
2729ac_cpp='$CPP $CPPFLAGS'
2730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732ac_compiler_gnu=$ac_cv_c_compiler_gnu
2733echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2734echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002735# On Suns, sometimes $CPP names a directory.
2736if test -n "$CPP" && test -d "$CPP"; then
2737 CPP=
2738fi
2739if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 if test "${ac_cv_prog_CPP+set}" = set; then
2741 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002742else
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 # Double quotes because CPP needs to be expanded
2744 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2745 do
2746 ac_preproc_ok=false
2747for ac_c_preproc_warn_flag in '' yes
2748do
2749 # Use a header file that comes with gcc, so configuring glibc
2750 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2752 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002753 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 # not just through cpp. "Syntax error" is here to catch this case.
2755 cat >conftest.$ac_ext <<_ACEOF
2756#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002757/* confdefs.h. */
2758_ACEOF
2759cat confdefs.h >>conftest.$ac_ext
2760cat >>conftest.$ac_ext <<_ACEOF
2761/* end confdefs.h. */
2762#ifdef __STDC__
2763# include <limits.h>
2764#else
2765# include <assert.h>
2766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 Syntax error
2768_ACEOF
2769if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2770 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2771 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002772 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 rm -f conftest.er1
2774 cat conftest.err >&5
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } >/dev/null; then
2777 if test -s conftest.err; then
2778 ac_cpp_err=$ac_c_preproc_warn_flag
2779 else
2780 ac_cpp_err=
2781 fi
2782else
2783 ac_cpp_err=yes
2784fi
2785if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002786 :
2787else
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002789sed 's/^/| /' conftest.$ac_ext >&5
2790
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 # Broken: fails on valid input.
2792continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002794rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002795
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 # OK, works on sane cases. Now check whether non-existent headers
2797 # can be detected and how.
2798 cat >conftest.$ac_ext <<_ACEOF
2799#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002800/* confdefs.h. */
2801_ACEOF
2802cat confdefs.h >>conftest.$ac_ext
2803cat >>conftest.$ac_ext <<_ACEOF
2804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002805#include <ac_nonexistent.h>
2806_ACEOF
2807if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2808 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2809 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002810 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 rm -f conftest.er1
2812 cat conftest.err >&5
2813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814 (exit $ac_status); } >/dev/null; then
2815 if test -s conftest.err; then
2816 ac_cpp_err=$ac_c_preproc_warn_flag
2817 else
2818 ac_cpp_err=
2819 fi
2820else
2821 ac_cpp_err=yes
2822fi
2823if test -z "$ac_cpp_err"; then
2824 # Broken: success on invalid input.
2825continue
2826else
2827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002828sed 's/^/| /' conftest.$ac_ext >&5
2829
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 # Passes both tests.
2831ac_preproc_ok=:
2832break
2833fi
2834rm -f conftest.err conftest.$ac_ext
2835
2836done
2837# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2838rm -f conftest.err conftest.$ac_ext
2839if $ac_preproc_ok; then
2840 break
2841fi
2842
2843 done
2844 ac_cv_prog_CPP=$CPP
2845
2846fi
2847 CPP=$ac_cv_prog_CPP
2848else
2849 ac_cv_prog_CPP=$CPP
2850fi
2851echo "$as_me:$LINENO: result: $CPP" >&5
2852echo "${ECHO_T}$CPP" >&6
2853ac_preproc_ok=false
2854for ac_c_preproc_warn_flag in '' yes
2855do
2856 # Use a header file that comes with gcc, so configuring glibc
2857 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002858 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2859 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 # On the NeXT, cc -E runs the code through the compiler's parser,
2861 # not just through cpp. "Syntax error" is here to catch this case.
2862 cat >conftest.$ac_ext <<_ACEOF
2863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002864/* confdefs.h. */
2865_ACEOF
2866cat confdefs.h >>conftest.$ac_ext
2867cat >>conftest.$ac_ext <<_ACEOF
2868/* end confdefs.h. */
2869#ifdef __STDC__
2870# include <limits.h>
2871#else
2872# include <assert.h>
2873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 Syntax error
2875_ACEOF
2876if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2877 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2878 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002879 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 rm -f conftest.er1
2881 cat conftest.err >&5
2882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883 (exit $ac_status); } >/dev/null; then
2884 if test -s conftest.err; then
2885 ac_cpp_err=$ac_c_preproc_warn_flag
2886 else
2887 ac_cpp_err=
2888 fi
2889else
2890 ac_cpp_err=yes
2891fi
2892if test -z "$ac_cpp_err"; then
2893 :
2894else
2895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002896sed 's/^/| /' conftest.$ac_ext >&5
2897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898 # Broken: fails on valid input.
2899continue
2900fi
2901rm -f conftest.err conftest.$ac_ext
2902
2903 # OK, works on sane cases. Now check whether non-existent headers
2904 # can be detected and how.
2905 cat >conftest.$ac_ext <<_ACEOF
2906#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002907/* confdefs.h. */
2908_ACEOF
2909cat confdefs.h >>conftest.$ac_ext
2910cat >>conftest.$ac_ext <<_ACEOF
2911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002912#include <ac_nonexistent.h>
2913_ACEOF
2914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2916 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002917 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 rm -f conftest.er1
2919 cat conftest.err >&5
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } >/dev/null; then
2922 if test -s conftest.err; then
2923 ac_cpp_err=$ac_c_preproc_warn_flag
2924 else
2925 ac_cpp_err=
2926 fi
2927else
2928 ac_cpp_err=yes
2929fi
2930if test -z "$ac_cpp_err"; then
2931 # Broken: success on invalid input.
2932continue
2933else
2934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002935sed 's/^/| /' conftest.$ac_ext >&5
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 # Passes both tests.
2938ac_preproc_ok=:
2939break
2940fi
2941rm -f conftest.err conftest.$ac_ext
2942
2943done
2944# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2945rm -f conftest.err conftest.$ac_ext
2946if $ac_preproc_ok; then
2947 :
2948else
Skip Montanaro6dead952003-09-25 14:50:04 +00002949 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2950See \`config.log' for more details." >&5
2951echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2952See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 { (exit 1); exit 1; }; }
2954fi
2955
2956ac_ext=c
2957ac_cpp='$CPP $CPPFLAGS'
2958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2960ac_compiler_gnu=$ac_cv_c_compiler_gnu
2961
2962
Skip Montanaro6dead952003-09-25 14:50:04 +00002963echo "$as_me:$LINENO: checking for egrep" >&5
2964echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2965if test "${ac_cv_prog_egrep+set}" = set; then
2966 echo $ECHO_N "(cached) $ECHO_C" >&6
2967else
2968 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2969 then ac_cv_prog_egrep='grep -E'
2970 else ac_cv_prog_egrep='egrep'
2971 fi
2972fi
2973echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2974echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2975 EGREP=$ac_cv_prog_egrep
2976
2977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
2979echo "$as_me:$LINENO: checking for AIX" >&5
2980echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2981cat >conftest.$ac_ext <<_ACEOF
2982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002983/* confdefs.h. */
2984_ACEOF
2985cat confdefs.h >>conftest.$ac_ext
2986cat >>conftest.$ac_ext <<_ACEOF
2987/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988#ifdef _AIX
2989 yes
2990#endif
2991
Martin v. Löwis11437992002-04-12 09:54:03 +00002992_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002994 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002995 echo "$as_me:$LINENO: result: yes" >&5
2996echo "${ECHO_T}yes" >&6
2997cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002999_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000
3001else
Martin v. Löwis11437992002-04-12 09:54:03 +00003002 echo "$as_me:$LINENO: result: no" >&5
3003echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003004fi
3005rm -f conftest*
3006
Michael W. Hudson54241132001-12-07 15:38:26 +00003007
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003008
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003009# Check for unsupported systems
3010case $ac_sys_system/$ac_sys_release in
Skip Montanarob9949db2004-01-17 04:04:13 +00003011SunOS/4*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003012 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3013 echo See README for details.
3014 exit 1;;
3015esac
3016
Michael W. Hudson54241132001-12-07 15:38:26 +00003017
Martin v. Löwis11437992002-04-12 09:54:03 +00003018echo "$as_me:$LINENO: checking for --with-suffix" >&5
3019echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003020
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003021# Check whether --with-suffix or --without-suffix was given.
3022if test "${with_suffix+set}" = set; then
3023 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003024
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003025 case $withval in
3026 no) EXEEXT=;;
3027 yes) EXEEXT=.exe;;
3028 *) EXEEXT=$withval;;
3029 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003030fi;
3031echo "$as_me:$LINENO: result: $EXEEXT" >&5
3032echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003033
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003034# Test whether we're running on a non-case-sensitive system, in which
3035# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003036
Martin v. Löwis11437992002-04-12 09:54:03 +00003037echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3038echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003039if test ! -d CaseSensitiveTestDir; then
3040mkdir CaseSensitiveTestDir
3041fi
3042
3043if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003044then
Martin v. Löwis11437992002-04-12 09:54:03 +00003045 echo "$as_me:$LINENO: result: yes" >&5
3046echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003047 BUILDEXEEXT=.exe
3048else
Martin v. Löwis11437992002-04-12 09:54:03 +00003049 echo "$as_me:$LINENO: result: no" >&5
3050echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003051 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003052fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003053rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003054
Guido van Rossumdd997f71998-10-07 19:58:26 +00003055case $MACHDEP in
3056bsdos*)
3057 case $CC in
3058 gcc) CC="$CC -D_HAVE_BSDI";;
3059 esac;;
3060esac
3061
Guido van Rossum24b1e751997-08-21 02:29:16 +00003062case $ac_sys_system in
3063hp*|HP*)
3064 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003065 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003066 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003067Monterey*)
3068 case $CC in
3069 cc) CC="$CC -Wl,-Bexport";;
3070 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003071SunOS*)
3072 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
3074cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003075#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003076_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003077
3078 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003079esac
3080
Michael W. Hudson54241132001-12-07 15:38:26 +00003081
3082
Martin v. Löwis11437992002-04-12 09:54:03 +00003083echo "$as_me:$LINENO: checking LIBRARY" >&5
3084echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003085if test -z "$LIBRARY"
3086then
3087 LIBRARY='libpython$(VERSION).a'
3088fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003089echo "$as_me:$LINENO: result: $LIBRARY" >&5
3090echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003091
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003092# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003093# name of the library into which to insert object files). BLDLIBRARY is also
3094# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3095# is blank as the main program is not linked directly against LDLIBRARY.
3096# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3097# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3098# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3099# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003100#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003101# RUNSHARED is used to run shared python without installed libraries
3102#
3103# INSTSONAME is the name of the shared library that will be use to install
3104# on the system - some systems like version suffix, others don't
3105
3106
Michael W. Hudson54241132001-12-07 15:38:26 +00003107
3108
3109
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003110
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003111LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003112BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003113INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003114DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003115LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003116RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003117
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003118# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003119# If CXX is set, and if it is needed to link a main function that was
3120# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3121# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003122# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003123# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003124
Martin v. Löwis11437992002-04-12 09:54:03 +00003125echo "$as_me:$LINENO: checking LINKCC" >&5
3126echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003127if test -z "$LINKCC"
3128then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003129 if test -z "$CXX"; then
3130 LINKCC="\$(PURIFY) \$(CC)"
3131 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003132 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003133 $CXX -c conftest.$ac_ext 2>&5
3134 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3135 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3136 then
3137 LINKCC="\$(PURIFY) \$(CC)"
3138 else
3139 LINKCC="\$(PURIFY) \$(CXX)"
3140 fi
3141 rm -fr conftest*
3142 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003143 case $ac_sys_system in
3144 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003145 exp_extra="\"\""
3146 if test $ac_sys_release -ge 5 -o \
3147 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3148 exp_extra="."
3149 fi
3150 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003151 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003152 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003153 esac
3154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003155echo "$as_me:$LINENO: result: $LINKCC" >&5
3156echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003157
Martin v. Löwis11437992002-04-12 09:54:03 +00003158echo "$as_me:$LINENO: checking for --enable-shared" >&5
3159echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003160# Check whether --enable-shared or --disable-shared was given.
3161if test "${enable_shared+set}" = set; then
3162 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003163
Martin v. Löwis11437992002-04-12 09:54:03 +00003164fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003165
3166if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003167then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003168 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003169 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003170 enable_shared="yes";;
3171 *)
3172 enable_shared="no";;
3173 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003175echo "$as_me:$LINENO: result: $enable_shared" >&5
3176echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003177
3178
Martin v. Löwis11437992002-04-12 09:54:03 +00003179echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3180echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003181
Guido van Rossumb8552162001-09-05 14:58:11 +00003182# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3183# library that we build, but we do not want to link against it (we
3184# will find it with a -framework option). For this reason there is an
3185# extra variable BLDLIBRARY against which Python and the extension
3186# modules are linked, BLDLIBRARY. This is normally the same as
3187# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003188if test "$enable_framework"
3189then
3190 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003191 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003192 BLDLIBRARY=''
3193else
3194 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003195fi
Jack Jansene578a632001-08-15 01:27:14 +00003196
Martin v. Löwis1142de32002-03-29 16:28:31 +00003197# Other platforms follow
3198if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003199
3200cat >>confdefs.h <<\_ACEOF
3201#define Py_ENABLE_SHARED 1
3202_ACEOF
3203
Martin v. Löwis1142de32002-03-29 16:28:31 +00003204 case $ac_sys_system in
3205 BeOS*)
3206 LDLIBRARY='libpython$(VERSION).so'
3207 ;;
3208 CYGWIN*)
3209 LDLIBRARY='libpython$(VERSION).dll.a'
3210 DLLLIBRARY='libpython$(VERSION).dll'
3211 ;;
3212 SunOS*)
3213 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003214 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003215 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003216 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003217 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003218 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219 LDLIBRARY='libpython$(VERSION).so'
3220 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003221 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003222 INSTSONAME="$LDLIBRARY".$SOVERSION
3223 ;;
3224 hp*|HP*)
3225 LDLIBRARY='libpython$(VERSION).sl'
3226 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003227 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228 ;;
3229 OSF*)
3230 LDLIBRARY='libpython$(VERSION).so'
3231 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003232 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003233 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003234 atheos*)
3235 LDLIBRARY='libpython$(VERSION).so'
3236 BLDLIBRARY='-L. -lpython$(VERSION)'
3237 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3238 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003239 esac
Jason Tishler30765592003-09-04 11:04:06 +00003240else # shared is disabled
3241 case $ac_sys_system in
3242 CYGWIN*)
3243 BLDLIBRARY='$(LIBRARY)'
3244 LDLIBRARY='libpython$(VERSION).dll.a'
3245 ;;
3246 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003247fi
3248
Martin v. Löwis11437992002-04-12 09:54:03 +00003249echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3250echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003251
Martin v. Löwis11437992002-04-12 09:54:03 +00003252if test -n "$ac_tool_prefix"; then
3253 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3254set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3255echo "$as_me:$LINENO: checking for $ac_word" >&5
3256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3257if test "${ac_cv_prog_RANLIB+set}" = set; then
3258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259else
3260 if test -n "$RANLIB"; then
3261 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3262else
Martin v. Löwis11437992002-04-12 09:54:03 +00003263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3264for as_dir in $PATH
3265do
3266 IFS=$as_save_IFS
3267 test -z "$as_dir" && as_dir=.
3268 for ac_exec_ext in '' $ac_executable_extensions; do
3269 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3270 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3271 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3272 break 2
3273 fi
3274done
3275done
3276
Guido van Rossum627b2d71993-12-24 10:39:16 +00003277fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003279RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003281 echo "$as_me:$LINENO: result: $RANLIB" >&5
3282echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283else
Martin v. Löwis11437992002-04-12 09:54:03 +00003284 echo "$as_me:$LINENO: result: no" >&5
3285echo "${ECHO_T}no" >&6
3286fi
3287
3288fi
3289if test -z "$ac_cv_prog_RANLIB"; then
3290 ac_ct_RANLIB=$RANLIB
3291 # Extract the first word of "ranlib", so it can be a program name with args.
3292set dummy ranlib; ac_word=$2
3293echo "$as_me:$LINENO: checking for $ac_word" >&5
3294echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3295if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3296 echo $ECHO_N "(cached) $ECHO_C" >&6
3297else
3298 if test -n "$ac_ct_RANLIB"; then
3299 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3300else
3301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3302for as_dir in $PATH
3303do
3304 IFS=$as_save_IFS
3305 test -z "$as_dir" && as_dir=.
3306 for ac_exec_ext in '' $ac_executable_extensions; do
3307 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3308 ac_cv_prog_ac_ct_RANLIB="ranlib"
3309 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3310 break 2
3311 fi
3312done
3313done
3314
3315 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3316fi
3317fi
3318ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3319if test -n "$ac_ct_RANLIB"; then
3320 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3321echo "${ECHO_T}$ac_ct_RANLIB" >&6
3322else
3323 echo "$as_me:$LINENO: result: no" >&5
3324echo "${ECHO_T}no" >&6
3325fi
3326
3327 RANLIB=$ac_ct_RANLIB
3328else
3329 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003331
3332
Guido van Rossum7f43da71994-08-01 12:15:30 +00003333for ac_prog in ar aal
3334do
Martin v. Löwis11437992002-04-12 09:54:03 +00003335 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003337echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3339if test "${ac_cv_prog_AR+set}" = set; then
3340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341else
3342 if test -n "$AR"; then
3343 ac_cv_prog_AR="$AR" # Let the user override the test.
3344else
Martin v. Löwis11437992002-04-12 09:54:03 +00003345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in $PATH
3347do
3348 IFS=$as_save_IFS
3349 test -z "$as_dir" && as_dir=.
3350 for ac_exec_ext in '' $ac_executable_extensions; do
3351 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3352 ac_cv_prog_AR="$ac_prog"
3353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3354 break 2
3355 fi
3356done
3357done
3358
Guido van Rossum7f43da71994-08-01 12:15:30 +00003359fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003361AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003362if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003363 echo "$as_me:$LINENO: result: $AR" >&5
3364echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365else
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 echo "$as_me:$LINENO: result: no" >&5
3367echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003368fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003371done
3372test -n "$AR" || AR="ar"
3373
Michael W. Hudson54241132001-12-07 15:38:26 +00003374
Neil Schemenauera42c8272001-03-31 00:01:55 +00003375case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003376bsdos*|hp*|HP*)
3377 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003378 if test -z "$INSTALL"
3379 then
3380 INSTALL="${srcdir}/install-sh -c"
3381 fi
3382esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383ac_aux_dir=
3384for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3385 if test -f $ac_dir/install-sh; then
3386 ac_aux_dir=$ac_dir
3387 ac_install_sh="$ac_aux_dir/install-sh -c"
3388 break
3389 elif test -f $ac_dir/install.sh; then
3390 ac_aux_dir=$ac_dir
3391 ac_install_sh="$ac_aux_dir/install.sh -c"
3392 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 elif test -f $ac_dir/shtool; then
3394 ac_aux_dir=$ac_dir
3395 ac_install_sh="$ac_aux_dir/shtool install -c"
3396 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003397 fi
3398done
3399if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3401echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3402 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003403fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003404ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3405ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3406ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003407
3408# Find a good install program. We prefer a C program (faster),
3409# so one script is as good as another. But avoid the broken or
3410# incompatible versions:
3411# SysV /etc/install, /usr/sbin/install
3412# SunOS /usr/etc/install
3413# IRIX /sbin/install
3414# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003415# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3417# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3418# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3419# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003420echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3421echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003422if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003423if test "${ac_cv_path_install+set}" = set; then
3424 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003425else
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3427for as_dir in $PATH
3428do
3429 IFS=$as_save_IFS
3430 test -z "$as_dir" && as_dir=.
3431 # Account for people who put trailing slashes in PATH elements.
3432case $as_dir/ in
3433 ./ | .// | /cC/* | \
3434 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3435 /usr/ucb/* ) ;;
3436 *)
3437 # OSF1 and SCO ODT 3.0 have their own names for install.
3438 # Don't use installbsd from OSF since it installs stuff as root
3439 # by default.
3440 for ac_prog in ginstall scoinst install; do
3441 for ac_exec_ext in '' $ac_executable_extensions; do
3442 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3443 if test $ac_prog = install &&
3444 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3445 # AIX install. It has an incompatible calling convention.
3446 :
3447 elif test $ac_prog = install &&
3448 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3449 # program-specific install script used by HP pwplus--don't use.
3450 :
3451 else
3452 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3453 break 3
3454 fi
3455 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003456 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 done
3458 ;;
3459esac
3460done
3461
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003462
3463fi
3464 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003466 else
3467 # As a last resort, use the slow shell script. We don't cache a
3468 # path for INSTALL within a source directory, because that will
3469 # break other packages using the cache if that directory is
3470 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003472 fi
3473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003474echo "$as_me:$LINENO: result: $INSTALL" >&5
3475echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003476
3477# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3478# It thinks the first close brace ends the variable substitution.
3479test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3480
Martin v. Löwis11437992002-04-12 09:54:03 +00003481test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003482
3483test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3484
Michael W. Hudson54241132001-12-07 15:38:26 +00003485
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003486# Not every filesystem supports hard links
3487
3488if test -z "$LN" ; then
3489 case $ac_sys_system in
3490 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003491 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003492 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003493 *) LN=ln;;
3494 esac
3495fi
3496
Fred Drake109d9862001-07-11 06:27:56 +00003497# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003498echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3499echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3500
Fred Drake109d9862001-07-11 06:27:56 +00003501# Check whether --with-pydebug or --without-pydebug was given.
3502if test "${with_pydebug+set}" = set; then
3503 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003504
Fred Drake109d9862001-07-11 06:27:56 +00003505if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003506then
3507
3508cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003509#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003510_ACEOF
3511
3512 echo "$as_me:$LINENO: result: yes" >&5
3513echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003514 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else echo "$as_me:$LINENO: result: no" >&5
3516echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003517fi
3518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 echo "$as_me:$LINENO: result: no" >&5
3520echo "${ECHO_T}no" >&6
3521fi;
Fred Drake109d9862001-07-11 06:27:56 +00003522
Skip Montanarodecc6a42003-01-01 20:07:49 +00003523# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3524# merged with this chunk of code?
3525
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003526# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003527# ------------------------
3528# (The following bit of code is complicated enough - please keep things
3529# indented properly. Just pretend you're editing Python code. ;-)
3530
3531# There are two parallel sets of case statements below, one that checks to
3532# see if OPT was set and one that does BASECFLAGS setting based upon
3533# compiler and platform. BASECFLAGS tweaks need to be made even if the
3534# user set OPT.
3535
3536# tweak OPT based on compiler and platform, only if the user didn't set
3537# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003539if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003540then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003541 case $GCC in
3542 yes)
3543 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003544 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003545 if test "$Py_DEBUG" = 'true' ; then
3546 # Optimization messes up debuggers, so turn it off for
3547 # debug builds.
3548 OPT="-g -Wall -Wstrict-prototypes"
3549 else
3550 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003551 fi
3552 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003553 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003554 OPT="-O3 -Wall -Wstrict-prototypes"
3555 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003556 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003557 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003558 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3559 ;;
3560 esac
Fred Drake109d9862001-07-11 06:27:56 +00003561 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003563 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003564 OPT="-O"
3565 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003566 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003567
3568 # The current (beta) Monterey compiler dies with optimizations
3569 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003570 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003571 Monterey*)
3572 OPT=""
3573 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003574 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003576fi
3577
Skip Montanarodecc6a42003-01-01 20:07:49 +00003578
3579# tweak BASECFLAGS based on compiler and platform
3580case $GCC in
3581yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003582 # Python violates C99 rules, by casting between incompatible
3583 # pointer types. GCC may generate bad code as a result of that,
3584 # so use -fno-strict-aliasing if supported.
3585 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3586echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3587 ac_save_cc="$CC"
3588 CC="$CC -fno-strict-aliasing"
3589 if test "$cross_compiling" = yes; then
3590 ac_cv_no_strict_aliasing_ok=no
3591else
3592 cat >conftest.$ac_ext <<_ACEOF
3593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003594/* confdefs.h. */
3595_ACEOF
3596cat confdefs.h >>conftest.$ac_ext
3597cat >>conftest.$ac_ext <<_ACEOF
3598/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003599int main() { return 0; }
3600_ACEOF
3601rm -f conftest$ac_exeext
3602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3603 (eval $ac_link) 2>&5
3604 ac_status=$?
3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3608 (eval $ac_try) 2>&5
3609 ac_status=$?
3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3611 (exit $ac_status); }; }; then
3612 ac_cv_no_strict_aliasing_ok=yes
3613else
3614 echo "$as_me: program exited with status $ac_status" >&5
3615echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003616sed 's/^/| /' conftest.$ac_ext >&5
3617
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003618( exit $ac_status )
3619ac_cv_no_strict_aliasing_ok=no
3620fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003621rm -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 +00003622fi
3623 CC="$ac_save_cc"
3624 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3625echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3626 if test $ac_cv_no_strict_aliasing_ok = yes
3627 then
3628 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3629 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003630 case $ac_sys_system in
3631 SCO_SV*)
3632 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3633 ;;
3634 # is there any other compiler on Darwin besides gcc?
3635 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003636 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003637 ;;
3638 esac
3639 ;;
3640
3641*)
3642 case $ac_sys_system in
3643 OpenUNIX*|UnixWare*)
3644 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3645 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003646 OSF*)
3647 BASECFLAGS="$BASECFLAGS -ieee -std"
3648 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003649 SCO_SV*)
3650 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3651 ;;
3652 esac
3653 ;;
3654esac
3655
Fred Drakee1ceaa02001-12-04 20:55:47 +00003656if test "$Py_DEBUG" = 'true'; then
3657 :
3658else
3659 OPT="-DNDEBUG $OPT"
3660fi
3661
Guido van Rossum563e7081996-09-10 18:20:48 +00003662if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003663then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003664 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003665fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003666
Martin v. Löwis11437992002-04-12 09:54:03 +00003667echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3668echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3669if test "${ac_cv_opt_olimit_ok+set}" = set; then
3670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003671else
3672 ac_save_cc="$CC"
3673CC="$CC -OPT:Olimit=0"
3674if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003675 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003676else
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 cat >conftest.$ac_ext <<_ACEOF
3678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003679/* confdefs.h. */
3680_ACEOF
3681cat confdefs.h >>conftest.$ac_ext
3682cat >>conftest.$ac_ext <<_ACEOF
3683/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003684int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003685_ACEOF
3686rm -f conftest$ac_exeext
3687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3688 (eval $ac_link) 2>&5
3689 ac_status=$?
3690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3693 (eval $ac_try) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003697 ac_cv_opt_olimit_ok=yes
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 echo "$as_me: program exited with status $ac_status" >&5
3700echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003701sed 's/^/| /' conftest.$ac_ext >&5
3702
Martin v. Löwis11437992002-04-12 09:54:03 +00003703( exit $ac_status )
3704ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003705fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003706rm -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 +00003707fi
Guido van Rossum91922671997-10-09 20:24:13 +00003708CC="$ac_save_cc"
3709fi
3710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3712echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003713if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003714 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003715 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3716 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3717 # environment?
3718 Darwin*)
3719 ;;
3720 *)
3721 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3722 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003723 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003724else
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3726echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3727 if test "${ac_cv_olimit_ok+set}" = set; then
3728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003729else
3730 ac_save_cc="$CC"
3731 CC="$CC -Olimit 1500"
3732 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003733 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003734else
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 cat >conftest.$ac_ext <<_ACEOF
3736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003742int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743_ACEOF
3744rm -f conftest$ac_exeext
3745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3746 (eval $ac_link) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003755 ac_cv_olimit_ok=yes
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me: program exited with status $ac_status" >&5
3758echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003759sed 's/^/| /' conftest.$ac_ext >&5
3760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761( exit $ac_status )
3762ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003763fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003764rm -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 +00003765fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003766 CC="$ac_save_cc"
3767fi
3768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3770echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003771 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003772 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003773 fi
3774fi
3775
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003776# On some compilers, pthreads are available without further options
3777# (e.g. MacOS X). On some of these systems, the compiler will not
3778# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3779# So we have to see first whether pthreads are available without
3780# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003781echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3782echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3783if test "${ac_cv_pthread_is_default+set}" = set; then
3784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003786 if test "$cross_compiling" = yes; then
3787 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003788else
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 cat >conftest.$ac_ext <<_ACEOF
3790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003791/* confdefs.h. */
3792_ACEOF
3793cat confdefs.h >>conftest.$ac_ext
3794cat >>conftest.$ac_ext <<_ACEOF
3795/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003796
Martin v. Löwis130fb172001-07-19 11:00:41 +00003797#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003798
3799void* routine(void* p){return NULL;}
3800
3801int main(){
3802 pthread_t p;
3803 if(pthread_create(&p,NULL,routine,NULL)!=0)
3804 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003805 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003806 return 0;
3807}
3808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809_ACEOF
3810rm -f conftest$ac_exeext
3811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3812 (eval $ac_link) 2>&5
3813 ac_status=$?
3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3817 (eval $ac_try) 2>&5
3818 ac_status=$?
3819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003821
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003822 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003823 ac_cv_kthread=no
3824 ac_cv_pthread=no
3825
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 echo "$as_me: program exited with status $ac_status" >&5
3828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003829sed 's/^/| /' conftest.$ac_ext >&5
3830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831( exit $ac_status )
3832ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003833fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003834rm -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 +00003835fi
3836
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003837fi
3838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3840echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003841
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003844then
3845 ac_cv_kpthread=no
3846else
3847# -Kpthread, if available, provides the right #defines
3848# and linker options to make pthread_create available
3849# Some compilers won't report that they do not support -Kpthread,
3850# so we need to run a program to see whether it really made the
3851# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003852echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3853echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3854if test "${ac_cv_kpthread+set}" = set; then
3855 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003856else
3857 ac_save_cc="$CC"
3858CC="$CC -Kpthread"
3859if test "$cross_compiling" = yes; then
3860 ac_cv_kpthread=no
3861else
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 cat >conftest.$ac_ext <<_ACEOF
3863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003864/* confdefs.h. */
3865_ACEOF
3866cat confdefs.h >>conftest.$ac_ext
3867cat >>conftest.$ac_ext <<_ACEOF
3868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003869
3870#include <pthread.h>
3871
3872void* routine(void* p){return NULL;}
3873
3874int main(){
3875 pthread_t p;
3876 if(pthread_create(&p,NULL,routine,NULL)!=0)
3877 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003878 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003879 return 0;
3880}
3881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882_ACEOF
3883rm -f conftest$ac_exeext
3884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3885 (eval $ac_link) 2>&5
3886 ac_status=$?
3887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3890 (eval $ac_try) 2>&5
3891 ac_status=$?
3892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3893 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003894 ac_cv_kpthread=yes
3895else
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 echo "$as_me: program exited with status $ac_status" >&5
3897echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003898sed 's/^/| /' conftest.$ac_ext >&5
3899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900( exit $ac_status )
3901ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003902fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003903rm -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 +00003904fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003905CC="$ac_save_cc"
3906fi
3907
Martin v. Löwis11437992002-04-12 09:54:03 +00003908echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3909echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003910fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003911
Skip Montanarod8d39a02003-07-10 20:44:10 +00003912if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003913then
3914# -Kthread, if available, provides the right #defines
3915# and linker options to make pthread_create available
3916# Some compilers won't report that they do not support -Kthread,
3917# so we need to run a program to see whether it really made the
3918# function available.
3919echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3920echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3921if test "${ac_cv_kthread+set}" = set; then
3922 echo $ECHO_N "(cached) $ECHO_C" >&6
3923else
3924 ac_save_cc="$CC"
3925CC="$CC -Kthread"
3926if test "$cross_compiling" = yes; then
3927 ac_cv_kthread=no
3928else
3929 cat >conftest.$ac_ext <<_ACEOF
3930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003936
3937#include <pthread.h>
3938
3939void* routine(void* p){return NULL;}
3940
3941int main(){
3942 pthread_t p;
3943 if(pthread_create(&p,NULL,routine,NULL)!=0)
3944 return 1;
3945 (void)pthread_detach(p);
3946 return 0;
3947}
3948
3949_ACEOF
3950rm -f conftest$ac_exeext
3951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3952 (eval $ac_link) 2>&5
3953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3957 (eval $ac_try) 2>&5
3958 ac_status=$?
3959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3960 (exit $ac_status); }; }; then
3961 ac_cv_kthread=yes
3962else
3963 echo "$as_me: program exited with status $ac_status" >&5
3964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003965sed 's/^/| /' conftest.$ac_ext >&5
3966
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003967( exit $ac_status )
3968ac_cv_kthread=no
3969fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003970rm -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 +00003971fi
3972CC="$ac_save_cc"
3973fi
3974
3975echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3976echo "${ECHO_T}$ac_cv_kthread" >&6
3977fi
3978
Skip Montanarod8d39a02003-07-10 20:44:10 +00003979if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003980then
3981# -pthread, if available, provides the right #defines
3982# and linker options to make pthread_create available
3983# Some compilers won't report that they do not support -pthread,
3984# so we need to run a program to see whether it really made the
3985# function available.
3986echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3987echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3988if test "${ac_cv_thread+set}" = set; then
3989 echo $ECHO_N "(cached) $ECHO_C" >&6
3990else
3991 ac_save_cc="$CC"
3992CC="$CC -pthread"
3993if test "$cross_compiling" = yes; then
3994 ac_cv_pthread=no
3995else
3996 cat >conftest.$ac_ext <<_ACEOF
3997#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* confdefs.h. */
3999_ACEOF
4000cat confdefs.h >>conftest.$ac_ext
4001cat >>conftest.$ac_ext <<_ACEOF
4002/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004003
4004#include <pthread.h>
4005
4006void* routine(void* p){return NULL;}
4007
4008int main(){
4009 pthread_t p;
4010 if(pthread_create(&p,NULL,routine,NULL)!=0)
4011 return 1;
4012 (void)pthread_detach(p);
4013 return 0;
4014}
4015
4016_ACEOF
4017rm -f conftest$ac_exeext
4018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4019 (eval $ac_link) 2>&5
4020 ac_status=$?
4021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4024 (eval $ac_try) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); }; }; then
4028 ac_cv_pthread=yes
4029else
4030 echo "$as_me: program exited with status $ac_status" >&5
4031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004032sed 's/^/| /' conftest.$ac_ext >&5
4033
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004034( exit $ac_status )
4035ac_cv_pthread=no
4036fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004037rm -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 +00004038fi
4039CC="$ac_save_cc"
4040fi
4041
4042echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4043echo "${ECHO_T}$ac_cv_pthread" >&6
4044fi
4045
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004046# If we have set a CC compiler flag for thread support then
4047# check if it works for CXX, too.
4048ac_cv_cxx_thread=no
4049if test ! -z "$CXX"
4050then
4051echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4052echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4053ac_save_cxx="$CXX"
4054
4055if test "$ac_cv_kpthread" = "yes"
4056then
4057 CXX="$CXX -Kpthread"
4058 ac_cv_cxx_thread=yes
4059elif test "$ac_cv_kthread" = "yes"
4060then
4061 CXX="$CXX -Kthread"
4062 ac_cv_cxx_thread=yes
4063elif test "$ac_cv_pthread" = "yes"
4064then
4065 CXX="$CXX -pthread"
4066 ac_cv_cxx_thread=yes
4067fi
4068
4069if test $ac_cv_cxx_thread = yes
4070then
4071 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4072 $CXX -c conftest.$ac_ext 2>&5
4073 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4074 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4075 then
4076 ac_cv_cxx_thread=yes
4077 else
4078 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004079 fi
4080 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004081fi
4082fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004083CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004084echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4085echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4086
Michael W. Hudson54241132001-12-07 15:38:26 +00004087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004088# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004089echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4090echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4091if test "${ac_cv_header_stdc+set}" = set; then
4092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004093else
Martin v. Löwis11437992002-04-12 09:54:03 +00004094 cat >conftest.$ac_ext <<_ACEOF
4095#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004096/* confdefs.h. */
4097_ACEOF
4098cat confdefs.h >>conftest.$ac_ext
4099cat >>conftest.$ac_ext <<_ACEOF
4100/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004101#include <stdlib.h>
4102#include <stdarg.h>
4103#include <string.h>
4104#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004105
Skip Montanaro6dead952003-09-25 14:50:04 +00004106int
4107main ()
4108{
4109
4110 ;
4111 return 0;
4112}
Martin v. Löwis11437992002-04-12 09:54:03 +00004113_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004114rm -f conftest.$ac_objext
4115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4116 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004117 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004119 (exit $ac_status); } &&
4120 { ac_try='test -s conftest.$ac_objext'
4121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4122 (eval $ac_try) 2>&5
4123 ac_status=$?
4124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4125 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004126 ac_cv_header_stdc=yes
4127else
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004129sed 's/^/| /' conftest.$ac_ext >&5
4130
4131ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004133rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134
4135if test $ac_cv_header_stdc = yes; then
4136 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 cat >conftest.$ac_ext <<_ACEOF
4138#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004139/* confdefs.h. */
4140_ACEOF
4141cat confdefs.h >>conftest.$ac_ext
4142cat >>conftest.$ac_ext <<_ACEOF
4143/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004145
4146_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004148 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149 :
4150else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151 ac_cv_header_stdc=no
4152fi
4153rm -f conftest*
4154
4155fi
4156
4157if test $ac_cv_header_stdc = yes; then
4158 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004161/* confdefs.h. */
4162_ACEOF
4163cat confdefs.h >>conftest.$ac_ext
4164cat >>conftest.$ac_ext <<_ACEOF
4165/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
4168_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004170 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 :
4172else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173 ac_cv_header_stdc=no
4174fi
4175rm -f conftest*
4176
4177fi
4178
4179if test $ac_cv_header_stdc = yes; then
4180 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004182 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 cat >conftest.$ac_ext <<_ACEOF
4185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* confdefs.h. */
4187_ACEOF
4188cat confdefs.h >>conftest.$ac_ext
4189cat >>conftest.$ac_ext <<_ACEOF
4190/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004191#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004192#if ((' ' & 0x0FF) == 0x020)
4193# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4194# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4195#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004196# define ISLOWER(c) \
4197 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 || ('j' <= (c) && (c) <= 'r') \
4199 || ('s' <= (c) && (c) <= 'z'))
4200# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4201#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4204int
4205main ()
4206{
4207 int i;
4208 for (i = 0; i < 256; i++)
4209 if (XOR (islower (i), ISLOWER (i))
4210 || toupper (i) != TOUPPER (i))
4211 exit(2);
4212 exit (0);
4213}
4214_ACEOF
4215rm -f conftest$ac_exeext
4216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4217 (eval $ac_link) 2>&5
4218 ac_status=$?
4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4222 (eval $ac_try) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226 :
4227else
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 echo "$as_me: program exited with status $ac_status" >&5
4229echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004230sed 's/^/| /' conftest.$ac_ext >&5
4231
Martin v. Löwis11437992002-04-12 09:54:03 +00004232( exit $ac_status )
4233ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004234fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004235rm -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 +00004236fi
4237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004238fi
4239echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4240echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004241if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004242
4243cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
4247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248
Skip Montanarob9820a32004-01-17 00:16:12 +00004249# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4260 inttypes.h stdint.h unistd.h
4261do
4262as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4263echo "$as_me:$LINENO: checking for $ac_header" >&5
4264echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4265if eval "test \"\${$as_ac_Header+set}\" = set"; then
4266 echo $ECHO_N "(cached) $ECHO_C" >&6
4267else
4268 cat >conftest.$ac_ext <<_ACEOF
4269#line $LINENO "configure"
4270/* confdefs.h. */
4271_ACEOF
4272cat confdefs.h >>conftest.$ac_ext
4273cat >>conftest.$ac_ext <<_ACEOF
4274/* end confdefs.h. */
4275$ac_includes_default
4276
4277#include <$ac_header>
4278_ACEOF
4279rm -f conftest.$ac_objext
4280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4281 (eval $ac_compile) 2>&5
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest.$ac_objext'
4286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4287 (eval $ac_try) 2>&5
4288 ac_status=$?
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290 (exit $ac_status); }; }; then
4291 eval "$as_ac_Header=yes"
4292else
4293 echo "$as_me: failed program was:" >&5
4294sed 's/^/| /' conftest.$ac_ext >&5
4295
4296eval "$as_ac_Header=no"
4297fi
4298rm -f conftest.$ac_objext conftest.$ac_ext
4299fi
4300echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4301echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4302if test `eval echo '${'$as_ac_Header'}'` = yes; then
4303 cat >>confdefs.h <<_ACEOF
4304#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4305_ACEOF
4306
4307fi
4308
4309done
4310
4311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004349
Barry Warsawfe33b792003-01-07 22:42:49 +00004350
Neal Norwitz82251032003-05-23 14:35:24 +00004351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004353libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004354signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4355unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004356sys/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 +00004357sys/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 +00004358sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004359sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004360do
Martin v. Löwis11437992002-04-12 09:54:03 +00004361as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4362if eval "test \"\${$as_ac_Header+set}\" = set"; then
4363 echo "$as_me:$LINENO: checking for $ac_header" >&5
4364echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4365if eval "test \"\${$as_ac_Header+set}\" = set"; then
4366 echo $ECHO_N "(cached) $ECHO_C" >&6
4367fi
4368echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4369echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370else
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 # Is the header compilable?
4372echo "$as_me:$LINENO: checking $ac_header usability" >&5
4373echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4374cat >conftest.$ac_ext <<_ACEOF
4375#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004376/* confdefs.h. */
4377_ACEOF
4378cat confdefs.h >>conftest.$ac_ext
4379cat >>conftest.$ac_ext <<_ACEOF
4380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004381$ac_includes_default
4382#include <$ac_header>
4383_ACEOF
4384rm -f conftest.$ac_objext
4385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4386 (eval $ac_compile) 2>&5
4387 ac_status=$?
4388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4389 (exit $ac_status); } &&
4390 { ac_try='test -s conftest.$ac_objext'
4391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4392 (eval $ac_try) 2>&5
4393 ac_status=$?
4394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4395 (exit $ac_status); }; }; then
4396 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004397else
Martin v. Löwis11437992002-04-12 09:54:03 +00004398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004399sed 's/^/| /' conftest.$ac_ext >&5
4400
Martin v. Löwis11437992002-04-12 09:54:03 +00004401ac_header_compiler=no
4402fi
4403rm -f conftest.$ac_objext conftest.$ac_ext
4404echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4405echo "${ECHO_T}$ac_header_compiler" >&6
4406
4407# Is the header present?
4408echo "$as_me:$LINENO: checking $ac_header presence" >&5
4409echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4410cat >conftest.$ac_ext <<_ACEOF
4411#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004412/* confdefs.h. */
4413_ACEOF
4414cat confdefs.h >>conftest.$ac_ext
4415cat >>conftest.$ac_ext <<_ACEOF
4416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004417#include <$ac_header>
4418_ACEOF
4419if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4420 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4421 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004422 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004423 rm -f conftest.er1
4424 cat conftest.err >&5
4425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426 (exit $ac_status); } >/dev/null; then
4427 if test -s conftest.err; then
4428 ac_cpp_err=$ac_c_preproc_warn_flag
4429 else
4430 ac_cpp_err=
4431 fi
4432else
4433 ac_cpp_err=yes
4434fi
4435if test -z "$ac_cpp_err"; then
4436 ac_header_preproc=yes
4437else
4438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004439sed 's/^/| /' conftest.$ac_ext >&5
4440
Martin v. Löwis11437992002-04-12 09:54:03 +00004441 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004442fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004443rm -f conftest.err conftest.$ac_ext
4444echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4445echo "${ECHO_T}$ac_header_preproc" >&6
4446
4447# So? What about this header?
4448case $ac_header_compiler:$ac_header_preproc in
4449 yes:no )
4450 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4451echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4452 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004453echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4454 (
4455 cat <<\_ASBOX
4456## ------------------------------------ ##
4457## Report this to bug-autoconf@gnu.org. ##
4458## ------------------------------------ ##
4459_ASBOX
4460 ) |
4461 sed "s/^/$as_me: WARNING: /" >&2
4462 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004463 no:yes )
4464 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4465echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4466 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4467echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4468 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004469echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4470 (
4471 cat <<\_ASBOX
4472## ------------------------------------ ##
4473## Report this to bug-autoconf@gnu.org. ##
4474## ------------------------------------ ##
4475_ASBOX
4476 ) |
4477 sed "s/^/$as_me: WARNING: /" >&2
4478 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004479esac
4480echo "$as_me:$LINENO: checking for $ac_header" >&5
4481echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4482if eval "test \"\${$as_ac_Header+set}\" = set"; then
4483 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004484else
Martin v. Löwis11437992002-04-12 09:54:03 +00004485 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004487echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4488echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4489
4490fi
4491if test `eval echo '${'$as_ac_Header'}'` = yes; then
4492 cat >>confdefs.h <<_ACEOF
4493#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4494_ACEOF
4495
4496fi
4497
Guido van Rossum627b2d71993-12-24 10:39:16 +00004498done
4499
Martin v. Löwis11437992002-04-12 09:54:03 +00004500
4501
4502
4503
4504
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004505ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004506for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4507 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4508echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4509echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4510if eval "test \"\${$as_ac_Header+set}\" = set"; then
4511 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004512else
Martin v. Löwis11437992002-04-12 09:54:03 +00004513 cat >conftest.$ac_ext <<_ACEOF
4514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004515/* confdefs.h. */
4516_ACEOF
4517cat confdefs.h >>conftest.$ac_ext
4518cat >>conftest.$ac_ext <<_ACEOF
4519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004520#include <sys/types.h>
4521#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004522
Martin v. Löwis11437992002-04-12 09:54:03 +00004523int
4524main ()
4525{
4526if ((DIR *) 0)
4527return 0;
4528 ;
4529 return 0;
4530}
4531_ACEOF
4532rm -f conftest.$ac_objext
4533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4534 (eval $ac_compile) 2>&5
4535 ac_status=$?
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); } &&
4538 { ac_try='test -s conftest.$ac_objext'
4539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4540 (eval $ac_try) 2>&5
4541 ac_status=$?
4542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543 (exit $ac_status); }; }; then
4544 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004545else
Martin v. Löwis11437992002-04-12 09:54:03 +00004546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004547sed 's/^/| /' conftest.$ac_ext >&5
4548
Martin v. Löwis11437992002-04-12 09:54:03 +00004549eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004551rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004553echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4554echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4555if test `eval echo '${'$as_ac_Header'}'` = yes; then
4556 cat >>confdefs.h <<_ACEOF
4557#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4558_ACEOF
4559
4560ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004562
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563done
4564# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4565if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004566 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4567echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4568if test "${ac_cv_search_opendir+set}" = set; then
4569 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570else
Martin v. Löwis11437992002-04-12 09:54:03 +00004571 ac_func_search_save_LIBS=$LIBS
4572ac_cv_search_opendir=no
4573cat >conftest.$ac_ext <<_ACEOF
4574#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004575/* confdefs.h. */
4576_ACEOF
4577cat confdefs.h >>conftest.$ac_ext
4578cat >>conftest.$ac_ext <<_ACEOF
4579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004580
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004581/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004582#ifdef __cplusplus
4583extern "C"
4584#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004585/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004586 builtin and then its argument prototype would still apply. */
4587char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004588int
4589main ()
4590{
4591opendir ();
4592 ;
4593 return 0;
4594}
4595_ACEOF
4596rm -f conftest.$ac_objext conftest$ac_exeext
4597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4598 (eval $ac_link) 2>&5
4599 ac_status=$?
4600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601 (exit $ac_status); } &&
4602 { ac_try='test -s 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
4608 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004609else
Martin v. Löwis11437992002-04-12 09:54:03 +00004610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004611sed 's/^/| /' conftest.$ac_ext >&5
4612
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004614rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4615if test "$ac_cv_search_opendir" = no; then
4616 for ac_lib in dir; do
4617 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4618 cat >conftest.$ac_ext <<_ACEOF
4619#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004620/* confdefs.h. */
4621_ACEOF
4622cat confdefs.h >>conftest.$ac_ext
4623cat >>conftest.$ac_ext <<_ACEOF
4624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004625
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004626/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004627#ifdef __cplusplus
4628extern "C"
4629#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004630/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004631 builtin and then its argument prototype would still apply. */
4632char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004633int
4634main ()
4635{
4636opendir ();
4637 ;
4638 return 0;
4639}
4640_ACEOF
4641rm -f conftest.$ac_objext conftest$ac_exeext
4642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4643 (eval $ac_link) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); } &&
4647 { ac_try='test -s conftest$ac_exeext'
4648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4649 (eval $ac_try) 2>&5
4650 ac_status=$?
4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4652 (exit $ac_status); }; }; then
4653 ac_cv_search_opendir="-l$ac_lib"
4654break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655else
Martin v. Löwis11437992002-04-12 09:54:03 +00004656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004657sed 's/^/| /' conftest.$ac_ext >&5
4658
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004659fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4661 done
4662fi
4663LIBS=$ac_func_search_save_LIBS
4664fi
4665echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4666echo "${ECHO_T}$ac_cv_search_opendir" >&6
4667if test "$ac_cv_search_opendir" != no; then
4668 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004669
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004670fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004671
Michael W. Hudson54241132001-12-07 15:38:26 +00004672else
Martin v. Löwis11437992002-04-12 09:54:03 +00004673 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4674echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4675if test "${ac_cv_search_opendir+set}" = set; then
4676 echo $ECHO_N "(cached) $ECHO_C" >&6
4677else
4678 ac_func_search_save_LIBS=$LIBS
4679ac_cv_search_opendir=no
4680cat >conftest.$ac_ext <<_ACEOF
4681#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004682/* confdefs.h. */
4683_ACEOF
4684cat confdefs.h >>conftest.$ac_ext
4685cat >>conftest.$ac_ext <<_ACEOF
4686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004687
4688/* Override any gcc2 internal prototype to avoid an error. */
4689#ifdef __cplusplus
4690extern "C"
4691#endif
4692/* We use char because int might match the return type of a gcc2
4693 builtin and then its argument prototype would still apply. */
4694char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004695int
4696main ()
4697{
4698opendir ();
4699 ;
4700 return 0;
4701}
4702_ACEOF
4703rm -f conftest.$ac_objext conftest$ac_exeext
4704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4705 (eval $ac_link) 2>&5
4706 ac_status=$?
4707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4708 (exit $ac_status); } &&
4709 { ac_try='test -s conftest$ac_exeext'
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_cv_search_opendir="none required"
4716else
4717 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 +00004720fi
4721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4722if test "$ac_cv_search_opendir" = no; then
4723 for ac_lib in x; do
4724 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4725 cat >conftest.$ac_ext <<_ACEOF
4726#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004727/* confdefs.h. */
4728_ACEOF
4729cat confdefs.h >>conftest.$ac_ext
4730cat >>conftest.$ac_ext <<_ACEOF
4731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004732
4733/* Override any gcc2 internal prototype to avoid an error. */
4734#ifdef __cplusplus
4735extern "C"
4736#endif
4737/* We use char because int might match the return type of a gcc2
4738 builtin and then its argument prototype would still apply. */
4739char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004740int
4741main ()
4742{
4743opendir ();
4744 ;
4745 return 0;
4746}
4747_ACEOF
4748rm -f conftest.$ac_objext conftest$ac_exeext
4749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4750 (eval $ac_link) 2>&5
4751 ac_status=$?
4752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4753 (exit $ac_status); } &&
4754 { ac_try='test -s conftest$ac_exeext'
4755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4756 (eval $ac_try) 2>&5
4757 ac_status=$?
4758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4759 (exit $ac_status); }; }; then
4760 ac_cv_search_opendir="-l$ac_lib"
4761break
4762else
4763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004764sed 's/^/| /' conftest.$ac_ext >&5
4765
Martin v. Löwis11437992002-04-12 09:54:03 +00004766fi
4767rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4768 done
4769fi
4770LIBS=$ac_func_search_save_LIBS
4771fi
4772echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4773echo "${ECHO_T}$ac_cv_search_opendir" >&6
4774if test "$ac_cv_search_opendir" != no; then
4775 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4776
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004777fi
4778
4779fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004780
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004781echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4782echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4783if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4784 echo $ECHO_N "(cached) $ECHO_C" >&6
4785else
4786 cat >conftest.$ac_ext <<_ACEOF
4787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004788/* confdefs.h. */
4789_ACEOF
4790cat confdefs.h >>conftest.$ac_ext
4791cat >>conftest.$ac_ext <<_ACEOF
4792/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004793#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004794int
4795main ()
4796{
4797return makedev(0, 0);
4798 ;
4799 return 0;
4800}
4801_ACEOF
4802rm -f conftest.$ac_objext conftest$ac_exeext
4803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4804 (eval $ac_link) 2>&5
4805 ac_status=$?
4806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4807 (exit $ac_status); } &&
4808 { ac_try='test -s conftest$ac_exeext'
4809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4810 (eval $ac_try) 2>&5
4811 ac_status=$?
4812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4813 (exit $ac_status); }; }; then
4814 ac_cv_header_sys_types_h_makedev=yes
4815else
4816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004817sed 's/^/| /' conftest.$ac_ext >&5
4818
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004819ac_cv_header_sys_types_h_makedev=no
4820fi
4821rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4822
4823fi
4824echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4825echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4826
4827if test $ac_cv_header_sys_types_h_makedev = no; then
4828if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4829 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4830echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4831if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4832 echo $ECHO_N "(cached) $ECHO_C" >&6
4833fi
4834echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4835echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4836else
4837 # Is the header compilable?
4838echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4839echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4840cat >conftest.$ac_ext <<_ACEOF
4841#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004842/* confdefs.h. */
4843_ACEOF
4844cat confdefs.h >>conftest.$ac_ext
4845cat >>conftest.$ac_ext <<_ACEOF
4846/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004847$ac_includes_default
4848#include <sys/mkdev.h>
4849_ACEOF
4850rm -f conftest.$ac_objext
4851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4852 (eval $ac_compile) 2>&5
4853 ac_status=$?
4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855 (exit $ac_status); } &&
4856 { ac_try='test -s conftest.$ac_objext'
4857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4858 (eval $ac_try) 2>&5
4859 ac_status=$?
4860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4861 (exit $ac_status); }; }; then
4862 ac_header_compiler=yes
4863else
4864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004865sed 's/^/| /' conftest.$ac_ext >&5
4866
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004867ac_header_compiler=no
4868fi
4869rm -f conftest.$ac_objext conftest.$ac_ext
4870echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4871echo "${ECHO_T}$ac_header_compiler" >&6
4872
4873# Is the header present?
4874echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4875echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4876cat >conftest.$ac_ext <<_ACEOF
4877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004878/* confdefs.h. */
4879_ACEOF
4880cat confdefs.h >>conftest.$ac_ext
4881cat >>conftest.$ac_ext <<_ACEOF
4882/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004883#include <sys/mkdev.h>
4884_ACEOF
4885if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4886 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4887 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004888 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004889 rm -f conftest.er1
4890 cat conftest.err >&5
4891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4892 (exit $ac_status); } >/dev/null; then
4893 if test -s conftest.err; then
4894 ac_cpp_err=$ac_c_preproc_warn_flag
4895 else
4896 ac_cpp_err=
4897 fi
4898else
4899 ac_cpp_err=yes
4900fi
4901if test -z "$ac_cpp_err"; then
4902 ac_header_preproc=yes
4903else
4904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004905sed 's/^/| /' conftest.$ac_ext >&5
4906
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004907 ac_header_preproc=no
4908fi
4909rm -f conftest.err conftest.$ac_ext
4910echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4911echo "${ECHO_T}$ac_header_preproc" >&6
4912
4913# So? What about this header?
4914case $ac_header_compiler:$ac_header_preproc in
4915 yes:no )
4916 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4917echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4918 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004919echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4920 (
4921 cat <<\_ASBOX
4922## ------------------------------------ ##
4923## Report this to bug-autoconf@gnu.org. ##
4924## ------------------------------------ ##
4925_ASBOX
4926 ) |
4927 sed "s/^/$as_me: WARNING: /" >&2
4928 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004929 no:yes )
4930 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4931echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4932 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4933echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4934 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004935echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4936 (
4937 cat <<\_ASBOX
4938## ------------------------------------ ##
4939## Report this to bug-autoconf@gnu.org. ##
4940## ------------------------------------ ##
4941_ASBOX
4942 ) |
4943 sed "s/^/$as_me: WARNING: /" >&2
4944 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004945esac
4946echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4947echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4948if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4949 echo $ECHO_N "(cached) $ECHO_C" >&6
4950else
4951 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4952fi
4953echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4954echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4955
4956fi
4957if test $ac_cv_header_sys_mkdev_h = yes; then
4958
4959cat >>confdefs.h <<\_ACEOF
4960#define MAJOR_IN_MKDEV 1
4961_ACEOF
4962
4963fi
4964
4965
4966
4967 if test $ac_cv_header_sys_mkdev_h = no; then
4968 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4969 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4970echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4971if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4972 echo $ECHO_N "(cached) $ECHO_C" >&6
4973fi
4974echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4975echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4976else
4977 # Is the header compilable?
4978echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4979echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4980cat >conftest.$ac_ext <<_ACEOF
4981#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004982/* confdefs.h. */
4983_ACEOF
4984cat confdefs.h >>conftest.$ac_ext
4985cat >>conftest.$ac_ext <<_ACEOF
4986/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004987$ac_includes_default
4988#include <sys/sysmacros.h>
4989_ACEOF
4990rm -f conftest.$ac_objext
4991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4992 (eval $ac_compile) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); } &&
4996 { ac_try='test -s conftest.$ac_objext'
4997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998 (eval $ac_try) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); }; }; then
5002 ac_header_compiler=yes
5003else
5004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005005sed 's/^/| /' conftest.$ac_ext >&5
5006
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005007ac_header_compiler=no
5008fi
5009rm -f conftest.$ac_objext conftest.$ac_ext
5010echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5011echo "${ECHO_T}$ac_header_compiler" >&6
5012
5013# Is the header present?
5014echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5015echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5016cat >conftest.$ac_ext <<_ACEOF
5017#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005023#include <sys/sysmacros.h>
5024_ACEOF
5025if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5026 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5027 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005028 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005029 rm -f conftest.er1
5030 cat conftest.err >&5
5031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5032 (exit $ac_status); } >/dev/null; then
5033 if test -s conftest.err; then
5034 ac_cpp_err=$ac_c_preproc_warn_flag
5035 else
5036 ac_cpp_err=
5037 fi
5038else
5039 ac_cpp_err=yes
5040fi
5041if test -z "$ac_cpp_err"; then
5042 ac_header_preproc=yes
5043else
5044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005045sed 's/^/| /' conftest.$ac_ext >&5
5046
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005047 ac_header_preproc=no
5048fi
5049rm -f conftest.err conftest.$ac_ext
5050echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5051echo "${ECHO_T}$ac_header_preproc" >&6
5052
5053# So? What about this header?
5054case $ac_header_compiler:$ac_header_preproc in
5055 yes:no )
5056 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5057echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5058 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005059echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5060 (
5061 cat <<\_ASBOX
5062## ------------------------------------ ##
5063## Report this to bug-autoconf@gnu.org. ##
5064## ------------------------------------ ##
5065_ASBOX
5066 ) |
5067 sed "s/^/$as_me: WARNING: /" >&2
5068 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005069 no:yes )
5070 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5071echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5072 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5073echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5074 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005075echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5076 (
5077 cat <<\_ASBOX
5078## ------------------------------------ ##
5079## Report this to bug-autoconf@gnu.org. ##
5080## ------------------------------------ ##
5081_ASBOX
5082 ) |
5083 sed "s/^/$as_me: WARNING: /" >&2
5084 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005085esac
5086echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5087echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5088if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5089 echo $ECHO_N "(cached) $ECHO_C" >&6
5090else
5091 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5092fi
5093echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5094echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5095
5096fi
5097if test $ac_cv_header_sys_sysmacros_h = yes; then
5098
5099cat >>confdefs.h <<\_ACEOF
5100#define MAJOR_IN_SYSMACROS 1
5101_ACEOF
5102
5103fi
5104
5105
5106 fi
5107fi
5108
Michael W. Hudson54241132001-12-07 15:38:26 +00005109
Guido van Rossum627b2d71993-12-24 10:39:16 +00005110# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005111was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005112echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5113echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5114cat >conftest.$ac_ext <<_ACEOF
5115#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005116/* confdefs.h. */
5117_ACEOF
5118cat confdefs.h >>conftest.$ac_ext
5119cat >>conftest.$ac_ext <<_ACEOF
5120/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005121#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005122
5123_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005125 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005126 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005127else
Martin v. Löwis11437992002-04-12 09:54:03 +00005128
5129
5130cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005131#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005132_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005133
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005134
Guido van Rossum627b2d71993-12-24 10:39:16 +00005135fi
5136rm -f conftest*
5137
Martin v. Löwis11437992002-04-12 09:54:03 +00005138echo "$as_me:$LINENO: result: $was_it_defined" >&5
5139echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005140
Neal Norwitz11690112002-07-30 01:08:28 +00005141# Check whether using makedev requires defining _OSF_SOURCE
5142echo "$as_me:$LINENO: checking for makedev" >&5
5143echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5144cat >conftest.$ac_ext <<_ACEOF
5145#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005146/* confdefs.h. */
5147_ACEOF
5148cat confdefs.h >>conftest.$ac_ext
5149cat >>conftest.$ac_ext <<_ACEOF
5150/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005151#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005152int
5153main ()
5154{
5155 makedev(0, 0)
5156 ;
5157 return 0;
5158}
5159_ACEOF
5160rm -f conftest.$ac_objext conftest$ac_exeext
5161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5162 (eval $ac_link) 2>&5
5163 ac_status=$?
5164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5165 (exit $ac_status); } &&
5166 { ac_try='test -s conftest$ac_exeext'
5167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5168 (eval $ac_try) 2>&5
5169 ac_status=$?
5170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171 (exit $ac_status); }; }; then
5172 ac_cv_has_makedev=yes
5173else
5174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005175sed 's/^/| /' conftest.$ac_ext >&5
5176
Neal Norwitz11690112002-07-30 01:08:28 +00005177ac_cv_has_makedev=no
5178fi
5179rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5180if test "$ac_cv_has_makedev" = "no"; then
5181 # we didn't link, try if _OSF_SOURCE will allow us to link
5182 cat >conftest.$ac_ext <<_ACEOF
5183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005184/* confdefs.h. */
5185_ACEOF
5186cat confdefs.h >>conftest.$ac_ext
5187cat >>conftest.$ac_ext <<_ACEOF
5188/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005189
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005190#define _OSF_SOURCE 1
5191#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005192
Neal Norwitz11690112002-07-30 01:08:28 +00005193int
5194main ()
5195{
5196 makedev(0, 0)
5197 ;
5198 return 0;
5199}
5200_ACEOF
5201rm -f conftest.$ac_objext conftest$ac_exeext
5202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5203 (eval $ac_link) 2>&5
5204 ac_status=$?
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); } &&
5207 { ac_try='test -s conftest$ac_exeext'
5208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5209 (eval $ac_try) 2>&5
5210 ac_status=$?
5211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212 (exit $ac_status); }; }; then
5213 ac_cv_has_makedev=yes
5214else
5215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005216sed 's/^/| /' conftest.$ac_ext >&5
5217
Neal Norwitz11690112002-07-30 01:08:28 +00005218ac_cv_has_makedev=no
5219fi
5220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5221 if test "$ac_cv_has_makedev" = "yes"; then
5222
5223cat >>confdefs.h <<\_ACEOF
5224#define _OSF_SOURCE 1
5225_ACEOF
5226
5227 fi
5228fi
5229echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5230echo "${ECHO_T}$ac_cv_has_makedev" >&6
5231if test "$ac_cv_has_makedev" = "yes"; then
5232
5233cat >>confdefs.h <<\_ACEOF
5234#define HAVE_MAKEDEV 1
5235_ACEOF
5236
5237fi
5238
Martin v. Löwis399a6892002-10-04 10:22:02 +00005239# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5240# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5241# defined, but the compiler does not support pragma redefine_extname,
5242# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5243# structures (such as rlimit64) without declaring them. As a
5244# work-around, disable LFS on such configurations
5245
5246use_lfs=yes
5247echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5248echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5249cat >conftest.$ac_ext <<_ACEOF
5250#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005251/* confdefs.h. */
5252_ACEOF
5253cat confdefs.h >>conftest.$ac_ext
5254cat >>conftest.$ac_ext <<_ACEOF
5255/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005256
5257#define _LARGEFILE_SOURCE 1
5258#define _FILE_OFFSET_BITS 64
5259#include <sys/resource.h>
5260
Martin v. Löwis399a6892002-10-04 10:22:02 +00005261int
5262main ()
5263{
5264struct rlimit foo;
5265 ;
5266 return 0;
5267}
5268_ACEOF
5269rm -f conftest.$ac_objext
5270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5271 (eval $ac_compile) 2>&5
5272 ac_status=$?
5273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274 (exit $ac_status); } &&
5275 { ac_try='test -s conftest.$ac_objext'
5276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5277 (eval $ac_try) 2>&5
5278 ac_status=$?
5279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5280 (exit $ac_status); }; }; then
5281 sol_lfs_bug=no
5282else
5283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005284sed 's/^/| /' conftest.$ac_ext >&5
5285
Martin v. Löwis399a6892002-10-04 10:22:02 +00005286sol_lfs_bug=yes
5287fi
5288rm -f conftest.$ac_objext conftest.$ac_ext
5289echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5290echo "${ECHO_T}$sol_lfs_bug" >&6
5291if test "$sol_lfs_bug" = "yes"; then
5292 use_lfs=no
5293fi
5294
5295if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005296# Two defines needed to enable largefile support on various platforms
5297# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005298
Martin v. Löwis11437992002-04-12 09:54:03 +00005299cat >>confdefs.h <<\_ACEOF
5300#define _LARGEFILE_SOURCE 1
5301_ACEOF
5302
5303
5304cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005305#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005306_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005307
Martin v. Löwis399a6892002-10-04 10:22:02 +00005308fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005309
Guido van Rossum84e7b241996-08-19 21:59:00 +00005310# Add some code to confdefs.h so that the test for off_t works on SCO
5311cat >> confdefs.h <<\EOF
5312#if defined(SCO_DS)
5313#undef _OFF_T
5314#endif
5315EOF
5316
Guido van Rossumef2255b2000-03-10 22:30:29 +00005317# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005318echo "$as_me:$LINENO: checking for mode_t" >&5
5319echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5320if test "${ac_cv_type_mode_t+set}" = set; then
5321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322else
Martin v. Löwis11437992002-04-12 09:54:03 +00005323 cat >conftest.$ac_ext <<_ACEOF
5324#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005325/* confdefs.h. */
5326_ACEOF
5327cat confdefs.h >>conftest.$ac_ext
5328cat >>conftest.$ac_ext <<_ACEOF
5329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005330$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005331int
5332main ()
5333{
5334if ((mode_t *) 0)
5335 return 0;
5336if (sizeof (mode_t))
5337 return 0;
5338 ;
5339 return 0;
5340}
5341_ACEOF
5342rm -f conftest.$ac_objext
5343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5344 (eval $ac_compile) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); } &&
5348 { ac_try='test -s conftest.$ac_objext'
5349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5350 (eval $ac_try) 2>&5
5351 ac_status=$?
5352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005354 ac_cv_type_mode_t=yes
5355else
Martin v. Löwis11437992002-04-12 09:54:03 +00005356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005357sed 's/^/| /' conftest.$ac_ext >&5
5358
Martin v. Löwis11437992002-04-12 09:54:03 +00005359ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005361rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005363echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5364echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5365if test $ac_cv_type_mode_t = yes; then
5366 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005367else
Martin v. Löwis11437992002-04-12 09:54:03 +00005368
5369cat >>confdefs.h <<_ACEOF
5370#define mode_t int
5371_ACEOF
5372
5373fi
5374
5375echo "$as_me:$LINENO: checking for off_t" >&5
5376echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5377if test "${ac_cv_type_off_t+set}" = set; then
5378 echo $ECHO_N "(cached) $ECHO_C" >&6
5379else
5380 cat >conftest.$ac_ext <<_ACEOF
5381#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005382/* confdefs.h. */
5383_ACEOF
5384cat confdefs.h >>conftest.$ac_ext
5385cat >>conftest.$ac_ext <<_ACEOF
5386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005387$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005388int
5389main ()
5390{
5391if ((off_t *) 0)
5392 return 0;
5393if (sizeof (off_t))
5394 return 0;
5395 ;
5396 return 0;
5397}
5398_ACEOF
5399rm -f conftest.$ac_objext
5400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5401 (eval $ac_compile) 2>&5
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); } &&
5405 { ac_try='test -s conftest.$ac_objext'
5406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5407 (eval $ac_try) 2>&5
5408 ac_status=$?
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005411 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005412else
Martin v. Löwis11437992002-04-12 09:54:03 +00005413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005414sed 's/^/| /' conftest.$ac_ext >&5
5415
Martin v. Löwis11437992002-04-12 09:54:03 +00005416ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005418rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005420echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5421echo "${ECHO_T}$ac_cv_type_off_t" >&6
5422if test $ac_cv_type_off_t = yes; then
5423 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005424else
Martin v. Löwis11437992002-04-12 09:54:03 +00005425
5426cat >>confdefs.h <<_ACEOF
5427#define off_t long
5428_ACEOF
5429
5430fi
5431
5432echo "$as_me:$LINENO: checking for pid_t" >&5
5433echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5434if test "${ac_cv_type_pid_t+set}" = set; then
5435 echo $ECHO_N "(cached) $ECHO_C" >&6
5436else
5437 cat >conftest.$ac_ext <<_ACEOF
5438#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005439/* confdefs.h. */
5440_ACEOF
5441cat confdefs.h >>conftest.$ac_ext
5442cat >>conftest.$ac_ext <<_ACEOF
5443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005444$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005445int
5446main ()
5447{
5448if ((pid_t *) 0)
5449 return 0;
5450if (sizeof (pid_t))
5451 return 0;
5452 ;
5453 return 0;
5454}
5455_ACEOF
5456rm -f conftest.$ac_objext
5457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5458 (eval $ac_compile) 2>&5
5459 ac_status=$?
5460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5461 (exit $ac_status); } &&
5462 { ac_try='test -s conftest.$ac_objext'
5463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5464 (eval $ac_try) 2>&5
5465 ac_status=$?
5466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5467 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005468 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005469else
Martin v. Löwis11437992002-04-12 09:54:03 +00005470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005471sed 's/^/| /' conftest.$ac_ext >&5
5472
Martin v. Löwis11437992002-04-12 09:54:03 +00005473ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005474fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005475rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005477echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5478echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5479if test $ac_cv_type_pid_t = yes; then
5480 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005481else
Martin v. Löwis11437992002-04-12 09:54:03 +00005482
5483cat >>confdefs.h <<_ACEOF
5484#define pid_t int
5485_ACEOF
5486
5487fi
5488
5489echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5490echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5491if test "${ac_cv_type_signal+set}" = set; then
5492 echo $ECHO_N "(cached) $ECHO_C" >&6
5493else
5494 cat >conftest.$ac_ext <<_ACEOF
5495#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005496/* confdefs.h. */
5497_ACEOF
5498cat confdefs.h >>conftest.$ac_ext
5499cat >>conftest.$ac_ext <<_ACEOF
5500/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005501#include <sys/types.h>
5502#include <signal.h>
5503#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005504# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005505#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005506#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005507extern "C" void (*signal (int, void (*)(int)))(int);
5508#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005509void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005510#endif
5511
Martin v. Löwis11437992002-04-12 09:54:03 +00005512int
5513main ()
5514{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005515int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005516 ;
5517 return 0;
5518}
5519_ACEOF
5520rm -f conftest.$ac_objext
5521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5522 (eval $ac_compile) 2>&5
5523 ac_status=$?
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); } &&
5526 { ac_try='test -s conftest.$ac_objext'
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005532 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005533else
Martin v. Löwis11437992002-04-12 09:54:03 +00005534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005535sed 's/^/| /' conftest.$ac_ext >&5
5536
Martin v. Löwis11437992002-04-12 09:54:03 +00005537ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005539rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005541echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5542echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005543
Martin v. Löwis11437992002-04-12 09:54:03 +00005544cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005545#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005546_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005547
Michael W. Hudson54241132001-12-07 15:38:26 +00005548
Martin v. Löwis11437992002-04-12 09:54:03 +00005549echo "$as_me:$LINENO: checking for size_t" >&5
5550echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5551if test "${ac_cv_type_size_t+set}" = set; then
5552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005553else
Martin v. Löwis11437992002-04-12 09:54:03 +00005554 cat >conftest.$ac_ext <<_ACEOF
5555#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005556/* confdefs.h. */
5557_ACEOF
5558cat confdefs.h >>conftest.$ac_ext
5559cat >>conftest.$ac_ext <<_ACEOF
5560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005561$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005562int
5563main ()
5564{
5565if ((size_t *) 0)
5566 return 0;
5567if (sizeof (size_t))
5568 return 0;
5569 ;
5570 return 0;
5571}
5572_ACEOF
5573rm -f conftest.$ac_objext
5574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5575 (eval $ac_compile) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); } &&
5579 { ac_try='test -s conftest.$ac_objext'
5580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5581 (eval $ac_try) 2>&5
5582 ac_status=$?
5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005585 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005586else
Martin v. Löwis11437992002-04-12 09:54:03 +00005587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005588sed 's/^/| /' conftest.$ac_ext >&5
5589
Martin v. Löwis11437992002-04-12 09:54:03 +00005590ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005592rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005594echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5595echo "${ECHO_T}$ac_cv_type_size_t" >&6
5596if test $ac_cv_type_size_t = yes; then
5597 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005598else
Martin v. Löwis11437992002-04-12 09:54:03 +00005599
5600cat >>confdefs.h <<_ACEOF
5601#define size_t unsigned
5602_ACEOF
5603
5604fi
5605
5606echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5607echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5608if test "${ac_cv_type_uid_t+set}" = set; then
5609 echo $ECHO_N "(cached) $ECHO_C" >&6
5610else
5611 cat >conftest.$ac_ext <<_ACEOF
5612#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005613/* confdefs.h. */
5614_ACEOF
5615cat confdefs.h >>conftest.$ac_ext
5616cat >>conftest.$ac_ext <<_ACEOF
5617/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005618#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005619
5620_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005622 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623 ac_cv_type_uid_t=yes
5624else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005625 ac_cv_type_uid_t=no
5626fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005627rm -f conftest*
5628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005629fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005630echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5631echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005632if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005633
Martin v. Löwis11437992002-04-12 09:54:03 +00005634cat >>confdefs.h <<\_ACEOF
5635#define uid_t int
5636_ACEOF
5637
5638
5639cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005640#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005642
5643fi
5644
Jack Jansendd19cf82001-12-06 22:36:17 +00005645
Michael W. Hudson54241132001-12-07 15:38:26 +00005646# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005647# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005648echo "$as_me:$LINENO: checking for int" >&5
5649echo $ECHO_N "checking for int... $ECHO_C" >&6
5650if test "${ac_cv_type_int+set}" = set; then
5651 echo $ECHO_N "(cached) $ECHO_C" >&6
5652else
5653 cat >conftest.$ac_ext <<_ACEOF
5654#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005655/* confdefs.h. */
5656_ACEOF
5657cat confdefs.h >>conftest.$ac_ext
5658cat >>conftest.$ac_ext <<_ACEOF
5659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005660$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005661int
5662main ()
5663{
5664if ((int *) 0)
5665 return 0;
5666if (sizeof (int))
5667 return 0;
5668 ;
5669 return 0;
5670}
5671_ACEOF
5672rm -f conftest.$ac_objext
5673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5674 (eval $ac_compile) 2>&5
5675 ac_status=$?
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); } &&
5678 { ac_try='test -s conftest.$ac_objext'
5679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680 (eval $ac_try) 2>&5
5681 ac_status=$?
5682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683 (exit $ac_status); }; }; then
5684 ac_cv_type_int=yes
5685else
5686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005687sed 's/^/| /' conftest.$ac_ext >&5
5688
Martin v. Löwis11437992002-04-12 09:54:03 +00005689ac_cv_type_int=no
5690fi
5691rm -f conftest.$ac_objext conftest.$ac_ext
5692fi
5693echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5694echo "${ECHO_T}$ac_cv_type_int" >&6
5695
5696echo "$as_me:$LINENO: checking size of int" >&5
5697echo $ECHO_N "checking size of int... $ECHO_C" >&6
5698if test "${ac_cv_sizeof_int+set}" = set; then
5699 echo $ECHO_N "(cached) $ECHO_C" >&6
5700else
5701 if test "$ac_cv_type_int" = yes; then
5702 # The cast to unsigned long works around a bug in the HP C Compiler
5703 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5704 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5705 # This bug is HP SR number 8606223364.
5706 if test "$cross_compiling" = yes; then
5707 # Depending upon the size, compute the lo and hi bounds.
5708cat >conftest.$ac_ext <<_ACEOF
5709#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005710/* confdefs.h. */
5711_ACEOF
5712cat confdefs.h >>conftest.$ac_ext
5713cat >>conftest.$ac_ext <<_ACEOF
5714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005715$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005716int
5717main ()
5718{
5719static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5720test_array [0] = 0
5721
5722 ;
5723 return 0;
5724}
5725_ACEOF
5726rm -f conftest.$ac_objext
5727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5728 (eval $ac_compile) 2>&5
5729 ac_status=$?
5730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5731 (exit $ac_status); } &&
5732 { ac_try='test -s conftest.$ac_objext'
5733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5734 (eval $ac_try) 2>&5
5735 ac_status=$?
5736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737 (exit $ac_status); }; }; then
5738 ac_lo=0 ac_mid=0
5739 while :; do
5740 cat >conftest.$ac_ext <<_ACEOF
5741#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005747$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005748int
5749main ()
5750{
5751static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5752test_array [0] = 0
5753
5754 ;
5755 return 0;
5756}
5757_ACEOF
5758rm -f conftest.$ac_objext
5759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5760 (eval $ac_compile) 2>&5
5761 ac_status=$?
5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763 (exit $ac_status); } &&
5764 { ac_try='test -s conftest.$ac_objext'
5765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5766 (eval $ac_try) 2>&5
5767 ac_status=$?
5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769 (exit $ac_status); }; }; then
5770 ac_hi=$ac_mid; break
5771else
5772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005773sed 's/^/| /' conftest.$ac_ext >&5
5774
Martin v. Löwis11437992002-04-12 09:54:03 +00005775ac_lo=`expr $ac_mid + 1`
5776 if test $ac_lo -le $ac_mid; then
5777 ac_lo= ac_hi=
5778 break
5779 fi
5780 ac_mid=`expr 2 '*' $ac_mid + 1`
5781fi
5782rm -f conftest.$ac_objext conftest.$ac_ext
5783 done
5784else
5785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005786sed 's/^/| /' conftest.$ac_ext >&5
5787
Martin v. Löwis11437992002-04-12 09:54:03 +00005788cat >conftest.$ac_ext <<_ACEOF
5789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005790/* confdefs.h. */
5791_ACEOF
5792cat confdefs.h >>conftest.$ac_ext
5793cat >>conftest.$ac_ext <<_ACEOF
5794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005795$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005796int
5797main ()
5798{
5799static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5800test_array [0] = 0
5801
5802 ;
5803 return 0;
5804}
5805_ACEOF
5806rm -f conftest.$ac_objext
5807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5808 (eval $ac_compile) 2>&5
5809 ac_status=$?
5810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5811 (exit $ac_status); } &&
5812 { ac_try='test -s conftest.$ac_objext'
5813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5814 (eval $ac_try) 2>&5
5815 ac_status=$?
5816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817 (exit $ac_status); }; }; then
5818 ac_hi=-1 ac_mid=-1
5819 while :; do
5820 cat >conftest.$ac_ext <<_ACEOF
5821#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005822/* confdefs.h. */
5823_ACEOF
5824cat confdefs.h >>conftest.$ac_ext
5825cat >>conftest.$ac_ext <<_ACEOF
5826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005827$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005828int
5829main ()
5830{
5831static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5832test_array [0] = 0
5833
5834 ;
5835 return 0;
5836}
5837_ACEOF
5838rm -f conftest.$ac_objext
5839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5840 (eval $ac_compile) 2>&5
5841 ac_status=$?
5842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5843 (exit $ac_status); } &&
5844 { ac_try='test -s conftest.$ac_objext'
5845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5846 (eval $ac_try) 2>&5
5847 ac_status=$?
5848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5849 (exit $ac_status); }; }; then
5850 ac_lo=$ac_mid; break
5851else
5852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005853sed 's/^/| /' conftest.$ac_ext >&5
5854
Martin v. Löwis11437992002-04-12 09:54:03 +00005855ac_hi=`expr '(' $ac_mid ')' - 1`
5856 if test $ac_mid -le $ac_hi; then
5857 ac_lo= ac_hi=
5858 break
5859 fi
5860 ac_mid=`expr 2 '*' $ac_mid`
5861fi
5862rm -f conftest.$ac_objext conftest.$ac_ext
5863 done
5864else
5865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005866sed 's/^/| /' conftest.$ac_ext >&5
5867
Martin v. Löwis11437992002-04-12 09:54:03 +00005868ac_lo= ac_hi=
5869fi
5870rm -f conftest.$ac_objext conftest.$ac_ext
5871fi
5872rm -f conftest.$ac_objext conftest.$ac_ext
5873# Binary search between lo and hi bounds.
5874while test "x$ac_lo" != "x$ac_hi"; do
5875 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5876 cat >conftest.$ac_ext <<_ACEOF
5877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005878/* confdefs.h. */
5879_ACEOF
5880cat confdefs.h >>conftest.$ac_ext
5881cat >>conftest.$ac_ext <<_ACEOF
5882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005884int
5885main ()
5886{
5887static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5888test_array [0] = 0
5889
5890 ;
5891 return 0;
5892}
5893_ACEOF
5894rm -f conftest.$ac_objext
5895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5896 (eval $ac_compile) 2>&5
5897 ac_status=$?
5898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899 (exit $ac_status); } &&
5900 { ac_try='test -s conftest.$ac_objext'
5901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5902 (eval $ac_try) 2>&5
5903 ac_status=$?
5904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5905 (exit $ac_status); }; }; then
5906 ac_hi=$ac_mid
5907else
5908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005909sed 's/^/| /' conftest.$ac_ext >&5
5910
Martin v. Löwis11437992002-04-12 09:54:03 +00005911ac_lo=`expr '(' $ac_mid ')' + 1`
5912fi
5913rm -f conftest.$ac_objext conftest.$ac_ext
5914done
5915case $ac_lo in
5916?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005917'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5918See \`config.log' for more details." >&5
5919echo "$as_me: error: cannot compute sizeof (int), 77
5920See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005921 { (exit 1); exit 1; }; } ;;
5922esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005923else
5924 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005925 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5926See \`config.log' for more details." >&5
5927echo "$as_me: error: cannot run test program while cross compiling
5928See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005929 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005930else
Martin v. Löwis11437992002-04-12 09:54:03 +00005931 cat >conftest.$ac_ext <<_ACEOF
5932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005933/* confdefs.h. */
5934_ACEOF
5935cat confdefs.h >>conftest.$ac_ext
5936cat >>conftest.$ac_ext <<_ACEOF
5937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005938$ac_includes_default
5939long longval () { return (long) (sizeof (int)); }
5940unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005941#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005942#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005943int
5944main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005945{
Martin v. Löwis11437992002-04-12 09:54:03 +00005946
5947 FILE *f = fopen ("conftest.val", "w");
5948 if (! f)
5949 exit (1);
5950 if (((long) (sizeof (int))) < 0)
5951 {
5952 long i = longval ();
5953 if (i != ((long) (sizeof (int))))
5954 exit (1);
5955 fprintf (f, "%ld\n", i);
5956 }
5957 else
5958 {
5959 unsigned long i = ulongval ();
5960 if (i != ((long) (sizeof (int))))
5961 exit (1);
5962 fprintf (f, "%lu\n", i);
5963 }
5964 exit (ferror (f) || fclose (f) != 0);
5965
5966 ;
5967 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005968}
Martin v. Löwis11437992002-04-12 09:54:03 +00005969_ACEOF
5970rm -f conftest$ac_exeext
5971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5972 (eval $ac_link) 2>&5
5973 ac_status=$?
5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5977 (eval $ac_try) 2>&5
5978 ac_status=$?
5979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5980 (exit $ac_status); }; }; then
5981 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005982else
Martin v. Löwis11437992002-04-12 09:54:03 +00005983 echo "$as_me: program exited with status $ac_status" >&5
5984echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005985sed 's/^/| /' conftest.$ac_ext >&5
5986
Martin v. Löwis11437992002-04-12 09:54:03 +00005987( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005988{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5989See \`config.log' for more details." >&5
5990echo "$as_me: error: cannot compute sizeof (int), 77
5991See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005992 { (exit 1); exit 1; }; }
5993fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005994rm -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 +00005995fi
5996fi
5997rm -f conftest.val
5998else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005999 ac_cv_sizeof_int=0
6000fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006002echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6003echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6004cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006005#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006006_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006007
6008
Martin v. Löwis11437992002-04-12 09:54:03 +00006009echo "$as_me:$LINENO: checking for long" >&5
6010echo $ECHO_N "checking for long... $ECHO_C" >&6
6011if test "${ac_cv_type_long+set}" = set; then
6012 echo $ECHO_N "(cached) $ECHO_C" >&6
6013else
6014 cat >conftest.$ac_ext <<_ACEOF
6015#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006016/* confdefs.h. */
6017_ACEOF
6018cat confdefs.h >>conftest.$ac_ext
6019cat >>conftest.$ac_ext <<_ACEOF
6020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006021$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006022int
6023main ()
6024{
6025if ((long *) 0)
6026 return 0;
6027if (sizeof (long))
6028 return 0;
6029 ;
6030 return 0;
6031}
6032_ACEOF
6033rm -f conftest.$ac_objext
6034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6035 (eval $ac_compile) 2>&5
6036 ac_status=$?
6037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6038 (exit $ac_status); } &&
6039 { ac_try='test -s conftest.$ac_objext'
6040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6041 (eval $ac_try) 2>&5
6042 ac_status=$?
6043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6044 (exit $ac_status); }; }; then
6045 ac_cv_type_long=yes
6046else
6047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006048sed 's/^/| /' conftest.$ac_ext >&5
6049
Martin v. Löwis11437992002-04-12 09:54:03 +00006050ac_cv_type_long=no
6051fi
6052rm -f conftest.$ac_objext conftest.$ac_ext
6053fi
6054echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6055echo "${ECHO_T}$ac_cv_type_long" >&6
6056
6057echo "$as_me:$LINENO: checking size of long" >&5
6058echo $ECHO_N "checking size of long... $ECHO_C" >&6
6059if test "${ac_cv_sizeof_long+set}" = set; then
6060 echo $ECHO_N "(cached) $ECHO_C" >&6
6061else
6062 if test "$ac_cv_type_long" = yes; then
6063 # The cast to unsigned long works around a bug in the HP C Compiler
6064 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6065 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6066 # This bug is HP SR number 8606223364.
6067 if test "$cross_compiling" = yes; then
6068 # Depending upon the size, compute the lo and hi bounds.
6069cat >conftest.$ac_ext <<_ACEOF
6070#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006071/* confdefs.h. */
6072_ACEOF
6073cat confdefs.h >>conftest.$ac_ext
6074cat >>conftest.$ac_ext <<_ACEOF
6075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006076$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006077int
6078main ()
6079{
6080static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6081test_array [0] = 0
6082
6083 ;
6084 return 0;
6085}
6086_ACEOF
6087rm -f conftest.$ac_objext
6088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6089 (eval $ac_compile) 2>&5
6090 ac_status=$?
6091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6092 (exit $ac_status); } &&
6093 { ac_try='test -s conftest.$ac_objext'
6094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6095 (eval $ac_try) 2>&5
6096 ac_status=$?
6097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6098 (exit $ac_status); }; }; then
6099 ac_lo=0 ac_mid=0
6100 while :; do
6101 cat >conftest.$ac_ext <<_ACEOF
6102#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006108$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006109int
6110main ()
6111{
6112static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6113test_array [0] = 0
6114
6115 ;
6116 return 0;
6117}
6118_ACEOF
6119rm -f conftest.$ac_objext
6120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6121 (eval $ac_compile) 2>&5
6122 ac_status=$?
6123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6124 (exit $ac_status); } &&
6125 { ac_try='test -s conftest.$ac_objext'
6126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6127 (eval $ac_try) 2>&5
6128 ac_status=$?
6129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6130 (exit $ac_status); }; }; then
6131 ac_hi=$ac_mid; break
6132else
6133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006134sed 's/^/| /' conftest.$ac_ext >&5
6135
Martin v. Löwis11437992002-04-12 09:54:03 +00006136ac_lo=`expr $ac_mid + 1`
6137 if test $ac_lo -le $ac_mid; then
6138 ac_lo= ac_hi=
6139 break
6140 fi
6141 ac_mid=`expr 2 '*' $ac_mid + 1`
6142fi
6143rm -f conftest.$ac_objext conftest.$ac_ext
6144 done
6145else
6146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006147sed 's/^/| /' conftest.$ac_ext >&5
6148
Martin v. Löwis11437992002-04-12 09:54:03 +00006149cat >conftest.$ac_ext <<_ACEOF
6150#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* confdefs.h. */
6152_ACEOF
6153cat confdefs.h >>conftest.$ac_ext
6154cat >>conftest.$ac_ext <<_ACEOF
6155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006156$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006157int
6158main ()
6159{
6160static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6161test_array [0] = 0
6162
6163 ;
6164 return 0;
6165}
6166_ACEOF
6167rm -f conftest.$ac_objext
6168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6169 (eval $ac_compile) 2>&5
6170 ac_status=$?
6171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6172 (exit $ac_status); } &&
6173 { ac_try='test -s conftest.$ac_objext'
6174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6175 (eval $ac_try) 2>&5
6176 ac_status=$?
6177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6178 (exit $ac_status); }; }; then
6179 ac_hi=-1 ac_mid=-1
6180 while :; do
6181 cat >conftest.$ac_ext <<_ACEOF
6182#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006183/* confdefs.h. */
6184_ACEOF
6185cat confdefs.h >>conftest.$ac_ext
6186cat >>conftest.$ac_ext <<_ACEOF
6187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006188$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006189int
6190main ()
6191{
6192static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6193test_array [0] = 0
6194
6195 ;
6196 return 0;
6197}
6198_ACEOF
6199rm -f conftest.$ac_objext
6200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6201 (eval $ac_compile) 2>&5
6202 ac_status=$?
6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); } &&
6205 { ac_try='test -s conftest.$ac_objext'
6206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207 (eval $ac_try) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); }; }; then
6211 ac_lo=$ac_mid; break
6212else
6213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006214sed 's/^/| /' conftest.$ac_ext >&5
6215
Martin v. Löwis11437992002-04-12 09:54:03 +00006216ac_hi=`expr '(' $ac_mid ')' - 1`
6217 if test $ac_mid -le $ac_hi; then
6218 ac_lo= ac_hi=
6219 break
6220 fi
6221 ac_mid=`expr 2 '*' $ac_mid`
6222fi
6223rm -f conftest.$ac_objext conftest.$ac_ext
6224 done
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= ac_hi=
6230fi
6231rm -f conftest.$ac_objext conftest.$ac_ext
6232fi
6233rm -f conftest.$ac_objext conftest.$ac_ext
6234# Binary search between lo and hi bounds.
6235while test "x$ac_lo" != "x$ac_hi"; do
6236 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6237 cat >conftest.$ac_ext <<_ACEOF
6238#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006239/* confdefs.h. */
6240_ACEOF
6241cat confdefs.h >>conftest.$ac_ext
6242cat >>conftest.$ac_ext <<_ACEOF
6243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006244$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006245int
6246main ()
6247{
6248static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6249test_array [0] = 0
6250
6251 ;
6252 return 0;
6253}
6254_ACEOF
6255rm -f conftest.$ac_objext
6256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6257 (eval $ac_compile) 2>&5
6258 ac_status=$?
6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6260 (exit $ac_status); } &&
6261 { ac_try='test -s conftest.$ac_objext'
6262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6263 (eval $ac_try) 2>&5
6264 ac_status=$?
6265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266 (exit $ac_status); }; }; then
6267 ac_hi=$ac_mid
6268else
6269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006270sed 's/^/| /' conftest.$ac_ext >&5
6271
Martin v. Löwis11437992002-04-12 09:54:03 +00006272ac_lo=`expr '(' $ac_mid ')' + 1`
6273fi
6274rm -f conftest.$ac_objext conftest.$ac_ext
6275done
6276case $ac_lo in
6277?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006278'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6279See \`config.log' for more details." >&5
6280echo "$as_me: error: cannot compute sizeof (long), 77
6281See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006282 { (exit 1); exit 1; }; } ;;
6283esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006284else
6285 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006286 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6287See \`config.log' for more details." >&5
6288echo "$as_me: error: cannot run test program while cross compiling
6289See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006290 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006291else
Martin v. Löwis11437992002-04-12 09:54:03 +00006292 cat >conftest.$ac_ext <<_ACEOF
6293#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006299$ac_includes_default
6300long longval () { return (long) (sizeof (long)); }
6301unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006302#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006303#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006304int
6305main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006306{
Martin v. Löwis11437992002-04-12 09:54:03 +00006307
6308 FILE *f = fopen ("conftest.val", "w");
6309 if (! f)
6310 exit (1);
6311 if (((long) (sizeof (long))) < 0)
6312 {
6313 long i = longval ();
6314 if (i != ((long) (sizeof (long))))
6315 exit (1);
6316 fprintf (f, "%ld\n", i);
6317 }
6318 else
6319 {
6320 unsigned long i = ulongval ();
6321 if (i != ((long) (sizeof (long))))
6322 exit (1);
6323 fprintf (f, "%lu\n", i);
6324 }
6325 exit (ferror (f) || fclose (f) != 0);
6326
6327 ;
6328 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006329}
Martin v. Löwis11437992002-04-12 09:54:03 +00006330_ACEOF
6331rm -f conftest$ac_exeext
6332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6333 (eval $ac_link) 2>&5
6334 ac_status=$?
6335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6336 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6338 (eval $ac_try) 2>&5
6339 ac_status=$?
6340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341 (exit $ac_status); }; }; then
6342 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006343else
Martin v. Löwis11437992002-04-12 09:54:03 +00006344 echo "$as_me: program exited with status $ac_status" >&5
6345echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006346sed 's/^/| /' conftest.$ac_ext >&5
6347
Martin v. Löwis11437992002-04-12 09:54:03 +00006348( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006349{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6350See \`config.log' for more details." >&5
6351echo "$as_me: error: cannot compute sizeof (long), 77
6352See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006353 { (exit 1); exit 1; }; }
6354fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006355rm -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 +00006356fi
6357fi
6358rm -f conftest.val
6359else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006360 ac_cv_sizeof_long=0
6361fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006363echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6364echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6365cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006366#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006367_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006368
6369
Martin v. Löwis11437992002-04-12 09:54:03 +00006370echo "$as_me:$LINENO: checking for void *" >&5
6371echo $ECHO_N "checking for void *... $ECHO_C" >&6
6372if test "${ac_cv_type_void_p+set}" = set; then
6373 echo $ECHO_N "(cached) $ECHO_C" >&6
6374else
6375 cat >conftest.$ac_ext <<_ACEOF
6376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006377/* confdefs.h. */
6378_ACEOF
6379cat confdefs.h >>conftest.$ac_ext
6380cat >>conftest.$ac_ext <<_ACEOF
6381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006383int
6384main ()
6385{
6386if ((void * *) 0)
6387 return 0;
6388if (sizeof (void *))
6389 return 0;
6390 ;
6391 return 0;
6392}
6393_ACEOF
6394rm -f conftest.$ac_objext
6395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6396 (eval $ac_compile) 2>&5
6397 ac_status=$?
6398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399 (exit $ac_status); } &&
6400 { ac_try='test -s conftest.$ac_objext'
6401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6402 (eval $ac_try) 2>&5
6403 ac_status=$?
6404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6405 (exit $ac_status); }; }; then
6406 ac_cv_type_void_p=yes
6407else
6408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006409sed 's/^/| /' conftest.$ac_ext >&5
6410
Martin v. Löwis11437992002-04-12 09:54:03 +00006411ac_cv_type_void_p=no
6412fi
6413rm -f conftest.$ac_objext conftest.$ac_ext
6414fi
6415echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6416echo "${ECHO_T}$ac_cv_type_void_p" >&6
6417
6418echo "$as_me:$LINENO: checking size of void *" >&5
6419echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6420if test "${ac_cv_sizeof_void_p+set}" = set; then
6421 echo $ECHO_N "(cached) $ECHO_C" >&6
6422else
6423 if test "$ac_cv_type_void_p" = yes; then
6424 # The cast to unsigned long works around a bug in the HP C Compiler
6425 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6426 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6427 # This bug is HP SR number 8606223364.
6428 if test "$cross_compiling" = yes; then
6429 # Depending upon the size, compute the lo and hi bounds.
6430cat >conftest.$ac_ext <<_ACEOF
6431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006432/* confdefs.h. */
6433_ACEOF
6434cat confdefs.h >>conftest.$ac_ext
6435cat >>conftest.$ac_ext <<_ACEOF
6436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006437$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006438int
6439main ()
6440{
6441static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6442test_array [0] = 0
6443
6444 ;
6445 return 0;
6446}
6447_ACEOF
6448rm -f conftest.$ac_objext
6449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6450 (eval $ac_compile) 2>&5
6451 ac_status=$?
6452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6453 (exit $ac_status); } &&
6454 { ac_try='test -s conftest.$ac_objext'
6455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6456 (eval $ac_try) 2>&5
6457 ac_status=$?
6458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6459 (exit $ac_status); }; }; then
6460 ac_lo=0 ac_mid=0
6461 while :; do
6462 cat >conftest.$ac_ext <<_ACEOF
6463#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006464/* confdefs.h. */
6465_ACEOF
6466cat confdefs.h >>conftest.$ac_ext
6467cat >>conftest.$ac_ext <<_ACEOF
6468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006469$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006470int
6471main ()
6472{
6473static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6474test_array [0] = 0
6475
6476 ;
6477 return 0;
6478}
6479_ACEOF
6480rm -f conftest.$ac_objext
6481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6482 (eval $ac_compile) 2>&5
6483 ac_status=$?
6484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6485 (exit $ac_status); } &&
6486 { ac_try='test -s conftest.$ac_objext'
6487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6488 (eval $ac_try) 2>&5
6489 ac_status=$?
6490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6491 (exit $ac_status); }; }; then
6492 ac_hi=$ac_mid; break
6493else
6494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006495sed 's/^/| /' conftest.$ac_ext >&5
6496
Martin v. Löwis11437992002-04-12 09:54:03 +00006497ac_lo=`expr $ac_mid + 1`
6498 if test $ac_lo -le $ac_mid; then
6499 ac_lo= ac_hi=
6500 break
6501 fi
6502 ac_mid=`expr 2 '*' $ac_mid + 1`
6503fi
6504rm -f conftest.$ac_objext conftest.$ac_ext
6505 done
6506else
6507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006508sed 's/^/| /' conftest.$ac_ext >&5
6509
Martin v. Löwis11437992002-04-12 09:54:03 +00006510cat >conftest.$ac_ext <<_ACEOF
6511#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006517$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006518int
6519main ()
6520{
6521static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6522test_array [0] = 0
6523
6524 ;
6525 return 0;
6526}
6527_ACEOF
6528rm -f conftest.$ac_objext
6529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6530 (eval $ac_compile) 2>&5
6531 ac_status=$?
6532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6533 (exit $ac_status); } &&
6534 { ac_try='test -s conftest.$ac_objext'
6535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6536 (eval $ac_try) 2>&5
6537 ac_status=$?
6538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6539 (exit $ac_status); }; }; then
6540 ac_hi=-1 ac_mid=-1
6541 while :; do
6542 cat >conftest.$ac_ext <<_ACEOF
6543#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006544/* confdefs.h. */
6545_ACEOF
6546cat confdefs.h >>conftest.$ac_ext
6547cat >>conftest.$ac_ext <<_ACEOF
6548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006549$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006550int
6551main ()
6552{
6553static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6554test_array [0] = 0
6555
6556 ;
6557 return 0;
6558}
6559_ACEOF
6560rm -f conftest.$ac_objext
6561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6562 (eval $ac_compile) 2>&5
6563 ac_status=$?
6564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6565 (exit $ac_status); } &&
6566 { ac_try='test -s conftest.$ac_objext'
6567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6568 (eval $ac_try) 2>&5
6569 ac_status=$?
6570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6571 (exit $ac_status); }; }; then
6572 ac_lo=$ac_mid; break
6573else
6574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006575sed 's/^/| /' conftest.$ac_ext >&5
6576
Martin v. Löwis11437992002-04-12 09:54:03 +00006577ac_hi=`expr '(' $ac_mid ')' - 1`
6578 if test $ac_mid -le $ac_hi; then
6579 ac_lo= ac_hi=
6580 break
6581 fi
6582 ac_mid=`expr 2 '*' $ac_mid`
6583fi
6584rm -f conftest.$ac_objext conftest.$ac_ext
6585 done
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= ac_hi=
6591fi
6592rm -f conftest.$ac_objext conftest.$ac_ext
6593fi
6594rm -f conftest.$ac_objext conftest.$ac_ext
6595# Binary search between lo and hi bounds.
6596while test "x$ac_lo" != "x$ac_hi"; do
6597 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6598 cat >conftest.$ac_ext <<_ACEOF
6599#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006605$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006606int
6607main ()
6608{
6609static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6610test_array [0] = 0
6611
6612 ;
6613 return 0;
6614}
6615_ACEOF
6616rm -f conftest.$ac_objext
6617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6618 (eval $ac_compile) 2>&5
6619 ac_status=$?
6620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6621 (exit $ac_status); } &&
6622 { ac_try='test -s conftest.$ac_objext'
6623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6624 (eval $ac_try) 2>&5
6625 ac_status=$?
6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627 (exit $ac_status); }; }; then
6628 ac_hi=$ac_mid
6629else
6630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006631sed 's/^/| /' conftest.$ac_ext >&5
6632
Martin v. Löwis11437992002-04-12 09:54:03 +00006633ac_lo=`expr '(' $ac_mid ')' + 1`
6634fi
6635rm -f conftest.$ac_objext conftest.$ac_ext
6636done
6637case $ac_lo in
6638?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006639'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6640See \`config.log' for more details." >&5
6641echo "$as_me: error: cannot compute sizeof (void *), 77
6642See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006643 { (exit 1); exit 1; }; } ;;
6644esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006645else
6646 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006647 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6648See \`config.log' for more details." >&5
6649echo "$as_me: error: cannot run test program while cross compiling
6650See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006651 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006652else
Martin v. Löwis11437992002-04-12 09:54:03 +00006653 cat >conftest.$ac_ext <<_ACEOF
6654#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006655/* confdefs.h. */
6656_ACEOF
6657cat confdefs.h >>conftest.$ac_ext
6658cat >>conftest.$ac_ext <<_ACEOF
6659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006660$ac_includes_default
6661long longval () { return (long) (sizeof (void *)); }
6662unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006663#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006664#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006665int
6666main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006667{
Martin v. Löwis11437992002-04-12 09:54:03 +00006668
6669 FILE *f = fopen ("conftest.val", "w");
6670 if (! f)
6671 exit (1);
6672 if (((long) (sizeof (void *))) < 0)
6673 {
6674 long i = longval ();
6675 if (i != ((long) (sizeof (void *))))
6676 exit (1);
6677 fprintf (f, "%ld\n", i);
6678 }
6679 else
6680 {
6681 unsigned long i = ulongval ();
6682 if (i != ((long) (sizeof (void *))))
6683 exit (1);
6684 fprintf (f, "%lu\n", i);
6685 }
6686 exit (ferror (f) || fclose (f) != 0);
6687
6688 ;
6689 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006690}
Martin v. Löwis11437992002-04-12 09:54:03 +00006691_ACEOF
6692rm -f conftest$ac_exeext
6693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6694 (eval $ac_link) 2>&5
6695 ac_status=$?
6696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6699 (eval $ac_try) 2>&5
6700 ac_status=$?
6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702 (exit $ac_status); }; }; then
6703 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006704else
Martin v. Löwis11437992002-04-12 09:54:03 +00006705 echo "$as_me: program exited with status $ac_status" >&5
6706echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006707sed 's/^/| /' conftest.$ac_ext >&5
6708
Martin v. Löwis11437992002-04-12 09:54:03 +00006709( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006710{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6711See \`config.log' for more details." >&5
6712echo "$as_me: error: cannot compute sizeof (void *), 77
6713See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 { (exit 1); exit 1; }; }
6715fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006716rm -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 +00006717fi
6718fi
6719rm -f conftest.val
6720else
Guido van Rossumad678af1998-10-02 14:42:15 +00006721 ac_cv_sizeof_void_p=0
6722fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006723fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006724echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6725echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6726cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006727#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006728_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006729
6730
Martin v. Löwis11437992002-04-12 09:54:03 +00006731echo "$as_me:$LINENO: checking for short" >&5
6732echo $ECHO_N "checking for short... $ECHO_C" >&6
6733if test "${ac_cv_type_short+set}" = set; then
6734 echo $ECHO_N "(cached) $ECHO_C" >&6
6735else
6736 cat >conftest.$ac_ext <<_ACEOF
6737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006738/* confdefs.h. */
6739_ACEOF
6740cat confdefs.h >>conftest.$ac_ext
6741cat >>conftest.$ac_ext <<_ACEOF
6742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006743$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006744int
6745main ()
6746{
6747if ((short *) 0)
6748 return 0;
6749if (sizeof (short))
6750 return 0;
6751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
6756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6757 (eval $ac_compile) 2>&5
6758 ac_status=$?
6759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6760 (exit $ac_status); } &&
6761 { ac_try='test -s conftest.$ac_objext'
6762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6763 (eval $ac_try) 2>&5
6764 ac_status=$?
6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766 (exit $ac_status); }; }; then
6767 ac_cv_type_short=yes
6768else
6769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006770sed 's/^/| /' conftest.$ac_ext >&5
6771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772ac_cv_type_short=no
6773fi
6774rm -f conftest.$ac_objext conftest.$ac_ext
6775fi
6776echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6777echo "${ECHO_T}$ac_cv_type_short" >&6
6778
6779echo "$as_me:$LINENO: checking size of short" >&5
6780echo $ECHO_N "checking size of short... $ECHO_C" >&6
6781if test "${ac_cv_sizeof_short+set}" = set; then
6782 echo $ECHO_N "(cached) $ECHO_C" >&6
6783else
6784 if test "$ac_cv_type_short" = yes; then
6785 # The cast to unsigned long works around a bug in the HP C Compiler
6786 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6787 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6788 # This bug is HP SR number 8606223364.
6789 if test "$cross_compiling" = yes; then
6790 # Depending upon the size, compute the lo and hi bounds.
6791cat >conftest.$ac_ext <<_ACEOF
6792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006793/* confdefs.h. */
6794_ACEOF
6795cat confdefs.h >>conftest.$ac_ext
6796cat >>conftest.$ac_ext <<_ACEOF
6797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006799int
6800main ()
6801{
6802static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6803test_array [0] = 0
6804
6805 ;
6806 return 0;
6807}
6808_ACEOF
6809rm -f conftest.$ac_objext
6810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6811 (eval $ac_compile) 2>&5
6812 ac_status=$?
6813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6814 (exit $ac_status); } &&
6815 { ac_try='test -s conftest.$ac_objext'
6816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6817 (eval $ac_try) 2>&5
6818 ac_status=$?
6819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6820 (exit $ac_status); }; }; then
6821 ac_lo=0 ac_mid=0
6822 while :; do
6823 cat >conftest.$ac_ext <<_ACEOF
6824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006825/* confdefs.h. */
6826_ACEOF
6827cat confdefs.h >>conftest.$ac_ext
6828cat >>conftest.$ac_ext <<_ACEOF
6829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006831int
6832main ()
6833{
6834static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6835test_array [0] = 0
6836
6837 ;
6838 return 0;
6839}
6840_ACEOF
6841rm -f conftest.$ac_objext
6842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6843 (eval $ac_compile) 2>&5
6844 ac_status=$?
6845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6846 (exit $ac_status); } &&
6847 { ac_try='test -s conftest.$ac_objext'
6848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6849 (eval $ac_try) 2>&5
6850 ac_status=$?
6851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852 (exit $ac_status); }; }; then
6853 ac_hi=$ac_mid; break
6854else
6855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006856sed 's/^/| /' conftest.$ac_ext >&5
6857
Martin v. Löwis11437992002-04-12 09:54:03 +00006858ac_lo=`expr $ac_mid + 1`
6859 if test $ac_lo -le $ac_mid; then
6860 ac_lo= ac_hi=
6861 break
6862 fi
6863 ac_mid=`expr 2 '*' $ac_mid + 1`
6864fi
6865rm -f conftest.$ac_objext conftest.$ac_ext
6866 done
6867else
6868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006869sed 's/^/| /' conftest.$ac_ext >&5
6870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871cat >conftest.$ac_ext <<_ACEOF
6872#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006873/* confdefs.h. */
6874_ACEOF
6875cat confdefs.h >>conftest.$ac_ext
6876cat >>conftest.$ac_ext <<_ACEOF
6877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006878$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006879int
6880main ()
6881{
6882static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6883test_array [0] = 0
6884
6885 ;
6886 return 0;
6887}
6888_ACEOF
6889rm -f conftest.$ac_objext
6890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6891 (eval $ac_compile) 2>&5
6892 ac_status=$?
6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894 (exit $ac_status); } &&
6895 { ac_try='test -s conftest.$ac_objext'
6896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6897 (eval $ac_try) 2>&5
6898 ac_status=$?
6899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6900 (exit $ac_status); }; }; then
6901 ac_hi=-1 ac_mid=-1
6902 while :; do
6903 cat >conftest.$ac_ext <<_ACEOF
6904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006905/* confdefs.h. */
6906_ACEOF
6907cat confdefs.h >>conftest.$ac_ext
6908cat >>conftest.$ac_ext <<_ACEOF
6909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006910$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006911int
6912main ()
6913{
6914static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6915test_array [0] = 0
6916
6917 ;
6918 return 0;
6919}
6920_ACEOF
6921rm -f conftest.$ac_objext
6922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6923 (eval $ac_compile) 2>&5
6924 ac_status=$?
6925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6926 (exit $ac_status); } &&
6927 { ac_try='test -s conftest.$ac_objext'
6928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6929 (eval $ac_try) 2>&5
6930 ac_status=$?
6931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6932 (exit $ac_status); }; }; then
6933 ac_lo=$ac_mid; break
6934else
6935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006936sed 's/^/| /' conftest.$ac_ext >&5
6937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938ac_hi=`expr '(' $ac_mid ')' - 1`
6939 if test $ac_mid -le $ac_hi; then
6940 ac_lo= ac_hi=
6941 break
6942 fi
6943 ac_mid=`expr 2 '*' $ac_mid`
6944fi
6945rm -f conftest.$ac_objext conftest.$ac_ext
6946 done
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= ac_hi=
6952fi
6953rm -f conftest.$ac_objext conftest.$ac_ext
6954fi
6955rm -f conftest.$ac_objext conftest.$ac_ext
6956# Binary search between lo and hi bounds.
6957while test "x$ac_lo" != "x$ac_hi"; do
6958 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6959 cat >conftest.$ac_ext <<_ACEOF
6960#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006961/* confdefs.h. */
6962_ACEOF
6963cat confdefs.h >>conftest.$ac_ext
6964cat >>conftest.$ac_ext <<_ACEOF
6965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006966$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006967int
6968main ()
6969{
6970static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6971test_array [0] = 0
6972
6973 ;
6974 return 0;
6975}
6976_ACEOF
6977rm -f conftest.$ac_objext
6978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6979 (eval $ac_compile) 2>&5
6980 ac_status=$?
6981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982 (exit $ac_status); } &&
6983 { ac_try='test -s conftest.$ac_objext'
6984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6985 (eval $ac_try) 2>&5
6986 ac_status=$?
6987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6988 (exit $ac_status); }; }; then
6989 ac_hi=$ac_mid
6990else
6991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006992sed 's/^/| /' conftest.$ac_ext >&5
6993
Martin v. Löwis11437992002-04-12 09:54:03 +00006994ac_lo=`expr '(' $ac_mid ')' + 1`
6995fi
6996rm -f conftest.$ac_objext conftest.$ac_ext
6997done
6998case $ac_lo in
6999?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007000'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7001See \`config.log' for more details." >&5
7002echo "$as_me: error: cannot compute sizeof (short), 77
7003See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007004 { (exit 1); exit 1; }; } ;;
7005esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007006else
7007 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007008 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7009See \`config.log' for more details." >&5
7010echo "$as_me: error: cannot run test program while cross compiling
7011See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007012 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007013else
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 cat >conftest.$ac_ext <<_ACEOF
7015#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007016/* confdefs.h. */
7017_ACEOF
7018cat confdefs.h >>conftest.$ac_ext
7019cat >>conftest.$ac_ext <<_ACEOF
7020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007021$ac_includes_default
7022long longval () { return (long) (sizeof (short)); }
7023unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007024#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007025#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007026int
7027main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007028{
Martin v. Löwis11437992002-04-12 09:54:03 +00007029
7030 FILE *f = fopen ("conftest.val", "w");
7031 if (! f)
7032 exit (1);
7033 if (((long) (sizeof (short))) < 0)
7034 {
7035 long i = longval ();
7036 if (i != ((long) (sizeof (short))))
7037 exit (1);
7038 fprintf (f, "%ld\n", i);
7039 }
7040 else
7041 {
7042 unsigned long i = ulongval ();
7043 if (i != ((long) (sizeof (short))))
7044 exit (1);
7045 fprintf (f, "%lu\n", i);
7046 }
7047 exit (ferror (f) || fclose (f) != 0);
7048
7049 ;
7050 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007051}
Martin v. Löwis11437992002-04-12 09:54:03 +00007052_ACEOF
7053rm -f conftest$ac_exeext
7054if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7055 (eval $ac_link) 2>&5
7056 ac_status=$?
7057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7058 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7060 (eval $ac_try) 2>&5
7061 ac_status=$?
7062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7063 (exit $ac_status); }; }; then
7064 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007065else
Martin v. Löwis11437992002-04-12 09:54:03 +00007066 echo "$as_me: program exited with status $ac_status" >&5
7067echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007068sed 's/^/| /' conftest.$ac_ext >&5
7069
Martin v. Löwis11437992002-04-12 09:54:03 +00007070( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007071{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7072See \`config.log' for more details." >&5
7073echo "$as_me: error: cannot compute sizeof (short), 77
7074See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007075 { (exit 1); exit 1; }; }
7076fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007077rm -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 +00007078fi
7079fi
7080rm -f conftest.val
7081else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007082 ac_cv_sizeof_short=0
7083fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007085echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7086echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7087cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007088#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007089_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007090
7091
Martin v. Löwis11437992002-04-12 09:54:03 +00007092echo "$as_me:$LINENO: checking for float" >&5
7093echo $ECHO_N "checking for float... $ECHO_C" >&6
7094if test "${ac_cv_type_float+set}" = set; then
7095 echo $ECHO_N "(cached) $ECHO_C" >&6
7096else
7097 cat >conftest.$ac_ext <<_ACEOF
7098#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007099/* confdefs.h. */
7100_ACEOF
7101cat confdefs.h >>conftest.$ac_ext
7102cat >>conftest.$ac_ext <<_ACEOF
7103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007104$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007105int
7106main ()
7107{
7108if ((float *) 0)
7109 return 0;
7110if (sizeof (float))
7111 return 0;
7112 ;
7113 return 0;
7114}
7115_ACEOF
7116rm -f conftest.$ac_objext
7117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7118 (eval $ac_compile) 2>&5
7119 ac_status=$?
7120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7121 (exit $ac_status); } &&
7122 { ac_try='test -s conftest.$ac_objext'
7123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7124 (eval $ac_try) 2>&5
7125 ac_status=$?
7126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7127 (exit $ac_status); }; }; then
7128 ac_cv_type_float=yes
7129else
7130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007131sed 's/^/| /' conftest.$ac_ext >&5
7132
Martin v. Löwis11437992002-04-12 09:54:03 +00007133ac_cv_type_float=no
7134fi
7135rm -f conftest.$ac_objext conftest.$ac_ext
7136fi
7137echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7138echo "${ECHO_T}$ac_cv_type_float" >&6
7139
7140echo "$as_me:$LINENO: checking size of float" >&5
7141echo $ECHO_N "checking size of float... $ECHO_C" >&6
7142if test "${ac_cv_sizeof_float+set}" = set; then
7143 echo $ECHO_N "(cached) $ECHO_C" >&6
7144else
7145 if test "$ac_cv_type_float" = yes; then
7146 # The cast to unsigned long works around a bug in the HP C Compiler
7147 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7148 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7149 # This bug is HP SR number 8606223364.
7150 if test "$cross_compiling" = yes; then
7151 # Depending upon the size, compute the lo and hi bounds.
7152cat >conftest.$ac_ext <<_ACEOF
7153#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007154/* confdefs.h. */
7155_ACEOF
7156cat confdefs.h >>conftest.$ac_ext
7157cat >>conftest.$ac_ext <<_ACEOF
7158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007159$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007160int
7161main ()
7162{
7163static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7164test_array [0] = 0
7165
7166 ;
7167 return 0;
7168}
7169_ACEOF
7170rm -f conftest.$ac_objext
7171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7172 (eval $ac_compile) 2>&5
7173 ac_status=$?
7174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7175 (exit $ac_status); } &&
7176 { ac_try='test -s conftest.$ac_objext'
7177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7178 (eval $ac_try) 2>&5
7179 ac_status=$?
7180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7181 (exit $ac_status); }; }; then
7182 ac_lo=0 ac_mid=0
7183 while :; do
7184 cat >conftest.$ac_ext <<_ACEOF
7185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007186/* confdefs.h. */
7187_ACEOF
7188cat confdefs.h >>conftest.$ac_ext
7189cat >>conftest.$ac_ext <<_ACEOF
7190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007191$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007192int
7193main ()
7194{
7195static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7196test_array [0] = 0
7197
7198 ;
7199 return 0;
7200}
7201_ACEOF
7202rm -f conftest.$ac_objext
7203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7204 (eval $ac_compile) 2>&5
7205 ac_status=$?
7206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207 (exit $ac_status); } &&
7208 { ac_try='test -s conftest.$ac_objext'
7209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7210 (eval $ac_try) 2>&5
7211 ac_status=$?
7212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213 (exit $ac_status); }; }; then
7214 ac_hi=$ac_mid; break
7215else
7216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007217sed 's/^/| /' conftest.$ac_ext >&5
7218
Martin v. Löwis11437992002-04-12 09:54:03 +00007219ac_lo=`expr $ac_mid + 1`
7220 if test $ac_lo -le $ac_mid; then
7221 ac_lo= ac_hi=
7222 break
7223 fi
7224 ac_mid=`expr 2 '*' $ac_mid + 1`
7225fi
7226rm -f conftest.$ac_objext conftest.$ac_ext
7227 done
7228else
7229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007230sed 's/^/| /' conftest.$ac_ext >&5
7231
Martin v. Löwis11437992002-04-12 09:54:03 +00007232cat >conftest.$ac_ext <<_ACEOF
7233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007234/* confdefs.h. */
7235_ACEOF
7236cat confdefs.h >>conftest.$ac_ext
7237cat >>conftest.$ac_ext <<_ACEOF
7238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007240int
7241main ()
7242{
7243static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7244test_array [0] = 0
7245
7246 ;
7247 return 0;
7248}
7249_ACEOF
7250rm -f conftest.$ac_objext
7251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7252 (eval $ac_compile) 2>&5
7253 ac_status=$?
7254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7255 (exit $ac_status); } &&
7256 { ac_try='test -s conftest.$ac_objext'
7257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7258 (eval $ac_try) 2>&5
7259 ac_status=$?
7260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7261 (exit $ac_status); }; }; then
7262 ac_hi=-1 ac_mid=-1
7263 while :; do
7264 cat >conftest.$ac_ext <<_ACEOF
7265#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007266/* confdefs.h. */
7267_ACEOF
7268cat confdefs.h >>conftest.$ac_ext
7269cat >>conftest.$ac_ext <<_ACEOF
7270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007271$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007272int
7273main ()
7274{
7275static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7276test_array [0] = 0
7277
7278 ;
7279 return 0;
7280}
7281_ACEOF
7282rm -f conftest.$ac_objext
7283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7284 (eval $ac_compile) 2>&5
7285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); } &&
7288 { ac_try='test -s conftest.$ac_objext'
7289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7290 (eval $ac_try) 2>&5
7291 ac_status=$?
7292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7293 (exit $ac_status); }; }; then
7294 ac_lo=$ac_mid; break
7295else
7296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007297sed 's/^/| /' conftest.$ac_ext >&5
7298
Martin v. Löwis11437992002-04-12 09:54:03 +00007299ac_hi=`expr '(' $ac_mid ')' - 1`
7300 if test $ac_mid -le $ac_hi; then
7301 ac_lo= ac_hi=
7302 break
7303 fi
7304 ac_mid=`expr 2 '*' $ac_mid`
7305fi
7306rm -f conftest.$ac_objext conftest.$ac_ext
7307 done
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= ac_hi=
7313fi
7314rm -f conftest.$ac_objext conftest.$ac_ext
7315fi
7316rm -f conftest.$ac_objext conftest.$ac_ext
7317# Binary search between lo and hi bounds.
7318while test "x$ac_lo" != "x$ac_hi"; do
7319 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7320 cat >conftest.$ac_ext <<_ACEOF
7321#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007322/* confdefs.h. */
7323_ACEOF
7324cat confdefs.h >>conftest.$ac_ext
7325cat >>conftest.$ac_ext <<_ACEOF
7326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007327$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007328int
7329main ()
7330{
7331static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7332test_array [0] = 0
7333
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7340 (eval $ac_compile) 2>&5
7341 ac_status=$?
7342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7343 (exit $ac_status); } &&
7344 { ac_try='test -s conftest.$ac_objext'
7345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7346 (eval $ac_try) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); }; }; then
7350 ac_hi=$ac_mid
7351else
7352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007353sed 's/^/| /' conftest.$ac_ext >&5
7354
Martin v. Löwis11437992002-04-12 09:54:03 +00007355ac_lo=`expr '(' $ac_mid ')' + 1`
7356fi
7357rm -f conftest.$ac_objext conftest.$ac_ext
7358done
7359case $ac_lo in
7360?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007361'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7362See \`config.log' for more details." >&5
7363echo "$as_me: error: cannot compute sizeof (float), 77
7364See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 { (exit 1); exit 1; }; } ;;
7366esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007367else
7368 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007369 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7370See \`config.log' for more details." >&5
7371echo "$as_me: error: cannot run test program while cross compiling
7372See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007373 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007374else
Martin v. Löwis11437992002-04-12 09:54:03 +00007375 cat >conftest.$ac_ext <<_ACEOF
7376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007377/* confdefs.h. */
7378_ACEOF
7379cat confdefs.h >>conftest.$ac_ext
7380cat >>conftest.$ac_ext <<_ACEOF
7381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007382$ac_includes_default
7383long longval () { return (long) (sizeof (float)); }
7384unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007385#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007386#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007387int
7388main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007389{
Martin v. Löwis11437992002-04-12 09:54:03 +00007390
7391 FILE *f = fopen ("conftest.val", "w");
7392 if (! f)
7393 exit (1);
7394 if (((long) (sizeof (float))) < 0)
7395 {
7396 long i = longval ();
7397 if (i != ((long) (sizeof (float))))
7398 exit (1);
7399 fprintf (f, "%ld\n", i);
7400 }
7401 else
7402 {
7403 unsigned long i = ulongval ();
7404 if (i != ((long) (sizeof (float))))
7405 exit (1);
7406 fprintf (f, "%lu\n", i);
7407 }
7408 exit (ferror (f) || fclose (f) != 0);
7409
7410 ;
7411 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412}
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
7414rm -f conftest$ac_exeext
7415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7416 (eval $ac_link) 2>&5
7417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7421 (eval $ac_try) 2>&5
7422 ac_status=$?
7423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 (exit $ac_status); }; }; then
7425 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007426else
Martin v. Löwis11437992002-04-12 09:54:03 +00007427 echo "$as_me: program exited with status $ac_status" >&5
7428echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007429sed 's/^/| /' conftest.$ac_ext >&5
7430
Martin v. Löwis11437992002-04-12 09:54:03 +00007431( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007432{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7433See \`config.log' for more details." >&5
7434echo "$as_me: error: cannot compute sizeof (float), 77
7435See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007436 { (exit 1); exit 1; }; }
7437fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007438rm -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 +00007439fi
7440fi
7441rm -f conftest.val
7442else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007443 ac_cv_sizeof_float=0
7444fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007446echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7447echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7448cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007449#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007450_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007451
7452
Martin v. Löwis11437992002-04-12 09:54:03 +00007453echo "$as_me:$LINENO: checking for double" >&5
7454echo $ECHO_N "checking for double... $ECHO_C" >&6
7455if test "${ac_cv_type_double+set}" = set; then
7456 echo $ECHO_N "(cached) $ECHO_C" >&6
7457else
7458 cat >conftest.$ac_ext <<_ACEOF
7459#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007460/* confdefs.h. */
7461_ACEOF
7462cat confdefs.h >>conftest.$ac_ext
7463cat >>conftest.$ac_ext <<_ACEOF
7464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007465$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007466int
7467main ()
7468{
7469if ((double *) 0)
7470 return 0;
7471if (sizeof (double))
7472 return 0;
7473 ;
7474 return 0;
7475}
7476_ACEOF
7477rm -f conftest.$ac_objext
7478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7479 (eval $ac_compile) 2>&5
7480 ac_status=$?
7481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7482 (exit $ac_status); } &&
7483 { ac_try='test -s conftest.$ac_objext'
7484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7485 (eval $ac_try) 2>&5
7486 ac_status=$?
7487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7488 (exit $ac_status); }; }; then
7489 ac_cv_type_double=yes
7490else
7491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007492sed 's/^/| /' conftest.$ac_ext >&5
7493
Martin v. Löwis11437992002-04-12 09:54:03 +00007494ac_cv_type_double=no
7495fi
7496rm -f conftest.$ac_objext conftest.$ac_ext
7497fi
7498echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7499echo "${ECHO_T}$ac_cv_type_double" >&6
7500
7501echo "$as_me:$LINENO: checking size of double" >&5
7502echo $ECHO_N "checking size of double... $ECHO_C" >&6
7503if test "${ac_cv_sizeof_double+set}" = set; then
7504 echo $ECHO_N "(cached) $ECHO_C" >&6
7505else
7506 if test "$ac_cv_type_double" = yes; then
7507 # The cast to unsigned long works around a bug in the HP C Compiler
7508 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7509 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7510 # This bug is HP SR number 8606223364.
7511 if test "$cross_compiling" = yes; then
7512 # Depending upon the size, compute the lo and hi bounds.
7513cat >conftest.$ac_ext <<_ACEOF
7514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007515/* confdefs.h. */
7516_ACEOF
7517cat confdefs.h >>conftest.$ac_ext
7518cat >>conftest.$ac_ext <<_ACEOF
7519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007521int
7522main ()
7523{
7524static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7525test_array [0] = 0
7526
7527 ;
7528 return 0;
7529}
7530_ACEOF
7531rm -f conftest.$ac_objext
7532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7533 (eval $ac_compile) 2>&5
7534 ac_status=$?
7535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536 (exit $ac_status); } &&
7537 { ac_try='test -s conftest.$ac_objext'
7538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7539 (eval $ac_try) 2>&5
7540 ac_status=$?
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); }; }; then
7543 ac_lo=0 ac_mid=0
7544 while :; do
7545 cat >conftest.$ac_ext <<_ACEOF
7546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007547/* confdefs.h. */
7548_ACEOF
7549cat confdefs.h >>conftest.$ac_ext
7550cat >>conftest.$ac_ext <<_ACEOF
7551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007553int
7554main ()
7555{
7556static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7557test_array [0] = 0
7558
7559 ;
7560 return 0;
7561}
7562_ACEOF
7563rm -f conftest.$ac_objext
7564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7565 (eval $ac_compile) 2>&5
7566 ac_status=$?
7567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7568 (exit $ac_status); } &&
7569 { ac_try='test -s conftest.$ac_objext'
7570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7571 (eval $ac_try) 2>&5
7572 ac_status=$?
7573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7574 (exit $ac_status); }; }; then
7575 ac_hi=$ac_mid; break
7576else
7577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007578sed 's/^/| /' conftest.$ac_ext >&5
7579
Martin v. Löwis11437992002-04-12 09:54:03 +00007580ac_lo=`expr $ac_mid + 1`
7581 if test $ac_lo -le $ac_mid; then
7582 ac_lo= ac_hi=
7583 break
7584 fi
7585 ac_mid=`expr 2 '*' $ac_mid + 1`
7586fi
7587rm -f conftest.$ac_objext conftest.$ac_ext
7588 done
7589else
7590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007591sed 's/^/| /' conftest.$ac_ext >&5
7592
Martin v. Löwis11437992002-04-12 09:54:03 +00007593cat >conftest.$ac_ext <<_ACEOF
7594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007595/* confdefs.h. */
7596_ACEOF
7597cat confdefs.h >>conftest.$ac_ext
7598cat >>conftest.$ac_ext <<_ACEOF
7599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007600$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007601int
7602main ()
7603{
7604static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7605test_array [0] = 0
7606
7607 ;
7608 return 0;
7609}
7610_ACEOF
7611rm -f conftest.$ac_objext
7612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7613 (eval $ac_compile) 2>&5
7614 ac_status=$?
7615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7616 (exit $ac_status); } &&
7617 { ac_try='test -s conftest.$ac_objext'
7618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7619 (eval $ac_try) 2>&5
7620 ac_status=$?
7621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7622 (exit $ac_status); }; }; then
7623 ac_hi=-1 ac_mid=-1
7624 while :; do
7625 cat >conftest.$ac_ext <<_ACEOF
7626#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007627/* confdefs.h. */
7628_ACEOF
7629cat confdefs.h >>conftest.$ac_ext
7630cat >>conftest.$ac_ext <<_ACEOF
7631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007632$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007633int
7634main ()
7635{
7636static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7637test_array [0] = 0
7638
7639 ;
7640 return 0;
7641}
7642_ACEOF
7643rm -f conftest.$ac_objext
7644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7645 (eval $ac_compile) 2>&5
7646 ac_status=$?
7647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7648 (exit $ac_status); } &&
7649 { ac_try='test -s conftest.$ac_objext'
7650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7651 (eval $ac_try) 2>&5
7652 ac_status=$?
7653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7654 (exit $ac_status); }; }; then
7655 ac_lo=$ac_mid; break
7656else
7657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007658sed 's/^/| /' conftest.$ac_ext >&5
7659
Martin v. Löwis11437992002-04-12 09:54:03 +00007660ac_hi=`expr '(' $ac_mid ')' - 1`
7661 if test $ac_mid -le $ac_hi; then
7662 ac_lo= ac_hi=
7663 break
7664 fi
7665 ac_mid=`expr 2 '*' $ac_mid`
7666fi
7667rm -f conftest.$ac_objext conftest.$ac_ext
7668 done
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= ac_hi=
7674fi
7675rm -f conftest.$ac_objext conftest.$ac_ext
7676fi
7677rm -f conftest.$ac_objext conftest.$ac_ext
7678# Binary search between lo and hi bounds.
7679while test "x$ac_lo" != "x$ac_hi"; do
7680 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7681 cat >conftest.$ac_ext <<_ACEOF
7682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007689int
7690main ()
7691{
7692static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7693test_array [0] = 0
7694
7695 ;
7696 return 0;
7697}
7698_ACEOF
7699rm -f conftest.$ac_objext
7700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7701 (eval $ac_compile) 2>&5
7702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); } &&
7705 { ac_try='test -s conftest.$ac_objext'
7706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7707 (eval $ac_try) 2>&5
7708 ac_status=$?
7709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7710 (exit $ac_status); }; }; then
7711 ac_hi=$ac_mid
7712else
7713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007714sed 's/^/| /' conftest.$ac_ext >&5
7715
Martin v. Löwis11437992002-04-12 09:54:03 +00007716ac_lo=`expr '(' $ac_mid ')' + 1`
7717fi
7718rm -f conftest.$ac_objext conftest.$ac_ext
7719done
7720case $ac_lo in
7721?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007722'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7723See \`config.log' for more details." >&5
7724echo "$as_me: error: cannot compute sizeof (double), 77
7725See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007726 { (exit 1); exit 1; }; } ;;
7727esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007728else
7729 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007730 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7731See \`config.log' for more details." >&5
7732echo "$as_me: error: cannot run test program while cross compiling
7733See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007735else
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 cat >conftest.$ac_ext <<_ACEOF
7737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007738/* confdefs.h. */
7739_ACEOF
7740cat confdefs.h >>conftest.$ac_ext
7741cat >>conftest.$ac_ext <<_ACEOF
7742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007743$ac_includes_default
7744long longval () { return (long) (sizeof (double)); }
7745unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007746#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007747#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007748int
7749main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007750{
Martin v. Löwis11437992002-04-12 09:54:03 +00007751
7752 FILE *f = fopen ("conftest.val", "w");
7753 if (! f)
7754 exit (1);
7755 if (((long) (sizeof (double))) < 0)
7756 {
7757 long i = longval ();
7758 if (i != ((long) (sizeof (double))))
7759 exit (1);
7760 fprintf (f, "%ld\n", i);
7761 }
7762 else
7763 {
7764 unsigned long i = ulongval ();
7765 if (i != ((long) (sizeof (double))))
7766 exit (1);
7767 fprintf (f, "%lu\n", i);
7768 }
7769 exit (ferror (f) || fclose (f) != 0);
7770
7771 ;
7772 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007773}
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
7775rm -f conftest$ac_exeext
7776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7777 (eval $ac_link) 2>&5
7778 ac_status=$?
7779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782 (eval $ac_try) 2>&5
7783 ac_status=$?
7784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785 (exit $ac_status); }; }; then
7786 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007787else
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 echo "$as_me: program exited with status $ac_status" >&5
7789echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007790sed 's/^/| /' conftest.$ac_ext >&5
7791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007793{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7794See \`config.log' for more details." >&5
7795echo "$as_me: error: cannot compute sizeof (double), 77
7796See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 { (exit 1); exit 1; }; }
7798fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007799rm -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 +00007800fi
7801fi
7802rm -f conftest.val
7803else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007804 ac_cv_sizeof_double=0
7805fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007807echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7808echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7809cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007810#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007811_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007812
7813
Martin v. Löwis11437992002-04-12 09:54:03 +00007814echo "$as_me:$LINENO: checking for fpos_t" >&5
7815echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7816if test "${ac_cv_type_fpos_t+set}" = set; then
7817 echo $ECHO_N "(cached) $ECHO_C" >&6
7818else
7819 cat >conftest.$ac_ext <<_ACEOF
7820#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007821/* confdefs.h. */
7822_ACEOF
7823cat confdefs.h >>conftest.$ac_ext
7824cat >>conftest.$ac_ext <<_ACEOF
7825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007826$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007827int
7828main ()
7829{
7830if ((fpos_t *) 0)
7831 return 0;
7832if (sizeof (fpos_t))
7833 return 0;
7834 ;
7835 return 0;
7836}
7837_ACEOF
7838rm -f conftest.$ac_objext
7839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7840 (eval $ac_compile) 2>&5
7841 ac_status=$?
7842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7843 (exit $ac_status); } &&
7844 { ac_try='test -s conftest.$ac_objext'
7845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7846 (eval $ac_try) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); }; }; then
7850 ac_cv_type_fpos_t=yes
7851else
7852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007853sed 's/^/| /' conftest.$ac_ext >&5
7854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855ac_cv_type_fpos_t=no
7856fi
7857rm -f conftest.$ac_objext conftest.$ac_ext
7858fi
7859echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7860echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7861
7862echo "$as_me:$LINENO: checking size of fpos_t" >&5
7863echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7864if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7865 echo $ECHO_N "(cached) $ECHO_C" >&6
7866else
7867 if test "$ac_cv_type_fpos_t" = yes; then
7868 # The cast to unsigned long works around a bug in the HP C Compiler
7869 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7870 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7871 # This bug is HP SR number 8606223364.
7872 if test "$cross_compiling" = yes; then
7873 # Depending upon the size, compute the lo and hi bounds.
7874cat >conftest.$ac_ext <<_ACEOF
7875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007876/* confdefs.h. */
7877_ACEOF
7878cat confdefs.h >>conftest.$ac_ext
7879cat >>conftest.$ac_ext <<_ACEOF
7880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007881$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007882int
7883main ()
7884{
7885static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7886test_array [0] = 0
7887
7888 ;
7889 return 0;
7890}
7891_ACEOF
7892rm -f conftest.$ac_objext
7893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7894 (eval $ac_compile) 2>&5
7895 ac_status=$?
7896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897 (exit $ac_status); } &&
7898 { ac_try='test -s conftest.$ac_objext'
7899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7900 (eval $ac_try) 2>&5
7901 ac_status=$?
7902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7903 (exit $ac_status); }; }; then
7904 ac_lo=0 ac_mid=0
7905 while :; do
7906 cat >conftest.$ac_ext <<_ACEOF
7907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007908/* confdefs.h. */
7909_ACEOF
7910cat confdefs.h >>conftest.$ac_ext
7911cat >>conftest.$ac_ext <<_ACEOF
7912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007914int
7915main ()
7916{
7917static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7918test_array [0] = 0
7919
7920 ;
7921 return 0;
7922}
7923_ACEOF
7924rm -f conftest.$ac_objext
7925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7926 (eval $ac_compile) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); } &&
7930 { ac_try='test -s conftest.$ac_objext'
7931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7932 (eval $ac_try) 2>&5
7933 ac_status=$?
7934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935 (exit $ac_status); }; }; then
7936 ac_hi=$ac_mid; break
7937else
7938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007939sed 's/^/| /' conftest.$ac_ext >&5
7940
Martin v. Löwis11437992002-04-12 09:54:03 +00007941ac_lo=`expr $ac_mid + 1`
7942 if test $ac_lo -le $ac_mid; then
7943 ac_lo= ac_hi=
7944 break
7945 fi
7946 ac_mid=`expr 2 '*' $ac_mid + 1`
7947fi
7948rm -f conftest.$ac_objext conftest.$ac_ext
7949 done
7950else
7951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007952sed 's/^/| /' conftest.$ac_ext >&5
7953
Martin v. Löwis11437992002-04-12 09:54:03 +00007954cat >conftest.$ac_ext <<_ACEOF
7955#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007956/* confdefs.h. */
7957_ACEOF
7958cat confdefs.h >>conftest.$ac_ext
7959cat >>conftest.$ac_ext <<_ACEOF
7960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007961$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007962int
7963main ()
7964{
7965static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7966test_array [0] = 0
7967
7968 ;
7969 return 0;
7970}
7971_ACEOF
7972rm -f conftest.$ac_objext
7973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7974 (eval $ac_compile) 2>&5
7975 ac_status=$?
7976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977 (exit $ac_status); } &&
7978 { ac_try='test -s conftest.$ac_objext'
7979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7980 (eval $ac_try) 2>&5
7981 ac_status=$?
7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7983 (exit $ac_status); }; }; then
7984 ac_hi=-1 ac_mid=-1
7985 while :; do
7986 cat >conftest.$ac_ext <<_ACEOF
7987#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007988/* confdefs.h. */
7989_ACEOF
7990cat confdefs.h >>conftest.$ac_ext
7991cat >>conftest.$ac_ext <<_ACEOF
7992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007993$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007994int
7995main ()
7996{
7997static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7998test_array [0] = 0
7999
8000 ;
8001 return 0;
8002}
8003_ACEOF
8004rm -f conftest.$ac_objext
8005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8006 (eval $ac_compile) 2>&5
8007 ac_status=$?
8008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8009 (exit $ac_status); } &&
8010 { ac_try='test -s conftest.$ac_objext'
8011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8012 (eval $ac_try) 2>&5
8013 ac_status=$?
8014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8015 (exit $ac_status); }; }; then
8016 ac_lo=$ac_mid; break
8017else
8018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008019sed 's/^/| /' conftest.$ac_ext >&5
8020
Martin v. Löwis11437992002-04-12 09:54:03 +00008021ac_hi=`expr '(' $ac_mid ')' - 1`
8022 if test $ac_mid -le $ac_hi; then
8023 ac_lo= ac_hi=
8024 break
8025 fi
8026 ac_mid=`expr 2 '*' $ac_mid`
8027fi
8028rm -f conftest.$ac_objext conftest.$ac_ext
8029 done
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= ac_hi=
8035fi
8036rm -f conftest.$ac_objext conftest.$ac_ext
8037fi
8038rm -f conftest.$ac_objext conftest.$ac_ext
8039# Binary search between lo and hi bounds.
8040while test "x$ac_lo" != "x$ac_hi"; do
8041 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8042 cat >conftest.$ac_ext <<_ACEOF
8043#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008049$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008050int
8051main ()
8052{
8053static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8054test_array [0] = 0
8055
8056 ;
8057 return 0;
8058}
8059_ACEOF
8060rm -f conftest.$ac_objext
8061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8062 (eval $ac_compile) 2>&5
8063 ac_status=$?
8064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8065 (exit $ac_status); } &&
8066 { ac_try='test -s conftest.$ac_objext'
8067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8068 (eval $ac_try) 2>&5
8069 ac_status=$?
8070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8071 (exit $ac_status); }; }; then
8072 ac_hi=$ac_mid
8073else
8074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008075sed 's/^/| /' conftest.$ac_ext >&5
8076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077ac_lo=`expr '(' $ac_mid ')' + 1`
8078fi
8079rm -f conftest.$ac_objext conftest.$ac_ext
8080done
8081case $ac_lo in
8082?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008083'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8084See \`config.log' for more details." >&5
8085echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8086See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 { (exit 1); exit 1; }; } ;;
8088esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008089else
8090 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008091 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8092See \`config.log' for more details." >&5
8093echo "$as_me: error: cannot run test program while cross compiling
8094See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008096else
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 cat >conftest.$ac_ext <<_ACEOF
8098#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* confdefs.h. */
8100_ACEOF
8101cat confdefs.h >>conftest.$ac_ext
8102cat >>conftest.$ac_ext <<_ACEOF
8103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008104$ac_includes_default
8105long longval () { return (long) (sizeof (fpos_t)); }
8106unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008107#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008108#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008109int
8110main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008111{
Martin v. Löwis11437992002-04-12 09:54:03 +00008112
8113 FILE *f = fopen ("conftest.val", "w");
8114 if (! f)
8115 exit (1);
8116 if (((long) (sizeof (fpos_t))) < 0)
8117 {
8118 long i = longval ();
8119 if (i != ((long) (sizeof (fpos_t))))
8120 exit (1);
8121 fprintf (f, "%ld\n", i);
8122 }
8123 else
8124 {
8125 unsigned long i = ulongval ();
8126 if (i != ((long) (sizeof (fpos_t))))
8127 exit (1);
8128 fprintf (f, "%lu\n", i);
8129 }
8130 exit (ferror (f) || fclose (f) != 0);
8131
8132 ;
8133 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008134}
Martin v. Löwis11437992002-04-12 09:54:03 +00008135_ACEOF
8136rm -f conftest$ac_exeext
8137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8138 (eval $ac_link) 2>&5
8139 ac_status=$?
8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8143 (eval $ac_try) 2>&5
8144 ac_status=$?
8145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8146 (exit $ac_status); }; }; then
8147 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008148else
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 echo "$as_me: program exited with status $ac_status" >&5
8150echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008151sed 's/^/| /' conftest.$ac_ext >&5
8152
Martin v. Löwis11437992002-04-12 09:54:03 +00008153( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008154{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8155See \`config.log' for more details." >&5
8156echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8157See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 { (exit 1); exit 1; }; }
8159fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008160rm -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 +00008161fi
8162fi
8163rm -f conftest.val
8164else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008165 ac_cv_sizeof_fpos_t=0
8166fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008168echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8169echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8170cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008171#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008172_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008173
Michael W. Hudson54241132001-12-07 15:38:26 +00008174
8175
Martin v. Löwis11437992002-04-12 09:54:03 +00008176echo "$as_me:$LINENO: checking for long long support" >&5
8177echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008178have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008179cat >conftest.$ac_ext <<_ACEOF
8180#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008181/* confdefs.h. */
8182_ACEOF
8183cat confdefs.h >>conftest.$ac_ext
8184cat >>conftest.$ac_ext <<_ACEOF
8185/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187int
8188main ()
8189{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008190long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 ;
8192 return 0;
8193}
8194_ACEOF
8195rm -f conftest.$ac_objext
8196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8197 (eval $ac_compile) 2>&5
8198 ac_status=$?
8199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8200 (exit $ac_status); } &&
8201 { ac_try='test -s conftest.$ac_objext'
8202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8203 (eval $ac_try) 2>&5
8204 ac_status=$?
8205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8206 (exit $ac_status); }; }; then
8207
8208
8209cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008210#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
8212
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008213 have_long_long=yes
8214
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008215else
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008217sed 's/^/| /' conftest.$ac_ext >&5
8218
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008220rm -f conftest.$ac_objext conftest.$ac_ext
8221echo "$as_me:$LINENO: result: $have_long_long" >&5
8222echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008223if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008224echo "$as_me:$LINENO: checking for long long" >&5
8225echo $ECHO_N "checking for long long... $ECHO_C" >&6
8226if test "${ac_cv_type_long_long+set}" = set; then
8227 echo $ECHO_N "(cached) $ECHO_C" >&6
8228else
8229 cat >conftest.$ac_ext <<_ACEOF
8230#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008231/* confdefs.h. */
8232_ACEOF
8233cat confdefs.h >>conftest.$ac_ext
8234cat >>conftest.$ac_ext <<_ACEOF
8235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008236$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008237int
8238main ()
8239{
8240if ((long long *) 0)
8241 return 0;
8242if (sizeof (long long))
8243 return 0;
8244 ;
8245 return 0;
8246}
8247_ACEOF
8248rm -f conftest.$ac_objext
8249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8250 (eval $ac_compile) 2>&5
8251 ac_status=$?
8252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8253 (exit $ac_status); } &&
8254 { ac_try='test -s conftest.$ac_objext'
8255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8256 (eval $ac_try) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); }; }; then
8260 ac_cv_type_long_long=yes
8261else
8262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008263sed 's/^/| /' conftest.$ac_ext >&5
8264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265ac_cv_type_long_long=no
8266fi
8267rm -f conftest.$ac_objext conftest.$ac_ext
8268fi
8269echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8270echo "${ECHO_T}$ac_cv_type_long_long" >&6
8271
8272echo "$as_me:$LINENO: checking size of long long" >&5
8273echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8274if test "${ac_cv_sizeof_long_long+set}" = set; then
8275 echo $ECHO_N "(cached) $ECHO_C" >&6
8276else
8277 if test "$ac_cv_type_long_long" = yes; then
8278 # The cast to unsigned long works around a bug in the HP C Compiler
8279 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8280 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8281 # This bug is HP SR number 8606223364.
8282 if test "$cross_compiling" = yes; then
8283 # Depending upon the size, compute the lo and hi bounds.
8284cat >conftest.$ac_ext <<_ACEOF
8285#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008286/* confdefs.h. */
8287_ACEOF
8288cat confdefs.h >>conftest.$ac_ext
8289cat >>conftest.$ac_ext <<_ACEOF
8290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008291$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008292int
8293main ()
8294{
8295static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8296test_array [0] = 0
8297
8298 ;
8299 return 0;
8300}
8301_ACEOF
8302rm -f conftest.$ac_objext
8303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8304 (eval $ac_compile) 2>&5
8305 ac_status=$?
8306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8307 (exit $ac_status); } &&
8308 { ac_try='test -s conftest.$ac_objext'
8309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8310 (eval $ac_try) 2>&5
8311 ac_status=$?
8312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313 (exit $ac_status); }; }; then
8314 ac_lo=0 ac_mid=0
8315 while :; do
8316 cat >conftest.$ac_ext <<_ACEOF
8317#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* confdefs.h. */
8319_ACEOF
8320cat confdefs.h >>conftest.$ac_ext
8321cat >>conftest.$ac_ext <<_ACEOF
8322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008323$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008324int
8325main ()
8326{
8327static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8328test_array [0] = 0
8329
8330 ;
8331 return 0;
8332}
8333_ACEOF
8334rm -f conftest.$ac_objext
8335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8336 (eval $ac_compile) 2>&5
8337 ac_status=$?
8338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339 (exit $ac_status); } &&
8340 { ac_try='test -s conftest.$ac_objext'
8341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8342 (eval $ac_try) 2>&5
8343 ac_status=$?
8344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345 (exit $ac_status); }; }; then
8346 ac_hi=$ac_mid; break
8347else
8348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008349sed 's/^/| /' conftest.$ac_ext >&5
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351ac_lo=`expr $ac_mid + 1`
8352 if test $ac_lo -le $ac_mid; then
8353 ac_lo= ac_hi=
8354 break
8355 fi
8356 ac_mid=`expr 2 '*' $ac_mid + 1`
8357fi
8358rm -f conftest.$ac_objext conftest.$ac_ext
8359 done
8360else
8361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008362sed 's/^/| /' conftest.$ac_ext >&5
8363
Martin v. Löwis11437992002-04-12 09:54:03 +00008364cat >conftest.$ac_ext <<_ACEOF
8365#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008366/* confdefs.h. */
8367_ACEOF
8368cat confdefs.h >>conftest.$ac_ext
8369cat >>conftest.$ac_ext <<_ACEOF
8370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008371$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008372int
8373main ()
8374{
8375static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8376test_array [0] = 0
8377
8378 ;
8379 return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext
8383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8384 (eval $ac_compile) 2>&5
8385 ac_status=$?
8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387 (exit $ac_status); } &&
8388 { ac_try='test -s conftest.$ac_objext'
8389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8390 (eval $ac_try) 2>&5
8391 ac_status=$?
8392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8393 (exit $ac_status); }; }; then
8394 ac_hi=-1 ac_mid=-1
8395 while :; do
8396 cat >conftest.$ac_ext <<_ACEOF
8397#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* confdefs.h. */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008404int
8405main ()
8406{
8407static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8408test_array [0] = 0
8409
8410 ;
8411 return 0;
8412}
8413_ACEOF
8414rm -f conftest.$ac_objext
8415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8416 (eval $ac_compile) 2>&5
8417 ac_status=$?
8418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8419 (exit $ac_status); } &&
8420 { ac_try='test -s conftest.$ac_objext'
8421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8422 (eval $ac_try) 2>&5
8423 ac_status=$?
8424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8425 (exit $ac_status); }; }; then
8426 ac_lo=$ac_mid; break
8427else
8428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008429sed 's/^/| /' conftest.$ac_ext >&5
8430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431ac_hi=`expr '(' $ac_mid ')' - 1`
8432 if test $ac_mid -le $ac_hi; then
8433 ac_lo= ac_hi=
8434 break
8435 fi
8436 ac_mid=`expr 2 '*' $ac_mid`
8437fi
8438rm -f conftest.$ac_objext conftest.$ac_ext
8439 done
8440else
8441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008442sed 's/^/| /' conftest.$ac_ext >&5
8443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444ac_lo= ac_hi=
8445fi
8446rm -f conftest.$ac_objext conftest.$ac_ext
8447fi
8448rm -f conftest.$ac_objext conftest.$ac_ext
8449# Binary search between lo and hi bounds.
8450while test "x$ac_lo" != "x$ac_hi"; do
8451 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8452 cat >conftest.$ac_ext <<_ACEOF
8453#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008460int
8461main ()
8462{
8463static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8464test_array [0] = 0
8465
8466 ;
8467 return 0;
8468}
8469_ACEOF
8470rm -f conftest.$ac_objext
8471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8472 (eval $ac_compile) 2>&5
8473 ac_status=$?
8474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475 (exit $ac_status); } &&
8476 { ac_try='test -s conftest.$ac_objext'
8477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8478 (eval $ac_try) 2>&5
8479 ac_status=$?
8480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481 (exit $ac_status); }; }; then
8482 ac_hi=$ac_mid
8483else
8484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008485sed 's/^/| /' conftest.$ac_ext >&5
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487ac_lo=`expr '(' $ac_mid ')' + 1`
8488fi
8489rm -f conftest.$ac_objext conftest.$ac_ext
8490done
8491case $ac_lo in
8492?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008493'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8494See \`config.log' for more details." >&5
8495echo "$as_me: error: cannot compute sizeof (long long), 77
8496See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 { (exit 1); exit 1; }; } ;;
8498esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008499else
8500 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008501 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8502See \`config.log' for more details." >&5
8503echo "$as_me: error: cannot run test program while cross compiling
8504See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 cat >conftest.$ac_ext <<_ACEOF
8508#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008509/* confdefs.h. */
8510_ACEOF
8511cat confdefs.h >>conftest.$ac_ext
8512cat >>conftest.$ac_ext <<_ACEOF
8513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008514$ac_includes_default
8515long longval () { return (long) (sizeof (long long)); }
8516unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008517#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008518#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008521{
Martin v. Löwis11437992002-04-12 09:54:03 +00008522
8523 FILE *f = fopen ("conftest.val", "w");
8524 if (! f)
8525 exit (1);
8526 if (((long) (sizeof (long long))) < 0)
8527 {
8528 long i = longval ();
8529 if (i != ((long) (sizeof (long long))))
8530 exit (1);
8531 fprintf (f, "%ld\n", i);
8532 }
8533 else
8534 {
8535 unsigned long i = ulongval ();
8536 if (i != ((long) (sizeof (long long))))
8537 exit (1);
8538 fprintf (f, "%lu\n", i);
8539 }
8540 exit (ferror (f) || fclose (f) != 0);
8541
8542 ;
8543 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008544}
Martin v. Löwis11437992002-04-12 09:54:03 +00008545_ACEOF
8546rm -f conftest$ac_exeext
8547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8548 (eval $ac_link) 2>&5
8549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8553 (eval $ac_try) 2>&5
8554 ac_status=$?
8555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8556 (exit $ac_status); }; }; then
8557 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 echo "$as_me: program exited with status $ac_status" >&5
8560echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008561sed 's/^/| /' conftest.$ac_ext >&5
8562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008564{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8565See \`config.log' for more details." >&5
8566echo "$as_me: error: cannot compute sizeof (long long), 77
8567See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 { (exit 1); exit 1; }; }
8569fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008570rm -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 +00008571fi
8572fi
8573rm -f conftest.val
8574else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008575 ac_cv_sizeof_long_long=0
8576fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008578echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8579echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8580cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008581#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008582_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008583
Michael W. Hudson54241132001-12-07 15:38:26 +00008584
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008585fi
8586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8588echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008589have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008590cat >conftest.$ac_ext <<_ACEOF
8591#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008592/* confdefs.h. */
8593_ACEOF
8594cat confdefs.h >>conftest.$ac_ext
8595cat >>conftest.$ac_ext <<_ACEOF
8596/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598int
8599main ()
8600{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008601uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 ;
8603 return 0;
8604}
8605_ACEOF
8606rm -f conftest.$ac_objext
8607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8608 (eval $ac_compile) 2>&5
8609 ac_status=$?
8610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8611 (exit $ac_status); } &&
8612 { ac_try='test -s conftest.$ac_objext'
8613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8614 (eval $ac_try) 2>&5
8615 ac_status=$?
8616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617 (exit $ac_status); }; }; then
8618
8619
8620cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008621#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008622_ACEOF
8623
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008624 have_uintptr_t=yes
8625
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008626else
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008628sed 's/^/| /' conftest.$ac_ext >&5
8629
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008630fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008631rm -f conftest.$ac_objext conftest.$ac_ext
8632echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8633echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008634if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008635echo "$as_me:$LINENO: checking for uintptr_t" >&5
8636echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8637if test "${ac_cv_type_uintptr_t+set}" = set; then
8638 echo $ECHO_N "(cached) $ECHO_C" >&6
8639else
8640 cat >conftest.$ac_ext <<_ACEOF
8641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008642/* confdefs.h. */
8643_ACEOF
8644cat confdefs.h >>conftest.$ac_ext
8645cat >>conftest.$ac_ext <<_ACEOF
8646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008648int
8649main ()
8650{
8651if ((uintptr_t *) 0)
8652 return 0;
8653if (sizeof (uintptr_t))
8654 return 0;
8655 ;
8656 return 0;
8657}
8658_ACEOF
8659rm -f conftest.$ac_objext
8660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8661 (eval $ac_compile) 2>&5
8662 ac_status=$?
8663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8664 (exit $ac_status); } &&
8665 { ac_try='test -s conftest.$ac_objext'
8666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8667 (eval $ac_try) 2>&5
8668 ac_status=$?
8669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8670 (exit $ac_status); }; }; then
8671 ac_cv_type_uintptr_t=yes
8672else
8673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008674sed 's/^/| /' conftest.$ac_ext >&5
8675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676ac_cv_type_uintptr_t=no
8677fi
8678rm -f conftest.$ac_objext conftest.$ac_ext
8679fi
8680echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8681echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8682
8683echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8684echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8685if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8686 echo $ECHO_N "(cached) $ECHO_C" >&6
8687else
8688 if test "$ac_cv_type_uintptr_t" = yes; then
8689 # The cast to unsigned long works around a bug in the HP C Compiler
8690 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8691 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8692 # This bug is HP SR number 8606223364.
8693 if test "$cross_compiling" = yes; then
8694 # Depending upon the size, compute the lo and hi bounds.
8695cat >conftest.$ac_ext <<_ACEOF
8696#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008697/* confdefs.h. */
8698_ACEOF
8699cat confdefs.h >>conftest.$ac_ext
8700cat >>conftest.$ac_ext <<_ACEOF
8701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008703int
8704main ()
8705{
8706static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8707test_array [0] = 0
8708
8709 ;
8710 return 0;
8711}
8712_ACEOF
8713rm -f conftest.$ac_objext
8714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8715 (eval $ac_compile) 2>&5
8716 ac_status=$?
8717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8718 (exit $ac_status); } &&
8719 { ac_try='test -s conftest.$ac_objext'
8720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8721 (eval $ac_try) 2>&5
8722 ac_status=$?
8723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8724 (exit $ac_status); }; }; then
8725 ac_lo=0 ac_mid=0
8726 while :; do
8727 cat >conftest.$ac_ext <<_ACEOF
8728#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* confdefs.h. */
8730_ACEOF
8731cat confdefs.h >>conftest.$ac_ext
8732cat >>conftest.$ac_ext <<_ACEOF
8733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008735int
8736main ()
8737{
8738static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8739test_array [0] = 0
8740
8741 ;
8742 return 0;
8743}
8744_ACEOF
8745rm -f conftest.$ac_objext
8746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8747 (eval $ac_compile) 2>&5
8748 ac_status=$?
8749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750 (exit $ac_status); } &&
8751 { ac_try='test -s conftest.$ac_objext'
8752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8753 (eval $ac_try) 2>&5
8754 ac_status=$?
8755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756 (exit $ac_status); }; }; then
8757 ac_hi=$ac_mid; break
8758else
8759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008760sed 's/^/| /' conftest.$ac_ext >&5
8761
Martin v. Löwis11437992002-04-12 09:54:03 +00008762ac_lo=`expr $ac_mid + 1`
8763 if test $ac_lo -le $ac_mid; then
8764 ac_lo= ac_hi=
8765 break
8766 fi
8767 ac_mid=`expr 2 '*' $ac_mid + 1`
8768fi
8769rm -f conftest.$ac_objext conftest.$ac_ext
8770 done
8771else
8772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008773sed 's/^/| /' conftest.$ac_ext >&5
8774
Martin v. Löwis11437992002-04-12 09:54:03 +00008775cat >conftest.$ac_ext <<_ACEOF
8776#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008777/* confdefs.h. */
8778_ACEOF
8779cat confdefs.h >>conftest.$ac_ext
8780cat >>conftest.$ac_ext <<_ACEOF
8781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008782$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008783int
8784main ()
8785{
8786static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8787test_array [0] = 0
8788
8789 ;
8790 return 0;
8791}
8792_ACEOF
8793rm -f conftest.$ac_objext
8794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8795 (eval $ac_compile) 2>&5
8796 ac_status=$?
8797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8798 (exit $ac_status); } &&
8799 { ac_try='test -s conftest.$ac_objext'
8800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8801 (eval $ac_try) 2>&5
8802 ac_status=$?
8803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804 (exit $ac_status); }; }; then
8805 ac_hi=-1 ac_mid=-1
8806 while :; do
8807 cat >conftest.$ac_ext <<_ACEOF
8808#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* confdefs.h. */
8810_ACEOF
8811cat confdefs.h >>conftest.$ac_ext
8812cat >>conftest.$ac_ext <<_ACEOF
8813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
8818static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8819test_array [0] = 0
8820
8821 ;
8822 return 0;
8823}
8824_ACEOF
8825rm -f conftest.$ac_objext
8826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8827 (eval $ac_compile) 2>&5
8828 ac_status=$?
8829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8830 (exit $ac_status); } &&
8831 { ac_try='test -s conftest.$ac_objext'
8832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8833 (eval $ac_try) 2>&5
8834 ac_status=$?
8835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8836 (exit $ac_status); }; }; then
8837 ac_lo=$ac_mid; break
8838else
8839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008840sed 's/^/| /' conftest.$ac_ext >&5
8841
Martin v. Löwis11437992002-04-12 09:54:03 +00008842ac_hi=`expr '(' $ac_mid ')' - 1`
8843 if test $ac_mid -le $ac_hi; then
8844 ac_lo= ac_hi=
8845 break
8846 fi
8847 ac_mid=`expr 2 '*' $ac_mid`
8848fi
8849rm -f conftest.$ac_objext conftest.$ac_ext
8850 done
8851else
8852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008853sed 's/^/| /' conftest.$ac_ext >&5
8854
Martin v. Löwis11437992002-04-12 09:54:03 +00008855ac_lo= ac_hi=
8856fi
8857rm -f conftest.$ac_objext conftest.$ac_ext
8858fi
8859rm -f conftest.$ac_objext conftest.$ac_ext
8860# Binary search between lo and hi bounds.
8861while test "x$ac_lo" != "x$ac_hi"; do
8862 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8863 cat >conftest.$ac_ext <<_ACEOF
8864#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008865/* confdefs.h. */
8866_ACEOF
8867cat confdefs.h >>conftest.$ac_ext
8868cat >>conftest.$ac_ext <<_ACEOF
8869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008870$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
8874static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8875test_array [0] = 0
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
8882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8883 (eval $ac_compile) 2>&5
8884 ac_status=$?
8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886 (exit $ac_status); } &&
8887 { ac_try='test -s conftest.$ac_objext'
8888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8889 (eval $ac_try) 2>&5
8890 ac_status=$?
8891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892 (exit $ac_status); }; }; then
8893 ac_hi=$ac_mid
8894else
8895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008896sed 's/^/| /' conftest.$ac_ext >&5
8897
Martin v. Löwis11437992002-04-12 09:54:03 +00008898ac_lo=`expr '(' $ac_mid ')' + 1`
8899fi
8900rm -f conftest.$ac_objext conftest.$ac_ext
8901done
8902case $ac_lo in
8903?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008904'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8905See \`config.log' for more details." >&5
8906echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8907See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 { (exit 1); exit 1; }; } ;;
8909esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008910else
8911 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008912 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8913See \`config.log' for more details." >&5
8914echo "$as_me: error: cannot run test program while cross compiling
8915See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008917else
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 cat >conftest.$ac_ext <<_ACEOF
8919#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008920/* confdefs.h. */
8921_ACEOF
8922cat confdefs.h >>conftest.$ac_ext
8923cat >>conftest.$ac_ext <<_ACEOF
8924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008925$ac_includes_default
8926long longval () { return (long) (sizeof (uintptr_t)); }
8927unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008928#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008929#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008930int
8931main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008932{
Martin v. Löwis11437992002-04-12 09:54:03 +00008933
8934 FILE *f = fopen ("conftest.val", "w");
8935 if (! f)
8936 exit (1);
8937 if (((long) (sizeof (uintptr_t))) < 0)
8938 {
8939 long i = longval ();
8940 if (i != ((long) (sizeof (uintptr_t))))
8941 exit (1);
8942 fprintf (f, "%ld\n", i);
8943 }
8944 else
8945 {
8946 unsigned long i = ulongval ();
8947 if (i != ((long) (sizeof (uintptr_t))))
8948 exit (1);
8949 fprintf (f, "%lu\n", i);
8950 }
8951 exit (ferror (f) || fclose (f) != 0);
8952
8953 ;
8954 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008955}
Martin v. Löwis11437992002-04-12 09:54:03 +00008956_ACEOF
8957rm -f conftest$ac_exeext
8958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8959 (eval $ac_link) 2>&5
8960 ac_status=$?
8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8964 (eval $ac_try) 2>&5
8965 ac_status=$?
8966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967 (exit $ac_status); }; }; then
8968 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008969else
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 echo "$as_me: program exited with status $ac_status" >&5
8971echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008972sed 's/^/| /' conftest.$ac_ext >&5
8973
Martin v. Löwis11437992002-04-12 09:54:03 +00008974( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008975{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8976See \`config.log' for more details." >&5
8977echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8978See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 { (exit 1); exit 1; }; }
8980fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008981rm -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 +00008982fi
8983fi
8984rm -f conftest.val
8985else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008986 ac_cv_sizeof_uintptr_t=0
8987fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008988fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008989echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8990echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8991cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008992#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008994
Michael W. Hudson54241132001-12-07 15:38:26 +00008995
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008996fi
8997
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008998# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008999echo "$as_me:$LINENO: checking size of off_t" >&5
9000echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9001if test "${ac_cv_sizeof_off_t+set}" = set; then
9002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009003else
9004 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009005 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006else
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 cat >conftest.$ac_ext <<_ACEOF
9008#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009009/* confdefs.h. */
9010_ACEOF
9011cat confdefs.h >>conftest.$ac_ext
9012cat >>conftest.$ac_ext <<_ACEOF
9013/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009014#include <stdio.h>
9015#include <sys/types.h>
9016main()
9017{
9018 FILE *f=fopen("conftestval", "w");
9019 if (!f) exit(1);
9020 fprintf(f, "%d\n", sizeof(off_t));
9021 exit(0);
9022}
Martin v. Löwis11437992002-04-12 09:54:03 +00009023_ACEOF
9024rm -f conftest$ac_exeext
9025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9026 (eval $ac_link) 2>&5
9027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9031 (eval $ac_try) 2>&5
9032 ac_status=$?
9033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9034 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009035 ac_cv_sizeof_off_t=`cat conftestval`
9036else
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 echo "$as_me: program exited with status $ac_status" >&5
9038echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009039sed 's/^/| /' conftest.$ac_ext >&5
9040
Martin v. Löwis11437992002-04-12 09:54:03 +00009041( exit $ac_status )
9042ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009043fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009044rm -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 +00009045fi
9046
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009047fi
9048
Martin v. Löwis11437992002-04-12 09:54:03 +00009049echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9050echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9051
9052cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009053#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009055
Michael W. Hudson54241132001-12-07 15:38:26 +00009056
Martin v. Löwis11437992002-04-12 09:54:03 +00009057echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9058echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009059if test "$have_long_long" = yes -a \
9060 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9061 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009062
Martin v. Löwis11437992002-04-12 09:54:03 +00009063cat >>confdefs.h <<\_ACEOF
9064#define HAVE_LARGEFILE_SUPPORT 1
9065_ACEOF
9066
9067 echo "$as_me:$LINENO: result: yes" >&5
9068echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009069else
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 echo "$as_me:$LINENO: result: no" >&5
9071echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072fi
9073
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009074# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009075echo "$as_me:$LINENO: checking size of time_t" >&5
9076echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9077if test "${ac_cv_sizeof_time_t+set}" = set; then
9078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009079else
9080 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009081 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009082else
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 cat >conftest.$ac_ext <<_ACEOF
9084#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009085/* confdefs.h. */
9086_ACEOF
9087cat confdefs.h >>conftest.$ac_ext
9088cat >>conftest.$ac_ext <<_ACEOF
9089/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009090#include <stdio.h>
9091#include <time.h>
9092main()
9093{
9094 FILE *f=fopen("conftestval", "w");
9095 if (!f) exit(1);
9096 fprintf(f, "%d\n", sizeof(time_t));
9097 exit(0);
9098}
Martin v. Löwis11437992002-04-12 09:54:03 +00009099_ACEOF
9100rm -f conftest$ac_exeext
9101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9102 (eval $ac_link) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9107 (eval $ac_try) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009111 ac_cv_sizeof_time_t=`cat conftestval`
9112else
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117( exit $ac_status )
9118ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009119fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009120rm -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 +00009121fi
9122
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009123fi
9124
Martin v. Löwis11437992002-04-12 09:54:03 +00009125echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9126echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9127
9128cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009129#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009130_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009131
Michael W. Hudson54241132001-12-07 15:38:26 +00009132
9133
Trent Mick635f6fb2000-08-23 21:33:05 +00009134# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009135ac_save_cc="$CC"
9136if test "$ac_cv_kpthread" = "yes"
9137then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009138elif test "$ac_cv_kthread" = "yes"
9139then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009140elif test "$ac_cv_pthread" = "yes"
9141then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009142fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009143echo "$as_me:$LINENO: checking for pthread_t" >&5
9144echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009145have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009146cat >conftest.$ac_ext <<_ACEOF
9147#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009153#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009154int
9155main ()
9156{
Guido van Rossum12580492000-09-24 16:47:19 +00009157pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 ;
9159 return 0;
9160}
9161_ACEOF
9162rm -f conftest.$ac_objext
9163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9164 (eval $ac_compile) 2>&5
9165 ac_status=$?
9166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9167 (exit $ac_status); } &&
9168 { ac_try='test -s conftest.$ac_objext'
9169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9170 (eval $ac_try) 2>&5
9171 ac_status=$?
9172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9173 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009174 have_pthread_t=yes
9175else
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009177sed 's/^/| /' conftest.$ac_ext >&5
9178
Trent Mick635f6fb2000-08-23 21:33:05 +00009179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009180rm -f conftest.$ac_objext conftest.$ac_ext
9181echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9182echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009183if test "$have_pthread_t" = yes ; then
9184 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9186echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9187 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9188 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009189else
9190 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009191 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009192else
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 cat >conftest.$ac_ext <<_ACEOF
9194#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009195/* confdefs.h. */
9196_ACEOF
9197cat confdefs.h >>conftest.$ac_ext
9198cat >>conftest.$ac_ext <<_ACEOF
9199/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009200#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009201#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009202 main()
9203 {
9204 FILE *f=fopen("conftestval", "w");
9205 if (!f) exit(1);
9206 fprintf(f, "%d\n", sizeof(pthread_t));
9207 exit(0);
9208 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009209_ACEOF
9210rm -f conftest$ac_exeext
9211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9212 (eval $ac_link) 2>&5
9213 ac_status=$?
9214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9217 (eval $ac_try) 2>&5
9218 ac_status=$?
9219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9220 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009221 ac_cv_sizeof_pthread_t=`cat conftestval`
9222else
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 echo "$as_me: program exited with status $ac_status" >&5
9224echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009225sed 's/^/| /' conftest.$ac_ext >&5
9226
Martin v. Löwis11437992002-04-12 09:54:03 +00009227( exit $ac_status )
9228ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009229fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009230rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009231fi
9232
Trent Mick635f6fb2000-08-23 21:33:05 +00009233fi
9234
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9236echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9237
9238cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009239#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009240_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009241
9242fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009243CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009244
Martin v. Löwis11437992002-04-12 09:54:03 +00009245echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9246echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009247# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9248if test "${enable_toolbox_glue+set}" = set; then
9249 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009250
Martin v. Löwis11437992002-04-12 09:54:03 +00009251fi;
Jack Jansene578a632001-08-15 01:27:14 +00009252
9253if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009254then
Jack Jansene578a632001-08-15 01:27:14 +00009255 case $ac_sys_system/$ac_sys_release in
9256 Darwin/*)
9257 enable_toolbox_glue="yes";;
9258 *)
9259 enable_toolbox_glue="no";;
9260 esac
9261fi
9262case "$enable_toolbox_glue" in
9263yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009264 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009265 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009266 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009267
9268cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009269#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009270_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009271
9272 ;;
9273*)
9274 extra_frameworks=""
9275 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009276 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009277 ;;
9278esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009279echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9280echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009281
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009282
9283case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009284 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009285 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009286 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009289 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009290 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009291 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009292 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009293 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294esac
9295
Martin v. Löwis11437992002-04-12 09:54:03 +00009296echo "$as_me:$LINENO: checking for --enable-framework" >&5
9297echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009298if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009299then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009300 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009302 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303
Martin v. Löwis11437992002-04-12 09:54:03 +00009304cat >>confdefs.h <<\_ACEOF
9305#define WITH_NEXT_FRAMEWORK 1
9306_ACEOF
9307
9308 echo "$as_me:$LINENO: result: yes" >&5
9309echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009310else
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 echo "$as_me:$LINENO: result: no" >&5
9312echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009313fi
9314
Martin v. Löwis11437992002-04-12 09:54:03 +00009315echo "$as_me:$LINENO: checking for dyld" >&5
9316echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009317case $ac_sys_system/$ac_sys_release in
9318 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009319
Martin v. Löwis11437992002-04-12 09:54:03 +00009320cat >>confdefs.h <<\_ACEOF
9321#define WITH_DYLD 1
9322_ACEOF
9323
9324 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9325echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009326 ;;
9327 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 echo "$as_me:$LINENO: result: no" >&5
9329echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009330 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009331esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009332
Guido van Rossum0a516c91994-09-12 10:58:40 +00009333# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334
Michael W. Hudson54241132001-12-07 15:38:26 +00009335
9336
9337
9338
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009340# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009341echo "$as_me:$LINENO: checking SO" >&5
9342echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009343if test -z "$SO"
9344then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009345 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009346 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009347 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009348 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009349 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009350else
9351 # this might also be a termcap variable, see #610332
9352 echo
9353 echo '====================================================================='
9354 echo '+ +'
9355 echo '+ WARNING: You have set SO in your environment. +'
9356 echo '+ Do you really mean to change the extension for shared libraries? +'
9357 echo '+ Continuing in 10 seconds to let you to ponder. +'
9358 echo '+ +'
9359 echo '====================================================================='
9360 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009362echo "$as_me:$LINENO: result: $SO" >&5
9363echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009365# -- "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 +00009366# (Shared libraries in this instance are shared modules to be loaded into
9367# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009368echo "$as_me:$LINENO: checking LDSHARED" >&5
9369echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009370if test -z "$LDSHARED"
9371then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009372 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009373 AIX*)
9374 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009375 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009376 ;;
9377 BeOS*)
9378 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009379 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009380 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009381 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009382 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009385 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009386 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009387 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009388 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009389 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009390 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009391 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009392 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9393 if test "$enable_framework" ; then
9394 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009395 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9396 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009397 else
9398 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009399 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009400 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009401 Darwin/*)
9402 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9403 if test "$enable_framework" ; then
9404 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009405 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9406 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009407 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009408 # No framework, use the Python app as bundle-loader
9409 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009410 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009411 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009412 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009413 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009414 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009415 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009416 then
9417 LDSHARED="cc -shared ${LDFLAGS}"
9418 else
9419 LDSHARED="ld -Bshareable ${LDFLAGS}"
9420 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009421 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009422 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009423 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009424 then LDSHARED='$(CC) -shared'
9425 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009426 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009427 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009428 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009429 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009430 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431 *) LDSHARED="ld";;
9432 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009434echo "$as_me:$LINENO: result: $LDSHARED" >&5
9435echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009436BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009437# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009438# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009439echo "$as_me:$LINENO: checking CCSHARED" >&5
9440echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009441if test -z "$CCSHARED"
9442then
Guido van Rossum07397971997-04-29 21:49:50 +00009443 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009444 SunOS*) if test "$GCC" = yes;
9445 then CCSHARED="-fPIC";
9446 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009447 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009448 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009449 else CCSHARED="+z";
9450 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009451 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009452 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009453 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009454 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009455 if test "$GCC" = "yes"
9456 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009457 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009458 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009459 SCO_SV*)
9460 if test "$GCC" = "yes"
9461 then CCSHARED="-fPIC"
9462 else CCSHARED="-Kpic -belf"
9463 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009464 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009465 IRIX*/6*) case $CC in
9466 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009467 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009468 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009469 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009472echo "$as_me:$LINENO: result: $CCSHARED" >&5
9473echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009475# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009476echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9477echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009478if test -z "$LINKFORSHARED"
9479then
Guido van Rossum07397971997-04-29 21:49:50 +00009480 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009481 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009482 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009483 LINKFORSHARED="-Wl,-E -Wl,+s";;
9484# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009485 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009486 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009487 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009489 # -u __dummy makes the linker aware of the objc runtime
9490 # in System.framework; otherwise, __objcInit (referenced in
9491 # crt1.o) gets erroneously defined as common, which breaks dynamic
9492 # loading of any modules which reference it in System.framework.
9493 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9494 # not used by the core itself but which needs to be in the core so
9495 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009496 # -prebind is no longer used, because it actually seems to give a
9497 # slowdown in stead of a speedup, maybe due to the large number of
9498 # dynamic loads Python does.
9499 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009500 if test "$enable_framework"
9501 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009502 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009503 fi
9504 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009505 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009506 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009507 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009509 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9510 then
9511 LINKFORSHARED="-Wl,--export-dynamic"
9512 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009513 SunOS/5*) case $CC in
9514 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009515 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009516 then
9517 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009518 fi;;
9519 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009520 CYGWIN*)
9521 if test $enable_shared = "no"
9522 then
9523 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9524 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009527echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9528echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529
Michael W. Hudson54241132001-12-07 15:38:26 +00009530
Martin v. Löwis11437992002-04-12 09:54:03 +00009531echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9532echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009533if test ! "$LIBRARY" = "$LDLIBRARY"
9534then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009535 case $ac_sys_system in
9536 CYGWIN*)
9537 # Cygwin needs CCSHARED when building extension DLLs
9538 # but not when building the interpreter DLL.
9539 CFLAGSFORSHARED='';;
9540 *)
9541 CFLAGSFORSHARED='$(CCSHARED)'
9542 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009544echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9545echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009546
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009547# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9548# library (with --enable-shared).
9549# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009550# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9551# if it is not required, since it creates a dependency of the shared library
9552# to LIBS. This, in turn, means that applications linking the shared libpython
9553# don't need to link LIBS explicitly. The default should be only changed
9554# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009555
9556echo "$as_me:$LINENO: checking SHLIBS" >&5
9557echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9558case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009559 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009560 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561esac
9562echo "$as_me:$LINENO: result: $SHLIBS" >&5
9563echo "${ECHO_T}$SHLIBS" >&6
9564
9565
Guido van Rossum627b2d71993-12-24 10:39:16 +00009566# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009567
9568echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9569echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9570if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009572else
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009574LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009575cat >conftest.$ac_ext <<_ACEOF
9576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* confdefs.h. */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009582
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009583/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584#ifdef __cplusplus
9585extern "C"
9586#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009587/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 builtin and then its argument prototype would still apply. */
9589char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009590int
9591main ()
9592{
9593dlopen ();
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext conftest$ac_exeext
9599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9600 (eval $ac_link) 2>&5
9601 ac_status=$?
9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603 (exit $ac_status); } &&
9604 { ac_try='test -s conftest$ac_exeext'
9605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9606 (eval $ac_try) 2>&5
9607 ac_status=$?
9608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9609 (exit $ac_status); }; }; then
9610 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009613sed 's/^/| /' conftest.$ac_ext >&5
9614
Martin v. Löwis11437992002-04-12 09:54:03 +00009615ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009620echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9621echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9622if test $ac_cv_lib_dl_dlopen = yes; then
9623 cat >>confdefs.h <<_ACEOF
9624#define HAVE_LIBDL 1
9625_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009626
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009627 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629fi
9630 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009631
9632echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9633echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9634if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9635 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009636else
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009638LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009639cat >conftest.$ac_ext <<_ACEOF
9640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* confdefs.h. */
9642_ACEOF
9643cat confdefs.h >>conftest.$ac_ext
9644cat >>conftest.$ac_ext <<_ACEOF
9645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009646
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009647/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648#ifdef __cplusplus
9649extern "C"
9650#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009651/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 builtin and then its argument prototype would still apply. */
9653char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009654int
9655main ()
9656{
9657shl_load ();
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662rm -f conftest.$ac_objext conftest$ac_exeext
9663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9664 (eval $ac_link) 2>&5
9665 ac_status=$?
9666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667 (exit $ac_status); } &&
9668 { ac_try='test -s conftest$ac_exeext'
9669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9670 (eval $ac_try) 2>&5
9671 ac_status=$?
9672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673 (exit $ac_status); }; }; then
9674 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009677sed 's/^/| /' conftest.$ac_ext >&5
9678
Martin v. Löwis11437992002-04-12 09:54:03 +00009679ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009681rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009684echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9685echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9686if test $ac_cv_lib_dld_shl_load = yes; then
9687 cat >>confdefs.h <<_ACEOF
9688#define HAVE_LIBDLD 1
9689_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009691 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009693fi
9694 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009695
9696# only check for sem_ini if thread support is requested
9697if test "$with_threads" = "yes" -o -z "$with_threads"; then
9698 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009699echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9700if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009702else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009703 ac_func_search_save_LIBS=$LIBS
9704ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009705cat >conftest.$ac_ext <<_ACEOF
9706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009707/* confdefs.h. */
9708_ACEOF
9709cat confdefs.h >>conftest.$ac_ext
9710cat >>conftest.$ac_ext <<_ACEOF
9711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009713/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714#ifdef __cplusplus
9715extern "C"
9716#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009717/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 builtin and then its argument prototype would still apply. */
9719char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009720int
9721main ()
9722{
9723sem_init ();
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728rm -f conftest.$ac_objext conftest$ac_exeext
9729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9730 (eval $ac_link) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); } &&
9734 { ac_try='test -s conftest$ac_exeext'
9735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9736 (eval $ac_try) 2>&5
9737 ac_status=$?
9738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009740 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009741else
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009743sed 's/^/| /' conftest.$ac_ext >&5
9744
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009746rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009747if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009748 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009749 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9750 cat >conftest.$ac_ext <<_ACEOF
9751#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009757
9758/* Override any gcc2 internal prototype to avoid an error. */
9759#ifdef __cplusplus
9760extern "C"
9761#endif
9762/* We use char because int might match the return type of a gcc2
9763 builtin and then its argument prototype would still apply. */
9764char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009765int
9766main ()
9767{
9768sem_init ();
9769 ;
9770 return 0;
9771}
Martin v. Löwis11437992002-04-12 09:54:03 +00009772_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781 (eval $ac_try) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
9785 ac_cv_search_sem_init="-l$ac_lib"
9786break
9787else
9788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009789sed 's/^/| /' conftest.$ac_ext >&5
9790
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009791fi
9792rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9793 done
9794fi
9795LIBS=$ac_func_search_save_LIBS
9796fi
9797echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9798echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9799if test "$ac_cv_search_sem_init" != no; then
9800 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009801
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009802fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009803 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009804 # posix4 on Solaris 2.6
9805 # pthread (first!) on Linux
9806fi
9807
Martin v. Löwis19d17342003-06-14 21:03:05 +00009808# check if we need libintl for locale functions
9809echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9810echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9811if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9812 echo $ECHO_N "(cached) $ECHO_C" >&6
9813else
9814 ac_check_lib_save_LIBS=$LIBS
9815LIBS="-lintl $LIBS"
9816cat >conftest.$ac_ext <<_ACEOF
9817#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009818/* confdefs.h. */
9819_ACEOF
9820cat confdefs.h >>conftest.$ac_ext
9821cat >>conftest.$ac_ext <<_ACEOF
9822/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009823
9824/* Override any gcc2 internal prototype to avoid an error. */
9825#ifdef __cplusplus
9826extern "C"
9827#endif
9828/* We use char because int might match the return type of a gcc2
9829 builtin and then its argument prototype would still apply. */
9830char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009831int
9832main ()
9833{
9834textdomain ();
9835 ;
9836 return 0;
9837}
9838_ACEOF
9839rm -f conftest.$ac_objext conftest$ac_exeext
9840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9841 (eval $ac_link) 2>&5
9842 ac_status=$?
9843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844 (exit $ac_status); } &&
9845 { ac_try='test -s conftest$ac_exeext'
9846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9847 (eval $ac_try) 2>&5
9848 ac_status=$?
9849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850 (exit $ac_status); }; }; then
9851 ac_cv_lib_intl_textdomain=yes
9852else
9853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Martin v. Löwis19d17342003-06-14 21:03:05 +00009856ac_cv_lib_intl_textdomain=no
9857fi
9858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9859LIBS=$ac_check_lib_save_LIBS
9860fi
9861echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9862echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9863if test $ac_cv_lib_intl_textdomain = yes; then
9864
9865cat >>confdefs.h <<\_ACEOF
9866#define WITH_LIBINTL 1
9867_ACEOF
9868
9869fi
9870
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009871
9872# checks for system dependent C++ extensions support
9873case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9875echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9876 cat >conftest.$ac_ext <<_ACEOF
9877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* confdefs.h. */
9879_ACEOF
9880cat confdefs.h >>conftest.$ac_ext
9881cat >>conftest.$ac_ext <<_ACEOF
9882/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009883#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009884int
9885main ()
9886{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009887loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ;
9889 return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext conftest$ac_exeext
9893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9894 (eval $ac_link) 2>&5
9895 ac_status=$?
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897 (exit $ac_status); } &&
9898 { ac_try='test -s conftest$ac_exeext'
9899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9900 (eval $ac_try) 2>&5
9901 ac_status=$?
9902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9903 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009904
Martin v. Löwis11437992002-04-12 09:54:03 +00009905cat >>confdefs.h <<\_ACEOF
9906#define AIX_GENUINE_CPLUSPLUS 1
9907_ACEOF
9908
9909 echo "$as_me:$LINENO: result: yes" >&5
9910echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009911else
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009913sed 's/^/| /' conftest.$ac_ext >&5
9914
Martin v. Löwis11437992002-04-12 09:54:03 +00009915echo "$as_me:$LINENO: result: no" >&5
9916echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009918rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009919 *) ;;
9920esac
9921
Guido van Rossum70c7f481998-03-26 18:44:10 +00009922# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009923# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9925echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9926if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009928else
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009930LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009931cat >conftest.$ac_ext <<_ACEOF
9932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009933/* confdefs.h. */
9934_ACEOF
9935cat confdefs.h >>conftest.$ac_ext
9936cat >>conftest.$ac_ext <<_ACEOF
9937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009940#ifdef __cplusplus
9941extern "C"
9942#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 builtin and then its argument prototype would still apply. */
9945char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009946int
9947main ()
9948{
9949t_open ();
9950 ;
9951 return 0;
9952}
9953_ACEOF
9954rm -f conftest.$ac_objext conftest$ac_exeext
9955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9956 (eval $ac_link) 2>&5
9957 ac_status=$?
9958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9959 (exit $ac_status); } &&
9960 { ac_try='test -s conftest$ac_exeext'
9961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9962 (eval $ac_try) 2>&5
9963 ac_status=$?
9964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9965 (exit $ac_status); }; }; then
9966 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009967else
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009969sed 's/^/| /' conftest.$ac_ext >&5
9970
Martin v. Löwis11437992002-04-12 09:54:03 +00009971ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9974LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009976echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9977echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9978if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009979 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009980fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009981 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009982echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9983echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9984if test "${ac_cv_lib_socket_socket+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009986else
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009988LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009989cat >conftest.$ac_ext <<_ACEOF
9990#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009996
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998#ifdef __cplusplus
9999extern "C"
10000#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 builtin and then its argument prototype would still apply. */
10003char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010004int
10005main ()
10006{
10007socket ();
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext conftest$ac_exeext
10013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10014 (eval $ac_link) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest$ac_exeext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
10024 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010027sed 's/^/| /' conftest.$ac_ext >&5
10028
Martin v. Löwis11437992002-04-12 09:54:03 +000010029ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010031rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10032LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010034echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10035echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10036if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010037 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010038fi
10039 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010040
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010041case "$ac_sys_system" in
10042BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010043echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10044echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10045if test "${ac_cv_lib_net_socket+set}" = set; then
10046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010049LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010050cat >conftest.$ac_ext <<_ACEOF
10051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010052/* confdefs.h. */
10053_ACEOF
10054cat confdefs.h >>conftest.$ac_ext
10055cat >>conftest.$ac_ext <<_ACEOF
10056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010057
Guido van Rossumad678af1998-10-02 14:42:15 +000010058/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010059#ifdef __cplusplus
10060extern "C"
10061#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010062/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 builtin and then its argument prototype would still apply. */
10064char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010065int
10066main ()
10067{
10068socket ();
10069 ;
10070 return 0;
10071}
10072_ACEOF
10073rm -f conftest.$ac_objext conftest$ac_exeext
10074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10075 (eval $ac_link) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); } &&
10079 { ac_try='test -s conftest$ac_exeext'
10080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10081 (eval $ac_try) 2>&5
10082 ac_status=$?
10083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10084 (exit $ac_status); }; }; then
10085 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010086else
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010088sed 's/^/| /' conftest.$ac_ext >&5
10089
Martin v. Löwis11437992002-04-12 09:54:03 +000010090ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10093LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010095echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10096echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10097if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010098 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010099fi
10100 # BeOS
10101;;
10102esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010103
Martin v. Löwis11437992002-04-12 09:54:03 +000010104echo "$as_me:$LINENO: checking for --with-libs" >&5
10105echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10106
Guido van Rossuma68acba1996-07-31 17:36:39 +000010107# Check whether --with-libs or --without-libs was given.
10108if test "${with_libs+set}" = set; then
10109 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
10111echo "$as_me:$LINENO: result: $withval" >&5
10112echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010113LIBS="$withval $LIBS"
10114
10115else
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 echo "$as_me:$LINENO: result: no" >&5
10117echo "${ECHO_T}no" >&6
10118fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010119
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010120# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010121
10122
Martin v. Löwis11437992002-04-12 09:54:03 +000010123echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10124echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10125
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010126# Check whether --with-signal-module or --without-signal-module was given.
10127if test "${with_signal_module+set}" = set; then
10128 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010129
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010131
10132if test -z "$with_signal_module"
10133then with_signal_module="yes"
10134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010135echo "$as_me:$LINENO: result: $with_signal_module" >&5
10136echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010137
10138if test "${with_signal_module}" = "yes"; then
10139 USE_SIGNAL_MODULE=""
10140 SIGNAL_OBJS=""
10141else
10142 USE_SIGNAL_MODULE="#"
10143 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10144fi
10145
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010146# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010147
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010148USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010149
Martin v. Löwis11437992002-04-12 09:54:03 +000010150echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10151echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10152
Guido van Rossumec2f0731997-01-22 20:54:01 +000010153
10154# Check whether --with-dec-threads or --without-dec-threads was given.
10155if test "${with_dec_threads+set}" = set; then
10156 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010157
10158echo "$as_me:$LINENO: result: $withval" >&5
10159echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010160LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010161if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010162 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010163fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010164else
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 echo "$as_me:$LINENO: result: no" >&5
10166echo "${ECHO_T}no" >&6
10167fi;
10168
10169# Templates for things AC_DEFINEd more than once.
10170# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010171
10172
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
10174
10175
10176
10177
10178echo "$as_me:$LINENO: checking for --with-threads" >&5
10179echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10180
Guido van Rossumec2f0731997-01-22 20:54:01 +000010181# Check whether --with-threads or --without-threads was given.
10182if test "${with_threads+set}" = set; then
10183 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010184
Martin v. Löwis11437992002-04-12 09:54:03 +000010185fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010186
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010187# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010189# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010190if test "${with_thread+set}" = set; then
10191 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010192 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010193fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010194
10195if test -z "$with_threads"
10196then with_threads="yes"
10197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010198echo "$as_me:$LINENO: result: $with_threads" >&5
10199echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010200
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010201
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010202if test "$with_threads" = "no"
10203then
10204 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205elif test "$ac_cv_pthread_is_default" = yes
10206then
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010208#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010209_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010210
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010211 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010213#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010214_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010215
10216 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010218elif test "$ac_cv_kpthread" = "yes"
10219then
10220 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010221 if test "$ac_cv_cxx_thread" = "yes"; then
10222 CXX="$CXX -Kpthread"
10223 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010225#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010227
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010228 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010229 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010230elif test "$ac_cv_kthread" = "yes"
10231then
10232 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010233 if test "$ac_cv_cxx_thread" = "yes"; then
10234 CXX="$CXX -Kthread"
10235 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010236 cat >>confdefs.h <<\_ACEOF
10237#define WITH_THREAD 1
10238_ACEOF
10239
10240 posix_threads=yes
10241 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010242elif test "$ac_cv_pthread" = "yes"
10243then
10244 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010245 if test "$ac_cv_cxx_thread" = "yes"; then
10246 CXX="$CXX -pthread"
10247 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010248 cat >>confdefs.h <<\_ACEOF
10249#define WITH_THREAD 1
10250_ACEOF
10251
10252 posix_threads=yes
10253 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010254else
10255 if test ! -z "$with_threads" -a -d "$with_threads"
10256 then LDFLAGS="$LDFLAGS -L$with_threads"
10257 fi
10258 if test ! -z "$withval" -a -d "$withval"
10259 then LDFLAGS="$LDFLAGS -L$withval"
10260 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261
10262 # According to the POSIX spec, a pthreads implementation must
10263 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10265echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10266 cat >conftest.$ac_ext <<_ACEOF
10267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010273
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010275#ifdef _POSIX_THREADS
10276yes
10277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
10279_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010281 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282 unistd_defines_pthreads=yes
10283else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284 unistd_defines_pthreads=no
10285fi
10286rm -f conftest*
10287
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10289echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010290
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010292#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010294
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 if test "${ac_cv_header_cthreads_h+set}" = set; then
10296 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10297echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10298if test "${ac_cv_header_cthreads_h+set}" = set; then
10299 echo $ECHO_N "(cached) $ECHO_C" >&6
10300fi
10301echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10302echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 # Is the header compilable?
10305echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10306echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10307cat >conftest.$ac_ext <<_ACEOF
10308#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* confdefs.h. */
10310_ACEOF
10311cat confdefs.h >>conftest.$ac_ext
10312cat >>conftest.$ac_ext <<_ACEOF
10313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314$ac_includes_default
10315#include <cthreads.h>
10316_ACEOF
10317rm -f conftest.$ac_objext
10318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10319 (eval $ac_compile) 2>&5
10320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); } &&
10323 { ac_try='test -s conftest.$ac_objext'
10324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10325 (eval $ac_try) 2>&5
10326 ac_status=$?
10327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328 (exit $ac_status); }; }; then
10329 ac_header_compiler=yes
10330else
10331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010332sed 's/^/| /' conftest.$ac_ext >&5
10333
Martin v. Löwis11437992002-04-12 09:54:03 +000010334ac_header_compiler=no
10335fi
10336rm -f conftest.$ac_objext conftest.$ac_ext
10337echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10338echo "${ECHO_T}$ac_header_compiler" >&6
10339
10340# Is the header present?
10341echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10342echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10343cat >conftest.$ac_ext <<_ACEOF
10344#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010345/* confdefs.h. */
10346_ACEOF
10347cat confdefs.h >>conftest.$ac_ext
10348cat >>conftest.$ac_ext <<_ACEOF
10349/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010350#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010351_ACEOF
10352if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10353 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10354 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010355 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 rm -f conftest.er1
10357 cat conftest.err >&5
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); } >/dev/null; then
10360 if test -s conftest.err; then
10361 ac_cpp_err=$ac_c_preproc_warn_flag
10362 else
10363 ac_cpp_err=
10364 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010365else
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ac_cpp_err=yes
10367fi
10368if test -z "$ac_cpp_err"; then
10369 ac_header_preproc=yes
10370else
10371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010372sed 's/^/| /' conftest.$ac_ext >&5
10373
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010376rm -f conftest.err conftest.$ac_ext
10377echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10378echo "${ECHO_T}$ac_header_preproc" >&6
10379
10380# So? What about this header?
10381case $ac_header_compiler:$ac_header_preproc in
10382 yes:no )
10383 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10384echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10385 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010386echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10387 (
10388 cat <<\_ASBOX
10389## ------------------------------------ ##
10390## Report this to bug-autoconf@gnu.org. ##
10391## ------------------------------------ ##
10392_ASBOX
10393 ) |
10394 sed "s/^/$as_me: WARNING: /" >&2
10395 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 no:yes )
10397 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10398echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10399 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10400echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10401 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010402echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10403 (
10404 cat <<\_ASBOX
10405## ------------------------------------ ##
10406## Report this to bug-autoconf@gnu.org. ##
10407## ------------------------------------ ##
10408_ASBOX
10409 ) |
10410 sed "s/^/$as_me: WARNING: /" >&2
10411 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010412esac
10413echo "$as_me:$LINENO: checking for cthreads.h" >&5
10414echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10415if test "${ac_cv_header_cthreads_h+set}" = set; then
10416 echo $ECHO_N "(cached) $ECHO_C" >&6
10417else
10418 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010420echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10421echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10422
10423fi
10424if test $ac_cv_header_cthreads_h = yes; then
10425 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010426#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010428
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010430#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010431_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010432
Martin v. Löwis11437992002-04-12 09:54:03 +000010433
10434cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010435#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010436_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010437
10438 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010439 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010440else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010441
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10443 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10444echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10445if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10446 echo $ECHO_N "(cached) $ECHO_C" >&6
10447fi
10448echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10449echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010450else
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 # Is the header compilable?
10452echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10453echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10454cat >conftest.$ac_ext <<_ACEOF
10455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010461$ac_includes_default
10462#include <mach/cthreads.h>
10463_ACEOF
10464rm -f conftest.$ac_objext
10465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10466 (eval $ac_compile) 2>&5
10467 ac_status=$?
10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10469 (exit $ac_status); } &&
10470 { ac_try='test -s conftest.$ac_objext'
10471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10472 (eval $ac_try) 2>&5
10473 ac_status=$?
10474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10475 (exit $ac_status); }; }; then
10476 ac_header_compiler=yes
10477else
10478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010479sed 's/^/| /' conftest.$ac_ext >&5
10480
Martin v. Löwis11437992002-04-12 09:54:03 +000010481ac_header_compiler=no
10482fi
10483rm -f conftest.$ac_objext conftest.$ac_ext
10484echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10485echo "${ECHO_T}$ac_header_compiler" >&6
10486
10487# Is the header present?
10488echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10489echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10490cat >conftest.$ac_ext <<_ACEOF
10491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* confdefs.h. */
10493_ACEOF
10494cat confdefs.h >>conftest.$ac_ext
10495cat >>conftest.$ac_ext <<_ACEOF
10496/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010497#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
10499if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10501 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010502 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 rm -f conftest.er1
10504 cat conftest.err >&5
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); } >/dev/null; then
10507 if test -s conftest.err; then
10508 ac_cpp_err=$ac_c_preproc_warn_flag
10509 else
10510 ac_cpp_err=
10511 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 ac_cpp_err=yes
10514fi
10515if test -z "$ac_cpp_err"; then
10516 ac_header_preproc=yes
10517else
10518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010519sed 's/^/| /' conftest.$ac_ext >&5
10520
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010523rm -f conftest.err conftest.$ac_ext
10524echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10525echo "${ECHO_T}$ac_header_preproc" >&6
10526
10527# So? What about this header?
10528case $ac_header_compiler:$ac_header_preproc in
10529 yes:no )
10530 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10531echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10532 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010533echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10534 (
10535 cat <<\_ASBOX
10536## ------------------------------------ ##
10537## Report this to bug-autoconf@gnu.org. ##
10538## ------------------------------------ ##
10539_ASBOX
10540 ) |
10541 sed "s/^/$as_me: WARNING: /" >&2
10542 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 no:yes )
10544 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10545echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10546 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10547echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10548 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010549echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10550 (
10551 cat <<\_ASBOX
10552## ------------------------------------ ##
10553## Report this to bug-autoconf@gnu.org. ##
10554## ------------------------------------ ##
10555_ASBOX
10556 ) |
10557 sed "s/^/$as_me: WARNING: /" >&2
10558 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010559esac
10560echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10561echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10562if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10563 echo $ECHO_N "(cached) $ECHO_C" >&6
10564else
10565 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010567echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10568echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10569
10570fi
10571if test $ac_cv_header_mach_cthreads_h = yes; then
10572 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010573#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010574_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010575
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010577#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010578_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010579
Martin v. Löwis11437992002-04-12 09:54:03 +000010580
10581cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010582#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010584
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010585 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010586else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010587
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 echo "$as_me:$LINENO: checking for --with-pth" >&5
10589echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10590
10591# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010592if test "${with_pth+set}" = set; then
10593 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010594 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010595echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010596 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010597#define WITH_THREAD 1
10598_ACEOF
10599
10600
10601cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010602#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010603_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010604
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010605 LIBS="-lpth $LIBS"
10606 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010607else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010608 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010609echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010610
10611 # Just looking for pthread_create in libpthread is not enough:
10612 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10613 # So we really have to include pthread.h, and then link.
10614 _libs=$LIBS
10615 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10617echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10618 cat >conftest.$ac_ext <<_ACEOF
10619#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010625#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010626
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010627void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010628int
10629main ()
10630{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010631
10632pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext conftest$ac_exeext
10638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10639 (eval $ac_link) 2>&5
10640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); } &&
10643 { ac_try='test -s conftest$ac_exeext'
10644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10645 (eval $ac_try) 2>&5
10646 ac_status=$?
10647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648 (exit $ac_status); }; }; then
10649
10650 echo "$as_me:$LINENO: result: yes" >&5
10651echo "${ECHO_T}yes" >&6
10652 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010653#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010655
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010656 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010657 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010658else
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010660sed 's/^/| /' conftest.$ac_ext >&5
10661
Martin v. Löwis11437992002-04-12 09:54:03 +000010662
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010663 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10665echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10666if test "${ac_cv_func_pthread_detach+set}" = set; then
10667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 cat >conftest.$ac_ext <<_ACEOF
10670#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* confdefs.h. */
10672_ACEOF
10673cat confdefs.h >>conftest.$ac_ext
10674cat >>conftest.$ac_ext <<_ACEOF
10675/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010676/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010677 which can conflict with char pthread_detach (); below.
10678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010679 <limits.h> exists even on freestanding compilers. Under hpux,
10680 including <limits.h> includes <sys/time.h> and causes problems
10681 checking for functions defined therein. */
10682#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010683# include <limits.h>
10684#else
10685# include <assert.h>
10686#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010687/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688#ifdef __cplusplus
10689extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010690{
Martin v. Löwis11437992002-04-12 09:54:03 +000010691#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010692/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 builtin and then its argument prototype would still apply. */
10694char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010695/* The GNU C library defines this for functions which it implements
10696 to always fail with ENOSYS. Some functions are actually named
10697 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010698#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010699choke me
10700#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010701char (*f) () = pthread_detach;
10702#endif
10703#ifdef __cplusplus
10704}
Guido van Rossumad678af1998-10-02 14:42:15 +000010705#endif
10706
Skip Montanaro6dead952003-09-25 14:50:04 +000010707int
10708main ()
10709{
10710return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext conftest$ac_exeext
10716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10717 (eval $ac_link) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest$ac_exeext'
10722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010730sed 's/^/| /' conftest.$ac_ext >&5
10731
Martin v. Löwis11437992002-04-12 09:54:03 +000010732ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010734rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010736echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10737echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10738if test $ac_cv_func_pthread_detach = yes; then
10739 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010740#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010741_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010742
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010743 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010744 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010745else
Guido van Rossumad678af1998-10-02 14:42:15 +000010746
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010747 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10748 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10749echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10750if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
10752fi
10753echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10754echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10755else
10756 # Is the header compilable?
10757echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10758echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10759cat >conftest.$ac_ext <<_ACEOF
10760#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* confdefs.h. */
10762_ACEOF
10763cat confdefs.h >>conftest.$ac_ext
10764cat >>conftest.$ac_ext <<_ACEOF
10765/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010766$ac_includes_default
10767#include <atheos/threads.h>
10768_ACEOF
10769rm -f conftest.$ac_objext
10770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10771 (eval $ac_compile) 2>&5
10772 ac_status=$?
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); } &&
10775 { ac_try='test -s conftest.$ac_objext'
10776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10777 (eval $ac_try) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); }; }; then
10781 ac_header_compiler=yes
10782else
10783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010784sed 's/^/| /' conftest.$ac_ext >&5
10785
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010786ac_header_compiler=no
10787fi
10788rm -f conftest.$ac_objext conftest.$ac_ext
10789echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10790echo "${ECHO_T}$ac_header_compiler" >&6
10791
10792# Is the header present?
10793echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10794echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10795cat >conftest.$ac_ext <<_ACEOF
10796#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* confdefs.h. */
10798_ACEOF
10799cat confdefs.h >>conftest.$ac_ext
10800cat >>conftest.$ac_ext <<_ACEOF
10801/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010802#include <atheos/threads.h>
10803_ACEOF
10804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010808 rm -f conftest.er1
10809 cat conftest.err >&5
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10811 (exit $ac_status); } >/dev/null; then
10812 if test -s conftest.err; then
10813 ac_cpp_err=$ac_c_preproc_warn_flag
10814 else
10815 ac_cpp_err=
10816 fi
10817else
10818 ac_cpp_err=yes
10819fi
10820if test -z "$ac_cpp_err"; then
10821 ac_header_preproc=yes
10822else
10823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010824sed 's/^/| /' conftest.$ac_ext >&5
10825
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010826 ac_header_preproc=no
10827fi
10828rm -f conftest.err conftest.$ac_ext
10829echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10830echo "${ECHO_T}$ac_header_preproc" >&6
10831
10832# So? What about this header?
10833case $ac_header_compiler:$ac_header_preproc in
10834 yes:no )
10835 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10836echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10837 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010838echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10839 (
10840 cat <<\_ASBOX
10841## ------------------------------------ ##
10842## Report this to bug-autoconf@gnu.org. ##
10843## ------------------------------------ ##
10844_ASBOX
10845 ) |
10846 sed "s/^/$as_me: WARNING: /" >&2
10847 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010848 no:yes )
10849 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10850echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10851 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10852echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10853 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010854echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10855 (
10856 cat <<\_ASBOX
10857## ------------------------------------ ##
10858## Report this to bug-autoconf@gnu.org. ##
10859## ------------------------------------ ##
10860_ASBOX
10861 ) |
10862 sed "s/^/$as_me: WARNING: /" >&2
10863 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010864esac
10865echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10866echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10867if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10868 echo $ECHO_N "(cached) $ECHO_C" >&6
10869else
10870 ac_cv_header_atheos_threads_h=$ac_header_preproc
10871fi
10872echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10873echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10874
10875fi
10876if test $ac_cv_header_atheos_threads_h = yes; then
10877 cat >>confdefs.h <<\_ACEOF
10878#define WITH_THREAD 1
10879_ACEOF
10880
10881
10882cat >>confdefs.h <<\_ACEOF
10883#define ATHEOS_THREADS 1
10884_ACEOF
10885
10886 THREADOBJ="Python/thread.o"
10887else
10888
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10890 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10891echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10892if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10893 echo $ECHO_N "(cached) $ECHO_C" >&6
10894fi
10895echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10896echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010897else
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 # Is the header compilable?
10899echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10900echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10901cat >conftest.$ac_ext <<_ACEOF
10902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* confdefs.h. */
10904_ACEOF
10905cat confdefs.h >>conftest.$ac_ext
10906cat >>conftest.$ac_ext <<_ACEOF
10907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908$ac_includes_default
10909#include <kernel/OS.h>
10910_ACEOF
10911rm -f conftest.$ac_objext
10912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10913 (eval $ac_compile) 2>&5
10914 ac_status=$?
10915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); } &&
10917 { ac_try='test -s conftest.$ac_objext'
10918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10919 (eval $ac_try) 2>&5
10920 ac_status=$?
10921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10922 (exit $ac_status); }; }; then
10923 ac_header_compiler=yes
10924else
10925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010926sed 's/^/| /' conftest.$ac_ext >&5
10927
Martin v. Löwis11437992002-04-12 09:54:03 +000010928ac_header_compiler=no
10929fi
10930rm -f conftest.$ac_objext conftest.$ac_ext
10931echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10932echo "${ECHO_T}$ac_header_compiler" >&6
10933
10934# Is the header present?
10935echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10936echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10937cat >conftest.$ac_ext <<_ACEOF
10938#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010944#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010945_ACEOF
10946if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10947 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10948 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010949 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 rm -f conftest.er1
10951 cat conftest.err >&5
10952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953 (exit $ac_status); } >/dev/null; then
10954 if test -s conftest.err; then
10955 ac_cpp_err=$ac_c_preproc_warn_flag
10956 else
10957 ac_cpp_err=
10958 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010959else
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ac_cpp_err=yes
10961fi
10962if test -z "$ac_cpp_err"; then
10963 ac_header_preproc=yes
10964else
10965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010966sed 's/^/| /' conftest.$ac_ext >&5
10967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010970rm -f conftest.err conftest.$ac_ext
10971echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10972echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010973
Martin v. Löwis11437992002-04-12 09:54:03 +000010974# So? What about this header?
10975case $ac_header_compiler:$ac_header_preproc in
10976 yes:no )
10977 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10978echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10979 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010980echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10981 (
10982 cat <<\_ASBOX
10983## ------------------------------------ ##
10984## Report this to bug-autoconf@gnu.org. ##
10985## ------------------------------------ ##
10986_ASBOX
10987 ) |
10988 sed "s/^/$as_me: WARNING: /" >&2
10989 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 no:yes )
10991 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10992echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10993 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10994echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10995 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010996echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10997 (
10998 cat <<\_ASBOX
10999## ------------------------------------ ##
11000## Report this to bug-autoconf@gnu.org. ##
11001## ------------------------------------ ##
11002_ASBOX
11003 ) |
11004 sed "s/^/$as_me: WARNING: /" >&2
11005 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011006esac
11007echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11008echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11009if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11010 echo $ECHO_N "(cached) $ECHO_C" >&6
11011else
11012 ac_cv_header_kernel_OS_h=$ac_header_preproc
11013fi
11014echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11015echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11016
11017fi
11018if test $ac_cv_header_kernel_OS_h = yes; then
11019 cat >>confdefs.h <<\_ACEOF
11020#define WITH_THREAD 1
11021_ACEOF
11022
11023
11024cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011025#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011028 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011030
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11032echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11033if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035else
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011037LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011038cat >conftest.$ac_ext <<_ACEOF
11039#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
Greg Steinadf63d62000-07-05 10:38:09 +000011046/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011047#ifdef __cplusplus
11048extern "C"
11049#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011050/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 builtin and then its argument prototype would still apply. */
11052char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
11056pthread_create ();
11057 ;
11058 return 0;
11059}
11060_ACEOF
11061rm -f conftest.$ac_objext conftest$ac_exeext
11062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11063 (eval $ac_link) 2>&5
11064 ac_status=$?
11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066 (exit $ac_status); } &&
11067 { ac_try='test -s conftest$ac_exeext'
11068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11069 (eval $ac_try) 2>&5
11070 ac_status=$?
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); }; }; then
11073 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011074else
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011076sed 's/^/| /' conftest.$ac_ext >&5
11077
Martin v. Löwis11437992002-04-12 09:54:03 +000011078ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11081LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011083echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11084echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11085if test $ac_cv_lib_pthreads_pthread_create = yes; then
11086 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011087#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011089
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011090 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011091 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011092 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011093else
Greg Steinadf63d62000-07-05 10:38:09 +000011094
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11096echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11097if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11098 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011099else
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011101LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011102cat >conftest.$ac_ext <<_ACEOF
11103#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* confdefs.h. */
11105_ACEOF
11106cat confdefs.h >>conftest.$ac_ext
11107cat >>conftest.$ac_ext <<_ACEOF
11108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011109
Guido van Rossum49545951997-12-02 19:28:29 +000011110/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011111#ifdef __cplusplus
11112extern "C"
11113#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011114/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 builtin and then its argument prototype would still apply. */
11116char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
11120pthread_create ();
11121 ;
11122 return 0;
11123}
11124_ACEOF
11125rm -f conftest.$ac_objext conftest$ac_exeext
11126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11127 (eval $ac_link) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); } &&
11131 { ac_try='test -s conftest$ac_exeext'
11132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11133 (eval $ac_try) 2>&5
11134 ac_status=$?
11135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136 (exit $ac_status); }; }; then
11137 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011138else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011147echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11148echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11149if test $ac_cv_lib_c_r_pthread_create = yes; then
11150 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011151#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011152_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011154 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011155 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011156 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011157else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11160echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11161if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011163else
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011165LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011166cat >conftest.$ac_ext <<_ACEOF
11167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* confdefs.h. */
11169_ACEOF
11170cat confdefs.h >>conftest.$ac_ext
11171cat >>conftest.$ac_ext <<_ACEOF
11172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011174/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011175#ifdef __cplusplus
11176extern "C"
11177#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011178/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 builtin and then its argument prototype would still apply. */
11180char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
11182main ()
11183{
11184__pthread_create_system ();
11185 ;
11186 return 0;
11187}
11188_ACEOF
11189rm -f conftest.$ac_objext conftest$ac_exeext
11190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11191 (eval $ac_link) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); } &&
11195 { ac_try='test -s conftest$ac_exeext'
11196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11198 ac_status=$?
11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11200 (exit $ac_status); }; }; then
11201 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011202else
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 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 +000011206ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11209LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011211echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11212echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11213if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11214 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011215#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011216_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011217
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011218 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011219 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011220 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011221else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011222
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11224echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11225if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011227else
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011229LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011230cat >conftest.$ac_ext <<_ACEOF
11231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011232/* confdefs.h. */
11233_ACEOF
11234cat confdefs.h >>conftest.$ac_ext
11235cat >>conftest.$ac_ext <<_ACEOF
11236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Guido van Rossumb93a8621998-05-07 13:27:32 +000011238/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011239#ifdef __cplusplus
11240extern "C"
11241#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011242/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 builtin and then its argument prototype would still apply. */
11244char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011245int
11246main ()
11247{
11248pthread_create ();
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253rm -f conftest.$ac_objext conftest$ac_exeext
11254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11255 (eval $ac_link) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); } &&
11259 { ac_try='test -s conftest$ac_exeext'
11260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261 (eval $ac_try) 2>&5
11262 ac_status=$?
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); }; }; then
11265 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011268sed 's/^/| /' conftest.$ac_ext >&5
11269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11273LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011275echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11276echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11277if test $ac_cv_lib_cma_pthread_create = yes; then
11278 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011281
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011282 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011283 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011284 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011285else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011286
Martin v. Löwis130fb172001-07-19 11:00:41 +000011287 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011288fi
11289
Guido van Rossum627b2d71993-12-24 10:39:16 +000011290
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011291fi
11292
Guido van Rossum0be3e491997-05-22 20:33:33 +000011293fi
11294
Guido van Rossum49545951997-12-02 19:28:29 +000011295fi
11296
Guido van Rossumb93a8621998-05-07 13:27:32 +000011297fi
11298
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011299
Michael W. Hudson54241132001-12-07 15:38:26 +000011300fi
11301
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011302
11303fi
11304
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11307fi;
11308fi
11309
11310
11311fi
11312
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011313
Michael W. Hudson54241132001-12-07 15:38:26 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11316echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11317if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319else
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011321LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011322cat >conftest.$ac_ext <<_ACEOF
11323#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* confdefs.h. */
11325_ACEOF
11326cat confdefs.h >>conftest.$ac_ext
11327cat >>conftest.$ac_ext <<_ACEOF
11328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331#ifdef __cplusplus
11332extern "C"
11333#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 builtin and then its argument prototype would still apply. */
11336char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
11340usconfig ();
11341 ;
11342 return 0;
11343}
11344_ACEOF
11345rm -f conftest.$ac_objext conftest$ac_exeext
11346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11347 (eval $ac_link) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); } &&
11351 { ac_try='test -s conftest$ac_exeext'
11352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11353 (eval $ac_try) 2>&5
11354 ac_status=$?
11355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11356 (exit $ac_status); }; }; then
11357 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011358else
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011360sed 's/^/| /' conftest.$ac_ext >&5
11361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011364rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11365LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011367echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11368echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11369if test $ac_cv_lib_mpc_usconfig = yes; then
11370 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011372_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011373
Martin v. Löwis130fb172001-07-19 11:00:41 +000011374 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011375 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011376 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377fi
11378
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011379
Neal Norwitza978ab02002-11-02 16:58:05 +000011380 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11382echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11383if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011385else
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011387LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011388cat >conftest.$ac_ext <<_ACEOF
11389#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* confdefs.h. */
11391_ACEOF
11392cat confdefs.h >>conftest.$ac_ext
11393cat >>conftest.$ac_ext <<_ACEOF
11394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011396/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011397#ifdef __cplusplus
11398extern "C"
11399#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011400/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 builtin and then its argument prototype would still apply. */
11402char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011403int
11404main ()
11405{
11406thr_create ();
11407 ;
11408 return 0;
11409}
11410_ACEOF
11411rm -f conftest.$ac_objext conftest$ac_exeext
11412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11413 (eval $ac_link) 2>&5
11414 ac_status=$?
11415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416 (exit $ac_status); } &&
11417 { ac_try='test -s conftest$ac_exeext'
11418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11419 (eval $ac_try) 2>&5
11420 ac_status=$?
11421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422 (exit $ac_status); }; }; then
11423 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424else
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011426sed 's/^/| /' conftest.$ac_ext >&5
11427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011430rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011433echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11434echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11435if test $ac_cv_lib_thread_thr_create = yes; then
11436 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011438_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011440 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011441 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011442 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011443fi
11444
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011445 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Martin v. Löwis130fb172001-07-19 11:00:41 +000011447 if test "$USE_THREAD_MODULE" != "#"
11448 then
11449 # If the above checks didn't disable threads, (at least) OSF1
11450 # needs this '-threads' argument during linking.
11451 case $ac_sys_system in
11452 OSF1) LDLAST=-threads;;
11453 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011454 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011455fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011456
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011457if test "$posix_threads" = "yes"; then
11458 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011459
11460cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011461#define _POSIX_THREADS 1
11462_ACEOF
11463
11464 fi
11465
11466 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11467 case $ac_sys_system/$ac_sys_release in
11468 SunOS/5.6)
11469cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011470#define HAVE_PTHREAD_DESTRUCTOR 1
11471_ACEOF
11472
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011473 ;;
11474 SunOS/5.8)
11475cat >>confdefs.h <<\_ACEOF
11476#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11477_ACEOF
11478
11479 ;;
11480 esac
11481
11482 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11483echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11484 if test "${ac_cv_pthread_system_supported+set}" = set; then
11485 echo $ECHO_N "(cached) $ECHO_C" >&6
11486else
11487 if test "$cross_compiling" = yes; then
11488 ac_cv_pthread_system_supported=no
11489else
11490 cat >conftest.$ac_ext <<_ACEOF
11491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* confdefs.h. */
11493_ACEOF
11494cat confdefs.h >>conftest.$ac_ext
11495cat >>conftest.$ac_ext <<_ACEOF
11496/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011497#include <pthread.h>
11498 void *foo(void *parm) {
11499 return NULL;
11500 }
11501 main() {
11502 pthread_attr_t attr;
11503 pthread_t id;
11504 if (pthread_attr_init(&attr)) exit(-1);
11505 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11506 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11507 exit(0);
11508 }
11509_ACEOF
11510rm -f conftest$ac_exeext
11511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11512 (eval $ac_link) 2>&5
11513 ac_status=$?
11514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517 (eval $ac_try) 2>&5
11518 ac_status=$?
11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520 (exit $ac_status); }; }; then
11521 ac_cv_pthread_system_supported=yes
11522else
11523 echo "$as_me: program exited with status $ac_status" >&5
11524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011525sed 's/^/| /' conftest.$ac_ext >&5
11526
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011527( exit $ac_status )
11528ac_cv_pthread_system_supported=no
11529fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011530rm -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 +000011531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011532
Guido van Rossum627b2d71993-12-24 10:39:16 +000011533fi
11534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011535 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11536echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11537 if test "$ac_cv_pthread_system_supported" = "yes"; then
11538
11539cat >>confdefs.h <<\_ACEOF
11540#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11541_ACEOF
11542
11543 fi
11544
11545for ac_func in pthread_sigmask
11546do
11547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11548echo "$as_me:$LINENO: checking for $ac_func" >&5
11549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11550if eval "test \"\${$as_ac_var+set}\" = set"; then
11551 echo $ECHO_N "(cached) $ECHO_C" >&6
11552else
11553 cat >conftest.$ac_ext <<_ACEOF
11554#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011555/* confdefs.h. */
11556_ACEOF
11557cat confdefs.h >>conftest.$ac_ext
11558cat >>conftest.$ac_ext <<_ACEOF
11559/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011560/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011561 which can conflict with char $ac_func (); below.
11562 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011563 <limits.h> exists even on freestanding compilers. Under hpux,
11564 including <limits.h> includes <sys/time.h> and causes problems
11565 checking for functions defined therein. */
11566#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011567# include <limits.h>
11568#else
11569# include <assert.h>
11570#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011571/* Override any gcc2 internal prototype to avoid an error. */
11572#ifdef __cplusplus
11573extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011574{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011575#endif
11576/* We use char because int might match the return type of a gcc2
11577 builtin and then its argument prototype would still apply. */
11578char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011579/* The GNU C library defines this for functions which it implements
11580 to always fail with ENOSYS. Some functions are actually named
11581 something starting with __ and the normal name is an alias. */
11582#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11583choke me
11584#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011585char (*f) () = $ac_func;
11586#endif
11587#ifdef __cplusplus
11588}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011589#endif
11590
Skip Montanaro6dead952003-09-25 14:50:04 +000011591int
11592main ()
11593{
11594return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011595 ;
11596 return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext conftest$ac_exeext
11600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11601 (eval $ac_link) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); } &&
11605 { ac_try='test -s conftest$ac_exeext'
11606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11607 (eval $ac_try) 2>&5
11608 ac_status=$?
11609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610 (exit $ac_status); }; }; then
11611 eval "$as_ac_var=yes"
11612else
11613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011614sed 's/^/| /' conftest.$ac_ext >&5
11615
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011616eval "$as_ac_var=no"
11617fi
11618rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11619fi
11620echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11621echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11622if test `eval echo '${'$as_ac_var'}'` = yes; then
11623 cat >>confdefs.h <<_ACEOF
11624#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11625_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011626 case $ac_sys_system in
11627 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011628
Jason Tishlerfac083d2003-07-22 15:20:49 +000011629cat >>confdefs.h <<\_ACEOF
11630#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11631_ACEOF
11632
11633 ;;
11634 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011635fi
11636done
11637
11638fi
11639
11640
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011641# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
11643
11644echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11645echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011646# Check whether --enable-ipv6 or --disable-ipv6 was given.
11647if test "${enable_ipv6+set}" = set; then
11648 enableval="$enable_ipv6"
11649 case "$enableval" in
11650 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 echo "$as_me:$LINENO: result: no" >&5
11652echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011653 ipv6=no
11654 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 *) echo "$as_me:$LINENO: result: yes" >&5
11656echo "${ECHO_T}yes" >&6
11657 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011658#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011659_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660
11661 ipv6=yes
11662 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011664else
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011666 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 echo "$as_me:$LINENO: result: no" >&5
11668echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011669 ipv6=no
11670
11671else
Martin v. Löwis11437992002-04-12 09:54:03 +000011672 cat >conftest.$ac_ext <<_ACEOF
11673#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* confdefs.h. */
11675_ACEOF
11676cat confdefs.h >>conftest.$ac_ext
11677cat >>conftest.$ac_ext <<_ACEOF
11678/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011679 /* AF_INET6 available check */
11680#include <sys/types.h>
11681#include <sys/socket.h>
11682main()
11683{
11684 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11685 exit(1);
11686 else
11687 exit(0);
11688}
11689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690_ACEOF
11691rm -f conftest$ac_exeext
11692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11693 (eval $ac_link) 2>&5
11694 ac_status=$?
11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11698 (eval $ac_try) 2>&5
11699 ac_status=$?
11700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11701 (exit $ac_status); }; }; then
11702 echo "$as_me:$LINENO: result: yes" >&5
11703echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011704 ipv6=yes
11705else
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 echo "$as_me: program exited with status $ac_status" >&5
11707echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011708sed 's/^/| /' conftest.$ac_ext >&5
11709
Martin v. Löwis11437992002-04-12 09:54:03 +000011710( exit $ac_status )
11711echo "$as_me:$LINENO: result: no" >&5
11712echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011713 ipv6=no
11714fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011715rm -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 +000011716fi
11717
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011718if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11720echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11721 cat >conftest.$ac_ext <<_ACEOF
11722#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* confdefs.h. */
11724_ACEOF
11725cat confdefs.h >>conftest.$ac_ext
11726cat >>conftest.$ac_ext <<_ACEOF
11727/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011728#include <sys/types.h>
11729#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011730int
11731main ()
11732{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011733struct sockaddr_in6 x;
11734x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ;
11736 return 0;
11737}
11738_ACEOF
11739rm -f conftest.$ac_objext
11740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11741 (eval $ac_compile) 2>&5
11742 ac_status=$?
11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); } &&
11745 { ac_try='test -s conftest.$ac_objext'
11746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11747 (eval $ac_try) 2>&5
11748 ac_status=$?
11749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750 (exit $ac_status); }; }; then
11751 echo "$as_me:$LINENO: result: yes" >&5
11752echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011753 ipv6=yes
11754else
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011756sed 's/^/| /' conftest.$ac_ext >&5
11757
Martin v. Löwis11437992002-04-12 09:54:03 +000011758echo "$as_me:$LINENO: result: no" >&5
11759echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011760 ipv6=no
11761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011762rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011763fi
11764
11765if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011767#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011769
11770fi
11771
Martin v. Löwis11437992002-04-12 09:54:03 +000011772fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011773
11774ipv6type=unknown
11775ipv6lib=none
11776ipv6trylibc=no
11777
11778if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11780echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011781 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11782 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011783 case $i in
11784 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 cat >conftest.$ac_ext <<_ACEOF
11786#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011787/* confdefs.h. */
11788_ACEOF
11789cat confdefs.h >>conftest.$ac_ext
11790cat >>conftest.$ac_ext <<_ACEOF
11791/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011792
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011793#include <netinet/in.h>
11794#ifdef IPV6_INRIA_VERSION
11795yes
11796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011797_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011799 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011800 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801fi
11802rm -f conftest*
11803
11804 ;;
11805 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 cat >conftest.$ac_ext <<_ACEOF
11807#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011808/* confdefs.h. */
11809_ACEOF
11810cat confdefs.h >>conftest.$ac_ext
11811cat >>conftest.$ac_ext <<_ACEOF
11812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011814#include <netinet/in.h>
11815#ifdef __KAME__
11816yes
11817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011820 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011821 ipv6type=$i;
11822 ipv6lib=inet6
11823 ipv6libdir=/usr/local/v6/lib
11824 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011825fi
11826rm -f conftest*
11827
11828 ;;
11829 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 cat >conftest.$ac_ext <<_ACEOF
11831#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* confdefs.h. */
11833_ACEOF
11834cat confdefs.h >>conftest.$ac_ext
11835cat >>conftest.$ac_ext <<_ACEOF
11836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011838#include <features.h>
11839#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11840yes
11841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011844 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011845 ipv6type=$i;
11846 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847fi
11848rm -f conftest*
11849
11850 ;;
11851 linux-inet6)
11852 if test -d /usr/inet6; then
11853 ipv6type=$i
11854 ipv6lib=inet6
11855 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011856 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011857 fi
11858 ;;
11859 solaris)
11860 if test -f /etc/netconfig; then
11861 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11862 ipv6type=$i
11863 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011864 fi
11865 fi
11866 ;;
11867 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 cat >conftest.$ac_ext <<_ACEOF
11869#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* confdefs.h. */
11871_ACEOF
11872cat confdefs.h >>conftest.$ac_ext
11873cat >>conftest.$ac_ext <<_ACEOF
11874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011876#include <sys/param.h>
11877#ifdef _TOSHIBA_INET6
11878yes
11879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011882 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011883 ipv6type=$i;
11884 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011885 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011886fi
11887rm -f conftest*
11888
11889 ;;
11890 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 cat >conftest.$ac_ext <<_ACEOF
11892#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011899#include </usr/local/v6/include/sys/v6config.h>
11900#ifdef __V6D__
11901yes
11902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011905 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906 ipv6type=$i;
11907 ipv6lib=v6;
11908 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011909 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011910fi
11911rm -f conftest*
11912
11913 ;;
11914 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 cat >conftest.$ac_ext <<_ACEOF
11916#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011917/* confdefs.h. */
11918_ACEOF
11919cat confdefs.h >>conftest.$ac_ext
11920cat >>conftest.$ac_ext <<_ACEOF
11921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011923#include <sys/param.h>
11924#ifdef _ZETA_MINAMI_INET6
11925yes
11926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011929 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011930 ipv6type=$i;
11931 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011932 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011933fi
11934rm -f conftest*
11935
11936 ;;
11937 esac
11938 if test "$ipv6type" != "unknown"; then
11939 break
11940 fi
11941 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 echo "$as_me:$LINENO: result: $ipv6type" >&5
11943echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011944fi
11945
11946if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11947 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11948 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11949 echo "using lib$ipv6lib"
11950 else
11951 if test $ipv6trylibc = "yes"; then
11952 echo "using libc"
11953 else
11954 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11955 echo "You need to fetch lib$ipv6lib.a from appropriate"
11956 echo 'ipv6 kit and compile beforehand.'
11957 exit 1
11958 fi
11959 fi
11960fi
11961
Jack Jansen7b8c7542002-04-14 20:12:41 +000011962# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011963echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11964echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011965
11966# Check whether --with-universal-newlines or --without-universal-newlines was given.
11967if test "${with_universal_newlines+set}" = set; then
11968 withval="$with_universal_newlines"
11969
11970fi;
11971
11972if test -z "$with_universal_newlines"
11973then with_universal_newlines="yes"
11974fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011975if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011976then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011977 echo --without-universal-newlines is unsupported, see README
11978 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011979else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011980
11981cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011982#define WITH_UNIVERSAL_NEWLINES 1
11983_ACEOF
11984
11985fi
11986echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11987echo "${ECHO_T}$with_universal_newlines" >&6
11988
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011989# Check for --with-doc-strings
11990echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11991echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11992
11993# Check whether --with-doc-strings or --without-doc-strings was given.
11994if test "${with_doc_strings+set}" = set; then
11995 withval="$with_doc_strings"
11996
11997fi;
11998
11999if test -z "$with_doc_strings"
12000then with_doc_strings="yes"
12001fi
12002if test "$with_doc_strings" != "no"
12003then
12004
12005cat >>confdefs.h <<\_ACEOF
12006#define WITH_DOC_STRINGS 1
12007_ACEOF
12008
12009fi
12010echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12011echo "${ECHO_T}$with_doc_strings" >&6
12012
Neil Schemenauera35c6882001-02-27 04:45:05 +000012013# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012014echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12015echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12016
Neil Schemenauera35c6882001-02-27 04:45:05 +000012017# Check whether --with-pymalloc or --without-pymalloc was given.
12018if test "${with_pymalloc+set}" = set; then
12019 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012020
Martin v. Löwis11437992002-04-12 09:54:03 +000012021fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012022
Neil Schemenauer16c22972002-03-22 15:34:49 +000012023if test -z "$with_pymalloc"
12024then with_pymalloc="yes"
12025fi
12026if test "$with_pymalloc" != "no"
12027then
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
12029cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012030#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012031_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012032
12033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012034echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12035echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012036
Barry Warsawef82cd72000-06-30 16:21:01 +000012037# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012038echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12039echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12040
Barry Warsawef82cd72000-06-30 16:21:01 +000012041# Check whether --with-wctype-functions or --without-wctype-functions was given.
12042if test "${with_wctype_functions+set}" = set; then
12043 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012044
Barry Warsawef82cd72000-06-30 16:21:01 +000012045if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012046then
12047
12048cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012049#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012050_ACEOF
12051
12052 echo "$as_me:$LINENO: result: yes" >&5
12053echo "${ECHO_T}yes" >&6
12054else echo "$as_me:$LINENO: result: no" >&5
12055echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012056fi
12057else
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 echo "$as_me:$LINENO: result: no" >&5
12059echo "${ECHO_T}no" >&6
12060fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012062# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012063
Guido van Rossum98935bf2001-09-05 19:13:16 +000012064DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065
Guido van Rossume97ee181999-12-20 21:27:22 +000012066# the dlopen() function means we might want to use dynload_shlib.o. some
12067# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012068
Thomas Wouters3a584202000-08-05 23:28:51 +000012069for ac_func in dlopen
12070do
Martin v. Löwis11437992002-04-12 09:54:03 +000012071as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12072echo "$as_me:$LINENO: checking for $ac_func" >&5
12073echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12074if eval "test \"\${$as_ac_var+set}\" = set"; then
12075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012076else
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 cat >conftest.$ac_ext <<_ACEOF
12078#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012079/* confdefs.h. */
12080_ACEOF
12081cat confdefs.h >>conftest.$ac_ext
12082cat >>conftest.$ac_ext <<_ACEOF
12083/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012084/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012085 which can conflict with char $ac_func (); below.
12086 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012087 <limits.h> exists even on freestanding compilers. Under hpux,
12088 including <limits.h> includes <sys/time.h> and causes problems
12089 checking for functions defined therein. */
12090#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012091# include <limits.h>
12092#else
12093# include <assert.h>
12094#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012095/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012096#ifdef __cplusplus
12097extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012098{
Martin v. Löwis11437992002-04-12 09:54:03 +000012099#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012100/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 builtin and then its argument prototype would still apply. */
12102char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012103/* The GNU C library defines this for functions which it implements
12104 to always fail with ENOSYS. Some functions are actually named
12105 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012106#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012107choke me
12108#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012109char (*f) () = $ac_func;
12110#endif
12111#ifdef __cplusplus
12112}
Guido van Rossume97ee181999-12-20 21:27:22 +000012113#endif
12114
Skip Montanaro6dead952003-09-25 14:50:04 +000012115int
12116main ()
12117{
12118return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 ;
12120 return 0;
12121}
12122_ACEOF
12123rm -f conftest.$ac_objext conftest$ac_exeext
12124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12125 (eval $ac_link) 2>&5
12126 ac_status=$?
12127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12128 (exit $ac_status); } &&
12129 { ac_try='test -s conftest$ac_exeext'
12130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12131 (eval $ac_try) 2>&5
12132 ac_status=$?
12133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12134 (exit $ac_status); }; }; then
12135 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012136else
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012138sed 's/^/| /' conftest.$ac_ext >&5
12139
Martin v. Löwis11437992002-04-12 09:54:03 +000012140eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012144echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12145echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12146if test `eval echo '${'$as_ac_var'}'` = yes; then
12147 cat >>confdefs.h <<_ACEOF
12148#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12149_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012150
Guido van Rossume97ee181999-12-20 21:27:22 +000012151fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012152done
Guido van Rossume97ee181999-12-20 21:27:22 +000012153
Michael W. Hudson54241132001-12-07 15:38:26 +000012154
Guido van Rossume97ee181999-12-20 21:27:22 +000012155# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12156# loading of modules.
12157
Martin v. Löwis11437992002-04-12 09:54:03 +000012158echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12159echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012160if test -z "$DYNLOADFILE"
12161then
12162 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012163 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12164 if test "$ac_cv_func_dlopen" = yes
12165 then DYNLOADFILE="dynload_shlib.o"
12166 else DYNLOADFILE="dynload_aix.o"
12167 fi
12168 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012169 BeOS*) DYNLOADFILE="dynload_beos.o";;
12170 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012171 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012172 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012173 *)
12174 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12175 # out any dynamic loading
12176 if test "$ac_cv_func_dlopen" = yes
12177 then DYNLOADFILE="dynload_shlib.o"
12178 else DYNLOADFILE="dynload_stub.o"
12179 fi
12180 ;;
12181 esac
12182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012183echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12184echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012185if test "$DYNLOADFILE" != "dynload_stub.o"
12186then
Martin v. Löwis11437992002-04-12 09:54:03 +000012187
12188cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012189#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012190_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012191
12192fi
12193
Neil Schemenauer4e425612001-06-19 15:44:15 +000012194# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12195
Michael W. Hudson54241132001-12-07 15:38:26 +000012196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12198echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012199if test -z "$MACHDEP_OBJS"
12200then
Jack Jansene578a632001-08-15 01:27:14 +000012201 MACHDEP_OBJS=$extra_machdep_objs
12202else
12203 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012205echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12206echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012207
Guido van Rossum627b2d71993-12-24 10:39:16 +000012208# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012280
Martin v. Löwisd5843682002-11-21 20:41:28 +000012281for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012282 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012283 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012284 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012285 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012286 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012287 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012288 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012289 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012290 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012291 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012292 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012293do
Martin v. Löwis11437992002-04-12 09:54:03 +000012294as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12295echo "$as_me:$LINENO: checking for $ac_func" >&5
12296echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12297if eval "test \"\${$as_ac_var+set}\" = set"; then
12298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012299else
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 cat >conftest.$ac_ext <<_ACEOF
12301#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012307/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012308 which can conflict with char $ac_func (); below.
12309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012310 <limits.h> exists even on freestanding compilers. Under hpux,
12311 including <limits.h> includes <sys/time.h> and causes problems
12312 checking for functions defined therein. */
12313#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012314# include <limits.h>
12315#else
12316# include <assert.h>
12317#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012318/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012319#ifdef __cplusplus
12320extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012321{
Martin v. Löwis11437992002-04-12 09:54:03 +000012322#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012323/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 builtin and then its argument prototype would still apply. */
12325char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326/* The GNU C library defines this for functions which it implements
12327 to always fail with ENOSYS. Some functions are actually named
12328 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012330choke me
12331#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012332char (*f) () = $ac_func;
12333#endif
12334#ifdef __cplusplus
12335}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012336#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012337
Skip Montanaro6dead952003-09-25 14:50:04 +000012338int
12339main ()
12340{
12341return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext conftest$ac_exeext
12347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12348 (eval $ac_link) 2>&5
12349 ac_status=$?
12350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12351 (exit $ac_status); } &&
12352 { ac_try='test -s conftest$ac_exeext'
12353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12354 (eval $ac_try) 2>&5
12355 ac_status=$?
12356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12357 (exit $ac_status); }; }; then
12358 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012359else
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012361sed 's/^/| /' conftest.$ac_ext >&5
12362
Martin v. Löwis11437992002-04-12 09:54:03 +000012363eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012365rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012367echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12368echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12369if test `eval echo '${'$as_ac_var'}'` = yes; then
12370 cat >>confdefs.h <<_ACEOF
12371#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12372_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012373
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012374fi
12375done
12376
Michael W. Hudson54241132001-12-07 15:38:26 +000012377
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012378# For some functions, having a definition is not sufficient, since
12379# we want to take their address.
12380echo "$as_me:$LINENO: checking for chroot" >&5
12381echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12382cat >conftest.$ac_ext <<_ACEOF
12383#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* confdefs.h. */
12385_ACEOF
12386cat confdefs.h >>conftest.$ac_ext
12387cat >>conftest.$ac_ext <<_ACEOF
12388/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012389#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012390int
12391main ()
12392{
12393void *x=chroot
12394 ;
12395 return 0;
12396}
12397_ACEOF
12398rm -f conftest.$ac_objext
12399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12400 (eval $ac_compile) 2>&5
12401 ac_status=$?
12402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403 (exit $ac_status); } &&
12404 { ac_try='test -s conftest.$ac_objext'
12405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12406 (eval $ac_try) 2>&5
12407 ac_status=$?
12408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409 (exit $ac_status); }; }; then
12410
12411cat >>confdefs.h <<\_ACEOF
12412#define HAVE_CHROOT 1
12413_ACEOF
12414
12415 echo "$as_me:$LINENO: result: yes" >&5
12416echo "${ECHO_T}yes" >&6
12417else
12418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012419sed 's/^/| /' conftest.$ac_ext >&5
12420
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012421echo "$as_me:$LINENO: result: no" >&5
12422echo "${ECHO_T}no" >&6
12423
12424fi
12425rm -f conftest.$ac_objext conftest.$ac_ext
12426echo "$as_me:$LINENO: checking for link" >&5
12427echo $ECHO_N "checking for link... $ECHO_C" >&6
12428cat >conftest.$ac_ext <<_ACEOF
12429#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* confdefs.h. */
12431_ACEOF
12432cat confdefs.h >>conftest.$ac_ext
12433cat >>conftest.$ac_ext <<_ACEOF
12434/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012435#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012436int
12437main ()
12438{
12439void *x=link
12440 ;
12441 return 0;
12442}
12443_ACEOF
12444rm -f conftest.$ac_objext
12445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12446 (eval $ac_compile) 2>&5
12447 ac_status=$?
12448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); } &&
12450 { ac_try='test -s conftest.$ac_objext'
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
12457cat >>confdefs.h <<\_ACEOF
12458#define HAVE_LINK 1
12459_ACEOF
12460
12461 echo "$as_me:$LINENO: result: yes" >&5
12462echo "${ECHO_T}yes" >&6
12463else
12464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012465sed 's/^/| /' conftest.$ac_ext >&5
12466
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012467echo "$as_me:$LINENO: result: no" >&5
12468echo "${ECHO_T}no" >&6
12469
12470fi
12471rm -f conftest.$ac_objext conftest.$ac_ext
12472echo "$as_me:$LINENO: checking for symlink" >&5
12473echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12474cat >conftest.$ac_ext <<_ACEOF
12475#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012476/* confdefs.h. */
12477_ACEOF
12478cat confdefs.h >>conftest.$ac_ext
12479cat >>conftest.$ac_ext <<_ACEOF
12480/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012481#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012482int
12483main ()
12484{
12485void *x=symlink
12486 ;
12487 return 0;
12488}
12489_ACEOF
12490rm -f conftest.$ac_objext
12491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12492 (eval $ac_compile) 2>&5
12493 ac_status=$?
12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495 (exit $ac_status); } &&
12496 { ac_try='test -s conftest.$ac_objext'
12497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12498 (eval $ac_try) 2>&5
12499 ac_status=$?
12500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501 (exit $ac_status); }; }; then
12502
12503cat >>confdefs.h <<\_ACEOF
12504#define HAVE_SYMLINK 1
12505_ACEOF
12506
12507 echo "$as_me:$LINENO: result: yes" >&5
12508echo "${ECHO_T}yes" >&6
12509else
12510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012511sed 's/^/| /' conftest.$ac_ext >&5
12512
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012513echo "$as_me:$LINENO: result: no" >&5
12514echo "${ECHO_T}no" >&6
12515
12516fi
12517rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012518echo "$as_me:$LINENO: checking for fchdir" >&5
12519echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12520cat >conftest.$ac_ext <<_ACEOF
12521#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012522/* confdefs.h. */
12523_ACEOF
12524cat confdefs.h >>conftest.$ac_ext
12525cat >>conftest.$ac_ext <<_ACEOF
12526/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012527#include <unistd.h>
12528int
12529main ()
12530{
12531void *x=fchdir
12532 ;
12533 return 0;
12534}
12535_ACEOF
12536rm -f conftest.$ac_objext
12537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12538 (eval $ac_compile) 2>&5
12539 ac_status=$?
12540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541 (exit $ac_status); } &&
12542 { ac_try='test -s conftest.$ac_objext'
12543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12544 (eval $ac_try) 2>&5
12545 ac_status=$?
12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547 (exit $ac_status); }; }; then
12548
12549cat >>confdefs.h <<\_ACEOF
12550#define HAVE_FCHDIR 1
12551_ACEOF
12552
12553 echo "$as_me:$LINENO: result: yes" >&5
12554echo "${ECHO_T}yes" >&6
12555else
12556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012557sed 's/^/| /' conftest.$ac_ext >&5
12558
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012559echo "$as_me:$LINENO: result: no" >&5
12560echo "${ECHO_T}no" >&6
12561
12562fi
12563rm -f conftest.$ac_objext conftest.$ac_ext
12564echo "$as_me:$LINENO: checking for fsync" >&5
12565echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12566cat >conftest.$ac_ext <<_ACEOF
12567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012568/* confdefs.h. */
12569_ACEOF
12570cat confdefs.h >>conftest.$ac_ext
12571cat >>conftest.$ac_ext <<_ACEOF
12572/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012573#include <unistd.h>
12574int
12575main ()
12576{
12577void *x=fsync
12578 ;
12579 return 0;
12580}
12581_ACEOF
12582rm -f conftest.$ac_objext
12583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12584 (eval $ac_compile) 2>&5
12585 ac_status=$?
12586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12587 (exit $ac_status); } &&
12588 { ac_try='test -s conftest.$ac_objext'
12589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12590 (eval $ac_try) 2>&5
12591 ac_status=$?
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); }; }; then
12594
12595cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012596#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012597_ACEOF
12598
12599 echo "$as_me:$LINENO: result: yes" >&5
12600echo "${ECHO_T}yes" >&6
12601else
12602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012603sed 's/^/| /' conftest.$ac_ext >&5
12604
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012605echo "$as_me:$LINENO: result: no" >&5
12606echo "${ECHO_T}no" >&6
12607
12608fi
12609rm -f conftest.$ac_objext conftest.$ac_ext
12610echo "$as_me:$LINENO: checking for fdatasync" >&5
12611echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12612cat >conftest.$ac_ext <<_ACEOF
12613#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012614/* confdefs.h. */
12615_ACEOF
12616cat confdefs.h >>conftest.$ac_ext
12617cat >>conftest.$ac_ext <<_ACEOF
12618/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012619#include <unistd.h>
12620int
12621main ()
12622{
12623void *x=fdatasync
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext
12629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12630 (eval $ac_compile) 2>&5
12631 ac_status=$?
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); } &&
12634 { ac_try='test -s conftest.$ac_objext'
12635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12636 (eval $ac_try) 2>&5
12637 ac_status=$?
12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639 (exit $ac_status); }; }; then
12640
12641cat >>confdefs.h <<\_ACEOF
12642#define HAVE_FDATASYNC 1
12643_ACEOF
12644
12645 echo "$as_me:$LINENO: result: yes" >&5
12646echo "${ECHO_T}yes" >&6
12647else
12648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012649sed 's/^/| /' conftest.$ac_ext >&5
12650
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012651echo "$as_me:$LINENO: result: no" >&5
12652echo "${ECHO_T}no" >&6
12653
12654fi
12655rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012656
Martin v. Löwisd5843682002-11-21 20:41:28 +000012657# On some systems (eg. FreeBSD 5), we would find a definition of the
12658# functions ctermid_r, setgroups in the library, but no prototype
12659# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12660# address to avoid compiler warnings and potential miscompilations
12661# because of the missing prototypes.
12662
12663echo "$as_me:$LINENO: checking for ctermid_r" >&5
12664echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12665cat >conftest.$ac_ext <<_ACEOF
12666#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012667/* confdefs.h. */
12668_ACEOF
12669cat confdefs.h >>conftest.$ac_ext
12670cat >>conftest.$ac_ext <<_ACEOF
12671/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012672
12673#include "confdefs.h"
12674#include <stdio.h>
12675
Martin v. Löwisd5843682002-11-21 20:41:28 +000012676int
12677main ()
12678{
12679void* p = ctermid_r
12680 ;
12681 return 0;
12682}
12683_ACEOF
12684rm -f conftest.$ac_objext
12685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12686 (eval $ac_compile) 2>&5
12687 ac_status=$?
12688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12689 (exit $ac_status); } &&
12690 { ac_try='test -s conftest.$ac_objext'
12691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12692 (eval $ac_try) 2>&5
12693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); }; }; then
12696
12697cat >>confdefs.h <<\_ACEOF
12698#define HAVE_CTERMID_R 1
12699_ACEOF
12700
12701 echo "$as_me:$LINENO: result: yes" >&5
12702echo "${ECHO_T}yes" >&6
12703else
12704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012705sed 's/^/| /' conftest.$ac_ext >&5
12706
Martin v. Löwisd5843682002-11-21 20:41:28 +000012707echo "$as_me:$LINENO: result: no" >&5
12708echo "${ECHO_T}no" >&6
12709
12710fi
12711rm -f conftest.$ac_objext conftest.$ac_ext
12712
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012713echo "$as_me:$LINENO: checking for flock" >&5
12714echo $ECHO_N "checking for flock... $ECHO_C" >&6
12715cat >conftest.$ac_ext <<_ACEOF
12716#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* confdefs.h. */
12718_ACEOF
12719cat confdefs.h >>conftest.$ac_ext
12720cat >>conftest.$ac_ext <<_ACEOF
12721/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012722
12723#include "confdefs.h"
12724#include <sys/file.h>
12725
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012726int
12727main ()
12728{
12729void* p = flock
12730 ;
12731 return 0;
12732}
12733_ACEOF
12734rm -f conftest.$ac_objext
12735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12736 (eval $ac_compile) 2>&5
12737 ac_status=$?
12738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739 (exit $ac_status); } &&
12740 { ac_try='test -s conftest.$ac_objext'
12741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12742 (eval $ac_try) 2>&5
12743 ac_status=$?
12744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12745 (exit $ac_status); }; }; then
12746
12747cat >>confdefs.h <<\_ACEOF
12748#define HAVE_FLOCK 1
12749_ACEOF
12750
12751 echo "$as_me:$LINENO: result: yes" >&5
12752echo "${ECHO_T}yes" >&6
12753else
12754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012755sed 's/^/| /' conftest.$ac_ext >&5
12756
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012757echo "$as_me:$LINENO: result: no" >&5
12758echo "${ECHO_T}no" >&6
12759
12760fi
12761rm -f conftest.$ac_objext conftest.$ac_ext
12762
12763echo "$as_me:$LINENO: checking for getpagesize" >&5
12764echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12765cat >conftest.$ac_ext <<_ACEOF
12766#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012767/* confdefs.h. */
12768_ACEOF
12769cat confdefs.h >>conftest.$ac_ext
12770cat >>conftest.$ac_ext <<_ACEOF
12771/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012772
12773#include "confdefs.h"
12774#include <unistd.h>
12775
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012776int
12777main ()
12778{
12779void* p = getpagesize
12780 ;
12781 return 0;
12782}
12783_ACEOF
12784rm -f conftest.$ac_objext
12785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12786 (eval $ac_compile) 2>&5
12787 ac_status=$?
12788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12789 (exit $ac_status); } &&
12790 { ac_try='test -s conftest.$ac_objext'
12791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12792 (eval $ac_try) 2>&5
12793 ac_status=$?
12794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12795 (exit $ac_status); }; }; then
12796
12797cat >>confdefs.h <<\_ACEOF
12798#define HAVE_GETPAGESIZE 1
12799_ACEOF
12800
12801 echo "$as_me:$LINENO: result: yes" >&5
12802echo "${ECHO_T}yes" >&6
12803else
12804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012805sed 's/^/| /' conftest.$ac_ext >&5
12806
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012807echo "$as_me:$LINENO: result: no" >&5
12808echo "${ECHO_T}no" >&6
12809
12810fi
12811rm -f conftest.$ac_objext conftest.$ac_ext
12812
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012813for ac_prog in true
12814do
12815 # Extract the first word of "$ac_prog", so it can be a program name with args.
12816set dummy $ac_prog; ac_word=$2
12817echo "$as_me:$LINENO: checking for $ac_word" >&5
12818echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12819if test "${ac_cv_prog_TRUE+set}" = set; then
12820 echo $ECHO_N "(cached) $ECHO_C" >&6
12821else
12822 if test -n "$TRUE"; then
12823 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12824else
12825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12826for as_dir in $PATH
12827do
12828 IFS=$as_save_IFS
12829 test -z "$as_dir" && as_dir=.
12830 for ac_exec_ext in '' $ac_executable_extensions; do
12831 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12832 ac_cv_prog_TRUE="$ac_prog"
12833 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12834 break 2
12835 fi
12836done
12837done
12838
12839fi
12840fi
12841TRUE=$ac_cv_prog_TRUE
12842if test -n "$TRUE"; then
12843 echo "$as_me:$LINENO: result: $TRUE" >&5
12844echo "${ECHO_T}$TRUE" >&6
12845else
12846 echo "$as_me:$LINENO: result: no" >&5
12847echo "${ECHO_T}no" >&6
12848fi
12849
12850 test -n "$TRUE" && break
12851done
12852test -n "$TRUE" || TRUE="/bin/true"
12853
12854
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012855echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12856echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12857if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12858 echo $ECHO_N "(cached) $ECHO_C" >&6
12859else
12860 ac_check_lib_save_LIBS=$LIBS
12861LIBS="-lc $LIBS"
12862cat >conftest.$ac_ext <<_ACEOF
12863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* confdefs.h. */
12865_ACEOF
12866cat confdefs.h >>conftest.$ac_ext
12867cat >>conftest.$ac_ext <<_ACEOF
12868/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012869
12870/* Override any gcc2 internal prototype to avoid an error. */
12871#ifdef __cplusplus
12872extern "C"
12873#endif
12874/* We use char because int might match the return type of a gcc2
12875 builtin and then its argument prototype would still apply. */
12876char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012877int
12878main ()
12879{
12880inet_aton ();
12881 ;
12882 return 0;
12883}
12884_ACEOF
12885rm -f conftest.$ac_objext conftest$ac_exeext
12886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12887 (eval $ac_link) 2>&5
12888 ac_status=$?
12889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12890 (exit $ac_status); } &&
12891 { ac_try='test -s conftest$ac_exeext'
12892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12893 (eval $ac_try) 2>&5
12894 ac_status=$?
12895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12896 (exit $ac_status); }; }; then
12897 ac_cv_lib_c_inet_aton=yes
12898else
12899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012900sed 's/^/| /' conftest.$ac_ext >&5
12901
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012902ac_cv_lib_c_inet_aton=no
12903fi
12904rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12905LIBS=$ac_check_lib_save_LIBS
12906fi
12907echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12908echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12909if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012910 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012911else
12912
12913echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12914echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12915if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12916 echo $ECHO_N "(cached) $ECHO_C" >&6
12917else
12918 ac_check_lib_save_LIBS=$LIBS
12919LIBS="-lresolv $LIBS"
12920cat >conftest.$ac_ext <<_ACEOF
12921#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012922/* confdefs.h. */
12923_ACEOF
12924cat confdefs.h >>conftest.$ac_ext
12925cat >>conftest.$ac_ext <<_ACEOF
12926/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012927
12928/* Override any gcc2 internal prototype to avoid an error. */
12929#ifdef __cplusplus
12930extern "C"
12931#endif
12932/* We use char because int might match the return type of a gcc2
12933 builtin and then its argument prototype would still apply. */
12934char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012935int
12936main ()
12937{
12938inet_aton ();
12939 ;
12940 return 0;
12941}
12942_ACEOF
12943rm -f conftest.$ac_objext conftest$ac_exeext
12944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12945 (eval $ac_link) 2>&5
12946 ac_status=$?
12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12948 (exit $ac_status); } &&
12949 { ac_try='test -s conftest$ac_exeext'
12950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12951 (eval $ac_try) 2>&5
12952 ac_status=$?
12953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12954 (exit $ac_status); }; }; then
12955 ac_cv_lib_resolv_inet_aton=yes
12956else
12957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012958sed 's/^/| /' conftest.$ac_ext >&5
12959
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012960ac_cv_lib_resolv_inet_aton=no
12961fi
12962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12963LIBS=$ac_check_lib_save_LIBS
12964fi
12965echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12966echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12967if test $ac_cv_lib_resolv_inet_aton = yes; then
12968 cat >>confdefs.h <<_ACEOF
12969#define HAVE_LIBRESOLV 1
12970_ACEOF
12971
12972 LIBS="-lresolv $LIBS"
12973
12974fi
12975
12976
12977fi
12978
12979
Martin v. Löwise9416172003-05-03 10:12:45 +000012980echo "$as_me:$LINENO: checking for hstrerror" >&5
12981echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12982cat >conftest.$ac_ext <<_ACEOF
12983#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* confdefs.h. */
12985_ACEOF
12986cat confdefs.h >>conftest.$ac_ext
12987cat >>conftest.$ac_ext <<_ACEOF
12988/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012989
12990#include "confdefs.h"
12991#include <netdb.h>
12992
Martin v. Löwise9416172003-05-03 10:12:45 +000012993int
12994main ()
12995{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012996void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013001rm -f conftest.$ac_objext conftest$ac_exeext
13002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13003 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013004 ac_status=$?
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013007 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13009 (eval $ac_try) 2>&5
13010 ac_status=$?
13011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012 (exit $ac_status); }; }; then
13013
13014cat >>confdefs.h <<\_ACEOF
13015#define HAVE_HSTRERROR 1
13016_ACEOF
13017
13018 echo "$as_me:$LINENO: result: yes" >&5
13019echo "${ECHO_T}yes" >&6
13020else
13021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013022sed 's/^/| /' conftest.$ac_ext >&5
13023
Martin v. Löwise9416172003-05-03 10:12:45 +000013024echo "$as_me:$LINENO: result: no" >&5
13025echo "${ECHO_T}no" >&6
13026
13027fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013028rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013029
13030echo "$as_me:$LINENO: checking for inet_aton" >&5
13031echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13032cat >conftest.$ac_ext <<_ACEOF
13033#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013034/* confdefs.h. */
13035_ACEOF
13036cat confdefs.h >>conftest.$ac_ext
13037cat >>conftest.$ac_ext <<_ACEOF
13038/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013039
13040#include "confdefs.h"
13041#include <sys/socket.h>
13042#include <netinet/in.h>
13043#include <arpa/inet.h>
13044
Martin v. Löwise9416172003-05-03 10:12:45 +000013045int
13046main ()
13047{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013048void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013049 ;
13050 return 0;
13051}
13052_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013053rm -f conftest.$ac_objext conftest$ac_exeext
13054if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13055 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013056 ac_status=$?
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013059 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13061 (eval $ac_try) 2>&5
13062 ac_status=$?
13063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13064 (exit $ac_status); }; }; then
13065
13066cat >>confdefs.h <<\_ACEOF
13067#define HAVE_INET_ATON 1
13068_ACEOF
13069
13070 echo "$as_me:$LINENO: result: yes" >&5
13071echo "${ECHO_T}yes" >&6
13072else
13073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013074sed 's/^/| /' conftest.$ac_ext >&5
13075
Martin v. Löwise9416172003-05-03 10:12:45 +000013076echo "$as_me:$LINENO: result: no" >&5
13077echo "${ECHO_T}no" >&6
13078
13079fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013081
13082echo "$as_me:$LINENO: checking for inet_pton" >&5
13083echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13084cat >conftest.$ac_ext <<_ACEOF
13085#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013086/* confdefs.h. */
13087_ACEOF
13088cat confdefs.h >>conftest.$ac_ext
13089cat >>conftest.$ac_ext <<_ACEOF
13090/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013091
13092#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013093#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013094#include <sys/socket.h>
13095#include <netinet/in.h>
13096#include <arpa/inet.h>
13097
Martin v. Löwise9416172003-05-03 10:12:45 +000013098int
13099main ()
13100{
13101void* p = inet_pton
13102 ;
13103 return 0;
13104}
13105_ACEOF
13106rm -f conftest.$ac_objext
13107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13108 (eval $ac_compile) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); } &&
13112 { ac_try='test -s conftest.$ac_objext'
13113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13114 (eval $ac_try) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); }; }; then
13118
13119cat >>confdefs.h <<\_ACEOF
13120#define HAVE_INET_PTON 1
13121_ACEOF
13122
13123 echo "$as_me:$LINENO: result: yes" >&5
13124echo "${ECHO_T}yes" >&6
13125else
13126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013127sed 's/^/| /' conftest.$ac_ext >&5
13128
Martin v. Löwise9416172003-05-03 10:12:45 +000013129echo "$as_me:$LINENO: result: no" >&5
13130echo "${ECHO_T}no" >&6
13131
13132fi
13133rm -f conftest.$ac_objext conftest.$ac_ext
13134
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013135# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013136echo "$as_me:$LINENO: checking for setgroups" >&5
13137echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13138cat >conftest.$ac_ext <<_ACEOF
13139#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013140/* confdefs.h. */
13141_ACEOF
13142cat confdefs.h >>conftest.$ac_ext
13143cat >>conftest.$ac_ext <<_ACEOF
13144/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013145
13146#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013147#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013148#ifdef HAVE_GRP_H
13149#include <grp.h>
13150#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013151
Martin v. Löwisd5843682002-11-21 20:41:28 +000013152int
13153main ()
13154{
13155void* p = setgroups
13156 ;
13157 return 0;
13158}
13159_ACEOF
13160rm -f conftest.$ac_objext
13161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13162 (eval $ac_compile) 2>&5
13163 ac_status=$?
13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165 (exit $ac_status); } &&
13166 { ac_try='test -s conftest.$ac_objext'
13167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13168 (eval $ac_try) 2>&5
13169 ac_status=$?
13170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171 (exit $ac_status); }; }; then
13172
13173cat >>confdefs.h <<\_ACEOF
13174#define HAVE_SETGROUPS 1
13175_ACEOF
13176
13177 echo "$as_me:$LINENO: result: yes" >&5
13178echo "${ECHO_T}yes" >&6
13179else
13180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013181sed 's/^/| /' conftest.$ac_ext >&5
13182
Martin v. Löwisd5843682002-11-21 20:41:28 +000013183echo "$as_me:$LINENO: result: no" >&5
13184echo "${ECHO_T}no" >&6
13185
13186fi
13187rm -f conftest.$ac_objext conftest.$ac_ext
13188
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013189# check for openpty and forkpty
13190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013192for ac_func in openpty
13193do
Martin v. Löwis11437992002-04-12 09:54:03 +000013194as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13195echo "$as_me:$LINENO: checking for $ac_func" >&5
13196echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13197if eval "test \"\${$as_ac_var+set}\" = set"; then
13198 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013199else
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 cat >conftest.$ac_ext <<_ACEOF
13201#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* confdefs.h. */
13203_ACEOF
13204cat confdefs.h >>conftest.$ac_ext
13205cat >>conftest.$ac_ext <<_ACEOF
13206/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013207/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013208 which can conflict with char $ac_func (); below.
13209 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013210 <limits.h> exists even on freestanding compilers. Under hpux,
13211 including <limits.h> includes <sys/time.h> and causes problems
13212 checking for functions defined therein. */
13213#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013214# include <limits.h>
13215#else
13216# include <assert.h>
13217#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013218/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013219#ifdef __cplusplus
13220extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013221{
Martin v. Löwis11437992002-04-12 09:54:03 +000013222#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013223/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 builtin and then its argument prototype would still apply. */
13225char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013226/* The GNU C library defines this for functions which it implements
13227 to always fail with ENOSYS. Some functions are actually named
13228 something starting with __ and the normal name is an alias. */
13229#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13230choke me
13231#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013232char (*f) () = $ac_func;
13233#endif
13234#ifdef __cplusplus
13235}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013236#endif
13237
Skip Montanaro6dead952003-09-25 14:50:04 +000013238int
13239main ()
13240{
13241return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 ;
13243 return 0;
13244}
13245_ACEOF
13246rm -f conftest.$ac_objext conftest$ac_exeext
13247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13248 (eval $ac_link) 2>&5
13249 ac_status=$?
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); } &&
13252 { ac_try='test -s conftest$ac_exeext'
13253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13254 (eval $ac_try) 2>&5
13255 ac_status=$?
13256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257 (exit $ac_status); }; }; then
13258 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013259else
Martin v. Löwis11437992002-04-12 09:54:03 +000013260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013261sed 's/^/| /' conftest.$ac_ext >&5
13262
Martin v. Löwis11437992002-04-12 09:54:03 +000013263eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013267echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13268echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13269if test `eval echo '${'$as_ac_var'}'` = yes; then
13270 cat >>confdefs.h <<_ACEOF
13271#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13272_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013274else
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13276echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13277if test "${ac_cv_lib_util_openpty+set}" = set; then
13278 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013279else
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013281LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013282cat >conftest.$ac_ext <<_ACEOF
13283#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* confdefs.h. */
13285_ACEOF
13286cat confdefs.h >>conftest.$ac_ext
13287cat >>conftest.$ac_ext <<_ACEOF
13288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Fred Drake8cef4cf2000-06-28 16:40:38 +000013290/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013291#ifdef __cplusplus
13292extern "C"
13293#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013294/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 builtin and then its argument prototype would still apply. */
13296char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013297int
13298main ()
13299{
13300openpty ();
13301 ;
13302 return 0;
13303}
13304_ACEOF
13305rm -f conftest.$ac_objext conftest$ac_exeext
13306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13307 (eval $ac_link) 2>&5
13308 ac_status=$?
13309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310 (exit $ac_status); } &&
13311 { ac_try='test -s conftest$ac_exeext'
13312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13313 (eval $ac_try) 2>&5
13314 ac_status=$?
13315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316 (exit $ac_status); }; }; then
13317 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013318else
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013320sed 's/^/| /' conftest.$ac_ext >&5
13321
Martin v. Löwis11437992002-04-12 09:54:03 +000013322ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13325LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013327echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13328echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13329if test $ac_cv_lib_util_openpty = yes; then
13330 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013331#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013332_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013333 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013334fi
13335
13336fi
13337done
13338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Fred Drake8cef4cf2000-06-28 16:40:38 +000013340for ac_func in forkpty
13341do
Martin v. Löwis11437992002-04-12 09:54:03 +000013342as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13343echo "$as_me:$LINENO: checking for $ac_func" >&5
13344echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13345if eval "test \"\${$as_ac_var+set}\" = set"; then
13346 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013347else
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 cat >conftest.$ac_ext <<_ACEOF
13349#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* confdefs.h. */
13351_ACEOF
13352cat confdefs.h >>conftest.$ac_ext
13353cat >>conftest.$ac_ext <<_ACEOF
13354/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013355/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013356 which can conflict with char $ac_func (); below.
13357 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013358 <limits.h> exists even on freestanding compilers. Under hpux,
13359 including <limits.h> includes <sys/time.h> and causes problems
13360 checking for functions defined therein. */
13361#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013362# include <limits.h>
13363#else
13364# include <assert.h>
13365#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013366/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013367#ifdef __cplusplus
13368extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013369{
Martin v. Löwis11437992002-04-12 09:54:03 +000013370#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013371/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 builtin and then its argument prototype would still apply. */
13373char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013374/* The GNU C library defines this for functions which it implements
13375 to always fail with ENOSYS. Some functions are actually named
13376 something starting with __ and the normal name is an alias. */
13377#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13378choke me
13379#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013380char (*f) () = $ac_func;
13381#endif
13382#ifdef __cplusplus
13383}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013384#endif
13385
Skip Montanaro6dead952003-09-25 14:50:04 +000013386int
13387main ()
13388{
13389return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 ;
13391 return 0;
13392}
13393_ACEOF
13394rm -f conftest.$ac_objext conftest$ac_exeext
13395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13396 (eval $ac_link) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); } &&
13400 { ac_try='test -s conftest$ac_exeext'
13401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13402 (eval $ac_try) 2>&5
13403 ac_status=$?
13404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 (exit $ac_status); }; }; then
13406 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013407else
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013409sed 's/^/| /' conftest.$ac_ext >&5
13410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013415echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13416echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13417if test `eval echo '${'$as_ac_var'}'` = yes; then
13418 cat >>confdefs.h <<_ACEOF
13419#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13420_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013421
Fred Drake8cef4cf2000-06-28 16:40:38 +000013422else
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13424echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13425if test "${ac_cv_lib_util_forkpty+set}" = set; then
13426 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013427else
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013429LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013430cat >conftest.$ac_ext <<_ACEOF
13431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013432/* confdefs.h. */
13433_ACEOF
13434cat confdefs.h >>conftest.$ac_ext
13435cat >>conftest.$ac_ext <<_ACEOF
13436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Fred Drake8cef4cf2000-06-28 16:40:38 +000013438/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013439#ifdef __cplusplus
13440extern "C"
13441#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013442/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 builtin and then its argument prototype would still apply. */
13444char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013445int
13446main ()
13447{
13448forkpty ();
13449 ;
13450 return 0;
13451}
13452_ACEOF
13453rm -f conftest.$ac_objext conftest$ac_exeext
13454if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13455 (eval $ac_link) 2>&5
13456 ac_status=$?
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); } &&
13459 { ac_try='test -s conftest$ac_exeext'
13460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13461 (eval $ac_try) 2>&5
13462 ac_status=$?
13463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13464 (exit $ac_status); }; }; then
13465 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013466else
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013468sed 's/^/| /' conftest.$ac_ext >&5
13469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13473LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013475echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13476echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13477if test $ac_cv_lib_util_forkpty = yes; then
13478 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013479#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013480_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013481 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013482fi
13483
13484fi
13485done
13486
Jack Jansendd19cf82001-12-06 22:36:17 +000013487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
13490
13491
13492
13493
13494
Fred Drake8cef4cf2000-06-28 16:40:38 +000013495for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13496do
Martin v. Löwis11437992002-04-12 09:54:03 +000013497as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13498echo "$as_me:$LINENO: checking for $ac_func" >&5
13499echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13500if eval "test \"\${$as_ac_var+set}\" = set"; then
13501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013502else
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 cat >conftest.$ac_ext <<_ACEOF
13504#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* confdefs.h. */
13506_ACEOF
13507cat confdefs.h >>conftest.$ac_ext
13508cat >>conftest.$ac_ext <<_ACEOF
13509/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013510/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013511 which can conflict with char $ac_func (); below.
13512 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013513 <limits.h> exists even on freestanding compilers. Under hpux,
13514 including <limits.h> includes <sys/time.h> and causes problems
13515 checking for functions defined therein. */
13516#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013517# include <limits.h>
13518#else
13519# include <assert.h>
13520#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013521/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013522#ifdef __cplusplus
13523extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013524{
Martin v. Löwis11437992002-04-12 09:54:03 +000013525#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013526/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013527 builtin and then its argument prototype would still apply. */
13528char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013529/* The GNU C library defines this for functions which it implements
13530 to always fail with ENOSYS. Some functions are actually named
13531 something starting with __ and the normal name is an alias. */
13532#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13533choke me
13534#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013535char (*f) () = $ac_func;
13536#endif
13537#ifdef __cplusplus
13538}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013539#endif
13540
Skip Montanaro6dead952003-09-25 14:50:04 +000013541int
13542main ()
13543{
13544return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ;
13546 return 0;
13547}
13548_ACEOF
13549rm -f conftest.$ac_objext conftest$ac_exeext
13550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13551 (eval $ac_link) 2>&5
13552 ac_status=$?
13553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554 (exit $ac_status); } &&
13555 { ac_try='test -s conftest$ac_exeext'
13556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13557 (eval $ac_try) 2>&5
13558 ac_status=$?
13559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13560 (exit $ac_status); }; }; then
13561 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562else
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013564sed 's/^/| /' conftest.$ac_ext >&5
13565
Martin v. Löwis11437992002-04-12 09:54:03 +000013566eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013568rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013570echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13571echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13572if test `eval echo '${'$as_ac_var'}'` = yes; then
13573 cat >>confdefs.h <<_ACEOF
13574#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13575_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013576
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013578done
13579
Michael W. Hudson54241132001-12-07 15:38:26 +000013580
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
13582
13583
13584
13585
Martin v. Löwis1142de32002-03-29 16:28:31 +000013586for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013587do
Martin v. Löwis11437992002-04-12 09:54:03 +000013588as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13589echo "$as_me:$LINENO: checking for $ac_func" >&5
13590echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13591if eval "test \"\${$as_ac_var+set}\" = set"; then
13592 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593else
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 cat >conftest.$ac_ext <<_ACEOF
13595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013596/* confdefs.h. */
13597_ACEOF
13598cat confdefs.h >>conftest.$ac_ext
13599cat >>conftest.$ac_ext <<_ACEOF
13600/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013601/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013602 which can conflict with char $ac_func (); below.
13603 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013604 <limits.h> exists even on freestanding compilers. Under hpux,
13605 including <limits.h> includes <sys/time.h> and causes problems
13606 checking for functions defined therein. */
13607#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013608# include <limits.h>
13609#else
13610# include <assert.h>
13611#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013612/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013613#ifdef __cplusplus
13614extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013615{
Martin v. Löwis11437992002-04-12 09:54:03 +000013616#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013617/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 builtin and then its argument prototype would still apply. */
13619char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013620/* The GNU C library defines this for functions which it implements
13621 to always fail with ENOSYS. Some functions are actually named
13622 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013623#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013624choke me
13625#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013626char (*f) () = $ac_func;
13627#endif
13628#ifdef __cplusplus
13629}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013630#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631
Skip Montanaro6dead952003-09-25 14:50:04 +000013632int
13633main ()
13634{
13635return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
13640rm -f conftest.$ac_objext conftest$ac_exeext
13641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13642 (eval $ac_link) 2>&5
13643 ac_status=$?
13644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645 (exit $ac_status); } &&
13646 { ac_try='test -s conftest$ac_exeext'
13647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13648 (eval $ac_try) 2>&5
13649 ac_status=$?
13650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651 (exit $ac_status); }; }; then
13652 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013653else
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013655sed 's/^/| /' conftest.$ac_ext >&5
13656
Martin v. Löwis11437992002-04-12 09:54:03 +000013657eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013661echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13662echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13663if test `eval echo '${'$as_ac_var'}'` = yes; then
13664 cat >>confdefs.h <<_ACEOF
13665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13666_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013667
Martin v. Löwis1142de32002-03-29 16:28:31 +000013668else
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013670fi
13671done
13672
13673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Martin v. Löwis1142de32002-03-29 16:28:31 +000013675for ac_func in getpgrp
13676do
Martin v. Löwis11437992002-04-12 09:54:03 +000013677as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13678echo "$as_me:$LINENO: checking for $ac_func" >&5
13679echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13680if eval "test \"\${$as_ac_var+set}\" = set"; then
13681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013682else
Martin v. Löwis11437992002-04-12 09:54:03 +000013683 cat >conftest.$ac_ext <<_ACEOF
13684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013685/* confdefs.h. */
13686_ACEOF
13687cat confdefs.h >>conftest.$ac_ext
13688cat >>conftest.$ac_ext <<_ACEOF
13689/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013690/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013691 which can conflict with char $ac_func (); below.
13692 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013693 <limits.h> exists even on freestanding compilers. Under hpux,
13694 including <limits.h> includes <sys/time.h> and causes problems
13695 checking for functions defined therein. */
13696#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013697# include <limits.h>
13698#else
13699# include <assert.h>
13700#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013702#ifdef __cplusplus
13703extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013704{
Martin v. Löwis11437992002-04-12 09:54:03 +000013705#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013706/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 builtin and then its argument prototype would still apply. */
13708char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013709/* The GNU C library defines this for functions which it implements
13710 to always fail with ENOSYS. Some functions are actually named
13711 something starting with __ and the normal name is an alias. */
13712#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13713choke me
13714#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013715char (*f) () = $ac_func;
13716#endif
13717#ifdef __cplusplus
13718}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013719#endif
13720
Skip Montanaro6dead952003-09-25 14:50:04 +000013721int
13722main ()
13723{
13724return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 ;
13726 return 0;
13727}
13728_ACEOF
13729rm -f conftest.$ac_objext conftest$ac_exeext
13730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13731 (eval $ac_link) 2>&5
13732 ac_status=$?
13733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); } &&
13735 { ac_try='test -s conftest$ac_exeext'
13736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13737 (eval $ac_try) 2>&5
13738 ac_status=$?
13739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13740 (exit $ac_status); }; }; then
13741 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013742else
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013744sed 's/^/| /' conftest.$ac_ext >&5
13745
Martin v. Löwis11437992002-04-12 09:54:03 +000013746eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13751echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13752if test `eval echo '${'$as_ac_var'}'` = yes; then
13753 cat >>confdefs.h <<_ACEOF
13754#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13755_ACEOF
13756 cat >conftest.$ac_ext <<_ACEOF
13757#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013758/* confdefs.h. */
13759_ACEOF
13760cat confdefs.h >>conftest.$ac_ext
13761cat >>conftest.$ac_ext <<_ACEOF
13762/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013763#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013764int
13765main ()
13766{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013767getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 ;
13769 return 0;
13770}
13771_ACEOF
13772rm -f conftest.$ac_objext
13773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13774 (eval $ac_compile) 2>&5
13775 ac_status=$?
13776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777 (exit $ac_status); } &&
13778 { ac_try='test -s conftest.$ac_objext'
13779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13780 (eval $ac_try) 2>&5
13781 ac_status=$?
13782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13783 (exit $ac_status); }; }; then
13784
13785cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013787_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788
Martin v. Löwis11437992002-04-12 09:54:03 +000013789
Guido van Rossumf78abae1997-01-21 22:02:36 +000013790else
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013792sed 's/^/| /' conftest.$ac_ext >&5
13793
Guido van Rossum627b2d71993-12-24 10:39:16 +000013794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013795rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013796
Guido van Rossum627b2d71993-12-24 10:39:16 +000013797fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013798done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799
Jack Jansen150753c2003-03-29 22:07:47 +000013800
13801for ac_func in setpgrp
13802do
13803as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13804echo "$as_me:$LINENO: checking for $ac_func" >&5
13805echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13806if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 cat >conftest.$ac_ext <<_ACEOF
13810#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* confdefs.h. */
13812_ACEOF
13813cat confdefs.h >>conftest.$ac_ext
13814cat >>conftest.$ac_ext <<_ACEOF
13815/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013816/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013817 which can conflict with char $ac_func (); below.
13818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013819 <limits.h> exists even on freestanding compilers. Under hpux,
13820 including <limits.h> includes <sys/time.h> and causes problems
13821 checking for functions defined therein. */
13822#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013823# include <limits.h>
13824#else
13825# include <assert.h>
13826#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013827/* Override any gcc2 internal prototype to avoid an error. */
13828#ifdef __cplusplus
13829extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013830{
Martin v. Löwis11437992002-04-12 09:54:03 +000013831#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013832/* We use char because int might match the return type of a gcc2
13833 builtin and then its argument prototype would still apply. */
13834char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013835/* The GNU C library defines this for functions which it implements
13836 to always fail with ENOSYS. Some functions are actually named
13837 something starting with __ and the normal name is an alias. */
13838#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13839choke me
13840#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013841char (*f) () = $ac_func;
13842#endif
13843#ifdef __cplusplus
13844}
Jack Jansen150753c2003-03-29 22:07:47 +000013845#endif
13846
Skip Montanaro6dead952003-09-25 14:50:04 +000013847int
13848main ()
13849{
13850return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 ;
13852 return 0;
13853}
13854_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013855rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13857 (eval $ac_link) 2>&5
13858 ac_status=$?
13859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013860 (exit $ac_status); } &&
13861 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13863 (eval $ac_try) 2>&5
13864 ac_status=$?
13865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13866 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013867 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013868else
Jack Jansen150753c2003-03-29 22:07:47 +000013869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013870sed 's/^/| /' conftest.$ac_ext >&5
13871
Jack Jansen150753c2003-03-29 22:07:47 +000013872eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013873fi
Jack Jansen150753c2003-03-29 22:07:47 +000013874rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013875fi
Jack Jansen150753c2003-03-29 22:07:47 +000013876echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13877echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13878if test `eval echo '${'$as_ac_var'}'` = yes; then
13879 cat >>confdefs.h <<_ACEOF
13880#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13881_ACEOF
13882 cat >conftest.$ac_ext <<_ACEOF
13883#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013884/* confdefs.h. */
13885_ACEOF
13886cat confdefs.h >>conftest.$ac_ext
13887cat >>conftest.$ac_ext <<_ACEOF
13888/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013889#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013890int
13891main ()
13892{
13893setpgrp(0,0);
13894 ;
13895 return 0;
13896}
13897_ACEOF
13898rm -f conftest.$ac_objext
13899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13900 (eval $ac_compile) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); } &&
13904 { ac_try='test -s conftest.$ac_objext'
13905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13906 (eval $ac_try) 2>&5
13907 ac_status=$?
13908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13909 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013910
13911cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013912#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013913_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013914
Jack Jansen150753c2003-03-29 22:07:47 +000013915
13916else
13917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013918sed 's/^/| /' conftest.$ac_ext >&5
13919
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013920fi
Jack Jansen150753c2003-03-29 22:07:47 +000013921rm -f conftest.$ac_objext conftest.$ac_ext
13922
13923fi
13924done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
Thomas Wouters3a584202000-08-05 23:28:51 +000013927for ac_func in gettimeofday
13928do
Martin v. Löwis11437992002-04-12 09:54:03 +000013929as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13930echo "$as_me:$LINENO: checking for $ac_func" >&5
13931echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13932if eval "test \"\${$as_ac_var+set}\" = set"; then
13933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013934else
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 cat >conftest.$ac_ext <<_ACEOF
13936#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013937/* confdefs.h. */
13938_ACEOF
13939cat confdefs.h >>conftest.$ac_ext
13940cat >>conftest.$ac_ext <<_ACEOF
13941/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013942/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013943 which can conflict with char $ac_func (); below.
13944 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013945 <limits.h> exists even on freestanding compilers. Under hpux,
13946 including <limits.h> includes <sys/time.h> and causes problems
13947 checking for functions defined therein. */
13948#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013949# include <limits.h>
13950#else
13951# include <assert.h>
13952#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013953/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013954#ifdef __cplusplus
13955extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013956{
Martin v. Löwis11437992002-04-12 09:54:03 +000013957#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013958/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 builtin and then its argument prototype would still apply. */
13960char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013961/* The GNU C library defines this for functions which it implements
13962 to always fail with ENOSYS. Some functions are actually named
13963 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013964#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965choke me
13966#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013967char (*f) () = $ac_func;
13968#endif
13969#ifdef __cplusplus
13970}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013971#endif
13972
Skip Montanaro6dead952003-09-25 14:50:04 +000013973int
13974main ()
13975{
13976return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 ;
13978 return 0;
13979}
13980_ACEOF
13981rm -f conftest.$ac_objext conftest$ac_exeext
13982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13983 (eval $ac_link) 2>&5
13984 ac_status=$?
13985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13986 (exit $ac_status); } &&
13987 { ac_try='test -s conftest$ac_exeext'
13988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13989 (eval $ac_try) 2>&5
13990 ac_status=$?
13991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13992 (exit $ac_status); }; }; then
13993 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013994else
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013996sed 's/^/| /' conftest.$ac_ext >&5
13997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014002echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14003echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14004if test `eval echo '${'$as_ac_var'}'` = yes; then
14005 cat >>confdefs.h <<_ACEOF
14006#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14007_ACEOF
14008 cat >conftest.$ac_ext <<_ACEOF
14009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014010/* confdefs.h. */
14011_ACEOF
14012cat confdefs.h >>conftest.$ac_ext
14013cat >>conftest.$ac_ext <<_ACEOF
14014/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014015#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014016int
14017main ()
14018{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014020 ;
14021 return 0;
14022}
14023_ACEOF
14024rm -f conftest.$ac_objext
14025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14026 (eval $ac_compile) 2>&5
14027 ac_status=$?
14028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14029 (exit $ac_status); } &&
14030 { ac_try='test -s conftest.$ac_objext'
14031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14032 (eval $ac_try) 2>&5
14033 ac_status=$?
14034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14035 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014036 :
14037else
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014039sed 's/^/| /' conftest.$ac_ext >&5
14040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
14042cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014043#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014044_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
Guido van Rossum627b2d71993-12-24 10:39:16 +000014047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014048rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014050fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014051done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052
Michael W. Hudson54241132001-12-07 15:38:26 +000014053
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014054echo "$as_me:$LINENO: checking for major" >&5
14055echo $ECHO_N "checking for major... $ECHO_C" >&6
14056cat >conftest.$ac_ext <<_ACEOF
14057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014058/* confdefs.h. */
14059_ACEOF
14060cat confdefs.h >>conftest.$ac_ext
14061cat >>conftest.$ac_ext <<_ACEOF
14062/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014063
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014064#if defined(MAJOR_IN_MKDEV)
14065#include <sys/mkdev.h>
14066#elif defined(MAJOR_IN_SYSMACROS)
14067#include <sys/sysmacros.h>
14068#else
14069#include <sys/types.h>
14070#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014071
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014072int
14073main ()
14074{
14075
14076 makedev(major(0),minor(0));
14077
14078 ;
14079 return 0;
14080}
14081_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014082rm -f conftest.$ac_objext conftest$ac_exeext
14083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14084 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014085 ac_status=$?
14086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14087 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014088 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14090 (eval $ac_try) 2>&5
14091 ac_status=$?
14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14093 (exit $ac_status); }; }; then
14094
14095
14096cat >>confdefs.h <<\_ACEOF
14097#define HAVE_DEVICE_MACROS 1
14098_ACEOF
14099
14100 echo "$as_me:$LINENO: result: yes" >&5
14101echo "${ECHO_T}yes" >&6
14102
14103else
14104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014105sed 's/^/| /' conftest.$ac_ext >&5
14106
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014107
14108 echo "$as_me:$LINENO: result: no" >&5
14109echo "${ECHO_T}no" >&6
14110
14111fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014113
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014114# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014115# for [no]getaddrinfo in netdb.h.
14116echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14117echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14118cat >conftest.$ac_ext <<_ACEOF
14119#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014120/* confdefs.h. */
14121_ACEOF
14122cat confdefs.h >>conftest.$ac_ext
14123cat >>conftest.$ac_ext <<_ACEOF
14124/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014125
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014126#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014127#include <sys/socket.h>
14128#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014129#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131int
14132main ()
14133{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014134
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014135getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014136
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext conftest$ac_exeext
14142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14143 (eval $ac_link) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); } &&
14147 { ac_try='test -s conftest$ac_exeext'
14148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14149 (eval $ac_try) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); }; }; then
14153
14154echo "$as_me:$LINENO: result: yes" >&5
14155echo "${ECHO_T}yes" >&6
14156echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14157echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014158if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 echo "$as_me:$LINENO: result: buggy" >&5
14160echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014161buggygetaddrinfo=yes
14162else
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 cat >conftest.$ac_ext <<_ACEOF
14164#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014165/* confdefs.h. */
14166_ACEOF
14167cat confdefs.h >>conftest.$ac_ext
14168cat >>conftest.$ac_ext <<_ACEOF
14169/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014170
14171#include <sys/types.h>
14172#include <netdb.h>
14173#include <string.h>
14174#include <sys/socket.h>
14175#include <netinet/in.h>
14176
14177main()
14178{
14179 int passive, gaierr, inet4 = 0, inet6 = 0;
14180 struct addrinfo hints, *ai, *aitop;
14181 char straddr[INET6_ADDRSTRLEN], strport[16];
14182
14183 for (passive = 0; passive <= 1; passive++) {
14184 memset(&hints, 0, sizeof(hints));
14185 hints.ai_family = AF_UNSPEC;
14186 hints.ai_flags = passive ? AI_PASSIVE : 0;
14187 hints.ai_socktype = SOCK_STREAM;
14188 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14189 (void)gai_strerror(gaierr);
14190 goto bad;
14191 }
14192 for (ai = aitop; ai; ai = ai->ai_next) {
14193 if (ai->ai_addr == NULL ||
14194 ai->ai_addrlen == 0 ||
14195 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14196 straddr, sizeof(straddr), strport, sizeof(strport),
14197 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14198 goto bad;
14199 }
14200 switch (ai->ai_family) {
14201 case AF_INET:
14202 if (strcmp(strport, "54321") != 0) {
14203 goto bad;
14204 }
14205 if (passive) {
14206 if (strcmp(straddr, "0.0.0.0") != 0) {
14207 goto bad;
14208 }
14209 } else {
14210 if (strcmp(straddr, "127.0.0.1") != 0) {
14211 goto bad;
14212 }
14213 }
14214 inet4++;
14215 break;
14216 case AF_INET6:
14217 if (strcmp(strport, "54321") != 0) {
14218 goto bad;
14219 }
14220 if (passive) {
14221 if (strcmp(straddr, "::") != 0) {
14222 goto bad;
14223 }
14224 } else {
14225 if (strcmp(straddr, "::1") != 0) {
14226 goto bad;
14227 }
14228 }
14229 inet6++;
14230 break;
14231 case AF_UNSPEC:
14232 goto bad;
14233 break;
14234 default:
14235 /* another family support? */
14236 break;
14237 }
14238 }
14239 }
14240
14241 if (!(inet4 == 0 || inet4 == 2))
14242 goto bad;
14243 if (!(inet6 == 0 || inet6 == 2))
14244 goto bad;
14245
14246 if (aitop)
14247 freeaddrinfo(aitop);
14248 exit(0);
14249
14250 bad:
14251 if (aitop)
14252 freeaddrinfo(aitop);
14253 exit(1);
14254}
14255
Martin v. Löwis11437992002-04-12 09:54:03 +000014256_ACEOF
14257rm -f conftest$ac_exeext
14258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14259 (eval $ac_link) 2>&5
14260 ac_status=$?
14261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14264 (eval $ac_try) 2>&5
14265 ac_status=$?
14266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14267 (exit $ac_status); }; }; then
14268 echo "$as_me:$LINENO: result: good" >&5
14269echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014270buggygetaddrinfo=no
14271else
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 echo "$as_me: program exited with status $ac_status" >&5
14273echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014274sed 's/^/| /' conftest.$ac_ext >&5
14275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276( exit $ac_status )
14277echo "$as_me:$LINENO: result: buggy" >&5
14278echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014279buggygetaddrinfo=yes
14280fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014281rm -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 +000014282fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014283else
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014285sed 's/^/| /' conftest.$ac_ext >&5
14286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
14288echo "$as_me:$LINENO: result: no" >&5
14289echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014290buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014291
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014293rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014294
14295if test "$buggygetaddrinfo" = "yes"; then
14296 if test "$ipv6" = "yes"; then
14297 echo 'Fatal: You must get working getaddrinfo() function.'
14298 echo ' or you can specify "--disable-ipv6"'.
14299 exit 1
14300 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014301else
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
14303cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014304#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014305_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014306
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014309for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014310do
Martin v. Löwis11437992002-04-12 09:54:03 +000014311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14312echo "$as_me:$LINENO: checking for $ac_func" >&5
14313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14314if eval "test \"\${$as_ac_var+set}\" = set"; then
14315 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014316else
Martin v. Löwis11437992002-04-12 09:54:03 +000014317 cat >conftest.$ac_ext <<_ACEOF
14318#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014319/* confdefs.h. */
14320_ACEOF
14321cat confdefs.h >>conftest.$ac_ext
14322cat >>conftest.$ac_ext <<_ACEOF
14323/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014324/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014325 which can conflict with char $ac_func (); below.
14326 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014327 <limits.h> exists even on freestanding compilers. Under hpux,
14328 including <limits.h> includes <sys/time.h> and causes problems
14329 checking for functions defined therein. */
14330#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014331# include <limits.h>
14332#else
14333# include <assert.h>
14334#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014335/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014336#ifdef __cplusplus
14337extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014338{
Martin v. Löwis11437992002-04-12 09:54:03 +000014339#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014340/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 builtin and then its argument prototype would still apply. */
14342char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014343/* The GNU C library defines this for functions which it implements
14344 to always fail with ENOSYS. Some functions are actually named
14345 something starting with __ and the normal name is an alias. */
14346#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14347choke me
14348#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014349char (*f) () = $ac_func;
14350#endif
14351#ifdef __cplusplus
14352}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014353#endif
14354
Skip Montanaro6dead952003-09-25 14:50:04 +000014355int
14356main ()
14357{
14358return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 ;
14360 return 0;
14361}
14362_ACEOF
14363rm -f conftest.$ac_objext conftest$ac_exeext
14364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14365 (eval $ac_link) 2>&5
14366 ac_status=$?
14367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14368 (exit $ac_status); } &&
14369 { ac_try='test -s conftest$ac_exeext'
14370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14371 (eval $ac_try) 2>&5
14372 ac_status=$?
14373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14374 (exit $ac_status); }; }; then
14375 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014376else
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014378sed 's/^/| /' conftest.$ac_ext >&5
14379
Martin v. Löwis11437992002-04-12 09:54:03 +000014380eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014381fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014382rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014384echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14385echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14386if test `eval echo '${'$as_ac_var'}'` = yes; then
14387 cat >>confdefs.h <<_ACEOF
14388#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14389_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014390
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014391fi
14392done
14393
Michael W. Hudson54241132001-12-07 15:38:26 +000014394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014395# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014396echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14397echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14398if test "${ac_cv_header_time+set}" = set; then
14399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014400else
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 cat >conftest.$ac_ext <<_ACEOF
14402#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014403/* confdefs.h. */
14404_ACEOF
14405cat confdefs.h >>conftest.$ac_ext
14406cat >>conftest.$ac_ext <<_ACEOF
14407/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014408#include <sys/types.h>
14409#include <sys/time.h>
14410#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412int
14413main ()
14414{
14415if ((struct tm *) 0)
14416return 0;
14417 ;
14418 return 0;
14419}
14420_ACEOF
14421rm -f conftest.$ac_objext
14422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14423 (eval $ac_compile) 2>&5
14424 ac_status=$?
14425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14426 (exit $ac_status); } &&
14427 { ac_try='test -s conftest.$ac_objext'
14428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14429 (eval $ac_try) 2>&5
14430 ac_status=$?
14431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14432 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014433 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014434else
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014436sed 's/^/| /' conftest.$ac_ext >&5
14437
Martin v. Löwis11437992002-04-12 09:54:03 +000014438ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014440rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014442echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14443echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014444if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
14446cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014447#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014449
14450fi
14451
Martin v. Löwis11437992002-04-12 09:54:03 +000014452echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14453echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14454if test "${ac_cv_struct_tm+set}" = set; then
14455 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014456else
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 cat >conftest.$ac_ext <<_ACEOF
14458#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* confdefs.h. */
14460_ACEOF
14461cat confdefs.h >>conftest.$ac_ext
14462cat >>conftest.$ac_ext <<_ACEOF
14463/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014464#include <sys/types.h>
14465#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467int
14468main ()
14469{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014470struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 ;
14472 return 0;
14473}
14474_ACEOF
14475rm -f conftest.$ac_objext
14476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14477 (eval $ac_compile) 2>&5
14478 ac_status=$?
14479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14480 (exit $ac_status); } &&
14481 { ac_try='test -s conftest.$ac_objext'
14482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14483 (eval $ac_try) 2>&5
14484 ac_status=$?
14485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014487 ac_cv_struct_tm=time.h
14488else
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014490sed 's/^/| /' conftest.$ac_ext >&5
14491
Martin v. Löwis11437992002-04-12 09:54:03 +000014492ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014494rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014496echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14497echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014498if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
14500cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014501#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014503
14504fi
14505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14507echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14508if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014510else
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 cat >conftest.$ac_ext <<_ACEOF
14512#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014513/* confdefs.h. */
14514_ACEOF
14515cat confdefs.h >>conftest.$ac_ext
14516cat >>conftest.$ac_ext <<_ACEOF
14517/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014518#include <sys/types.h>
14519#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522int
14523main ()
14524{
14525static struct tm ac_aggr;
14526if (ac_aggr.tm_zone)
14527return 0;
14528 ;
14529 return 0;
14530}
14531_ACEOF
14532rm -f conftest.$ac_objext
14533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14534 (eval $ac_compile) 2>&5
14535 ac_status=$?
14536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14537 (exit $ac_status); } &&
14538 { ac_try='test -s conftest.$ac_objext'
14539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14540 (eval $ac_try) 2>&5
14541 ac_status=$?
14542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543 (exit $ac_status); }; }; then
14544 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014545else
Martin v. Löwis11437992002-04-12 09:54:03 +000014546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014547sed 's/^/| /' conftest.$ac_ext >&5
14548
14549cat >conftest.$ac_ext <<_ACEOF
14550#line $LINENO "configure"
14551/* confdefs.h. */
14552_ACEOF
14553cat confdefs.h >>conftest.$ac_ext
14554cat >>conftest.$ac_ext <<_ACEOF
14555/* end confdefs.h. */
14556#include <sys/types.h>
14557#include <$ac_cv_struct_tm>
14558
14559
14560int
14561main ()
14562{
14563static struct tm ac_aggr;
14564if (sizeof ac_aggr.tm_zone)
14565return 0;
14566 ;
14567 return 0;
14568}
14569_ACEOF
14570rm -f conftest.$ac_objext
14571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14572 (eval $ac_compile) 2>&5
14573 ac_status=$?
14574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14575 (exit $ac_status); } &&
14576 { ac_try='test -s conftest.$ac_objext'
14577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14578 (eval $ac_try) 2>&5
14579 ac_status=$?
14580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14581 (exit $ac_status); }; }; then
14582 ac_cv_member_struct_tm_tm_zone=yes
14583else
14584 echo "$as_me: failed program was:" >&5
14585sed 's/^/| /' conftest.$ac_ext >&5
14586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014589rm -f conftest.$ac_objext conftest.$ac_ext
14590fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014591rm -f conftest.$ac_objext conftest.$ac_ext
14592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014593echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14594echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14595if test $ac_cv_member_struct_tm_tm_zone = yes; then
14596
14597cat >>confdefs.h <<_ACEOF
14598#define HAVE_STRUCT_TM_TM_ZONE 1
14599_ACEOF
14600
14601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014602fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014603
Martin v. Löwis11437992002-04-12 09:54:03 +000014604if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14605
14606cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014607#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014608_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014609
14610else
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 echo "$as_me:$LINENO: checking for tzname" >&5
14612echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14613if test "${ac_cv_var_tzname+set}" = set; then
14614 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014615else
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 cat >conftest.$ac_ext <<_ACEOF
14617#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014618/* confdefs.h. */
14619_ACEOF
14620cat confdefs.h >>conftest.$ac_ext
14621cat >>conftest.$ac_ext <<_ACEOF
14622/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014623#include <time.h>
14624#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014625extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628int
14629main ()
14630{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014631atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ;
14633 return 0;
14634}
14635_ACEOF
14636rm -f conftest.$ac_objext conftest$ac_exeext
14637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14638 (eval $ac_link) 2>&5
14639 ac_status=$?
14640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14641 (exit $ac_status); } &&
14642 { ac_try='test -s conftest$ac_exeext'
14643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14644 (eval $ac_try) 2>&5
14645 ac_status=$?
14646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14647 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014648 ac_cv_var_tzname=yes
14649else
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014651sed 's/^/| /' conftest.$ac_ext >&5
14652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014657echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14658echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014659 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014660
14661cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014662#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014663_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014664
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014665 fi
14666fi
14667
Martin v. Löwis11437992002-04-12 09:54:03 +000014668echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14669echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14670if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14671 echo $ECHO_N "(cached) $ECHO_C" >&6
14672else
14673 cat >conftest.$ac_ext <<_ACEOF
14674#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014675/* confdefs.h. */
14676_ACEOF
14677cat confdefs.h >>conftest.$ac_ext
14678cat >>conftest.$ac_ext <<_ACEOF
14679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014680$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014681int
14682main ()
14683{
14684static struct stat ac_aggr;
14685if (ac_aggr.st_rdev)
14686return 0;
14687 ;
14688 return 0;
14689}
14690_ACEOF
14691rm -f conftest.$ac_objext
14692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14693 (eval $ac_compile) 2>&5
14694 ac_status=$?
14695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14696 (exit $ac_status); } &&
14697 { ac_try='test -s conftest.$ac_objext'
14698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14699 (eval $ac_try) 2>&5
14700 ac_status=$?
14701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702 (exit $ac_status); }; }; then
14703 ac_cv_member_struct_stat_st_rdev=yes
14704else
14705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014706sed 's/^/| /' conftest.$ac_ext >&5
14707
14708cat >conftest.$ac_ext <<_ACEOF
14709#line $LINENO "configure"
14710/* confdefs.h. */
14711_ACEOF
14712cat confdefs.h >>conftest.$ac_ext
14713cat >>conftest.$ac_ext <<_ACEOF
14714/* end confdefs.h. */
14715$ac_includes_default
14716int
14717main ()
14718{
14719static struct stat ac_aggr;
14720if (sizeof ac_aggr.st_rdev)
14721return 0;
14722 ;
14723 return 0;
14724}
14725_ACEOF
14726rm -f conftest.$ac_objext
14727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14728 (eval $ac_compile) 2>&5
14729 ac_status=$?
14730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14731 (exit $ac_status); } &&
14732 { ac_try='test -s conftest.$ac_objext'
14733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14734 (eval $ac_try) 2>&5
14735 ac_status=$?
14736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14737 (exit $ac_status); }; }; then
14738 ac_cv_member_struct_stat_st_rdev=yes
14739else
14740 echo "$as_me: failed program was:" >&5
14741sed 's/^/| /' conftest.$ac_ext >&5
14742
Martin v. Löwis11437992002-04-12 09:54:03 +000014743ac_cv_member_struct_stat_st_rdev=no
14744fi
14745rm -f conftest.$ac_objext conftest.$ac_ext
14746fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014747rm -f conftest.$ac_objext conftest.$ac_ext
14748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014749echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14750echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14751if test $ac_cv_member_struct_stat_st_rdev = yes; then
14752
14753cat >>confdefs.h <<_ACEOF
14754#define HAVE_STRUCT_STAT_ST_RDEV 1
14755_ACEOF
14756
14757
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014758fi
14759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14761echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14762if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014764else
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 cat >conftest.$ac_ext <<_ACEOF
14766#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014767/* confdefs.h. */
14768_ACEOF
14769cat confdefs.h >>conftest.$ac_ext
14770cat >>conftest.$ac_ext <<_ACEOF
14771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014772$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014773int
14774main ()
14775{
14776static struct stat ac_aggr;
14777if (ac_aggr.st_blksize)
14778return 0;
14779 ;
14780 return 0;
14781}
14782_ACEOF
14783rm -f conftest.$ac_objext
14784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14785 (eval $ac_compile) 2>&5
14786 ac_status=$?
14787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14788 (exit $ac_status); } &&
14789 { ac_try='test -s conftest.$ac_objext'
14790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14791 (eval $ac_try) 2>&5
14792 ac_status=$?
14793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794 (exit $ac_status); }; }; then
14795 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014796else
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014798sed 's/^/| /' conftest.$ac_ext >&5
14799
14800cat >conftest.$ac_ext <<_ACEOF
14801#line $LINENO "configure"
14802/* confdefs.h. */
14803_ACEOF
14804cat confdefs.h >>conftest.$ac_ext
14805cat >>conftest.$ac_ext <<_ACEOF
14806/* end confdefs.h. */
14807$ac_includes_default
14808int
14809main ()
14810{
14811static struct stat ac_aggr;
14812if (sizeof ac_aggr.st_blksize)
14813return 0;
14814 ;
14815 return 0;
14816}
14817_ACEOF
14818rm -f conftest.$ac_objext
14819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14820 (eval $ac_compile) 2>&5
14821 ac_status=$?
14822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14823 (exit $ac_status); } &&
14824 { ac_try='test -s conftest.$ac_objext'
14825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14826 (eval $ac_try) 2>&5
14827 ac_status=$?
14828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14829 (exit $ac_status); }; }; then
14830 ac_cv_member_struct_stat_st_blksize=yes
14831else
14832 echo "$as_me: failed program was:" >&5
14833sed 's/^/| /' conftest.$ac_ext >&5
14834
Martin v. Löwis11437992002-04-12 09:54:03 +000014835ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014837rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014838fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014839rm -f conftest.$ac_objext conftest.$ac_ext
14840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014841echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14842echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14843if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014844
Martin v. Löwis11437992002-04-12 09:54:03 +000014845cat >>confdefs.h <<_ACEOF
14846#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14847_ACEOF
14848
14849
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014850fi
14851
Martin v. Löwis11437992002-04-12 09:54:03 +000014852echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14853echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14854if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014856else
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 cat >conftest.$ac_ext <<_ACEOF
14858#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014859/* confdefs.h. */
14860_ACEOF
14861cat confdefs.h >>conftest.$ac_ext
14862cat >>conftest.$ac_ext <<_ACEOF
14863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014864$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014865int
14866main ()
14867{
14868static struct stat ac_aggr;
14869if (ac_aggr.st_blocks)
14870return 0;
14871 ;
14872 return 0;
14873}
14874_ACEOF
14875rm -f conftest.$ac_objext
14876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14877 (eval $ac_compile) 2>&5
14878 ac_status=$?
14879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14880 (exit $ac_status); } &&
14881 { ac_try='test -s conftest.$ac_objext'
14882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14883 (eval $ac_try) 2>&5
14884 ac_status=$?
14885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886 (exit $ac_status); }; }; then
14887 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014888else
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014890sed 's/^/| /' conftest.$ac_ext >&5
14891
14892cat >conftest.$ac_ext <<_ACEOF
14893#line $LINENO "configure"
14894/* confdefs.h. */
14895_ACEOF
14896cat confdefs.h >>conftest.$ac_ext
14897cat >>conftest.$ac_ext <<_ACEOF
14898/* end confdefs.h. */
14899$ac_includes_default
14900int
14901main ()
14902{
14903static struct stat ac_aggr;
14904if (sizeof ac_aggr.st_blocks)
14905return 0;
14906 ;
14907 return 0;
14908}
14909_ACEOF
14910rm -f conftest.$ac_objext
14911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14912 (eval $ac_compile) 2>&5
14913 ac_status=$?
14914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915 (exit $ac_status); } &&
14916 { ac_try='test -s conftest.$ac_objext'
14917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14918 (eval $ac_try) 2>&5
14919 ac_status=$?
14920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14921 (exit $ac_status); }; }; then
14922 ac_cv_member_struct_stat_st_blocks=yes
14923else
14924 echo "$as_me: failed program was:" >&5
14925sed 's/^/| /' conftest.$ac_ext >&5
14926
Martin v. Löwis11437992002-04-12 09:54:03 +000014927ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014928fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014929rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014930fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014931rm -f conftest.$ac_objext conftest.$ac_ext
14932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014933echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14934echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14935if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014936
Martin v. Löwis11437992002-04-12 09:54:03 +000014937cat >>confdefs.h <<_ACEOF
14938#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14939_ACEOF
14940
14941
14942cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014943#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014944_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014945
14946else
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014948fi
14949
Michael W. Hudson54241132001-12-07 15:38:26 +000014950
Martin v. Löwis11437992002-04-12 09:54:03 +000014951
14952echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14953echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14954if test "${ac_cv_header_time_altzone+set}" = set; then
14955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956else
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 cat >conftest.$ac_ext <<_ACEOF
14958#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014959/* confdefs.h. */
14960_ACEOF
14961cat confdefs.h >>conftest.$ac_ext
14962cat >>conftest.$ac_ext <<_ACEOF
14963/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014964#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014965int
14966main ()
14967{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014968return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ;
14970 return 0;
14971}
14972_ACEOF
14973rm -f conftest.$ac_objext
14974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14975 (eval $ac_compile) 2>&5
14976 ac_status=$?
14977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978 (exit $ac_status); } &&
14979 { ac_try='test -s conftest.$ac_objext'
14980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14981 (eval $ac_try) 2>&5
14982 ac_status=$?
14983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14984 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014985 ac_cv_header_time_altzone=yes
14986else
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014988sed 's/^/| /' conftest.$ac_ext >&5
14989
Martin v. Löwis11437992002-04-12 09:54:03 +000014990ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014992rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014993fi
14994
Martin v. Löwis11437992002-04-12 09:54:03 +000014995echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14996echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014997if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014998
14999cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015000#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015001_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015002
15003fi
15004
Guido van Rossumda88dad1995-01-26 00:46:29 +000015005was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015006echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15007echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15008cat >conftest.$ac_ext <<_ACEOF
15009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* confdefs.h. */
15011_ACEOF
15012cat confdefs.h >>conftest.$ac_ext
15013cat >>conftest.$ac_ext <<_ACEOF
15014/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015015
15016#include <sys/types.h>
15017#include <sys/select.h>
15018#include <sys/time.h>
15019
Martin v. Löwis11437992002-04-12 09:54:03 +000015020int
15021main ()
15022{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015023;
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ;
15025 return 0;
15026}
15027_ACEOF
15028rm -f conftest.$ac_objext
15029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15030 (eval $ac_compile) 2>&5
15031 ac_status=$?
15032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); } &&
15034 { ac_try='test -s conftest.$ac_objext'
15035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15036 (eval $ac_try) 2>&5
15037 ac_status=$?
15038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15039 (exit $ac_status); }; }; then
15040
15041
15042cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015043#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015044_ACEOF
15045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015046 was_it_defined=yes
15047
Guido van Rossumf78abae1997-01-21 22:02:36 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015050sed 's/^/| /' conftest.$ac_ext >&5
15051
Guido van Rossum7f43da71994-08-01 12:15:30 +000015052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015053rm -f conftest.$ac_objext conftest.$ac_ext
15054echo "$as_me:$LINENO: result: $was_it_defined" >&5
15055echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015056
Martin v. Löwis11437992002-04-12 09:54:03 +000015057echo "$as_me:$LINENO: checking for addrinfo" >&5
15058echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15059if test "${ac_cv_struct_addrinfo+set}" = set; then
15060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015061else
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 cat >conftest.$ac_ext <<_ACEOF
15063#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015064/* confdefs.h. */
15065_ACEOF
15066cat confdefs.h >>conftest.$ac_ext
15067cat >>conftest.$ac_ext <<_ACEOF
15068/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015069
15070# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015071int
15072main ()
15073{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015074struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext
15080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15081 (eval $ac_compile) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); } &&
15085 { ac_try='test -s conftest.$ac_objext'
15086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
15089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015091 ac_cv_struct_addrinfo=yes
15092else
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015094sed 's/^/| /' conftest.$ac_ext >&5
15095
Martin v. Löwis11437992002-04-12 09:54:03 +000015096ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015098rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015099fi
15100
Martin v. Löwis11437992002-04-12 09:54:03 +000015101echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15102echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015103if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015104
15105cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015106#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015107_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015108
15109fi
15110
Martin v. Löwis11437992002-04-12 09:54:03 +000015111echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15112echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15113if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15114 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015115else
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 cat >conftest.$ac_ext <<_ACEOF
15117#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015118/* confdefs.h. */
15119_ACEOF
15120cat confdefs.h >>conftest.$ac_ext
15121cat >>conftest.$ac_ext <<_ACEOF
15122/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015123
15124# include <sys/types.h>
15125# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015126int
15127main ()
15128{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015129struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 ;
15131 return 0;
15132}
15133_ACEOF
15134rm -f conftest.$ac_objext
15135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15136 (eval $ac_compile) 2>&5
15137 ac_status=$?
15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139 (exit $ac_status); } &&
15140 { ac_try='test -s conftest.$ac_objext'
15141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142 (eval $ac_try) 2>&5
15143 ac_status=$?
15144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015146 ac_cv_struct_sockaddr_storage=yes
15147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015149sed 's/^/| /' conftest.$ac_ext >&5
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015153rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015154fi
15155
Martin v. Löwis11437992002-04-12 09:54:03 +000015156echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15157echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015158if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
15160cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015161#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015162_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015163
15164fi
15165
Guido van Rossum627b2d71993-12-24 10:39:16 +000015166# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015167
Michael W. Hudson54241132001-12-07 15:38:26 +000015168
Martin v. Löwis11437992002-04-12 09:54:03 +000015169echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15170echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15171if test "${ac_cv_c_char_unsigned+set}" = set; then
15172 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015173else
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 cat >conftest.$ac_ext <<_ACEOF
15175#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015176/* confdefs.h. */
15177_ACEOF
15178cat confdefs.h >>conftest.$ac_ext
15179cat >>conftest.$ac_ext <<_ACEOF
15180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015181$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015182int
15183main ()
15184{
15185static int test_array [1 - 2 * !(((char) -1) < 0)];
15186test_array [0] = 0
15187
15188 ;
15189 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015190}
Martin v. Löwis11437992002-04-12 09:54:03 +000015191_ACEOF
15192rm -f conftest.$ac_objext
15193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15194 (eval $ac_compile) 2>&5
15195 ac_status=$?
15196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15197 (exit $ac_status); } &&
15198 { ac_try='test -s conftest.$ac_objext'
15199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15200 (eval $ac_try) 2>&5
15201 ac_status=$?
15202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015204 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015205else
15206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015207sed 's/^/| /' conftest.$ac_ext >&5
15208
Martin v. Löwis11437992002-04-12 09:54:03 +000015209ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015211rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015213echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15214echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015215if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015217#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015218_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219
15220fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015221
Martin v. Löwis11437992002-04-12 09:54:03 +000015222echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15223echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15224if test "${ac_cv_c_const+set}" = set; then
15225 echo $ECHO_N "(cached) $ECHO_C" >&6
15226else
15227 cat >conftest.$ac_ext <<_ACEOF
15228#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015229/* confdefs.h. */
15230_ACEOF
15231cat confdefs.h >>conftest.$ac_ext
15232cat >>conftest.$ac_ext <<_ACEOF
15233/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234
Martin v. Löwis11437992002-04-12 09:54:03 +000015235int
15236main ()
15237{
15238/* FIXME: Include the comments suggested by Paul. */
15239#ifndef __cplusplus
15240 /* Ultrix mips cc rejects this. */
15241 typedef int charset[2];
15242 const charset x;
15243 /* SunOS 4.1.1 cc rejects this. */
15244 char const *const *ccp;
15245 char **p;
15246 /* NEC SVR4.0.2 mips cc rejects this. */
15247 struct point {int x, y;};
15248 static struct point const zero = {0,0};
15249 /* AIX XL C 1.02.0.0 rejects this.
15250 It does not let you subtract one const X* pointer from another in
15251 an arm of an if-expression whose if-part is not a constant
15252 expression */
15253 const char *g = "string";
15254 ccp = &g + (g ? g-g : 0);
15255 /* HPUX 7.0 cc rejects these. */
15256 ++ccp;
15257 p = (char**) ccp;
15258 ccp = (char const *const *) p;
15259 { /* SCO 3.2v4 cc rejects this. */
15260 char *t;
15261 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015262
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 *t++ = 0;
15264 }
15265 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15266 int x[] = {25, 17};
15267 const int *foo = &x[0];
15268 ++foo;
15269 }
15270 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15271 typedef const int *iptr;
15272 iptr p = 0;
15273 ++p;
15274 }
15275 { /* AIX XL C 1.02.0.0 rejects this saying
15276 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15277 struct s { int j; const int *ap[3]; };
15278 struct s *b; b->j = 5;
15279 }
15280 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15281 const int foo = 10;
15282 }
15283#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015284
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ;
15286 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015287}
Martin v. Löwis11437992002-04-12 09:54:03 +000015288_ACEOF
15289rm -f conftest.$ac_objext
15290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15291 (eval $ac_compile) 2>&5
15292 ac_status=$?
15293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15294 (exit $ac_status); } &&
15295 { ac_try='test -s conftest.$ac_objext'
15296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15297 (eval $ac_try) 2>&5
15298 ac_status=$?
15299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015301 ac_cv_c_const=yes
15302else
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015304sed 's/^/| /' conftest.$ac_ext >&5
15305
Martin v. Löwis11437992002-04-12 09:54:03 +000015306ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015308rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015310echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15311echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015312if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
15314cat >>confdefs.h <<\_ACEOF
15315#define const
15316_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015317
15318fi
15319
Michael W. Hudson54241132001-12-07 15:38:26 +000015320
Guido van Rossumda88dad1995-01-26 00:46:29 +000015321works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015322echo "$as_me:$LINENO: checking for working volatile" >&5
15323echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15324cat >conftest.$ac_ext <<_ACEOF
15325#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* confdefs.h. */
15327_ACEOF
15328cat confdefs.h >>conftest.$ac_ext
15329cat >>conftest.$ac_ext <<_ACEOF
15330/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015331
Martin v. Löwis11437992002-04-12 09:54:03 +000015332int
15333main ()
15334{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015335volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ;
15337 return 0;
15338}
15339_ACEOF
15340rm -f conftest.$ac_objext
15341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15342 (eval $ac_compile) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); } &&
15346 { ac_try='test -s conftest.$ac_objext'
15347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15348 (eval $ac_try) 2>&5
15349 ac_status=$?
15350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15351 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015352 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015355sed 's/^/| /' conftest.$ac_ext >&5
15356
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
15358cat >>confdefs.h <<\_ACEOF
15359#define volatile
15360_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015361
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015362
Guido van Rossum627b2d71993-12-24 10:39:16 +000015363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015364rm -f conftest.$ac_objext conftest.$ac_ext
15365echo "$as_me:$LINENO: result: $works" >&5
15366echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015367
Guido van Rossumda88dad1995-01-26 00:46:29 +000015368works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015369echo "$as_me:$LINENO: checking for working signed char" >&5
15370echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15371cat >conftest.$ac_ext <<_ACEOF
15372#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015373/* confdefs.h. */
15374_ACEOF
15375cat confdefs.h >>conftest.$ac_ext
15376cat >>conftest.$ac_ext <<_ACEOF
15377/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015378
Martin v. Löwis11437992002-04-12 09:54:03 +000015379int
15380main ()
15381{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015382signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ;
15384 return 0;
15385}
15386_ACEOF
15387rm -f conftest.$ac_objext
15388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15389 (eval $ac_compile) 2>&5
15390 ac_status=$?
15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); } &&
15393 { ac_try='test -s conftest.$ac_objext'
15394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15395 (eval $ac_try) 2>&5
15396 ac_status=$?
15397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15398 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015399 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015400else
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015402sed 's/^/| /' conftest.$ac_ext >&5
15403
Martin v. Löwis11437992002-04-12 09:54:03 +000015404
15405cat >>confdefs.h <<\_ACEOF
15406#define signed
15407_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015408
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015409
Guido van Rossum7f43da71994-08-01 12:15:30 +000015410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015411rm -f conftest.$ac_objext conftest.$ac_ext
15412echo "$as_me:$LINENO: result: $works" >&5
15413echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015414
Guido van Rossumda88dad1995-01-26 00:46:29 +000015415have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015416echo "$as_me:$LINENO: checking for prototypes" >&5
15417echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15418cat >conftest.$ac_ext <<_ACEOF
15419#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015420/* confdefs.h. */
15421_ACEOF
15422cat confdefs.h >>conftest.$ac_ext
15423cat >>conftest.$ac_ext <<_ACEOF
15424/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015425int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015426int
15427main ()
15428{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015429return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 ;
15431 return 0;
15432}
15433_ACEOF
15434rm -f conftest.$ac_objext
15435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15436 (eval $ac_compile) 2>&5
15437 ac_status=$?
15438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15439 (exit $ac_status); } &&
15440 { ac_try='test -s conftest.$ac_objext'
15441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15442 (eval $ac_try) 2>&5
15443 ac_status=$?
15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15445 (exit $ac_status); }; }; then
15446
15447
15448cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015449#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015450_ACEOF
15451
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015452 have_prototypes=yes
15453
Guido van Rossumf78abae1997-01-21 22:02:36 +000015454else
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015456sed 's/^/| /' conftest.$ac_ext >&5
15457
Guido van Rossum7f43da71994-08-01 12:15:30 +000015458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015459rm -f conftest.$ac_objext conftest.$ac_ext
15460echo "$as_me:$LINENO: result: $have_prototypes" >&5
15461echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015462
Guido van Rossumda88dad1995-01-26 00:46:29 +000015463works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015464echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15465echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15466cat >conftest.$ac_ext <<_ACEOF
15467#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015468/* confdefs.h. */
15469_ACEOF
15470cat confdefs.h >>conftest.$ac_ext
15471cat >>conftest.$ac_ext <<_ACEOF
15472/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015473
15474#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015475int foo(int x, ...) {
15476 va_list va;
15477 va_start(va, x);
15478 va_arg(va, int);
15479 va_arg(va, char *);
15480 va_arg(va, double);
15481 return 0;
15482}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015483
Martin v. Löwis11437992002-04-12 09:54:03 +000015484int
15485main ()
15486{
Guido van Rossum90eea071996-08-30 20:58:57 +000015487return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 ;
15489 return 0;
15490}
15491_ACEOF
15492rm -f conftest.$ac_objext
15493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15494 (eval $ac_compile) 2>&5
15495 ac_status=$?
15496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497 (exit $ac_status); } &&
15498 { ac_try='test -s conftest.$ac_objext'
15499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15500 (eval $ac_try) 2>&5
15501 ac_status=$?
15502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503 (exit $ac_status); }; }; then
15504
15505
15506cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015507#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015508_ACEOF
15509
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015510 works=yes
15511
Guido van Rossumf78abae1997-01-21 22:02:36 +000015512else
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015514sed 's/^/| /' conftest.$ac_ext >&5
15515
Guido van Rossum627b2d71993-12-24 10:39:16 +000015516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015517rm -f conftest.$ac_objext conftest.$ac_ext
15518echo "$as_me:$LINENO: result: $works" >&5
15519echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015520
Guido van Rossumda88dad1995-01-26 00:46:29 +000015521if test "$have_prototypes" = yes; then
15522bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015523echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15524echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15525cat >conftest.$ac_ext <<_ACEOF
15526#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015527/* confdefs.h. */
15528_ACEOF
15529cat confdefs.h >>conftest.$ac_ext
15530cat >>conftest.$ac_ext <<_ACEOF
15531/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015532#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015533int
15534main ()
15535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015536char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015537 ;
15538 return 0;
15539}
15540_ACEOF
15541rm -f conftest.$ac_objext
15542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15543 (eval $ac_compile) 2>&5
15544 ac_status=$?
15545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15546 (exit $ac_status); } &&
15547 { ac_try='test -s conftest.$ac_objext'
15548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15549 (eval $ac_try) 2>&5
15550 ac_status=$?
15551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15552 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015553 :
15554else
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015556sed 's/^/| /' conftest.$ac_ext >&5
15557
Martin v. Löwis11437992002-04-12 09:54:03 +000015558
15559cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015560#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015561_ACEOF
15562
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015563 bad_prototypes=yes
15564
Guido van Rossum627b2d71993-12-24 10:39:16 +000015565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015566rm -f conftest.$ac_objext conftest.$ac_ext
15567echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15568echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015569fi
15570
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015571# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015572echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15573echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15574cat >conftest.$ac_ext <<_ACEOF
15575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015576/* confdefs.h. */
15577_ACEOF
15578cat confdefs.h >>conftest.$ac_ext
15579cat >>conftest.$ac_ext <<_ACEOF
15580/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015581#include <sys/types.h>
15582#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015583int
15584main ()
15585{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015586struct sockaddr x;
15587x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 ;
15589 return 0;
15590}
15591_ACEOF
15592rm -f conftest.$ac_objext
15593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15594 (eval $ac_compile) 2>&5
15595 ac_status=$?
15596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15597 (exit $ac_status); } &&
15598 { ac_try='test -s conftest.$ac_objext'
15599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15600 (eval $ac_try) 2>&5
15601 ac_status=$?
15602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15603 (exit $ac_status); }; }; then
15604 echo "$as_me:$LINENO: result: yes" >&5
15605echo "${ECHO_T}yes" >&6
15606
15607cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015608#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015609_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015610
15611else
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015613sed 's/^/| /' conftest.$ac_ext >&5
15614
Martin v. Löwis11437992002-04-12 09:54:03 +000015615echo "$as_me:$LINENO: result: no" >&5
15616echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015617fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015618rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015619
Guido van Rossumda88dad1995-01-26 00:46:29 +000015620va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015621echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15622echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15623cat >conftest.$ac_ext <<_ACEOF
15624#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015625/* confdefs.h. */
15626_ACEOF
15627cat confdefs.h >>conftest.$ac_ext
15628cat >>conftest.$ac_ext <<_ACEOF
15629/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015630
15631#ifdef HAVE_STDARG_PROTOTYPES
15632#include <stdarg.h>
15633#else
15634#include <varargs.h>
15635#endif
15636
Martin v. Löwis11437992002-04-12 09:54:03 +000015637int
15638main ()
15639{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015640va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 ;
15642 return 0;
15643}
15644_ACEOF
15645rm -f conftest.$ac_objext
15646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15647 (eval $ac_compile) 2>&5
15648 ac_status=$?
15649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15650 (exit $ac_status); } &&
15651 { ac_try='test -s conftest.$ac_objext'
15652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15653 (eval $ac_try) 2>&5
15654 ac_status=$?
15655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15656 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015657 :
15658else
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015660sed 's/^/| /' conftest.$ac_ext >&5
15661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662
15663
15664cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015665#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015666_ACEOF
15667
Guido van Rossumda88dad1995-01-26 00:46:29 +000015668 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015671rm -f conftest.$ac_objext conftest.$ac_ext
15672echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15673echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015674
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015675# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015676
15677
15678
15679echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15680echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15681if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015683else
Martin v. Löwis11437992002-04-12 09:54:03 +000015684 cat >conftest.$ac_ext <<_ACEOF
15685#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015686/* confdefs.h. */
15687_ACEOF
15688cat confdefs.h >>conftest.$ac_ext
15689cat >>conftest.$ac_ext <<_ACEOF
15690/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015691/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015692 which can conflict with char gethostbyname_r (); below.
15693 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015694 <limits.h> exists even on freestanding compilers. Under hpux,
15695 including <limits.h> includes <sys/time.h> and causes problems
15696 checking for functions defined therein. */
15697#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015698# include <limits.h>
15699#else
15700# include <assert.h>
15701#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015702/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015703#ifdef __cplusplus
15704extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015705{
Martin v. Löwis11437992002-04-12 09:54:03 +000015706#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015707/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 builtin and then its argument prototype would still apply. */
15709char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015710/* The GNU C library defines this for functions which it implements
15711 to always fail with ENOSYS. Some functions are actually named
15712 something starting with __ and the normal name is an alias. */
15713#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15714choke me
15715#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015716char (*f) () = gethostbyname_r;
15717#endif
15718#ifdef __cplusplus
15719}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015720#endif
15721
Skip Montanaro6dead952003-09-25 14:50:04 +000015722int
15723main ()
15724{
15725return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 ;
15727 return 0;
15728}
15729_ACEOF
15730rm -f conftest.$ac_objext conftest$ac_exeext
15731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15732 (eval $ac_link) 2>&5
15733 ac_status=$?
15734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15735 (exit $ac_status); } &&
15736 { ac_try='test -s conftest$ac_exeext'
15737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15738 (eval $ac_try) 2>&5
15739 ac_status=$?
15740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741 (exit $ac_status); }; }; then
15742 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015743else
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015745sed 's/^/| /' conftest.$ac_ext >&5
15746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015749rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015751echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15752echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15753if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015754
Martin v. Löwis11437992002-04-12 09:54:03 +000015755 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015756#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015757_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015758
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15760echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015761 OLD_CFLAGS=$CFLAGS
15762 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 cat >conftest.$ac_ext <<_ACEOF
15764#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015765/* confdefs.h. */
15766_ACEOF
15767cat confdefs.h >>conftest.$ac_ext
15768cat >>conftest.$ac_ext <<_ACEOF
15769/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015770
15771# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015772
Martin v. Löwis11437992002-04-12 09:54:03 +000015773int
15774main ()
15775{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015776
15777 char *name;
15778 struct hostent *he, *res;
15779 char buffer[2048];
15780 int buflen = 2048;
15781 int h_errnop;
15782
15783 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
15785 ;
15786 return 0;
15787}
15788_ACEOF
15789rm -f conftest.$ac_objext
15790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15791 (eval $ac_compile) 2>&5
15792 ac_status=$?
15793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15794 (exit $ac_status); } &&
15795 { ac_try='test -s conftest.$ac_objext'
15796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15797 (eval $ac_try) 2>&5
15798 ac_status=$?
15799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15800 (exit $ac_status); }; }; then
15801
15802 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015803#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015804_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015805
Martin v. Löwis11437992002-04-12 09:54:03 +000015806
15807cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015808#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015809_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 echo "$as_me:$LINENO: result: yes" >&5
15812echo "${ECHO_T}yes" >&6
15813
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015814else
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015816sed 's/^/| /' conftest.$ac_ext >&5
15817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
15819 echo "$as_me:$LINENO: result: no" >&5
15820echo "${ECHO_T}no" >&6
15821 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15822echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15823 cat >conftest.$ac_ext <<_ACEOF
15824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015825/* confdefs.h. */
15826_ACEOF
15827cat confdefs.h >>conftest.$ac_ext
15828cat >>conftest.$ac_ext <<_ACEOF
15829/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015830
15831# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
Martin v. Löwis11437992002-04-12 09:54:03 +000015833int
15834main ()
15835{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015836
15837 char *name;
15838 struct hostent *he;
15839 char buffer[2048];
15840 int buflen = 2048;
15841 int h_errnop;
15842
15843 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
15845 ;
15846 return 0;
15847}
15848_ACEOF
15849rm -f conftest.$ac_objext
15850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15851 (eval $ac_compile) 2>&5
15852 ac_status=$?
15853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15854 (exit $ac_status); } &&
15855 { ac_try='test -s conftest.$ac_objext'
15856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15857 (eval $ac_try) 2>&5
15858 ac_status=$?
15859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15860 (exit $ac_status); }; }; then
15861
15862 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015863#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015864_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
15867cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015868#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015870
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 echo "$as_me:$LINENO: result: yes" >&5
15872echo "${ECHO_T}yes" >&6
15873
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015874else
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015876sed 's/^/| /' conftest.$ac_ext >&5
15877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
15879 echo "$as_me:$LINENO: result: no" >&5
15880echo "${ECHO_T}no" >&6
15881 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15882echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15883 cat >conftest.$ac_ext <<_ACEOF
15884#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015885/* confdefs.h. */
15886_ACEOF
15887cat confdefs.h >>conftest.$ac_ext
15888cat >>conftest.$ac_ext <<_ACEOF
15889/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015890
15891# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Martin v. Löwis11437992002-04-12 09:54:03 +000015893int
15894main ()
15895{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015896
15897 char *name;
15898 struct hostent *he;
15899 struct hostent_data data;
15900
15901 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015902
15903 ;
15904 return 0;
15905}
15906_ACEOF
15907rm -f conftest.$ac_objext
15908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15909 (eval $ac_compile) 2>&5
15910 ac_status=$?
15911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15912 (exit $ac_status); } &&
15913 { ac_try='test -s conftest.$ac_objext'
15914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15915 (eval $ac_try) 2>&5
15916 ac_status=$?
15917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15918 (exit $ac_status); }; }; then
15919
15920 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015921#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015922_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015923
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
15925cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015926#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015927_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015928
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 echo "$as_me:$LINENO: result: yes" >&5
15930echo "${ECHO_T}yes" >&6
15931
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015932else
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015934sed 's/^/| /' conftest.$ac_ext >&5
15935
Martin v. Löwis11437992002-04-12 09:54:03 +000015936
15937 echo "$as_me:$LINENO: result: no" >&5
15938echo "${ECHO_T}no" >&6
15939
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015941rm -f conftest.$ac_objext conftest.$ac_ext
15942
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015944rm -f conftest.$ac_objext conftest.$ac_ext
15945
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015946fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015947rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015948 CFLAGS=$OLD_CFLAGS
15949
15950else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015951
Martin v. Löwis11437992002-04-12 09:54:03 +000015952
15953for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015954do
Martin v. Löwis11437992002-04-12 09:54:03 +000015955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15956echo "$as_me:$LINENO: checking for $ac_func" >&5
15957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15958if eval "test \"\${$as_ac_var+set}\" = set"; then
15959 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015960else
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 cat >conftest.$ac_ext <<_ACEOF
15962#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015963/* confdefs.h. */
15964_ACEOF
15965cat confdefs.h >>conftest.$ac_ext
15966cat >>conftest.$ac_ext <<_ACEOF
15967/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015968/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015969 which can conflict with char $ac_func (); below.
15970 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015971 <limits.h> exists even on freestanding compilers. Under hpux,
15972 including <limits.h> includes <sys/time.h> and causes problems
15973 checking for functions defined therein. */
15974#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015975# include <limits.h>
15976#else
15977# include <assert.h>
15978#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015979/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015980#ifdef __cplusplus
15981extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015982{
Martin v. Löwis11437992002-04-12 09:54:03 +000015983#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015984/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 builtin and then its argument prototype would still apply. */
15986char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015987/* The GNU C library defines this for functions which it implements
15988 to always fail with ENOSYS. Some functions are actually named
15989 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015991choke me
15992#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015993char (*f) () = $ac_func;
15994#endif
15995#ifdef __cplusplus
15996}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015997#endif
15998
Skip Montanaro6dead952003-09-25 14:50:04 +000015999int
16000main ()
16001{
16002return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 ;
16004 return 0;
16005}
16006_ACEOF
16007rm -f conftest.$ac_objext conftest$ac_exeext
16008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16009 (eval $ac_link) 2>&5
16010 ac_status=$?
16011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16012 (exit $ac_status); } &&
16013 { ac_try='test -s conftest$ac_exeext'
16014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16015 (eval $ac_try) 2>&5
16016 ac_status=$?
16017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16018 (exit $ac_status); }; }; then
16019 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016020else
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016022sed 's/^/| /' conftest.$ac_ext >&5
16023
Martin v. Löwis11437992002-04-12 09:54:03 +000016024eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016025fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016026rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016027fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016028echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16029echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16030if test `eval echo '${'$as_ac_var'}'` = yes; then
16031 cat >>confdefs.h <<_ACEOF
16032#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16033_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016034
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016035fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016036done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016037
Michael W. Hudson54241132001-12-07 15:38:26 +000016038
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016039fi
16040
Michael W. Hudson54241132001-12-07 15:38:26 +000016041
16042
16043
16044
16045
16046
Guido van Rossum627b2d71993-12-24 10:39:16 +000016047# checks for system services
16048# (none yet)
16049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016050# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016051echo "$as_me:$LINENO: checking for __fpu_control" >&5
16052echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16053if test "${ac_cv_func___fpu_control+set}" = set; then
16054 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016055else
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 cat >conftest.$ac_ext <<_ACEOF
16057#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016058/* confdefs.h. */
16059_ACEOF
16060cat confdefs.h >>conftest.$ac_ext
16061cat >>conftest.$ac_ext <<_ACEOF
16062/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016063/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016064 which can conflict with char __fpu_control (); below.
16065 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016066 <limits.h> exists even on freestanding compilers. Under hpux,
16067 including <limits.h> includes <sys/time.h> and causes problems
16068 checking for functions defined therein. */
16069#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016070# include <limits.h>
16071#else
16072# include <assert.h>
16073#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016074/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016075#ifdef __cplusplus
16076extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016077{
Martin v. Löwis11437992002-04-12 09:54:03 +000016078#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016079/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 builtin and then its argument prototype would still apply. */
16081char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016082/* The GNU C library defines this for functions which it implements
16083 to always fail with ENOSYS. Some functions are actually named
16084 something starting with __ and the normal name is an alias. */
16085#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16086choke me
16087#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016088char (*f) () = __fpu_control;
16089#endif
16090#ifdef __cplusplus
16091}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016092#endif
16093
Skip Montanaro6dead952003-09-25 14:50:04 +000016094int
16095main ()
16096{
16097return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 ;
16099 return 0;
16100}
16101_ACEOF
16102rm -f conftest.$ac_objext conftest$ac_exeext
16103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16104 (eval $ac_link) 2>&5
16105 ac_status=$?
16106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16107 (exit $ac_status); } &&
16108 { ac_try='test -s conftest$ac_exeext'
16109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16110 (eval $ac_try) 2>&5
16111 ac_status=$?
16112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16113 (exit $ac_status); }; }; then
16114 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016115else
Martin v. Löwis11437992002-04-12 09:54:03 +000016116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016117sed 's/^/| /' conftest.$ac_ext >&5
16118
Martin v. Löwis11437992002-04-12 09:54:03 +000016119ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016121rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016123echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16124echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16125if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016126 :
16127else
Martin v. Löwis11437992002-04-12 09:54:03 +000016128
16129echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16130echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16131if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016133else
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016135LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016136cat >conftest.$ac_ext <<_ACEOF
16137#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016138/* confdefs.h. */
16139_ACEOF
16140cat confdefs.h >>conftest.$ac_ext
16141cat >>conftest.$ac_ext <<_ACEOF
16142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016144/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016145#ifdef __cplusplus
16146extern "C"
16147#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016148/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 builtin and then its argument prototype would still apply. */
16150char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016151int
16152main ()
16153{
16154__fpu_control ();
16155 ;
16156 return 0;
16157}
16158_ACEOF
16159rm -f conftest.$ac_objext conftest$ac_exeext
16160if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16161 (eval $ac_link) 2>&5
16162 ac_status=$?
16163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16164 (exit $ac_status); } &&
16165 { ac_try='test -s conftest$ac_exeext'
16166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16167 (eval $ac_try) 2>&5
16168 ac_status=$?
16169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16170 (exit $ac_status); }; }; then
16171 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016172else
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016174sed 's/^/| /' conftest.$ac_ext >&5
16175
Martin v. Löwis11437992002-04-12 09:54:03 +000016176ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016178rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16179LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016181echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16182echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16183if test $ac_cv_lib_ieee___fpu_control = yes; then
16184 cat >>confdefs.h <<_ACEOF
16185#define HAVE_LIBIEEE 1
16186_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016187
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016188 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016189
Guido van Rossum627b2d71993-12-24 10:39:16 +000016190fi
16191
Michael W. Hudson54241132001-12-07 15:38:26 +000016192
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016193fi
16194
Michael W. Hudson54241132001-12-07 15:38:26 +000016195
Guido van Rossum7f253911997-05-09 02:42:48 +000016196# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016197echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16198echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16199
Guido van Rossum7f253911997-05-09 02:42:48 +000016200# Check whether --with-fpectl or --without-fpectl was given.
16201if test "${with_fpectl+set}" = set; then
16202 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016203
Guido van Rossum7f253911997-05-09 02:42:48 +000016204if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016205then
16206
16207cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016208#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016209_ACEOF
16210
16211 echo "$as_me:$LINENO: result: yes" >&5
16212echo "${ECHO_T}yes" >&6
16213else echo "$as_me:$LINENO: result: no" >&5
16214echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016215fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016216else
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 echo "$as_me:$LINENO: result: no" >&5
16218echo "${ECHO_T}no" >&6
16219fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016220
Guido van Rossum7f43da71994-08-01 12:15:30 +000016221# check for --with-libm=...
16222
Guido van Rossum563e7081996-09-10 18:20:48 +000016223case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016224Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016225BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016226*) LIBM=-lm
16227esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016228echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16229echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016231# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016232if test "${with_libm+set}" = set; then
16233 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016234
Guido van Rossum7f253911997-05-09 02:42:48 +000016235if test "$withval" = no
16236then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16238echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016239elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016240then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16242echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16243else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16244echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16245 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016246fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016247else
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16249echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16250fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016251
16252# check for --with-libc=...
16253
Martin v. Löwis11437992002-04-12 09:54:03 +000016254echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16255echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16256
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016257# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016258if test "${with_libc+set}" = set; then
16259 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016260
Guido van Rossum7f253911997-05-09 02:42:48 +000016261if test "$withval" = no
16262then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16264echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016265elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016266then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16268echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16269else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16270echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16271 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016272fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016273else
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16275echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16276fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016277
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016278# check for hypot() in math library
16279LIBS_SAVE=$LIBS
16280LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016281
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016282for ac_func in hypot
16283do
Martin v. Löwis11437992002-04-12 09:54:03 +000016284as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16285echo "$as_me:$LINENO: checking for $ac_func" >&5
16286echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16287if eval "test \"\${$as_ac_var+set}\" = set"; then
16288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016289else
Martin v. Löwis11437992002-04-12 09:54:03 +000016290 cat >conftest.$ac_ext <<_ACEOF
16291#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016292/* confdefs.h. */
16293_ACEOF
16294cat confdefs.h >>conftest.$ac_ext
16295cat >>conftest.$ac_ext <<_ACEOF
16296/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016297/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016298 which can conflict with char $ac_func (); below.
16299 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016300 <limits.h> exists even on freestanding compilers. Under hpux,
16301 including <limits.h> includes <sys/time.h> and causes problems
16302 checking for functions defined therein. */
16303#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016304# include <limits.h>
16305#else
16306# include <assert.h>
16307#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016308/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016309#ifdef __cplusplus
16310extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016311{
Martin v. Löwis11437992002-04-12 09:54:03 +000016312#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016313/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 builtin and then its argument prototype would still apply. */
16315char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016316/* The GNU C library defines this for functions which it implements
16317 to always fail with ENOSYS. Some functions are actually named
16318 something starting with __ and the normal name is an alias. */
16319#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16320choke me
16321#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016322char (*f) () = $ac_func;
16323#endif
16324#ifdef __cplusplus
16325}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016326#endif
16327
Skip Montanaro6dead952003-09-25 14:50:04 +000016328int
16329main ()
16330{
16331return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 ;
16333 return 0;
16334}
16335_ACEOF
16336rm -f conftest.$ac_objext conftest$ac_exeext
16337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16338 (eval $ac_link) 2>&5
16339 ac_status=$?
16340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16341 (exit $ac_status); } &&
16342 { ac_try='test -s conftest$ac_exeext'
16343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16344 (eval $ac_try) 2>&5
16345 ac_status=$?
16346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16347 (exit $ac_status); }; }; then
16348 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016349else
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016351sed 's/^/| /' conftest.$ac_ext >&5
16352
Martin v. Löwis11437992002-04-12 09:54:03 +000016353eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016355rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016357echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16358echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16359if test `eval echo '${'$as_ac_var'}'` = yes; then
16360 cat >>confdefs.h <<_ACEOF
16361#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16362_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016363
Michael W. Hudson54241132001-12-07 15:38:26 +000016364else
Martin v. Löwis11437992002-04-12 09:54:03 +000016365 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016366fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016367done
16368
Michael W. Hudson54241132001-12-07 15:38:26 +000016369
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016370LIBS=$LIBS_SAVE
16371
Guido van Rossumef2255b2000-03-10 22:30:29 +000016372# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016373if test "${ac_cv_header_wchar_h+set}" = set; then
16374 echo "$as_me:$LINENO: checking for wchar.h" >&5
16375echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16376if test "${ac_cv_header_wchar_h+set}" = set; then
16377 echo $ECHO_N "(cached) $ECHO_C" >&6
16378fi
16379echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16380echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016381else
Martin v. Löwis11437992002-04-12 09:54:03 +000016382 # Is the header compilable?
16383echo "$as_me:$LINENO: checking wchar.h usability" >&5
16384echo $ECHO_N "checking wchar.h usability... $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öwis11437992002-04-12 09:54:03 +000016392$ac_includes_default
16393#include <wchar.h>
16394_ACEOF
16395rm -f conftest.$ac_objext
16396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16397 (eval $ac_compile) 2>&5
16398 ac_status=$?
16399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16400 (exit $ac_status); } &&
16401 { ac_try='test -s conftest.$ac_objext'
16402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16403 (eval $ac_try) 2>&5
16404 ac_status=$?
16405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16406 (exit $ac_status); }; }; then
16407 ac_header_compiler=yes
16408else
16409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016410sed 's/^/| /' conftest.$ac_ext >&5
16411
Martin v. Löwis11437992002-04-12 09:54:03 +000016412ac_header_compiler=no
16413fi
16414rm -f conftest.$ac_objext conftest.$ac_ext
16415echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16416echo "${ECHO_T}$ac_header_compiler" >&6
16417
16418# Is the header present?
16419echo "$as_me:$LINENO: checking wchar.h presence" >&5
16420echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16421cat >conftest.$ac_ext <<_ACEOF
16422#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016423/* confdefs.h. */
16424_ACEOF
16425cat confdefs.h >>conftest.$ac_ext
16426cat >>conftest.$ac_ext <<_ACEOF
16427/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016428#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016429_ACEOF
16430if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16431 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16432 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016433 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016434 rm -f conftest.er1
16435 cat conftest.err >&5
16436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16437 (exit $ac_status); } >/dev/null; then
16438 if test -s conftest.err; then
16439 ac_cpp_err=$ac_c_preproc_warn_flag
16440 else
16441 ac_cpp_err=
16442 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016443else
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 ac_cpp_err=yes
16445fi
16446if test -z "$ac_cpp_err"; then
16447 ac_header_preproc=yes
16448else
16449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016450sed 's/^/| /' conftest.$ac_ext >&5
16451
Martin v. Löwis11437992002-04-12 09:54:03 +000016452 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016454rm -f conftest.err conftest.$ac_ext
16455echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16456echo "${ECHO_T}$ac_header_preproc" >&6
16457
16458# So? What about this header?
16459case $ac_header_compiler:$ac_header_preproc in
16460 yes:no )
16461 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16462echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16463 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016464echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16465 (
16466 cat <<\_ASBOX
16467## ------------------------------------ ##
16468## Report this to bug-autoconf@gnu.org. ##
16469## ------------------------------------ ##
16470_ASBOX
16471 ) |
16472 sed "s/^/$as_me: WARNING: /" >&2
16473 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016474 no:yes )
16475 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16476echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16477 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16478echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16479 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016480echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16481 (
16482 cat <<\_ASBOX
16483## ------------------------------------ ##
16484## Report this to bug-autoconf@gnu.org. ##
16485## ------------------------------------ ##
16486_ASBOX
16487 ) |
16488 sed "s/^/$as_me: WARNING: /" >&2
16489 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016490esac
16491echo "$as_me:$LINENO: checking for wchar.h" >&5
16492echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16493if test "${ac_cv_header_wchar_h+set}" = set; then
16494 echo $ECHO_N "(cached) $ECHO_C" >&6
16495else
16496 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016498echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16499echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16500
16501fi
16502if test $ac_cv_header_wchar_h = yes; then
16503
16504
16505cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016506#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016507_ACEOF
16508
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016509 wchar_h="yes"
16510
Guido van Rossumef2255b2000-03-10 22:30:29 +000016511else
Martin v. Löwis11437992002-04-12 09:54:03 +000016512 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016513
16514fi
16515
Michael W. Hudson54241132001-12-07 15:38:26 +000016516
Martin v. Löwis11437992002-04-12 09:54:03 +000016517
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016518# determine wchar_t size
16519if test "$wchar_h" = yes
16520then
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 echo "$as_me:$LINENO: checking for wchar_t" >&5
16522echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16523if test "${ac_cv_type_wchar_t+set}" = set; then
16524 echo $ECHO_N "(cached) $ECHO_C" >&6
16525else
16526 cat >conftest.$ac_ext <<_ACEOF
16527#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016528/* confdefs.h. */
16529_ACEOF
16530cat confdefs.h >>conftest.$ac_ext
16531cat >>conftest.$ac_ext <<_ACEOF
16532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016533#include <wchar.h>
16534
Martin v. Löwis11437992002-04-12 09:54:03 +000016535int
16536main ()
16537{
16538if ((wchar_t *) 0)
16539 return 0;
16540if (sizeof (wchar_t))
16541 return 0;
16542 ;
16543 return 0;
16544}
16545_ACEOF
16546rm -f conftest.$ac_objext
16547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16548 (eval $ac_compile) 2>&5
16549 ac_status=$?
16550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551 (exit $ac_status); } &&
16552 { ac_try='test -s conftest.$ac_objext'
16553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554 (eval $ac_try) 2>&5
16555 ac_status=$?
16556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); }; }; then
16558 ac_cv_type_wchar_t=yes
16559else
16560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016561sed 's/^/| /' conftest.$ac_ext >&5
16562
Martin v. Löwis11437992002-04-12 09:54:03 +000016563ac_cv_type_wchar_t=no
16564fi
16565rm -f conftest.$ac_objext conftest.$ac_ext
16566fi
16567echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16568echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16569
16570echo "$as_me:$LINENO: checking size of wchar_t" >&5
16571echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16572if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16573 echo $ECHO_N "(cached) $ECHO_C" >&6
16574else
16575 if test "$ac_cv_type_wchar_t" = yes; then
16576 # The cast to unsigned long works around a bug in the HP C Compiler
16577 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16578 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16579 # This bug is HP SR number 8606223364.
16580 if test "$cross_compiling" = yes; then
16581 # Depending upon the size, compute the lo and hi bounds.
16582cat >conftest.$ac_ext <<_ACEOF
16583#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016584/* confdefs.h. */
16585_ACEOF
16586cat confdefs.h >>conftest.$ac_ext
16587cat >>conftest.$ac_ext <<_ACEOF
16588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016589#include <wchar.h>
16590
Martin v. Löwis11437992002-04-12 09:54:03 +000016591int
16592main ()
16593{
16594static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16595test_array [0] = 0
16596
16597 ;
16598 return 0;
16599}
16600_ACEOF
16601rm -f conftest.$ac_objext
16602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16603 (eval $ac_compile) 2>&5
16604 ac_status=$?
16605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16606 (exit $ac_status); } &&
16607 { ac_try='test -s conftest.$ac_objext'
16608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16609 (eval $ac_try) 2>&5
16610 ac_status=$?
16611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612 (exit $ac_status); }; }; then
16613 ac_lo=0 ac_mid=0
16614 while :; do
16615 cat >conftest.$ac_ext <<_ACEOF
16616#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016617/* confdefs.h. */
16618_ACEOF
16619cat confdefs.h >>conftest.$ac_ext
16620cat >>conftest.$ac_ext <<_ACEOF
16621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016622#include <wchar.h>
16623
Martin v. Löwis11437992002-04-12 09:54:03 +000016624int
16625main ()
16626{
16627static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16628test_array [0] = 0
16629
16630 ;
16631 return 0;
16632}
16633_ACEOF
16634rm -f conftest.$ac_objext
16635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16636 (eval $ac_compile) 2>&5
16637 ac_status=$?
16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639 (exit $ac_status); } &&
16640 { ac_try='test -s conftest.$ac_objext'
16641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16642 (eval $ac_try) 2>&5
16643 ac_status=$?
16644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16645 (exit $ac_status); }; }; then
16646 ac_hi=$ac_mid; break
16647else
16648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016649sed 's/^/| /' conftest.$ac_ext >&5
16650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651ac_lo=`expr $ac_mid + 1`
16652 if test $ac_lo -le $ac_mid; then
16653 ac_lo= ac_hi=
16654 break
16655 fi
16656 ac_mid=`expr 2 '*' $ac_mid + 1`
16657fi
16658rm -f conftest.$ac_objext conftest.$ac_ext
16659 done
16660else
16661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016662sed 's/^/| /' conftest.$ac_ext >&5
16663
Martin v. Löwis11437992002-04-12 09:54:03 +000016664cat >conftest.$ac_ext <<_ACEOF
16665#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016666/* confdefs.h. */
16667_ACEOF
16668cat confdefs.h >>conftest.$ac_ext
16669cat >>conftest.$ac_ext <<_ACEOF
16670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016671#include <wchar.h>
16672
Martin v. Löwis11437992002-04-12 09:54:03 +000016673int
16674main ()
16675{
16676static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16677test_array [0] = 0
16678
16679 ;
16680 return 0;
16681}
16682_ACEOF
16683rm -f conftest.$ac_objext
16684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16685 (eval $ac_compile) 2>&5
16686 ac_status=$?
16687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16688 (exit $ac_status); } &&
16689 { ac_try='test -s conftest.$ac_objext'
16690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16691 (eval $ac_try) 2>&5
16692 ac_status=$?
16693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694 (exit $ac_status); }; }; then
16695 ac_hi=-1 ac_mid=-1
16696 while :; do
16697 cat >conftest.$ac_ext <<_ACEOF
16698#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016699/* confdefs.h. */
16700_ACEOF
16701cat confdefs.h >>conftest.$ac_ext
16702cat >>conftest.$ac_ext <<_ACEOF
16703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016704#include <wchar.h>
16705
Martin v. Löwis11437992002-04-12 09:54:03 +000016706int
16707main ()
16708{
16709static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16710test_array [0] = 0
16711
16712 ;
16713 return 0;
16714}
16715_ACEOF
16716rm -f conftest.$ac_objext
16717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16718 (eval $ac_compile) 2>&5
16719 ac_status=$?
16720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16721 (exit $ac_status); } &&
16722 { ac_try='test -s conftest.$ac_objext'
16723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16724 (eval $ac_try) 2>&5
16725 ac_status=$?
16726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16727 (exit $ac_status); }; }; then
16728 ac_lo=$ac_mid; break
16729else
16730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016731sed 's/^/| /' conftest.$ac_ext >&5
16732
Martin v. Löwis11437992002-04-12 09:54:03 +000016733ac_hi=`expr '(' $ac_mid ')' - 1`
16734 if test $ac_mid -le $ac_hi; then
16735 ac_lo= ac_hi=
16736 break
16737 fi
16738 ac_mid=`expr 2 '*' $ac_mid`
16739fi
16740rm -f conftest.$ac_objext conftest.$ac_ext
16741 done
16742else
16743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016744sed 's/^/| /' conftest.$ac_ext >&5
16745
Martin v. Löwis11437992002-04-12 09:54:03 +000016746ac_lo= ac_hi=
16747fi
16748rm -f conftest.$ac_objext conftest.$ac_ext
16749fi
16750rm -f conftest.$ac_objext conftest.$ac_ext
16751# Binary search between lo and hi bounds.
16752while test "x$ac_lo" != "x$ac_hi"; do
16753 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16754 cat >conftest.$ac_ext <<_ACEOF
16755#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016756/* confdefs.h. */
16757_ACEOF
16758cat confdefs.h >>conftest.$ac_ext
16759cat >>conftest.$ac_ext <<_ACEOF
16760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016761#include <wchar.h>
16762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763int
16764main ()
16765{
16766static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16767test_array [0] = 0
16768
16769 ;
16770 return 0;
16771}
16772_ACEOF
16773rm -f conftest.$ac_objext
16774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16775 (eval $ac_compile) 2>&5
16776 ac_status=$?
16777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16778 (exit $ac_status); } &&
16779 { ac_try='test -s conftest.$ac_objext'
16780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16781 (eval $ac_try) 2>&5
16782 ac_status=$?
16783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16784 (exit $ac_status); }; }; then
16785 ac_hi=$ac_mid
16786else
16787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016788sed 's/^/| /' conftest.$ac_ext >&5
16789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790ac_lo=`expr '(' $ac_mid ')' + 1`
16791fi
16792rm -f conftest.$ac_objext conftest.$ac_ext
16793done
16794case $ac_lo in
16795?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016796'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16797See \`config.log' for more details." >&5
16798echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16799See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016800 { (exit 1); exit 1; }; } ;;
16801esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016802else
16803 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016804 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16805See \`config.log' for more details." >&5
16806echo "$as_me: error: cannot run test program while cross compiling
16807See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016808 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016809else
Martin v. Löwis11437992002-04-12 09:54:03 +000016810 cat >conftest.$ac_ext <<_ACEOF
16811#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016812/* confdefs.h. */
16813_ACEOF
16814cat confdefs.h >>conftest.$ac_ext
16815cat >>conftest.$ac_ext <<_ACEOF
16816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016817#include <wchar.h>
16818
16819long longval () { return (long) (sizeof (wchar_t)); }
16820unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016821#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016822#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016823int
16824main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016825{
Martin v. Löwis11437992002-04-12 09:54:03 +000016826
16827 FILE *f = fopen ("conftest.val", "w");
16828 if (! f)
16829 exit (1);
16830 if (((long) (sizeof (wchar_t))) < 0)
16831 {
16832 long i = longval ();
16833 if (i != ((long) (sizeof (wchar_t))))
16834 exit (1);
16835 fprintf (f, "%ld\n", i);
16836 }
16837 else
16838 {
16839 unsigned long i = ulongval ();
16840 if (i != ((long) (sizeof (wchar_t))))
16841 exit (1);
16842 fprintf (f, "%lu\n", i);
16843 }
16844 exit (ferror (f) || fclose (f) != 0);
16845
16846 ;
16847 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016848}
Martin v. Löwis11437992002-04-12 09:54:03 +000016849_ACEOF
16850rm -f conftest$ac_exeext
16851if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16852 (eval $ac_link) 2>&5
16853 ac_status=$?
16854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16857 (eval $ac_try) 2>&5
16858 ac_status=$?
16859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16860 (exit $ac_status); }; }; then
16861 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016862else
Martin v. Löwis11437992002-04-12 09:54:03 +000016863 echo "$as_me: program exited with status $ac_status" >&5
16864echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016865sed 's/^/| /' conftest.$ac_ext >&5
16866
Martin v. Löwis11437992002-04-12 09:54:03 +000016867( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016868{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16869See \`config.log' for more details." >&5
16870echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16871See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 { (exit 1); exit 1; }; }
16873fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016874rm -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 +000016875fi
16876fi
16877rm -f conftest.val
16878else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016879 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016880fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016881fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016882echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16883echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16884cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016885#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016886_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016887
Michael W. Hudson54241132001-12-07 15:38:26 +000016888
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016889fi
16890
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016891echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16892echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16893have_ucs4_tcl=no
16894cat >conftest.$ac_ext <<_ACEOF
16895#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016896/* confdefs.h. */
16897_ACEOF
16898cat confdefs.h >>conftest.$ac_ext
16899cat >>conftest.$ac_ext <<_ACEOF
16900/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016901
16902#include <tcl.h>
16903#if TCL_UTF_MAX != 6
16904# error "NOT UCS4_TCL"
16905#endif
16906int
16907main ()
16908{
16909
16910 ;
16911 return 0;
16912}
16913_ACEOF
16914rm -f conftest.$ac_objext
16915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16916 (eval $ac_compile) 2>&5
16917 ac_status=$?
16918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16919 (exit $ac_status); } &&
16920 { ac_try='test -s conftest.$ac_objext'
16921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16922 (eval $ac_try) 2>&5
16923 ac_status=$?
16924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925 (exit $ac_status); }; }; then
16926
16927
16928cat >>confdefs.h <<\_ACEOF
16929#define HAVE_UCS4_TCL 1
16930_ACEOF
16931
16932 have_ucs4_tcl=yes
16933
16934else
16935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016936sed 's/^/| /' conftest.$ac_ext >&5
16937
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016938fi
16939rm -f conftest.$ac_objext conftest.$ac_ext
16940echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16941echo "${ECHO_T}$have_ucs4_tcl" >&6
16942
Skip Montanaro6dead952003-09-25 14:50:04 +000016943# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016944if test "$wchar_h" = yes
16945then
16946 # check whether wchar_t is signed or not
16947 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16948echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16949 if test "${ac_cv_wchar_t_signed+set}" = set; then
16950 echo $ECHO_N "(cached) $ECHO_C" >&6
16951else
16952
16953 if test "$cross_compiling" = yes; then
16954 ac_cv_wchar_t_signed=yes
16955else
16956 cat >conftest.$ac_ext <<_ACEOF
16957#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016958/* confdefs.h. */
16959_ACEOF
16960cat confdefs.h >>conftest.$ac_ext
16961cat >>conftest.$ac_ext <<_ACEOF
16962/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016963
16964 #include <wchar.h>
16965 int main()
16966 {
16967 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16968 }
16969
16970_ACEOF
16971rm -f conftest$ac_exeext
16972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16973 (eval $ac_link) 2>&5
16974 ac_status=$?
16975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16976 (exit $ac_status); } && { ac_try='./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_wchar_t_signed=yes
16983else
16984 echo "$as_me: program exited with status $ac_status" >&5
16985echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016986sed 's/^/| /' conftest.$ac_ext >&5
16987
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016988( exit $ac_status )
16989ac_cv_wchar_t_signed=no
16990fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016991rm -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 +000016992fi
16993fi
16994
16995 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16996echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16997fi
16998
Martin v. Löwis11437992002-04-12 09:54:03 +000016999echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17000echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017001# Check whether --enable-unicode or --disable-unicode was given.
17002if test "${enable_unicode+set}" = set; then
17003 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017004
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017005else
17006 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017007fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017008
17009if test $enable_unicode = yes
17010then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017011 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017012 case "$have_ucs4_tcl" in
17013 yes) enable_unicode="ucs4"
17014 ;;
17015 *) enable_unicode="ucs2"
17016 ;;
17017 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017018fi
17019
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017020
17021
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017022case "$enable_unicode" in
17023ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017024 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017025#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017026_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017027
17028 ;;
17029ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017031#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017032_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017033
17034 ;;
17035esac
17036
Michael W. Hudson54241132001-12-07 15:38:26 +000017037
Martin v. Löwis11437992002-04-12 09:54:03 +000017038
17039
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017040
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017041if test "$enable_unicode" = "no"
17042then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017043 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017044 echo "$as_me:$LINENO: result: not used" >&5
17045echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017046else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017047 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
17049cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017050#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017051_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017052
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017053
17054 # wchar_t is only usable if it maps to an unsigned type
17055 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17056 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017057 then
17058 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017059
Martin v. Löwis11437992002-04-12 09:54:03 +000017060cat >>confdefs.h <<\_ACEOF
17061#define HAVE_USABLE_WCHAR_T 1
17062_ACEOF
17063
17064 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017065#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017066_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017067
17068 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17069 then
17070 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017071 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017072#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017073_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017074
17075 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17076 then
17077 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017079#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017080_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017081
17082 else
17083 PY_UNICODE_TYPE="no type found"
17084 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17086echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017087fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017088
17089# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017090echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17091echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17092if test "${ac_cv_c_bigendian+set}" = set; then
17093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017094else
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 # See if sys/param.h defines the BYTE_ORDER macro.
17096cat >conftest.$ac_ext <<_ACEOF
17097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017098/* confdefs.h. */
17099_ACEOF
17100cat confdefs.h >>conftest.$ac_ext
17101cat >>conftest.$ac_ext <<_ACEOF
17102/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017103#include <sys/types.h>
17104#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017105
Martin v. Löwis11437992002-04-12 09:54:03 +000017106int
17107main ()
17108{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017109#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17110 bogus endian macros
17111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017112
17113 ;
17114 return 0;
17115}
17116_ACEOF
17117rm -f conftest.$ac_objext
17118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17119 (eval $ac_compile) 2>&5
17120 ac_status=$?
17121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17122 (exit $ac_status); } &&
17123 { ac_try='test -s conftest.$ac_objext'
17124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17125 (eval $ac_try) 2>&5
17126 ac_status=$?
17127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17128 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017129 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017130cat >conftest.$ac_ext <<_ACEOF
17131#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017132/* confdefs.h. */
17133_ACEOF
17134cat confdefs.h >>conftest.$ac_ext
17135cat >>conftest.$ac_ext <<_ACEOF
17136/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017137#include <sys/types.h>
17138#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017139
Martin v. Löwis11437992002-04-12 09:54:03 +000017140int
17141main ()
17142{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017143#if BYTE_ORDER != BIG_ENDIAN
17144 not big endian
17145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017146
17147 ;
17148 return 0;
17149}
17150_ACEOF
17151rm -f conftest.$ac_objext
17152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17153 (eval $ac_compile) 2>&5
17154 ac_status=$?
17155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17156 (exit $ac_status); } &&
17157 { ac_try='test -s conftest.$ac_objext'
17158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17159 (eval $ac_try) 2>&5
17160 ac_status=$?
17161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17162 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017163 ac_cv_c_bigendian=yes
17164else
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017166sed 's/^/| /' conftest.$ac_ext >&5
17167
Martin v. Löwis11437992002-04-12 09:54:03 +000017168ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017170rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017171else
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017173sed 's/^/| /' conftest.$ac_ext >&5
17174
Martin v. Löwis11437992002-04-12 09:54:03 +000017175# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017176if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017177 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017178 ac_cv_c_bigendian=unknown
17179 cat >conftest.$ac_ext <<_ACEOF
17180#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017181/* confdefs.h. */
17182_ACEOF
17183cat confdefs.h >>conftest.$ac_ext
17184cat >>conftest.$ac_ext <<_ACEOF
17185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017186short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17187short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17188void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17189short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17190short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17191void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017192int
17193main ()
17194{
17195 _ascii (); _ebcdic ();
17196 ;
17197 return 0;
17198}
17199_ACEOF
17200rm -f conftest.$ac_objext
17201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17202 (eval $ac_compile) 2>&5
17203 ac_status=$?
17204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17205 (exit $ac_status); } &&
17206 { ac_try='test -s conftest.$ac_objext'
17207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17208 (eval $ac_try) 2>&5
17209 ac_status=$?
17210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17211 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017212 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 ac_cv_c_bigendian=yes
17214fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017215if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017216 if test "$ac_cv_c_bigendian" = unknown; then
17217 ac_cv_c_bigendian=no
17218 else
17219 # finding both strings is unlikely to happen, but who knows?
17220 ac_cv_c_bigendian=unknown
17221 fi
17222fi
17223else
17224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017225sed 's/^/| /' conftest.$ac_ext >&5
17226
Martin v. Löwis11437992002-04-12 09:54:03 +000017227fi
17228rm -f conftest.$ac_objext conftest.$ac_ext
17229else
17230 cat >conftest.$ac_ext <<_ACEOF
17231#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017232/* confdefs.h. */
17233_ACEOF
17234cat confdefs.h >>conftest.$ac_ext
17235cat >>conftest.$ac_ext <<_ACEOF
17236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017237int
17238main ()
17239{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017240 /* Are we little or big endian? From Harbison&Steele. */
17241 union
17242 {
17243 long l;
17244 char c[sizeof (long)];
17245 } u;
17246 u.l = 1;
17247 exit (u.c[sizeof (long) - 1] == 1);
17248}
Martin v. Löwis11437992002-04-12 09:54:03 +000017249_ACEOF
17250rm -f conftest$ac_exeext
17251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17252 (eval $ac_link) 2>&5
17253 ac_status=$?
17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17257 (eval $ac_try) 2>&5
17258 ac_status=$?
17259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017261 ac_cv_c_bigendian=no
17262else
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 echo "$as_me: program exited with status $ac_status" >&5
17264echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017265sed 's/^/| /' conftest.$ac_ext >&5
17266
Martin v. Löwis11437992002-04-12 09:54:03 +000017267( exit $ac_status )
17268ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017269fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017270rm -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 +000017271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017272fi
17273rm -f conftest.$ac_objext conftest.$ac_ext
17274fi
17275echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17276echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17277case $ac_cv_c_bigendian in
17278 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017279
Martin v. Löwis11437992002-04-12 09:54:03 +000017280cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017281#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017282_ACEOF
17283 ;;
17284 no)
17285 ;;
17286 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017287 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017288presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017289echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017290presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17291 { (exit 1); exit 1; }; } ;;
17292esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017293
Michael W. Hudson54241132001-12-07 15:38:26 +000017294
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017295# Check whether right shifting a negative integer extends the sign bit
17296# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017297echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17298echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17299if test "${ac_cv_rshift_extends_sign+set}" = set; then
17300 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017301else
Martin v. Löwis11437992002-04-12 09:54:03 +000017302
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017303if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017304 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017305else
Martin v. Löwis11437992002-04-12 09:54:03 +000017306 cat >conftest.$ac_ext <<_ACEOF
17307#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017308/* confdefs.h. */
17309_ACEOF
17310cat confdefs.h >>conftest.$ac_ext
17311cat >>conftest.$ac_ext <<_ACEOF
17312/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017313
17314int main()
17315{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017316 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017317}
17318
Martin v. Löwis11437992002-04-12 09:54:03 +000017319_ACEOF
17320rm -f conftest$ac_exeext
17321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17322 (eval $ac_link) 2>&5
17323 ac_status=$?
17324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17325 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17327 (eval $ac_try) 2>&5
17328 ac_status=$?
17329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17330 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017331 ac_cv_rshift_extends_sign=yes
17332else
Martin v. Löwis11437992002-04-12 09:54:03 +000017333 echo "$as_me: program exited with status $ac_status" >&5
17334echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017335sed 's/^/| /' conftest.$ac_ext >&5
17336
Martin v. Löwis11437992002-04-12 09:54:03 +000017337( exit $ac_status )
17338ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017339fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017340rm -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 +000017341fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017342fi
17343
Martin v. Löwis11437992002-04-12 09:54:03 +000017344echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17345echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017346if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017347then
Martin v. Löwis11437992002-04-12 09:54:03 +000017348
17349cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017350#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017351_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017352
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017353fi
17354
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017355# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017356echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17357echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17358if test "${ac_cv_have_getc_unlocked+set}" = set; then
17359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017360else
Martin v. Löwis11437992002-04-12 09:54:03 +000017361
17362cat >conftest.$ac_ext <<_ACEOF
17363#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017364/* confdefs.h. */
17365_ACEOF
17366cat confdefs.h >>conftest.$ac_ext
17367cat >>conftest.$ac_ext <<_ACEOF
17368/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017369#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017370int
17371main ()
17372{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017373
17374 FILE *f = fopen("/dev/null", "r");
17375 flockfile(f);
17376 getc_unlocked(f);
17377 funlockfile(f);
17378
Martin v. Löwis11437992002-04-12 09:54:03 +000017379 ;
17380 return 0;
17381}
17382_ACEOF
17383rm -f conftest.$ac_objext conftest$ac_exeext
17384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17385 (eval $ac_link) 2>&5
17386 ac_status=$?
17387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17388 (exit $ac_status); } &&
17389 { ac_try='test -s conftest$ac_exeext'
17390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17391 (eval $ac_try) 2>&5
17392 ac_status=$?
17393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17394 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017395 ac_cv_have_getc_unlocked=yes
17396else
Martin v. Löwis11437992002-04-12 09:54:03 +000017397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017398sed 's/^/| /' conftest.$ac_ext >&5
17399
Martin v. Löwis11437992002-04-12 09:54:03 +000017400ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017402rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017403fi
17404
Martin v. Löwis11437992002-04-12 09:54:03 +000017405echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17406echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017407if test "$ac_cv_have_getc_unlocked" = yes
17408then
Martin v. Löwis11437992002-04-12 09:54:03 +000017409
17410cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017411#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017412_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017413
17414fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017415
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017416# check for readline 2.2
17417cat >conftest.$ac_ext <<_ACEOF
17418#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017419/* confdefs.h. */
17420_ACEOF
17421cat confdefs.h >>conftest.$ac_ext
17422cat >>conftest.$ac_ext <<_ACEOF
17423/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017424#include <readline/readline.h>
17425_ACEOF
17426if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17427 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17428 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017429 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017430 rm -f conftest.er1
17431 cat conftest.err >&5
17432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433 (exit $ac_status); } >/dev/null; then
17434 if test -s conftest.err; then
17435 ac_cpp_err=$ac_c_preproc_warn_flag
17436 else
17437 ac_cpp_err=
17438 fi
17439else
17440 ac_cpp_err=yes
17441fi
17442if test -z "$ac_cpp_err"; then
17443 have_readline=yes
17444else
17445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017446sed 's/^/| /' conftest.$ac_ext >&5
17447
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017448 have_readline=no
17449fi
17450rm -f conftest.err conftest.$ac_ext
17451if test $have_readline = yes
17452then
17453 cat >conftest.$ac_ext <<_ACEOF
17454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017455/* confdefs.h. */
17456_ACEOF
17457cat confdefs.h >>conftest.$ac_ext
17458cat >>conftest.$ac_ext <<_ACEOF
17459/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017460#include <readline/readline.h>
17461
17462_ACEOF
17463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017464 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017465
17466cat >>confdefs.h <<\_ACEOF
17467#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17468_ACEOF
17469
17470fi
17471rm -f conftest*
17472
17473fi
17474
Martin v. Löwis0daad592001-09-30 21:09:59 +000017475# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017476echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17477echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17478if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017480else
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017482LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017483cat >conftest.$ac_ext <<_ACEOF
17484#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017485/* confdefs.h. */
17486_ACEOF
17487cat confdefs.h >>conftest.$ac_ext
17488cat >>conftest.$ac_ext <<_ACEOF
17489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017490
Guido van Rossum353ae582001-07-10 16:45:32 +000017491/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017492#ifdef __cplusplus
17493extern "C"
17494#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017495/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 builtin and then its argument prototype would still apply. */
17497char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017498int
17499main ()
17500{
17501rl_pre_input_hook ();
17502 ;
17503 return 0;
17504}
17505_ACEOF
17506rm -f conftest.$ac_objext conftest$ac_exeext
17507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17508 (eval $ac_link) 2>&5
17509 ac_status=$?
17510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17511 (exit $ac_status); } &&
17512 { ac_try='test -s conftest$ac_exeext'
17513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17514 (eval $ac_try) 2>&5
17515 ac_status=$?
17516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17517 (exit $ac_status); }; }; then
17518 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017519else
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017521sed 's/^/| /' conftest.$ac_ext >&5
17522
Martin v. Löwis11437992002-04-12 09:54:03 +000017523ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17526LIBS=$ac_check_lib_save_LIBS
17527fi
17528echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17529echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17530if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017531
Martin v. Löwis11437992002-04-12 09:54:03 +000017532cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017533#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017534_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017535
Martin v. Löwis0daad592001-09-30 21:09:59 +000017536fi
17537
Michael W. Hudson54241132001-12-07 15:38:26 +000017538
Martin v. Löwis0daad592001-09-30 21:09:59 +000017539# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017540echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17541echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17542if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17543 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017544else
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017546LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017547cat >conftest.$ac_ext <<_ACEOF
17548#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017549/* confdefs.h. */
17550_ACEOF
17551cat confdefs.h >>conftest.$ac_ext
17552cat >>conftest.$ac_ext <<_ACEOF
17553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017554
Martin v. Löwis0daad592001-09-30 21:09:59 +000017555/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017556#ifdef __cplusplus
17557extern "C"
17558#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017559/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 builtin and then its argument prototype would still apply. */
17561char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017562int
17563main ()
17564{
17565rl_completion_matches ();
17566 ;
17567 return 0;
17568}
17569_ACEOF
17570rm -f conftest.$ac_objext conftest$ac_exeext
17571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17572 (eval $ac_link) 2>&5
17573 ac_status=$?
17574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17575 (exit $ac_status); } &&
17576 { ac_try='test -s conftest$ac_exeext'
17577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17578 (eval $ac_try) 2>&5
17579 ac_status=$?
17580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581 (exit $ac_status); }; }; then
17582 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017583else
Martin v. Löwis11437992002-04-12 09:54:03 +000017584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017585sed 's/^/| /' conftest.$ac_ext >&5
17586
Martin v. Löwis11437992002-04-12 09:54:03 +000017587ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17590LIBS=$ac_check_lib_save_LIBS
17591fi
17592echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17593echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17594if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017595
Martin v. Löwis11437992002-04-12 09:54:03 +000017596cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017597#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017598_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017599
Guido van Rossum353ae582001-07-10 16:45:32 +000017600fi
17601
Jack Jansendd19cf82001-12-06 22:36:17 +000017602
Martin v. Löwis11437992002-04-12 09:54:03 +000017603echo "$as_me:$LINENO: checking for broken nice()" >&5
17604echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17605if test "${ac_cv_broken_nice+set}" = set; then
17606 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017607else
Martin v. Löwis11437992002-04-12 09:54:03 +000017608
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017609if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017610 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017611else
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 cat >conftest.$ac_ext <<_ACEOF
17613#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017614/* confdefs.h. */
17615_ACEOF
17616cat confdefs.h >>conftest.$ac_ext
17617cat >>conftest.$ac_ext <<_ACEOF
17618/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017619
17620int main()
17621{
17622 int val1 = nice(1);
17623 if (val1 != -1 && val1 == nice(2))
17624 exit(0);
17625 exit(1);
17626}
17627
Martin v. Löwis11437992002-04-12 09:54:03 +000017628_ACEOF
17629rm -f conftest$ac_exeext
17630if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17631 (eval $ac_link) 2>&5
17632 ac_status=$?
17633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17636 (eval $ac_try) 2>&5
17637 ac_status=$?
17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17639 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017640 ac_cv_broken_nice=yes
17641else
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 echo "$as_me: program exited with status $ac_status" >&5
17643echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017644sed 's/^/| /' conftest.$ac_ext >&5
17645
Martin v. Löwis11437992002-04-12 09:54:03 +000017646( exit $ac_status )
17647ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017648fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017649rm -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 +000017650fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017651fi
17652
Martin v. Löwis11437992002-04-12 09:54:03 +000017653echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17654echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017655if test "$ac_cv_broken_nice" = yes
17656then
Martin v. Löwis11437992002-04-12 09:54:03 +000017657
17658cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017659#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017660_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017661
17662fi
17663
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017664# tzset(3) exists and works like we expect it to
17665echo "$as_me:$LINENO: checking for working tzset()" >&5
17666echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17667if test "${ac_cv_working_tzset+set}" = set; then
17668 echo $ECHO_N "(cached) $ECHO_C" >&6
17669else
17670
17671if test "$cross_compiling" = yes; then
17672 ac_cv_working_tzset=no
17673else
17674 cat >conftest.$ac_ext <<_ACEOF
17675#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017676/* confdefs.h. */
17677_ACEOF
17678cat confdefs.h >>conftest.$ac_ext
17679cat >>conftest.$ac_ext <<_ACEOF
17680/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017681
17682#include <stdlib.h>
17683#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017684#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017685int main()
17686{
Brett Cannon18367812003-09-19 00:59:16 +000017687 /* Note that we need to ensure that not only does tzset(3)
17688 do 'something' with localtime, but it works as documented
17689 in the library reference and as expected by the test suite.
17690
17691 Red Hat 6.2 doesn't understand the southern hemisphere
17692 after New Year's Day; it thinks swaps on that day.
17693 */
17694
17695 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17696 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17697
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017698 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017699 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017700 if (localtime(&groundhogday)->tm_hour != 0)
17701 exit(1);
17702
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017703 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017704 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017705 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017706 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017707
17708 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17709 tzset();
17710 if (localtime(&groundhogday)->tm_hour != 11)
17711 exit(1);
17712 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17713 exit(1);
17714 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17715 exit(1);
17716
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017717 exit(0);
17718}
17719
17720_ACEOF
17721rm -f conftest$ac_exeext
17722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17723 (eval $ac_link) 2>&5
17724 ac_status=$?
17725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17728 (eval $ac_try) 2>&5
17729 ac_status=$?
17730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17731 (exit $ac_status); }; }; then
17732 ac_cv_working_tzset=yes
17733else
17734 echo "$as_me: program exited with status $ac_status" >&5
17735echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017736sed 's/^/| /' conftest.$ac_ext >&5
17737
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017738( exit $ac_status )
17739ac_cv_working_tzset=no
17740fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017741rm -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 +000017742fi
17743fi
17744
17745echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17746echo "${ECHO_T}$ac_cv_working_tzset" >&6
17747if test "$ac_cv_working_tzset" = yes
17748then
17749
17750cat >>confdefs.h <<\_ACEOF
17751#define HAVE_WORKING_TZSET 1
17752_ACEOF
17753
17754fi
17755
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017756# Look for subsecond timestamps in struct stat
17757echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17758echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17759if test "${ac_cv_stat_tv_nsec+set}" = set; then
17760 echo $ECHO_N "(cached) $ECHO_C" >&6
17761else
17762 cat >conftest.$ac_ext <<_ACEOF
17763#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017764/* confdefs.h. */
17765_ACEOF
17766cat confdefs.h >>conftest.$ac_ext
17767cat >>conftest.$ac_ext <<_ACEOF
17768/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017769#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017770int
17771main ()
17772{
17773
17774struct stat st;
17775st.st_mtim.tv_nsec = 1;
17776
17777 ;
17778 return 0;
17779}
17780_ACEOF
17781rm -f conftest.$ac_objext
17782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17783 (eval $ac_compile) 2>&5
17784 ac_status=$?
17785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17786 (exit $ac_status); } &&
17787 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017793 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017794else
17795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017796sed 's/^/| /' conftest.$ac_ext >&5
17797
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017798ac_cv_stat_tv_nsec=no
17799fi
17800rm -f conftest.$ac_objext conftest.$ac_ext
17801fi
17802
17803echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17804echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17805if test "$ac_cv_stat_tv_nsec" = yes
17806then
17807
17808cat >>confdefs.h <<\_ACEOF
17809#define HAVE_STAT_TV_NSEC 1
17810_ACEOF
17811
17812fi
17813
Jack Jansen666b1e72001-10-31 12:11:48 +000017814# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017815echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17816echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17817if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17818 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017819else
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 cat >conftest.$ac_ext <<_ACEOF
17821#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017822/* confdefs.h. */
17823_ACEOF
17824cat confdefs.h >>conftest.$ac_ext
17825cat >>conftest.$ac_ext <<_ACEOF
17826/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017827#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017828int
17829main ()
17830{
Jack Jansen666b1e72001-10-31 12:11:48 +000017831
17832 int rtn;
17833 rtn = mvwdelch(0,0,0);
17834
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 ;
17836 return 0;
17837}
17838_ACEOF
17839rm -f conftest.$ac_objext
17840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17841 (eval $ac_compile) 2>&5
17842 ac_status=$?
17843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17844 (exit $ac_status); } &&
17845 { ac_try='test -s conftest.$ac_objext'
17846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17847 (eval $ac_try) 2>&5
17848 ac_status=$?
17849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17850 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017851 ac_cv_mvwdelch_is_expression=yes
17852else
Martin v. Löwis11437992002-04-12 09:54:03 +000017853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017854sed 's/^/| /' conftest.$ac_ext >&5
17855
Martin v. Löwis11437992002-04-12 09:54:03 +000017856ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017858rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017859fi
17860
Martin v. Löwis11437992002-04-12 09:54:03 +000017861echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17862echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017863
17864if test "$ac_cv_mvwdelch_is_expression" = yes
17865then
Martin v. Löwis11437992002-04-12 09:54:03 +000017866
17867cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017868#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017869_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017870
17871fi
17872
Martin v. Löwis11437992002-04-12 09:54:03 +000017873echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17874echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17875if test "${ac_cv_window_has_flags+set}" = set; then
17876 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017877else
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 cat >conftest.$ac_ext <<_ACEOF
17879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017880/* confdefs.h. */
17881_ACEOF
17882cat confdefs.h >>conftest.$ac_ext
17883cat >>conftest.$ac_ext <<_ACEOF
17884/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017885#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017886int
17887main ()
17888{
Jack Jansen666b1e72001-10-31 12:11:48 +000017889
17890 WINDOW *w;
17891 w->_flags = 0;
17892
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 ;
17894 return 0;
17895}
17896_ACEOF
17897rm -f conftest.$ac_objext
17898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17899 (eval $ac_compile) 2>&5
17900 ac_status=$?
17901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17902 (exit $ac_status); } &&
17903 { ac_try='test -s conftest.$ac_objext'
17904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17905 (eval $ac_try) 2>&5
17906 ac_status=$?
17907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017909 ac_cv_window_has_flags=yes
17910else
Martin v. Löwis11437992002-04-12 09:54:03 +000017911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017912sed 's/^/| /' conftest.$ac_ext >&5
17913
Martin v. Löwis11437992002-04-12 09:54:03 +000017914ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017915fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017916rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017917fi
17918
Martin v. Löwis11437992002-04-12 09:54:03 +000017919echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17920echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017921
Jack Jansen666b1e72001-10-31 12:11:48 +000017922
17923if test "$ac_cv_window_has_flags" = yes
17924then
Martin v. Löwis11437992002-04-12 09:54:03 +000017925
17926cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017927#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017928_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017929
17930fi
17931
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017932echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17933echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17934
17935if test -e /dev/ptmx
17936then
17937 echo "$as_me:$LINENO: result: yes" >&5
17938echo "${ECHO_T}yes" >&6
17939
17940cat >>confdefs.h <<\_ACEOF
17941#define HAVE_DEV_PTMX 1
17942_ACEOF
17943
17944else
17945 echo "$as_me:$LINENO: result: no" >&5
17946echo "${ECHO_T}no" >&6
17947fi
17948
Neal Norwitz865400f2003-03-21 01:42:58 +000017949echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17950echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17951
17952if test -e /dev/ptc
17953then
17954 echo "$as_me:$LINENO: result: yes" >&5
17955echo "${ECHO_T}yes" >&6
17956
17957cat >>confdefs.h <<\_ACEOF
17958#define HAVE_DEV_PTC 1
17959_ACEOF
17960
17961else
17962 echo "$as_me:$LINENO: result: no" >&5
17963echo "${ECHO_T}no" >&6
17964fi
17965
Martin v. Löwis11437992002-04-12 09:54:03 +000017966echo "$as_me:$LINENO: checking for socklen_t" >&5
17967echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17968if test "${ac_cv_type_socklen_t+set}" = set; then
17969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017970else
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 cat >conftest.$ac_ext <<_ACEOF
17972#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017973/* confdefs.h. */
17974_ACEOF
17975cat confdefs.h >>conftest.$ac_ext
17976cat >>conftest.$ac_ext <<_ACEOF
17977/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017978
17979#ifdef HAVE_SYS_TYPES_H
17980#include <sys/types.h>
17981#endif
17982#ifdef HAVE_SYS_SOCKET_H
17983#include <sys/socket.h>
17984#endif
17985
17986
Martin v. Löwis11437992002-04-12 09:54:03 +000017987int
17988main ()
17989{
17990if ((socklen_t *) 0)
17991 return 0;
17992if (sizeof (socklen_t))
17993 return 0;
17994 ;
17995 return 0;
17996}
17997_ACEOF
17998rm -f conftest.$ac_objext
17999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18000 (eval $ac_compile) 2>&5
18001 ac_status=$?
18002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18003 (exit $ac_status); } &&
18004 { ac_try='test -s conftest.$ac_objext'
18005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18006 (eval $ac_try) 2>&5
18007 ac_status=$?
18008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18009 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018010 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018011else
Martin v. Löwis11437992002-04-12 09:54:03 +000018012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018013sed 's/^/| /' conftest.$ac_ext >&5
18014
Martin v. Löwis11437992002-04-12 09:54:03 +000018015ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018016fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018017rm -f conftest.$ac_objext conftest.$ac_ext
18018fi
18019echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18020echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18021if test $ac_cv_type_socklen_t = yes; then
18022 :
18023else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018024
Martin v. Löwis01c04012002-11-11 14:58:44 +000018025cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018026#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018027_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018028
18029fi
18030
Michael W. Hudson54241132001-12-07 15:38:26 +000018031
Michael W. Hudson54241132001-12-07 15:38:26 +000018032
18033
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018034for h in `(cd $srcdir;echo Python/thread_*.h)`
18035do
18036 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18037done
18038
Michael W. Hudson54241132001-12-07 15:38:26 +000018039
Jack Jansen0b06be72002-06-21 14:48:38 +000018040SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018041echo "$as_me:$LINENO: checking for build directories" >&5
18042echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018043for dir in $SRCDIRS; do
18044 if test ! -d $dir; then
18045 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018046 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018047done
Martin v. Löwis11437992002-04-12 09:54:03 +000018048echo "$as_me:$LINENO: result: done" >&5
18049echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018050
Guido van Rossum627b2d71993-12-24 10:39:16 +000018051# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018052 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018053
Martin v. Löwis11437992002-04-12 09:54:03 +000018054cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018055# This file is a shell script that caches the results of configure
18056# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018057# scripts and configure runs, see configure's option --config-cache.
18058# It is not useful on other systems. If it contains results you don't
18059# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018060#
Martin v. Löwis11437992002-04-12 09:54:03 +000018061# config.status only pays attention to the cache file if you give it
18062# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018063#
Skip Montanaro6dead952003-09-25 14:50:04 +000018064# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018065# loading this file, other *unset* `ac_cv_foo' will be assigned the
18066# following values.
18067
18068_ACEOF
18069
Guido van Rossumf78abae1997-01-21 22:02:36 +000018070# The following way of writing the cache mishandles newlines in values,
18071# but we know of no workaround that is simple, portable, and efficient.
18072# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018073# Ultrix sh set writes to stderr and can't be redirected directly,
18074# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018075{
18076 (set) 2>&1 |
18077 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18078 *ac_space=\ *)
18079 # `set' does not quote correctly, so add quotes (double-quote
18080 # substitution turns \\\\ into \\, and sed turns \\ into \).
18081 sed -n \
18082 "s/'/'\\\\''/g;
18083 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18084 ;;
18085 *)
18086 # `set' quotes correctly as required by POSIX, so do not add quotes.
18087 sed -n \
18088 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18089 ;;
18090 esac;
18091} |
18092 sed '
18093 t clear
18094 : clear
18095 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18096 t end
18097 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18098 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018099if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018100 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018101 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18102 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018103 else
18104 echo "not updating unwritable cache $cache_file"
18105 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018106fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018107rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018108
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018109test "x$prefix" = xNONE && prefix=$ac_default_prefix
18110# Let make expand exec_prefix.
18111test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018112
Martin v. Löwis11437992002-04-12 09:54:03 +000018113# VPATH may cause trouble with some makes, so we remove $(srcdir),
18114# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18115# trailing colons and then remove the whole line if VPATH becomes empty
18116# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018117if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018118 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18119s/:*\$(srcdir):*/:/;
18120s/:*\${srcdir}:*/:/;
18121s/:*@srcdir@:*/:/;
18122s/^\([^=]*=[ ]*\):*/\1/;
18123s/:*$//;
18124s/^[^=]*=[ ]*$//;
18125}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018126fi
18127
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018128DEFS=-DHAVE_CONFIG_H
18129
Skip Montanaro6dead952003-09-25 14:50:04 +000018130ac_libobjs=
18131ac_ltlibobjs=
18132for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18133 # 1. Remove the extension, and $U if already installed.
18134 ac_i=`echo "$ac_i" |
18135 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18136 # 2. Add them.
18137 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18138 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18139done
18140LIBOBJS=$ac_libobjs
18141
18142LTLIBOBJS=$ac_ltlibobjs
18143
18144
Martin v. Löwis11437992002-04-12 09:54:03 +000018145
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018146: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018147ac_clean_files_save=$ac_clean_files
18148ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18149{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18150echo "$as_me: creating $CONFIG_STATUS" >&6;}
18151cat >$CONFIG_STATUS <<_ACEOF
18152#! $SHELL
18153# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018154# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018155# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018156# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018157
Martin v. Löwis11437992002-04-12 09:54:03 +000018158debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018159ac_cs_recheck=false
18160ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018161SHELL=\${CONFIG_SHELL-$SHELL}
18162_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018163
Martin v. Löwis11437992002-04-12 09:54:03 +000018164cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018165## --------------------- ##
18166## M4sh Initialization. ##
18167## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018168
Martin v. Löwis11437992002-04-12 09:54:03 +000018169# Be Bourne compatible
18170if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18171 emulate sh
18172 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018173 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18174 # is contrary to our usage. Disable this feature.
18175 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018176elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18177 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018178fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018179
Martin v. Löwis11437992002-04-12 09:54:03 +000018180# Support unset when possible.
18181if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18182 as_unset=unset
18183else
18184 as_unset=false
18185fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018186
Skip Montanaro6dead952003-09-25 14:50:04 +000018187
18188# Work around bugs in pre-3.0 UWIN ksh.
18189$as_unset ENV MAIL MAILPATH
18190PS1='$ '
18191PS2='> '
18192PS4='+ '
18193
18194# NLS nuisances.
18195for as_var in \
18196 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18197 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18198 LC_TELEPHONE LC_TIME
18199do
18200 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18201 eval $as_var=C; export $as_var
18202 else
18203 $as_unset $as_var
18204 fi
18205done
18206
18207# Required to use basename.
18208if expr a : '\(a\)' >/dev/null 2>&1; then
18209 as_expr=expr
18210else
18211 as_expr=false
18212fi
18213
18214if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18215 as_basename=basename
18216else
18217 as_basename=false
18218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018219
18220
18221# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018222as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018223$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18224 X"$0" : 'X\(//\)$' \| \
18225 X"$0" : 'X\(/\)$' \| \
18226 . : '\(.\)' 2>/dev/null ||
18227echo X/"$0" |
18228 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18229 /^X\/\(\/\/\)$/{ s//\1/; q; }
18230 /^X\/\(\/\).*/{ s//\1/; q; }
18231 s/.*/./; q'`
18232
Skip Montanaro6dead952003-09-25 14:50:04 +000018233
Martin v. Löwis11437992002-04-12 09:54:03 +000018234# PATH needs CR, and LINENO needs CR and PATH.
18235# Avoid depending upon Character Ranges.
18236as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18237as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18238as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18239as_cr_digits='0123456789'
18240as_cr_alnum=$as_cr_Letters$as_cr_digits
18241
18242# The user is always right.
18243if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018244 echo "#! /bin/sh" >conf$$.sh
18245 echo "exit 0" >>conf$$.sh
18246 chmod +x conf$$.sh
18247 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018248 PATH_SEPARATOR=';'
18249 else
18250 PATH_SEPARATOR=:
18251 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018252 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018253fi
18254
18255
18256 as_lineno_1=$LINENO
18257 as_lineno_2=$LINENO
18258 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18259 test "x$as_lineno_1" != "x$as_lineno_2" &&
18260 test "x$as_lineno_3" = "x$as_lineno_2" || {
18261 # Find who we are. Look in the path if we contain no path at all
18262 # relative or not.
18263 case $0 in
18264 *[\\/]* ) as_myself=$0 ;;
18265 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18266for as_dir in $PATH
18267do
18268 IFS=$as_save_IFS
18269 test -z "$as_dir" && as_dir=.
18270 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18271done
18272
18273 ;;
18274 esac
18275 # We did not find ourselves, most probably we were run as `sh COMMAND'
18276 # in which case we are not to be found in the path.
18277 if test "x$as_myself" = x; then
18278 as_myself=$0
18279 fi
18280 if test ! -f "$as_myself"; then
18281 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18282echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18283 { (exit 1); exit 1; }; }
18284 fi
18285 case $CONFIG_SHELL in
18286 '')
18287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18288for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18289do
18290 IFS=$as_save_IFS
18291 test -z "$as_dir" && as_dir=.
18292 for as_base in sh bash ksh sh5; do
18293 case $as_dir in
18294 /*)
18295 if ("$as_dir/$as_base" -c '
18296 as_lineno_1=$LINENO
18297 as_lineno_2=$LINENO
18298 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18299 test "x$as_lineno_1" != "x$as_lineno_2" &&
18300 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018301 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18302 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 CONFIG_SHELL=$as_dir/$as_base
18304 export CONFIG_SHELL
18305 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18306 fi;;
18307 esac
18308 done
18309done
18310;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018311 esac
18312
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18314 # uniformly replaced by the line number. The first 'sed' inserts a
18315 # line-number line before each line; the second 'sed' does the real
18316 # work. The second script uses 'N' to pair each line-number line
18317 # with the numbered line, and appends trailing '-' during
18318 # substitution so that $LINENO is not a special case at line end.
18319 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18320 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18321 sed '=' <$as_myself |
18322 sed '
18323 N
18324 s,$,-,
18325 : loop
18326 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18327 t loop
18328 s,-$,,
18329 s,^['$as_cr_digits']*\n,,
18330 ' >$as_me.lineno &&
18331 chmod +x $as_me.lineno ||
18332 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18333echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18334 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018335
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 # Don't try to exec as it changes $[0], causing all sort of problems
18337 # (the dirname of $[0] is not the place where we might find the
18338 # original and so on. Autoconf is especially sensible to this).
18339 . ./$as_me.lineno
18340 # Exit status is that of the last command.
18341 exit
18342}
18343
18344
18345case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18346 *c*,-n*) ECHO_N= ECHO_C='
18347' ECHO_T=' ' ;;
18348 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18349 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18350esac
18351
18352if expr a : '\(a\)' >/dev/null 2>&1; then
18353 as_expr=expr
18354else
18355 as_expr=false
18356fi
18357
18358rm -f conf$$ conf$$.exe conf$$.file
18359echo >conf$$.file
18360if ln -s conf$$.file conf$$ 2>/dev/null; then
18361 # We could just check for DJGPP; but this test a) works b) is more generic
18362 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18363 if test -f conf$$.exe; then
18364 # Don't use ln at all; we don't have any links
18365 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018366 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018367 as_ln_s='ln -s'
18368 fi
18369elif ln conf$$.file conf$$ 2>/dev/null; then
18370 as_ln_s=ln
18371else
18372 as_ln_s='cp -p'
18373fi
18374rm -f conf$$ conf$$.exe conf$$.file
18375
Skip Montanaro6dead952003-09-25 14:50:04 +000018376if mkdir -p . 2>/dev/null; then
18377 as_mkdir_p=:
18378else
18379 as_mkdir_p=false
18380fi
18381
Martin v. Löwis11437992002-04-12 09:54:03 +000018382as_executable_p="test -f"
18383
18384# Sed expression to map a string onto a valid CPP name.
18385as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18386
18387# Sed expression to map a string onto a valid variable name.
18388as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18389
18390
18391# IFS
18392# We need space, tab and new line, in precisely that order.
18393as_nl='
18394'
18395IFS=" $as_nl"
18396
18397# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018398$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018399
18400exec 6>&1
18401
18402# Open the log real soon, to keep \$[0] and so on meaningful, and to
18403# report actual input values of CONFIG_FILES etc. instead of their
18404# values after options handling. Logging --version etc. is OK.
18405exec 5>>config.log
18406{
18407 echo
18408 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18409## Running $as_me. ##
18410_ASBOX
18411} >&5
18412cat >&5 <<_CSEOF
18413
Fred Drake9bd44622003-07-30 17:39:48 +000018414This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018415generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018416
18417 CONFIG_FILES = $CONFIG_FILES
18418 CONFIG_HEADERS = $CONFIG_HEADERS
18419 CONFIG_LINKS = $CONFIG_LINKS
18420 CONFIG_COMMANDS = $CONFIG_COMMANDS
18421 $ $0 $@
18422
18423_CSEOF
18424echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18425echo >&5
18426_ACEOF
18427
18428# Files that config.status was made for.
18429if test -n "$ac_config_files"; then
18430 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18431fi
18432
18433if test -n "$ac_config_headers"; then
18434 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18435fi
18436
18437if test -n "$ac_config_links"; then
18438 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18439fi
18440
18441if test -n "$ac_config_commands"; then
18442 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18443fi
18444
18445cat >>$CONFIG_STATUS <<\_ACEOF
18446
18447ac_cs_usage="\
18448\`$as_me' instantiates files from templates according to the
18449current configuration.
18450
18451Usage: $0 [OPTIONS] [FILE]...
18452
18453 -h, --help print this help, then exit
18454 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018455 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 -d, --debug don't remove temporary files
18457 --recheck update $as_me by reconfiguring in the same conditions
18458 --file=FILE[:TEMPLATE]
18459 instantiate the configuration file FILE
18460 --header=FILE[:TEMPLATE]
18461 instantiate the configuration header FILE
18462
18463Configuration files:
18464$config_files
18465
18466Configuration headers:
18467$config_headers
18468
18469Report bugs to <bug-autoconf@gnu.org>."
18470_ACEOF
18471
18472cat >>$CONFIG_STATUS <<_ACEOF
18473ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018474python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018475configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018476 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18477
18478Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18479Free Software Foundation, Inc.
18480This config.status script is free software; the Free Software Foundation
18481gives unlimited permission to copy, distribute and modify it."
18482srcdir=$srcdir
18483INSTALL="$INSTALL"
18484_ACEOF
18485
18486cat >>$CONFIG_STATUS <<\_ACEOF
18487# If no file are specified by the user, then we need to provide default
18488# value. By we need to know if files were specified by the user.
18489ac_need_defaults=:
18490while test $# != 0
18491do
18492 case $1 in
18493 --*=*)
18494 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18495 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018496 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018497 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018498 -*)
18499 ac_option=$1
18500 ac_optarg=$2
18501 ac_shift=shift
18502 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018503 *) # This is not an option, so the user has probably given explicit
18504 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018505 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 ac_need_defaults=false;;
18507 esac
18508
Skip Montanaro6dead952003-09-25 14:50:04 +000018509 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018510 # Handling of the options.
18511_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018512cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018513 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18514 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018515 --version | --vers* | -V )
18516 echo "$ac_cs_version"; exit 0 ;;
18517 --he | --h)
18518 # Conflict between --help and --header
18519 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18520Try \`$0 --help' for more information." >&5
18521echo "$as_me: error: ambiguous option: $1
18522Try \`$0 --help' for more information." >&2;}
18523 { (exit 1); exit 1; }; };;
18524 --help | --hel | -h )
18525 echo "$ac_cs_usage"; exit 0 ;;
18526 --debug | --d* | -d )
18527 debug=: ;;
18528 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018529 $ac_shift
18530 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018531 ac_need_defaults=false;;
18532 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018533 $ac_shift
18534 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018535 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018536 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18537 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18538 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018539
18540 # This is an error.
18541 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18542Try \`$0 --help' for more information." >&5
18543echo "$as_me: error: unrecognized option: $1
18544Try \`$0 --help' for more information." >&2;}
18545 { (exit 1); exit 1; }; } ;;
18546
18547 *) ac_config_targets="$ac_config_targets $1" ;;
18548
18549 esac
18550 shift
18551done
18552
Skip Montanaro6dead952003-09-25 14:50:04 +000018553ac_configure_extra_args=
18554
18555if $ac_cs_silent; then
18556 exec 6>/dev/null
18557 ac_configure_extra_args="$ac_configure_extra_args --silent"
18558fi
18559
18560_ACEOF
18561cat >>$CONFIG_STATUS <<_ACEOF
18562if \$ac_cs_recheck; then
18563 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18564 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18565fi
18566
Martin v. Löwis11437992002-04-12 09:54:03 +000018567_ACEOF
18568
18569
18570
18571
18572
18573cat >>$CONFIG_STATUS <<\_ACEOF
18574for ac_config_target in $ac_config_targets
18575do
18576 case "$ac_config_target" in
18577 # Handling of arguments.
18578 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18579 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18580 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18581 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18582echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18583 { (exit 1); exit 1; }; };;
18584 esac
18585done
18586
18587# If the user did not use the arguments to specify the items to instantiate,
18588# then the envvar interface is used. Set only those that are not.
18589# We use the long form for the default assignment because of an extremely
18590# bizarre bug on SunOS 4.1.3.
18591if $ac_need_defaults; then
18592 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18593 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18594fi
18595
Skip Montanaro6dead952003-09-25 14:50:04 +000018596# Have a temporary directory for convenience. Make it in the build tree
18597# simply because there is no reason to put it here, and in addition,
18598# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018599# Create a temporary directory, and hook for its removal unless debugging.
18600$debug ||
18601{
18602 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18603 trap '{ (exit 1); exit 1; }' 1 2 13 15
18604}
18605
18606# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018607
Martin v. Löwis11437992002-04-12 09:54:03 +000018608{
Skip Montanaro6dead952003-09-25 14:50:04 +000018609 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018610 test -n "$tmp" && test -d "$tmp"
18611} ||
18612{
Skip Montanaro6dead952003-09-25 14:50:04 +000018613 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 (umask 077 && mkdir $tmp)
18615} ||
18616{
Skip Montanaro6dead952003-09-25 14:50:04 +000018617 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 { (exit 1); exit 1; }
18619}
18620
18621_ACEOF
18622
18623cat >>$CONFIG_STATUS <<_ACEOF
18624
18625#
18626# CONFIG_FILES section.
18627#
18628
18629# No need to generate the scripts if there are no CONFIG_FILES.
18630# This happens for instance when ./config.status config.h
18631if test -n "\$CONFIG_FILES"; then
18632 # Protect against being on the right side of a sed subst in config.status.
18633 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18634 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18635s,@SHELL@,$SHELL,;t t
18636s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18637s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18638s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18639s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18640s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18641s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18642s,@exec_prefix@,$exec_prefix,;t t
18643s,@prefix@,$prefix,;t t
18644s,@program_transform_name@,$program_transform_name,;t t
18645s,@bindir@,$bindir,;t t
18646s,@sbindir@,$sbindir,;t t
18647s,@libexecdir@,$libexecdir,;t t
18648s,@datadir@,$datadir,;t t
18649s,@sysconfdir@,$sysconfdir,;t t
18650s,@sharedstatedir@,$sharedstatedir,;t t
18651s,@localstatedir@,$localstatedir,;t t
18652s,@libdir@,$libdir,;t t
18653s,@includedir@,$includedir,;t t
18654s,@oldincludedir@,$oldincludedir,;t t
18655s,@infodir@,$infodir,;t t
18656s,@mandir@,$mandir,;t t
18657s,@build_alias@,$build_alias,;t t
18658s,@host_alias@,$host_alias,;t t
18659s,@target_alias@,$target_alias,;t t
18660s,@DEFS@,$DEFS,;t t
18661s,@ECHO_C@,$ECHO_C,;t t
18662s,@ECHO_N@,$ECHO_N,;t t
18663s,@ECHO_T@,$ECHO_T,;t t
18664s,@LIBS@,$LIBS,;t t
18665s,@VERSION@,$VERSION,;t t
18666s,@SOVERSION@,$SOVERSION,;t t
18667s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18668s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18669s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18670s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18671s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18672s,@MACHDEP@,$MACHDEP,;t t
18673s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018674s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018675s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018676s,@CXX@,$CXX,;t t
18677s,@MAINOBJ@,$MAINOBJ,;t t
18678s,@EXEEXT@,$EXEEXT,;t t
18679s,@CC@,$CC,;t t
18680s,@CFLAGS@,$CFLAGS,;t t
18681s,@LDFLAGS@,$LDFLAGS,;t t
18682s,@CPPFLAGS@,$CPPFLAGS,;t t
18683s,@ac_ct_CC@,$ac_ct_CC,;t t
18684s,@OBJEXT@,$OBJEXT,;t t
18685s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018686s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018687s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18688s,@LIBRARY@,$LIBRARY,;t t
18689s,@LDLIBRARY@,$LDLIBRARY,;t t
18690s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18691s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18692s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18693s,@INSTSONAME@,$INSTSONAME,;t t
18694s,@RUNSHARED@,$RUNSHARED,;t t
18695s,@LINKCC@,$LINKCC,;t t
18696s,@RANLIB@,$RANLIB,;t t
18697s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18698s,@AR@,$AR,;t t
18699s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18700s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18701s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18702s,@LN@,$LN,;t t
18703s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018704s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018705s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18706s,@SO@,$SO,;t t
18707s,@LDSHARED@,$LDSHARED,;t t
18708s,@BLDSHARED@,$BLDSHARED,;t t
18709s,@CCSHARED@,$CCSHARED,;t t
18710s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18711s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018712s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018713s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18714s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18715s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18716s,@LDLAST@,$LDLAST,;t t
18717s,@THREADOBJ@,$THREADOBJ,;t t
18718s,@DLINCLDIR@,$DLINCLDIR,;t t
18719s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18720s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018721s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018722s,@LIBOBJS@,$LIBOBJS,;t t
18723s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18724s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18725s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18726s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18727s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18728s,@LIBM@,$LIBM,;t t
18729s,@LIBC@,$LIBC,;t t
18730s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18731s,@THREADHEADERS@,$THREADHEADERS,;t t
18732s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018733s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018734CEOF
18735
18736_ACEOF
18737
18738 cat >>$CONFIG_STATUS <<\_ACEOF
18739 # Split the substitutions into bite-sized pieces for seds with
18740 # small command number limits, like on Digital OSF/1 and HP-UX.
18741 ac_max_sed_lines=48
18742 ac_sed_frag=1 # Number of current file.
18743 ac_beg=1 # First line for current file.
18744 ac_end=$ac_max_sed_lines # Line after last line for current file.
18745 ac_more_lines=:
18746 ac_sed_cmds=
18747 while $ac_more_lines; do
18748 if test $ac_beg -gt 1; then
18749 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18750 else
18751 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18752 fi
18753 if test ! -s $tmp/subs.frag; then
18754 ac_more_lines=false
18755 else
18756 # The purpose of the label and of the branching condition is to
18757 # speed up the sed processing (if there are no `@' at all, there
18758 # is no need to browse any of the substitutions).
18759 # These are the two extra sed commands mentioned above.
18760 (echo ':t
18761 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18762 if test -z "$ac_sed_cmds"; then
18763 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18764 else
18765 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18766 fi
18767 ac_sed_frag=`expr $ac_sed_frag + 1`
18768 ac_beg=$ac_end
18769 ac_end=`expr $ac_end + $ac_max_sed_lines`
18770 fi
18771 done
18772 if test -z "$ac_sed_cmds"; then
18773 ac_sed_cmds=cat
18774 fi
18775fi # test -n "$CONFIG_FILES"
18776
18777_ACEOF
18778cat >>$CONFIG_STATUS <<\_ACEOF
18779for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18780 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18781 case $ac_file in
18782 - | *:- | *:-:* ) # input from stdin
18783 cat >$tmp/stdin
18784 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18785 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18786 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18787 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18788 * ) ac_file_in=$ac_file.in ;;
18789 esac
18790
18791 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18792 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18793$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18794 X"$ac_file" : 'X\(//\)[^/]' \| \
18795 X"$ac_file" : 'X\(//\)$' \| \
18796 X"$ac_file" : 'X\(/\)' \| \
18797 . : '\(.\)' 2>/dev/null ||
18798echo X"$ac_file" |
18799 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18800 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18801 /^X\(\/\/\)$/{ s//\1/; q; }
18802 /^X\(\/\).*/{ s//\1/; q; }
18803 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018804 { if $as_mkdir_p; then
18805 mkdir -p "$ac_dir"
18806 else
18807 as_dir="$ac_dir"
18808 as_dirs=
18809 while test ! -d "$as_dir"; do
18810 as_dirs="$as_dir $as_dirs"
18811 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18812$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18813 X"$as_dir" : 'X\(//\)[^/]' \| \
18814 X"$as_dir" : 'X\(//\)$' \| \
18815 X"$as_dir" : 'X\(/\)' \| \
18816 . : '\(.\)' 2>/dev/null ||
18817echo X"$as_dir" |
18818 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18819 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18820 /^X\(\/\/\)$/{ s//\1/; q; }
18821 /^X\(\/\).*/{ s//\1/; q; }
18822 s/.*/./; q'`
18823 done
18824 test ! -n "$as_dirs" || mkdir $as_dirs
18825 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18826echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18827 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018828
18829 ac_builddir=.
18830
18831if test "$ac_dir" != .; then
18832 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18833 # A "../" for each directory in $ac_dir_suffix.
18834 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18835else
18836 ac_dir_suffix= ac_top_builddir=
18837fi
18838
18839case $srcdir in
18840 .) # No --srcdir option. We are building in place.
18841 ac_srcdir=.
18842 if test -z "$ac_top_builddir"; then
18843 ac_top_srcdir=.
18844 else
18845 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18846 fi ;;
18847 [\\/]* | ?:[\\/]* ) # Absolute path.
18848 ac_srcdir=$srcdir$ac_dir_suffix;
18849 ac_top_srcdir=$srcdir ;;
18850 *) # Relative path.
18851 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18852 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18853esac
18854# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18855# absolute.
18856ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018857ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018858ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18859ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18860
18861
18862 case $INSTALL in
18863 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18864 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18865 esac
18866
18867 if test x"$ac_file" != x-; then
18868 { echo "$as_me:$LINENO: creating $ac_file" >&5
18869echo "$as_me: creating $ac_file" >&6;}
18870 rm -f "$ac_file"
18871 fi
18872 # Let's still pretend it is `configure' which instantiates (i.e., don't
18873 # use $as_me), people would be surprised to read:
18874 # /* config.h. Generated by config.status. */
18875 if test x"$ac_file" = x-; then
18876 configure_input=
18877 else
18878 configure_input="$ac_file. "
18879 fi
18880 configure_input=$configure_input"Generated from `echo $ac_file_in |
18881 sed 's,.*/,,'` by configure."
18882
18883 # First look for the input files in the build tree, otherwise in the
18884 # src tree.
18885 ac_file_inputs=`IFS=:
18886 for f in $ac_file_in; do
18887 case $f in
18888 -) echo $tmp/stdin ;;
18889 [\\/$]*)
18890 # Absolute (can't be DOS-style, as IFS=:)
18891 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18892echo "$as_me: error: cannot find input file: $f" >&2;}
18893 { (exit 1); exit 1; }; }
18894 echo $f;;
18895 *) # Relative
18896 if test -f "$f"; then
18897 # Build tree
18898 echo $f
18899 elif test -f "$srcdir/$f"; then
18900 # Source tree
18901 echo $srcdir/$f
18902 else
18903 # /dev/null tree
18904 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18905echo "$as_me: error: cannot find input file: $f" >&2;}
18906 { (exit 1); exit 1; }; }
18907 fi;;
18908 esac
18909 done` || { (exit 1); exit 1; }
18910_ACEOF
18911cat >>$CONFIG_STATUS <<_ACEOF
18912 sed "$ac_vpsub
18913$extrasub
18914_ACEOF
18915cat >>$CONFIG_STATUS <<\_ACEOF
18916:t
18917/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18918s,@configure_input@,$configure_input,;t t
18919s,@srcdir@,$ac_srcdir,;t t
18920s,@abs_srcdir@,$ac_abs_srcdir,;t t
18921s,@top_srcdir@,$ac_top_srcdir,;t t
18922s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18923s,@builddir@,$ac_builddir,;t t
18924s,@abs_builddir@,$ac_abs_builddir,;t t
18925s,@top_builddir@,$ac_top_builddir,;t t
18926s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18927s,@INSTALL@,$ac_INSTALL,;t t
18928" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18929 rm -f $tmp/stdin
18930 if test x"$ac_file" != x-; then
18931 mv $tmp/out $ac_file
18932 else
18933 cat $tmp/out
18934 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018935 fi
18936
Martin v. Löwis11437992002-04-12 09:54:03 +000018937done
18938_ACEOF
18939cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018940
Martin v. Löwis11437992002-04-12 09:54:03 +000018941#
18942# CONFIG_HEADER section.
18943#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018944
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018945# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18946# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018947#
18948# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018949ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18950ac_dB='[ ].*$,\1#\2'
18951ac_dC=' '
18952ac_dD=',;t'
18953# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18954ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18955ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018956ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018957ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018958
Martin v. Löwis11437992002-04-12 09:54:03 +000018959for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018960 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018961 case $ac_file in
18962 - | *:- | *:-:* ) # input from stdin
18963 cat >$tmp/stdin
18964 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18965 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18966 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18967 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18968 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018969 esac
18970
Martin v. Löwis11437992002-04-12 09:54:03 +000018971 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18972echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018973
Martin v. Löwis11437992002-04-12 09:54:03 +000018974 # First look for the input files in the build tree, otherwise in the
18975 # src tree.
18976 ac_file_inputs=`IFS=:
18977 for f in $ac_file_in; do
18978 case $f in
18979 -) echo $tmp/stdin ;;
18980 [\\/$]*)
18981 # Absolute (can't be DOS-style, as IFS=:)
18982 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18983echo "$as_me: error: cannot find input file: $f" >&2;}
18984 { (exit 1); exit 1; }; }
18985 echo $f;;
18986 *) # Relative
18987 if test -f "$f"; then
18988 # Build tree
18989 echo $f
18990 elif test -f "$srcdir/$f"; then
18991 # Source tree
18992 echo $srcdir/$f
18993 else
18994 # /dev/null tree
18995 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18996echo "$as_me: error: cannot find input file: $f" >&2;}
18997 { (exit 1); exit 1; }; }
18998 fi;;
18999 esac
19000 done` || { (exit 1); exit 1; }
19001 # Remove the trailing spaces.
19002 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019003
Martin v. Löwis11437992002-04-12 09:54:03 +000019004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019005
Martin v. Löwis11437992002-04-12 09:54:03 +000019006# Transform confdefs.h into two sed scripts, `conftest.defines' and
19007# `conftest.undefs', that substitutes the proper values into
19008# config.h.in to produce config.h. The first handles `#define'
19009# templates, and the second `#undef' templates.
19010# And first: Protect against being on the right side of a sed subst in
19011# config.status. Protect against being in an unquoted here document
19012# in config.status.
19013rm -f conftest.defines conftest.undefs
19014# Using a here document instead of a string reduces the quoting nightmare.
19015# Putting comments in sed scripts is not portable.
19016#
19017# `end' is used to avoid that the second main sed command (meant for
19018# 0-ary CPP macros) applies to n-ary macro definitions.
19019# See the Autoconf documentation for `clear'.
19020cat >confdef2sed.sed <<\_ACEOF
19021s/[\\&,]/\\&/g
19022s,[\\$`],\\&,g
19023t clear
19024: clear
19025s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19026t end
19027s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19028: end
19029_ACEOF
19030# If some macros were called several times there might be several times
19031# the same #defines, which is useless. Nevertheless, we may not want to
19032# sort them, since we want the *last* AC-DEFINE to be honored.
19033uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19034sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19035rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019036
19037# This sed command replaces #undef with comments. This is necessary, for
19038# example, in the case of _POSIX_SOURCE, which is predefined and required
19039# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019040cat >>conftest.undefs <<\_ACEOF
19041s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19042_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019043
Martin v. Löwis11437992002-04-12 09:54:03 +000019044# Break up conftest.defines because some shells have a limit on the size
19045# of here documents, and old seds have small limits too (100 cmds).
19046echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019047echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019048echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19049echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019050rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019051while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019052do
Martin v. Löwis11437992002-04-12 09:54:03 +000019053 # Write a limited-size here document to $tmp/defines.sed.
19054 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19055 # Speed up: don't consider the non `#define' lines.
19056 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19057 # Work around the forget-to-reset-the-flag bug.
19058 echo 't clr' >>$CONFIG_STATUS
19059 echo ': clr' >>$CONFIG_STATUS
19060 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019061 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019062 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19063 rm -f $tmp/in
19064 mv $tmp/out $tmp/in
19065' >>$CONFIG_STATUS
19066 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19067 rm -f conftest.defines
19068 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019069done
Martin v. Löwis11437992002-04-12 09:54:03 +000019070rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019071echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019072echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019073
Martin v. Löwis11437992002-04-12 09:54:03 +000019074# Break up conftest.undefs because some shells have a limit on the size
19075# of here documents, and old seds have small limits too (100 cmds).
19076echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19077rm -f conftest.tail
19078while grep . conftest.undefs >/dev/null
19079do
19080 # Write a limited-size here document to $tmp/undefs.sed.
19081 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19082 # Speed up: don't consider the non `#undef'
19083 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19084 # Work around the forget-to-reset-the-flag bug.
19085 echo 't clr' >>$CONFIG_STATUS
19086 echo ': clr' >>$CONFIG_STATUS
19087 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19088 echo 'CEOF
19089 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19090 rm -f $tmp/in
19091 mv $tmp/out $tmp/in
19092' >>$CONFIG_STATUS
19093 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19094 rm -f conftest.undefs
19095 mv conftest.tail conftest.undefs
19096done
19097rm -f conftest.undefs
19098
19099cat >>$CONFIG_STATUS <<\_ACEOF
19100 # Let's still pretend it is `configure' which instantiates (i.e., don't
19101 # use $as_me), people would be surprised to read:
19102 # /* config.h. Generated by config.status. */
19103 if test x"$ac_file" = x-; then
19104 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019105 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019106 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019107 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019108 cat $tmp/in >>$tmp/config.h
19109 rm -f $tmp/in
19110 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019111 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019112 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19113echo "$as_me: $ac_file is unchanged" >&6;}
19114 else
19115 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19116$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19117 X"$ac_file" : 'X\(//\)[^/]' \| \
19118 X"$ac_file" : 'X\(//\)$' \| \
19119 X"$ac_file" : 'X\(/\)' \| \
19120 . : '\(.\)' 2>/dev/null ||
19121echo X"$ac_file" |
19122 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19123 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19124 /^X\(\/\/\)$/{ s//\1/; q; }
19125 /^X\(\/\).*/{ s//\1/; q; }
19126 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019127 { if $as_mkdir_p; then
19128 mkdir -p "$ac_dir"
19129 else
19130 as_dir="$ac_dir"
19131 as_dirs=
19132 while test ! -d "$as_dir"; do
19133 as_dirs="$as_dir $as_dirs"
19134 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19135$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19136 X"$as_dir" : 'X\(//\)[^/]' \| \
19137 X"$as_dir" : 'X\(//\)$' \| \
19138 X"$as_dir" : 'X\(/\)' \| \
19139 . : '\(.\)' 2>/dev/null ||
19140echo X"$as_dir" |
19141 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19142 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19143 /^X\(\/\/\)$/{ s//\1/; q; }
19144 /^X\(\/\).*/{ s//\1/; q; }
19145 s/.*/./; q'`
19146 done
19147 test ! -n "$as_dirs" || mkdir $as_dirs
19148 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19149echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19150 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019151
Martin v. Löwis11437992002-04-12 09:54:03 +000019152 rm -f $ac_file
19153 mv $tmp/config.h $ac_file
19154 fi
19155 else
19156 cat $tmp/config.h
19157 rm -f $tmp/config.h
19158 fi
19159done
19160_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019161
Martin v. Löwis11437992002-04-12 09:54:03 +000019162cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019163
Martin v. Löwis11437992002-04-12 09:54:03 +000019164{ (exit 0); exit 0; }
19165_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019166chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019167ac_clean_files=$ac_clean_files_save
19168
19169
19170# configure is writing to config.log, and then calls config.status.
19171# config.status does its own redirection, appending to config.log.
19172# Unfortunately, on DOS this fails, as config.log is still kept open
19173# by configure, so config.status won't be able to write to it; its
19174# output is simply discarded. So we exec the FD to /dev/null,
19175# effectively closing config.log, so it can be properly (re)opened and
19176# appended to by config.status. When coming back to configure, we
19177# need to make the FD available again.
19178if test "$no_create" != yes; then
19179 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019180 ac_config_status_args=
19181 test "$silent" = yes &&
19182 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019183 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019184 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019185 exec 5>>config.log
19186 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19187 # would make configure fail if this is the last instruction.
19188 $ac_cs_success || { (exit 1); exit 1; }
19189fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019190
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019191
19192echo "creating Setup"
19193if test ! -f Modules/Setup
19194then
19195 cp $srcdir/Modules/Setup.dist Modules/Setup
19196fi
19197
19198echo "creating Setup.local"
19199if test ! -f Modules/Setup.local
19200then
19201 echo "# Edit this file for local setup changes" >Modules/Setup.local
19202fi
19203
19204echo "creating Makefile"
19205$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19206 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019207 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019208mv config.c Modules