blob: cf2747a7599a19dff106704cc65a9b84a241f3a8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanaro7befb992004-02-10 16:50:21 +00002# From configure.in Revision: 1.451 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaro6dead952003-09-25 14:50:04 +00004# Generated by GNU Autoconf 2.57 for python 2.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000010## --------------------- ##
11## M4sh Initialization. ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22 set -o posix
23fi
24
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27 as_unset=unset
28else
29 as_unset=false
30fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in \
41 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43 LC_TELEPHONE LC_TIME
44do
45 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
46 eval $as_var=C; export $as_var
47 else
48 $as_unset $as_var
49 fi
50done
51
52# Required to use basename.
53if expr a : '\(a\)' >/dev/null 2>&1; then
54 as_expr=expr
55else
56 as_expr=false
57fi
58
59if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60 as_basename=basename
61else
62 as_basename=false
63fi
Martin v. Löwis11437992002-04-12 09:54:03 +000064
65
66# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000067as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000068$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69 X"$0" : 'X\(//\)$' \| \
70 X"$0" : 'X\(/\)$' \| \
71 . : '\(.\)' 2>/dev/null ||
72echo X/"$0" |
73 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74 /^X\/\(\/\/\)$/{ s//\1/; q; }
75 /^X\/\(\/\).*/{ s//\1/; q; }
76 s/.*/./; q'`
77
Skip Montanaro6dead952003-09-25 14:50:04 +000078
Martin v. Löwis11437992002-04-12 09:54:03 +000079# PATH needs CR, and LINENO needs CR and PATH.
80# Avoid depending upon Character Ranges.
81as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84as_cr_digits='0123456789'
85as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87# The user is always right.
88if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000089 echo "#! /bin/sh" >conf$$.sh
90 echo "exit 0" >>conf$$.sh
91 chmod +x conf$$.sh
92 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000093 PATH_SEPARATOR=';'
94 else
95 PATH_SEPARATOR=:
96 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000097 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000098fi
99
100
101 as_lineno_1=$LINENO
102 as_lineno_2=$LINENO
103 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104 test "x$as_lineno_1" != "x$as_lineno_2" &&
105 test "x$as_lineno_3" = "x$as_lineno_2" || {
106 # Find who we are. Look in the path if we contain no path at all
107 # relative or not.
108 case $0 in
109 *[\\/]* ) as_myself=$0 ;;
110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111for as_dir in $PATH
112do
113 IFS=$as_save_IFS
114 test -z "$as_dir" && as_dir=.
115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116done
117
118 ;;
119 esac
120 # We did not find ourselves, most probably we were run as `sh COMMAND'
121 # in which case we are not to be found in the path.
122 if test "x$as_myself" = x; then
123 as_myself=$0
124 fi
125 if test ! -f "$as_myself"; then
126 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127 { (exit 1); exit 1; }; }
128 fi
129 case $CONFIG_SHELL in
130 '')
131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133do
134 IFS=$as_save_IFS
135 test -z "$as_dir" && as_dir=.
136 for as_base in sh bash ksh sh5; do
137 case $as_dir in
138 /*)
139 if ("$as_dir/$as_base" -c '
140 as_lineno_1=$LINENO
141 as_lineno_2=$LINENO
142 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143 test "x$as_lineno_1" != "x$as_lineno_2" &&
144 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000145 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000147 CONFIG_SHELL=$as_dir/$as_base
148 export CONFIG_SHELL
149 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150 fi;;
151 esac
152 done
153done
154;;
155 esac
156
157 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158 # uniformly replaced by the line number. The first 'sed' inserts a
159 # line-number line before each line; the second 'sed' does the real
160 # work. The second script uses 'N' to pair each line-number line
161 # with the numbered line, and appends trailing '-' during
162 # substitution so that $LINENO is not a special case at line end.
163 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
165 sed '=' <$as_myself |
166 sed '
167 N
168 s,$,-,
169 : loop
170 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171 t loop
172 s,-$,,
173 s,^['$as_cr_digits']*\n,,
174 ' >$as_me.lineno &&
175 chmod +x $as_me.lineno ||
176 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177 { (exit 1); exit 1; }; }
178
179 # Don't try to exec as it changes $[0], causing all sort of problems
180 # (the dirname of $[0] is not the place where we might find the
181 # original and so on. Autoconf is especially sensible to this).
182 . ./$as_me.lineno
183 # Exit status is that of the last command.
184 exit
185}
186
187
188case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189 *c*,-n*) ECHO_N= ECHO_C='
190' ECHO_T=' ' ;;
191 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
193esac
194
195if expr a : '\(a\)' >/dev/null 2>&1; then
196 as_expr=expr
197else
198 as_expr=false
199fi
200
201rm -f conf$$ conf$$.exe conf$$.file
202echo >conf$$.file
203if ln -s conf$$.file conf$$ 2>/dev/null; then
204 # We could just check for DJGPP; but this test a) works b) is more generic
205 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206 if test -f conf$$.exe; then
207 # Don't use ln at all; we don't have any links
208 as_ln_s='cp -p'
209 else
210 as_ln_s='ln -s'
211 fi
212elif ln conf$$.file conf$$ 2>/dev/null; then
213 as_ln_s=ln
214else
215 as_ln_s='cp -p'
216fi
217rm -f conf$$ conf$$.exe conf$$.file
218
Skip Montanaro6dead952003-09-25 14:50:04 +0000219if mkdir -p . 2>/dev/null; then
220 as_mkdir_p=:
221else
222 as_mkdir_p=false
223fi
224
Martin v. Löwis11437992002-04-12 09:54:03 +0000225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000241$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000254ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000255ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000268PACKAGE_NAME='python'
269PACKAGE_TARNAME='python'
Fred Drake9bd44622003-07-30 17:39:48 +0000270PACKAGE_VERSION='2.4'
271PACKAGE_STRING='python 2.4'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000272PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000273
274ac_unique_file="Include/object.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
Skip Montanaro6dead952003-09-25 14:50:04 +0000312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
313ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000314
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000316ac_init_help=
317ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# The variables have the same names as the options, with
319# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000320cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000321exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000322no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000329site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000330srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332x_includes=NONE
333x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353ac_prev=
354for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000355do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
Martin v. Löwis11437992002-04-12 09:54:03 +0000367 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000372 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
374 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000377 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000394
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403
404 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000406 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413 *) ac_optarg=yes ;;
414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000415 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
426 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429
Martin v. Löwis11437992002-04-12 09:54:03 +0000430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436
437 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000440 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000479
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 # Obsolete; use --without-fp.
482 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486 no_create=yes ;;
487
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000500
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000511 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000518 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000535 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000545 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000556 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000557
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000561 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000566 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000574
Guido van Rossum7f43da71994-08-01 12:15:30 +0000575 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000578 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000585
586 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000588 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000592 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 *) ac_optarg=yes ;;
596 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000597 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598
599 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000601 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000607
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000624 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000625
Martin v. Löwis11437992002-04-12 09:54:03 +0000626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000629 ;;
630
Martin v. Löwis11437992002-04-12 09:54:03 +0000631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000641 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000647 ;;
648
649 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000650done
651
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000656fi
657
Martin v. Löwis11437992002-04-12 09:54:03 +0000658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000660do
Martin v. Löwis11437992002-04-12 09:54:03 +0000661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000666 esac
667done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Martin v. Löwis11437992002-04-12 09:54:03 +0000669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
678 esac
679done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000680
Martin v. Löwis11437992002-04-12 09:54:03 +0000681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000687
Martin v. Löwis11437992002-04-12 09:54:03 +0000688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000723 srcdir=..
724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000725else
726 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000727fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000729 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773
Martin v. Löwis11437992002-04-12 09:54:03 +0000774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000781\`configure' configures python 2.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
831
832 cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000837 case $ac_init_help in
Fred Drake9bd44622003-07-30 17:39:48 +0000838 short | recursive ) echo "Configuration of python 2.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000839 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 cat <<\_ACEOF
841
842Optional Features:
843 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
844 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000845 --enable-framework[=INSTALLDIR]
846 Build (MacOSX|Darwin) framework
847 --enable-shared disable/enable building shared python library
848 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
849 --enable-ipv6 Enable ipv6 (with ipv4) support
850 --disable-ipv6 Disable ipv6 support
851 --enable-unicode[=ucs[24]]
852 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853
854Optional Packages:
855 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
856 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000857 --without-gcc never use gcc
858 --with-cxx=<compiler> enable C++ support
859 --with-suffix=.exe set executable suffix
860 --with-pydebug build with Py_DEBUG defined
861 --with-libs='lib1 ...' link against additional libs
862 --with-signal-module disable/enable signal module
863 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
864 --with(out)-threads[=DIRECTORY]
865 disable/enable thread support
866 --with(out)-thread[=DIRECTORY]
867 deprecated; use --with(out)-threads
868 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000869 --with(out)-doc-strings disable/enable documentation strings
870 --with(out)-pymalloc disable/enable specialized mallocs
871 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000872 --with-fpectl enable SIGFPE catching
873 --with-libm=STRING math library
874 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000875
876Some influential environment variables:
877 CC C compiler command
878 CFLAGS C compiler flags
879 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
880 nonstandard directory <lib dir>
881 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
882 headers in a nonstandard directory <include dir>
883 CPP C preprocessor
884
885Use these variables to override the choices made by `configure' or to help
886it to find libraries and programs with nonstandard names/locations.
887
888_ACEOF
889fi
890
891if test "$ac_init_help" = "recursive"; then
892 # If there are subdirs, report their specific --help.
893 ac_popdir=`pwd`
894 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
895 test -d $ac_dir || continue
896 ac_builddir=.
897
898if test "$ac_dir" != .; then
899 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
900 # A "../" for each directory in $ac_dir_suffix.
901 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
902else
903 ac_dir_suffix= ac_top_builddir=
904fi
905
906case $srcdir in
907 .) # No --srcdir option. We are building in place.
908 ac_srcdir=.
909 if test -z "$ac_top_builddir"; then
910 ac_top_srcdir=.
911 else
912 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
913 fi ;;
914 [\\/]* | ?:[\\/]* ) # Absolute path.
915 ac_srcdir=$srcdir$ac_dir_suffix;
916 ac_top_srcdir=$srcdir ;;
917 *) # Relative path.
918 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
919 ac_top_srcdir=$ac_top_builddir$srcdir ;;
920esac
921# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
922# absolute.
923ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000924ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000925ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
926ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
927
928 cd $ac_dir
929 # Check for guested configure; otherwise get Cygnus style configure.
930 if test -f $ac_srcdir/configure.gnu; then
931 echo
932 $SHELL $ac_srcdir/configure.gnu --help=recursive
933 elif test -f $ac_srcdir/configure; then
934 echo
935 $SHELL $ac_srcdir/configure --help=recursive
936 elif test -f $ac_srcdir/configure.ac ||
937 test -f $ac_srcdir/configure.in; then
938 echo
939 $ac_configure --help
940 else
941 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
942 fi
943 cd $ac_popdir
944 done
945fi
946
947test -n "$ac_init_help" && exit 0
948if $ac_init_version; then
949 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000950python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000951generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000952
953Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
954Free Software Foundation, Inc.
955This configure script is free software; the Free Software Foundation
956gives unlimited permission to copy, distribute and modify it.
957_ACEOF
958 exit 0
959fi
960exec 5>config.log
961cat >&5 <<_ACEOF
962This file contains any messages produced by compilers while
963running configure, to aid debugging if configure makes a mistake.
964
Fred Drake9bd44622003-07-30 17:39:48 +0000965It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000966generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000967
968 $ $0 $@
969
970_ACEOF
971{
972cat <<_ASUNAME
973## --------- ##
974## Platform. ##
975## --------- ##
976
977hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
978uname -m = `(uname -m) 2>/dev/null || echo unknown`
979uname -r = `(uname -r) 2>/dev/null || echo unknown`
980uname -s = `(uname -s) 2>/dev/null || echo unknown`
981uname -v = `(uname -v) 2>/dev/null || echo unknown`
982
983/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
984/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
985
986/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
987/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
988/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
989hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
990/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
991/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
992/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
993
994_ASUNAME
995
996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
997for as_dir in $PATH
998do
999 IFS=$as_save_IFS
1000 test -z "$as_dir" && as_dir=.
1001 echo "PATH: $as_dir"
1002done
1003
1004} >&5
1005
1006cat >&5 <<_ACEOF
1007
1008
1009## ----------- ##
1010## Core tests. ##
1011## ----------- ##
1012
1013_ACEOF
1014
1015
1016# Keep a trace of the command line.
1017# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001018# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001019# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001020# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001021ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001022ac_configure_args0=
1023ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001024ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001025ac_must_keep_next=false
1026for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001027do
Skip Montanaro6dead952003-09-25 14:50:04 +00001028 for ac_arg
1029 do
1030 case $ac_arg in
1031 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1032 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1033 | -silent | --silent | --silen | --sile | --sil)
1034 continue ;;
1035 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1036 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1037 esac
1038 case $ac_pass in
1039 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1040 2)
1041 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1042 if test $ac_must_keep_next = true; then
1043 ac_must_keep_next=false # Got value, back to normal.
1044 else
1045 case $ac_arg in
1046 *=* | --config-cache | -C | -disable-* | --disable-* \
1047 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1048 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1049 | -with-* | --with-* | -without-* | --without-* | --x)
1050 case "$ac_configure_args0 " in
1051 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1052 esac
1053 ;;
1054 -* ) ac_must_keep_next=true ;;
1055 esac
1056 fi
1057 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1058 # Get rid of the leading space.
1059 ac_sep=" "
1060 ;;
1061 esac
1062 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001063done
Skip Montanaro6dead952003-09-25 14:50:04 +00001064$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1065$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001066
1067# When interrupted or exit'd, cleanup temporary files, and complete
1068# config.log. We remove comments because anyway the quotes in there
1069# would cause problems or look ugly.
1070# WARNING: Be sure not to use single quotes in there, as some shells,
1071# such as our DU 5.0 friend, will then `close' the trap.
1072trap 'exit_status=$?
1073 # Save into config.log some information that might help in debugging.
1074 {
1075 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001076
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 cat <<\_ASBOX
1078## ---------------- ##
1079## Cache variables. ##
1080## ---------------- ##
1081_ASBOX
1082 echo
1083 # The following way of writing the cache mishandles newlines in values,
1084{
1085 (set) 2>&1 |
1086 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1087 *ac_space=\ *)
1088 sed -n \
1089 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1090 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1091 ;;
1092 *)
1093 sed -n \
1094 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1095 ;;
1096 esac;
1097}
1098 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001099
1100 cat <<\_ASBOX
1101## ----------------- ##
1102## Output variables. ##
1103## ----------------- ##
1104_ASBOX
1105 echo
1106 for ac_var in $ac_subst_vars
1107 do
1108 eval ac_val=$`echo $ac_var`
1109 echo "$ac_var='"'"'$ac_val'"'"'"
1110 done | sort
1111 echo
1112
1113 if test -n "$ac_subst_files"; then
1114 cat <<\_ASBOX
1115## ------------- ##
1116## Output files. ##
1117## ------------- ##
1118_ASBOX
1119 echo
1120 for ac_var in $ac_subst_files
1121 do
1122 eval ac_val=$`echo $ac_var`
1123 echo "$ac_var='"'"'$ac_val'"'"'"
1124 done | sort
1125 echo
1126 fi
1127
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 if test -s confdefs.h; then
1129 cat <<\_ASBOX
1130## ----------- ##
1131## confdefs.h. ##
1132## ----------- ##
1133_ASBOX
1134 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001135 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 echo
1137 fi
1138 test "$ac_signal" != 0 &&
1139 echo "$as_me: caught signal $ac_signal"
1140 echo "$as_me: exit $exit_status"
1141 } >&5
1142 rm -f core core.* *.core &&
1143 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1144 exit $exit_status
1145 ' 0
1146for ac_signal in 1 2 13 15; do
1147 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1148done
1149ac_signal=0
1150
1151# confdefs.h avoids OS command line length limits that DEFS can exceed.
1152rm -rf conftest* confdefs.h
1153# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1154echo >confdefs.h
1155
1156# Predefined preprocessor variables.
1157
1158cat >>confdefs.h <<_ACEOF
1159#define PACKAGE_NAME "$PACKAGE_NAME"
1160_ACEOF
1161
1162
1163cat >>confdefs.h <<_ACEOF
1164#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1165_ACEOF
1166
1167
1168cat >>confdefs.h <<_ACEOF
1169#define PACKAGE_VERSION "$PACKAGE_VERSION"
1170_ACEOF
1171
1172
1173cat >>confdefs.h <<_ACEOF
1174#define PACKAGE_STRING "$PACKAGE_STRING"
1175_ACEOF
1176
1177
1178cat >>confdefs.h <<_ACEOF
1179#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1180_ACEOF
1181
1182
1183# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184# Prefer explicitly selected file to automatically selected ones.
1185if test -z "$CONFIG_SITE"; then
1186 if test "x$prefix" != xNONE; then
1187 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1188 else
1189 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1190 fi
1191fi
1192for ac_site_file in $CONFIG_SITE; do
1193 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1195echo "$as_me: loading site script $ac_site_file" >&6;}
1196 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 . "$ac_site_file"
1198 fi
1199done
1200
1201if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 # Some versions of bash will fail to source /dev/null (special
1203 # files actually), so we avoid doing that.
1204 if test -f "$cache_file"; then
1205 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1206echo "$as_me: loading cache $cache_file" >&6;}
1207 case $cache_file in
1208 [\\/]* | ?:[\\/]* ) . $cache_file;;
1209 *) . ./$cache_file;;
1210 esac
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1214echo "$as_me: creating cache $cache_file" >&6;}
1215 >$cache_file
1216fi
1217
1218# Check that the precious variables saved in the cache have kept the same
1219# value.
1220ac_cache_corrupted=false
1221for ac_var in `(set) 2>&1 |
1222 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1223 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1224 eval ac_new_set=\$ac_env_${ac_var}_set
1225 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1226 eval ac_new_val="\$ac_env_${ac_var}_value"
1227 case $ac_old_set,$ac_new_set in
1228 set,)
1229 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1230echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1231 ac_cache_corrupted=: ;;
1232 ,set)
1233 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1234echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1235 ac_cache_corrupted=: ;;
1236 ,);;
1237 *)
1238 if test "x$ac_old_val" != "x$ac_new_val"; then
1239 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1240echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1241 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1242echo "$as_me: former value: $ac_old_val" >&2;}
1243 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1244echo "$as_me: current value: $ac_new_val" >&2;}
1245 ac_cache_corrupted=:
1246 fi;;
1247 esac
1248 # Pass precious variables to config.status.
1249 if test "$ac_new_set" = set; then
1250 case $ac_new_val in
1251 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1252 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1253 *) ac_arg=$ac_var=$ac_new_val ;;
1254 esac
1255 case " $ac_configure_args " in
1256 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1257 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1258 esac
1259 fi
1260done
1261if $ac_cache_corrupted; then
1262 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1263echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1264 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1265echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1266 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267fi
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1273ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Michael W. Hudson54241132001-12-07 15:38:26 +00001276
1277
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278
Martin v. Löwis11437992002-04-12 09:54:03 +00001279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
Martin v. Löwis88afe662002-10-26 13:47:44 +00001292
1293
1294
1295
1296
1297
1298
1299
1300
Skip Montanaro6dead952003-09-25 14:50:04 +00001301
1302 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305
1306
1307
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001308
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001309
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001310# We don't use PACKAGE_ variables, and they cause conflicts
1311# with other autoconf-based packages that include Python.h
1312grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1313rm confdefs.h
1314mv confdefs.h.new confdefs.h
1315
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001316
Fred Drake9bd44622003-07-30 17:39:48 +00001317VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001318
Martin v. Löwis1142de32002-03-29 16:28:31 +00001319
1320SOVERSION=1.0
1321
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001322# The later defininition of _XOPEN_SOURCE disables certain features
1323# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1324
1325cat >>confdefs.h <<\_ACEOF
1326#define _GNU_SOURCE 1
1327_ACEOF
1328
1329
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001330# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1331# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1332# them.
1333
1334cat >>confdefs.h <<\_ACEOF
1335#define _NETBSD_SOURCE 1
1336_ACEOF
1337
1338
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001339# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1340# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1341# them.
1342
1343cat >>confdefs.h <<\_ACEOF
1344#define __BSD_VISIBLE 1
1345_ACEOF
1346
1347
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001348define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001349
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001350# Arguments passed to configure.
1351
1352CONFIG_ARGS="$ac_configure_args"
1353
Jack Jansene578a632001-08-15 01:27:14 +00001354# Check whether --enable-framework or --disable-framework was given.
1355if test "${enable_framework+set}" = set; then
1356 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001357
Jack Jansene578a632001-08-15 01:27:14 +00001358 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001359 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001360 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001361 esac
1362 case $enableval in
1363 no)
1364 PYTHONFRAMEWORK=
1365 PYTHONFRAMEWORKDIR=no-framework
1366 PYTHONFRAMEWORKPREFIX=
1367 PYTHONFRAMEWORKINSTALLDIR=
1368 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001369 ;;
1370 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001371 PYTHONFRAMEWORK=Python
1372 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001373 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001374 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1375 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001376 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001377
Guido van Rossum563e7081996-09-10 18:20:48 +00001378else
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Jack Jansene578a632001-08-15 01:27:14 +00001380 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001381 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001382 PYTHONFRAMEWORKPREFIX=
1383 PYTHONFRAMEWORKINSTALLDIR=
1384 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001385
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001387
1388
1389
1390
Jack Jansene578a632001-08-15 01:27:14 +00001391
1392##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393## AC_HELP_STRING(--with-dyld,
1394## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001395##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001396# Set name for machine-dependent library files
1397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398echo "$as_me:$LINENO: checking MACHDEP" >&5
1399echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001400if test -z "$MACHDEP"
1401then
Guido van Rossum563e7081996-09-10 18:20:48 +00001402 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001403 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1404 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001405 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001406 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001407 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001408 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_md_system=`echo $ac_sys_system |
1410 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1411 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001412 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001413 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001414
Guido van Rossum07397971997-04-29 21:49:50 +00001415 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001416 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001417 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001418 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001419 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001420 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001421 esac
1422fi
Guido van Rossum91922671997-10-09 20:24:13 +00001423
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001424# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1425# disable features if it is defined, without any means to access these
1426# features as extensions. For these systems, we skip the definition of
1427# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1428# some feature, make sure there is no alternative way to access this
1429# feature. Also, when using wildcards, make sure you have verified the
1430# need for not defining _XOPEN_SOURCE on all systems matching the
1431# wildcard, and that the wildcard does not include future systems
1432# (which may remove their limitations).
1433case $ac_sys_system/$ac_sys_release in
1434 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1435 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001436 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1437 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001438 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001439 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1440 # of union __?sigval. Reported by Stuart Bishop.
1441 SunOS/5.6)
1442 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001443 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1444 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1445 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1446 define_xopen_source=no;;
1447 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001448 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001449 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001450 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001451 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1452 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1453 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1454 # This should hopefully be fixed in FreeBSD 4.9
1455 FreeBSD/4.8* | Darwin/6* )
1456 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001457 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1458 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1459 # has another value. By not (re)defining it, the defaults come in place.
1460 AIX/4)
1461 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001462esac
1463
1464if test $define_xopen_source = yes
1465then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001466
1467cat >>confdefs.h <<\_ACEOF
1468#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001469_ACEOF
1470
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001471
1472 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1473 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1474 # several APIs are not declared. Since this is also needed in some
1475 # cases for HP-UX, we define it globally.
1476
1477
1478cat >>confdefs.h <<\_ACEOF
1479#define _XOPEN_SOURCE_EXTENDED 1
1480_ACEOF
1481
1482
1483cat >>confdefs.h <<\_ACEOF
1484#define _POSIX_C_SOURCE 200112L
1485_ACEOF
1486
1487
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001488fi
1489
Guido van Rossum91922671997-10-09 20:24:13 +00001490#
1491# SGI compilers allow the specification of the both the ABI and the
1492# ISA on the command line. Depending on the values of these switches,
1493# different and often incompatable code will be generated.
1494#
1495# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1496# thus supply support for various ABI/ISA combinations. The MACHDEP
1497# variable is also adjusted.
1498#
1499
1500if test ! -z "$SGI_ABI"
1501then
1502 CC="cc $SGI_ABI"
1503 LDFLAGS="$SGI_ABI $LDFLAGS"
1504 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001506echo "$as_me:$LINENO: result: $MACHDEP" >&5
1507echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001508
Jack Jansen83f898c2002-12-30 22:23:40 +00001509# And add extra plat-mac for darwin
1510
Jack Jansen7b59b422003-03-17 15:44:10 +00001511
Jack Jansen83f898c2002-12-30 22:23:40 +00001512echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1513echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1514if test -z "$EXTRAPLATDIR"
1515then
1516 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001517 darwin)
1518 EXTRAPLATDIR="\$(PLATMACDIRS)"
1519 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1520 ;;
1521 *)
1522 EXTRAPLATDIR=""
1523 EXTRAMACHDEPPATH=""
1524 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001525 esac
1526fi
1527echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1528echo "${ECHO_T}$EXTRAPLATDIR" >&6
1529
Guido van Rossum627b2d71993-12-24 10:39:16 +00001530# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001531
1532# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1533# for debug/optimization stuff. BASECFLAGS is for flags that are required
1534# just to get things to compile and link. Users are free to override OPT
1535# when running configure or make. The build should not break if they do.
1536# BASECFLAGS should generally not be messed with, however.
1537
1538# XXX shouldn't some/most/all of this code be merged with the stuff later
1539# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001540echo "$as_me:$LINENO: checking for --without-gcc" >&5
1541echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1542
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001544if test "${with_gcc+set}" = set; then
1545 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
Guido van Rossum7f43da71994-08-01 12:15:30 +00001547 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001548 no) CC=cc
1549 without_gcc=yes;;
1550 yes) CC=gcc
1551 without_gcc=no;;
1552 *) CC=$withval
1553 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001554 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001555else
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001557 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001558 AIX*) CC=cc_r
1559 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001560 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001561 case $BE_HOST_CPU in
1562 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001563 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001564 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001565 BASECFLAGS="$BASECFLAGS -export pragma"
1566 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001567 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 ;;
1569 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001570 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001572 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001573 ;;
1574 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1576echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1577 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001578 ;;
1579 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001580 AR="\$(srcdir)/Modules/ar_beos"
1581 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001582 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001583 Monterey*)
1584 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001585 without_gcc=;;
1586 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001587 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001588fi;
1589echo "$as_me:$LINENO: result: $without_gcc" >&5
1590echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001591
1592
Guido van Rossum95012191999-12-16 17:50:52 +00001593
Fred Drakea1a84e72001-03-06 05:52:16 +00001594MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001595echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1596echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1597
Guido van Rossum95012191999-12-16 17:50:52 +00001598# Check whether --with-cxx or --without-cxx was given.
1599if test "${with_cxx+set}" = set; then
1600 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
Martin v. Löwis22352952000-12-13 17:37:02 +00001602 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001603 case $withval in
1604 no) CXX=
1605 with_cxx=no;;
1606 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001607 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001608 with_cxx=$withval;;
1609 esac
1610else
Martin v. Löwis11437992002-04-12 09:54:03 +00001611
Guido van Rossum95012191999-12-16 17:50:52 +00001612 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001613 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001614
Martin v. Löwis11437992002-04-12 09:54:03 +00001615fi;
1616echo "$as_me:$LINENO: result: $with_cxx" >&5
1617echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001618
1619if test "$with_cxx" = "yes"
1620then
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1622echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1623 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001624fi
1625
1626
1627
1628
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001630then
1631 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1632do
Martin v. Löwis11437992002-04-12 09:54:03 +00001633 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001634set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001635echo "$as_me:$LINENO: checking for $ac_word" >&5
1636echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637if test "${ac_cv_prog_CXX+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001639else
1640 if test -n "$CXX"; then
1641 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1642else
Martin v. Löwis11437992002-04-12 09:54:03 +00001643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1644for as_dir in $PATH
1645do
1646 IFS=$as_save_IFS
1647 test -z "$as_dir" && as_dir=.
1648 for ac_exec_ext in '' $ac_executable_extensions; do
1649 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1650 ac_cv_prog_CXX="$ac_prog"
1651 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1652 break 2
1653 fi
1654done
1655done
1656
Martin v. Löwis22352952000-12-13 17:37:02 +00001657fi
1658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001659CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001660if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 echo "$as_me:$LINENO: result: $CXX" >&5
1662echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001663else
Martin v. Löwis11437992002-04-12 09:54:03 +00001664 echo "$as_me:$LINENO: result: no" >&5
1665echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001666fi
1667
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001669done
1670test -n "$CXX" || CXX="notfound"
1671
1672 if test "$CXX" = "notfound"
1673 then
1674 CXX=
1675 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001676 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001677ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1681 cat >conftest.$ac_ext <<_ACEOF
1682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001683/* confdefs.h. */
1684_ACEOF
1685cat confdefs.h >>conftest.$ac_ext
1686cat >>conftest.$ac_ext <<_ACEOF
1687/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001688
Martin v. Löwis11437992002-04-12 09:54:03 +00001689int
1690main ()
1691{
Michael W. Hudson54241132001-12-07 15:38:26 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 ;
1694 return 0;
1695}
1696_ACEOF
1697ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001698ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001699# Try to create an executable without -o first, disregard a.out.
1700# It will help us diagnose broken compilers, and finding out an intuition
1701# of exeext.
1702echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1703echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1704ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1705if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1706 (eval $ac_link_default) 2>&5
1707 ac_status=$?
1708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1709 (exit $ac_status); }; then
1710 # Find the output, starting from the most likely. This scheme is
1711# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1712# resort.
1713
1714# Be careful to initialize this variable, since it used to be cached.
1715# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1716ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001717# b.out is created by i960 compilers.
1718for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1719do
1720 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001722 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1723 ;;
1724 conftest.$ac_ext )
1725 # This is the source file.
1726 ;;
1727 [ab].out )
1728 # We found the default executable, but exeext='' is most
1729 # certainly right.
1730 break;;
1731 *.* )
1732 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1733 # FIXME: I believe we export ac_cv_exeext for Libtool,
1734 # but it would be cool to find out if it's true. Does anybody
1735 # maintain Libtool? --akim.
1736 export ac_cv_exeext
1737 break;;
1738 * )
1739 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 esac
1741done
1742else
1743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1747See \`config.log' for more details." >&5
1748echo "$as_me: error: C++ compiler cannot create executables
1749See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001752
1753ac_exeext=$ac_cv_exeext
1754echo "$as_me:$LINENO: result: $ac_file" >&5
1755echo "${ECHO_T}$ac_file" >&6
1756
1757# Check the compiler produces executables we can run. If not, either
1758# the compiler is broken, or we cross compile.
1759echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1760echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1761# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762# If not cross compiling, check that we can run a simple program.
1763if test "$cross_compiling" != yes; then
1764 if { ac_try='./$ac_file'
1765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1766 (eval $ac_try) 2>&5
1767 ac_status=$?
1768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1769 (exit $ac_status); }; }; then
1770 cross_compiling=no
1771 else
1772 if test "$cross_compiling" = maybe; then
1773 cross_compiling=yes
1774 else
1775 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001776If you meant to cross compile, use \`--host'.
1777See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001778echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001779If you meant to cross compile, use \`--host'.
1780See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001781 { (exit 1); exit 1; }; }
1782 fi
1783 fi
1784fi
1785echo "$as_me:$LINENO: result: yes" >&5
1786echo "${ECHO_T}yes" >&6
1787
Skip Montanaro6dead952003-09-25 14:50:04 +00001788rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_clean_files=$ac_clean_files_save
1790# Check the compiler produces executables we can run. If not, either
1791# the compiler is broken, or we cross compile.
1792echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1793echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794echo "$as_me:$LINENO: result: $cross_compiling" >&5
1795echo "${ECHO_T}$cross_compiling" >&6
1796
1797echo "$as_me:$LINENO: checking for suffix of executables" >&5
1798echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1800 (eval $ac_link) 2>&5
1801 ac_status=$?
1802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1803 (exit $ac_status); }; then
1804 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1806# work properly (i.e., refer to `conftest.exe'), while it won't with
1807# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001808for ac_file in conftest.exe conftest conftest.*; do
1809 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001810 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001811 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001812 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1813 export ac_cv_exeext
1814 break;;
1815 * ) break;;
1816 esac
1817done
1818else
Skip Montanaro6dead952003-09-25 14:50:04 +00001819 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1820See \`config.log' for more details." >&5
1821echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1822See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 { (exit 1); exit 1; }; }
1824fi
1825
1826rm -f conftest$ac_cv_exeext
1827echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1828echo "${ECHO_T}$ac_cv_exeext" >&6
1829
1830rm -f conftest.$ac_ext
1831EXEEXT=$ac_cv_exeext
1832ac_exeext=$EXEEXT
1833
1834 ac_ext=c
1835ac_cpp='$CPP $CPPFLAGS'
1836ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1837ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1838ac_compiler_gnu=$ac_cv_c_compiler_gnu
1839
1840
Martin v. Löwis22352952000-12-13 17:37:02 +00001841
1842 fi
1843fi
1844
Guido van Rossum8b131c51995-03-09 14:10:13 +00001845# If the user switches compilers, we can't believe the cache
1846if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1847then
Martin v. Löwis11437992002-04-12 09:54:03 +00001848 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1849(it is also a good idea to do 'make clean' before compiling)" >&5
1850echo "$as_me: error: cached CC is different -- throw away $cache_file
1851(it is also a good idea to do 'make clean' before compiling)" >&2;}
1852 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001853fi
1854
Martin v. Löwis11437992002-04-12 09:54:03 +00001855ac_ext=c
1856ac_cpp='$CPP $CPPFLAGS'
1857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1859ac_compiler_gnu=$ac_cv_c_compiler_gnu
1860if test -n "$ac_tool_prefix"; then
1861 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1862set dummy ${ac_tool_prefix}gcc; ac_word=$2
1863echo "$as_me:$LINENO: checking for $ac_word" >&5
1864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1865if test "${ac_cv_prog_CC+set}" = set; then
1866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001867else
1868 if test -n "$CC"; then
1869 ac_cv_prog_CC="$CC" # Let the user override the test.
1870else
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
1881 fi
1882done
1883done
1884
Jack Jansendd19cf82001-12-06 22:36:17 +00001885fi
1886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001887CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001888if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 echo "$as_me:$LINENO: result: $CC" >&5
1890echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001891else
Martin v. Löwis11437992002-04-12 09:54:03 +00001892 echo "$as_me:$LINENO: result: no" >&5
1893echo "${ECHO_T}no" >&6
1894fi
1895
1896fi
1897if test -z "$ac_cv_prog_CC"; then
1898 ac_ct_CC=$CC
1899 # Extract the first word of "gcc", so it can be a program name with args.
1900set dummy gcc; ac_word=$2
1901echo "$as_me:$LINENO: checking for $ac_word" >&5
1902echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1903if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1904 echo $ECHO_N "(cached) $ECHO_C" >&6
1905else
1906 if test -n "$ac_ct_CC"; then
1907 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1908else
1909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1910for as_dir in $PATH
1911do
1912 IFS=$as_save_IFS
1913 test -z "$as_dir" && as_dir=.
1914 for ac_exec_ext in '' $ac_executable_extensions; do
1915 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1916 ac_cv_prog_ac_ct_CC="gcc"
1917 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1918 break 2
1919 fi
1920done
1921done
1922
1923fi
1924fi
1925ac_ct_CC=$ac_cv_prog_ac_ct_CC
1926if test -n "$ac_ct_CC"; then
1927 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1928echo "${ECHO_T}$ac_ct_CC" >&6
1929else
1930 echo "$as_me:$LINENO: result: no" >&5
1931echo "${ECHO_T}no" >&6
1932fi
1933
1934 CC=$ac_ct_CC
1935else
1936 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001937fi
1938
Jack Jansendd19cf82001-12-06 22:36:17 +00001939if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001940 if test -n "$ac_tool_prefix"; then
1941 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1942set dummy ${ac_tool_prefix}cc; ac_word=$2
1943echo "$as_me:$LINENO: checking for $ac_word" >&5
1944echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1945if test "${ac_cv_prog_CC+set}" = set; then
1946 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001947else
1948 if test -n "$CC"; then
1949 ac_cv_prog_CC="$CC" # Let the user override the test.
1950else
Martin v. Löwis11437992002-04-12 09:54:03 +00001951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1952for as_dir in $PATH
1953do
1954 IFS=$as_save_IFS
1955 test -z "$as_dir" && as_dir=.
1956 for ac_exec_ext in '' $ac_executable_extensions; do
1957 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1958 ac_cv_prog_CC="${ac_tool_prefix}cc"
1959 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1960 break 2
1961 fi
1962done
1963done
1964
1965fi
1966fi
1967CC=$ac_cv_prog_CC
1968if test -n "$CC"; then
1969 echo "$as_me:$LINENO: result: $CC" >&5
1970echo "${ECHO_T}$CC" >&6
1971else
1972 echo "$as_me:$LINENO: result: no" >&5
1973echo "${ECHO_T}no" >&6
1974fi
1975
1976fi
1977if test -z "$ac_cv_prog_CC"; then
1978 ac_ct_CC=$CC
1979 # Extract the first word of "cc", so it can be a program name with args.
1980set dummy cc; ac_word=$2
1981echo "$as_me:$LINENO: checking for $ac_word" >&5
1982echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1983if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1984 echo $ECHO_N "(cached) $ECHO_C" >&6
1985else
1986 if test -n "$ac_ct_CC"; then
1987 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1988else
1989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1990for as_dir in $PATH
1991do
1992 IFS=$as_save_IFS
1993 test -z "$as_dir" && as_dir=.
1994 for ac_exec_ext in '' $ac_executable_extensions; do
1995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1996 ac_cv_prog_ac_ct_CC="cc"
1997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1998 break 2
1999 fi
2000done
2001done
2002
2003fi
2004fi
2005ac_ct_CC=$ac_cv_prog_ac_ct_CC
2006if test -n "$ac_ct_CC"; then
2007 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2008echo "${ECHO_T}$ac_ct_CC" >&6
2009else
2010 echo "$as_me:$LINENO: result: no" >&5
2011echo "${ECHO_T}no" >&6
2012fi
2013
2014 CC=$ac_ct_CC
2015else
2016 CC="$ac_cv_prog_CC"
2017fi
2018
2019fi
2020if test -z "$CC"; then
2021 # Extract the first word of "cc", so it can be a program name with args.
2022set dummy cc; ac_word=$2
2023echo "$as_me:$LINENO: checking for $ac_word" >&5
2024echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2025if test "${ac_cv_prog_CC+set}" = set; then
2026 echo $ECHO_N "(cached) $ECHO_C" >&6
2027else
2028 if test -n "$CC"; then
2029 ac_cv_prog_CC="$CC" # Let the user override the test.
2030else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002031 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2033for as_dir in $PATH
2034do
2035 IFS=$as_save_IFS
2036 test -z "$as_dir" && as_dir=.
2037 for ac_exec_ext in '' $ac_executable_extensions; do
2038 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2039 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2040 ac_prog_rejected=yes
2041 continue
2042 fi
2043 ac_cv_prog_CC="cc"
2044 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2045 break 2
2046 fi
2047done
2048done
2049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002050if test $ac_prog_rejected = yes; then
2051 # We found a bogon in the path, so make sure we never use it.
2052 set dummy $ac_cv_prog_CC
2053 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002054 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002055 # We chose a different compiler from the bogus one.
2056 # However, it has the same basename, so the bogon will be chosen
2057 # first if we set CC to just the basename; use the full file name.
2058 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002059 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002060 fi
2061fi
2062fi
2063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002064CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002065if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002066 echo "$as_me:$LINENO: result: $CC" >&5
2067echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002068else
Martin v. Löwis11437992002-04-12 09:54:03 +00002069 echo "$as_me:$LINENO: result: no" >&5
2070echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002071fi
2072
Martin v. Löwis11437992002-04-12 09:54:03 +00002073fi
2074if test -z "$CC"; then
2075 if test -n "$ac_tool_prefix"; then
2076 for ac_prog in cl
2077 do
2078 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2079set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2080echo "$as_me:$LINENO: checking for $ac_word" >&5
2081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2082if test "${ac_cv_prog_CC+set}" = set; then
2083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002084else
2085 if test -n "$CC"; then
2086 ac_cv_prog_CC="$CC" # Let the user override the test.
2087else
Martin v. Löwis11437992002-04-12 09:54:03 +00002088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2089for as_dir in $PATH
2090do
2091 IFS=$as_save_IFS
2092 test -z "$as_dir" && as_dir=.
2093 for ac_exec_ext in '' $ac_executable_extensions; do
2094 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2095 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2096 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2097 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002098 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002099done
2100done
2101
2102fi
2103fi
2104CC=$ac_cv_prog_CC
2105if test -n "$CC"; then
2106 echo "$as_me:$LINENO: result: $CC" >&5
2107echo "${ECHO_T}$CC" >&6
2108else
2109 echo "$as_me:$LINENO: result: no" >&5
2110echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002111fi
2112
Martin v. Löwis11437992002-04-12 09:54:03 +00002113 test -n "$CC" && break
2114 done
2115fi
2116if test -z "$CC"; then
2117 ac_ct_CC=$CC
2118 for ac_prog in cl
2119do
2120 # Extract the first word of "$ac_prog", so it can be a program name with args.
2121set dummy $ac_prog; ac_word=$2
2122echo "$as_me:$LINENO: checking for $ac_word" >&5
2123echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2124if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2125 echo $ECHO_N "(cached) $ECHO_C" >&6
2126else
2127 if test -n "$ac_ct_CC"; then
2128 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2129else
2130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2131for as_dir in $PATH
2132do
2133 IFS=$as_save_IFS
2134 test -z "$as_dir" && as_dir=.
2135 for ac_exec_ext in '' $ac_executable_extensions; do
2136 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2137 ac_cv_prog_ac_ct_CC="$ac_prog"
2138 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2139 break 2
2140 fi
2141done
2142done
Jack Jansendd19cf82001-12-06 22:36:17 +00002143
Martin v. Löwis11437992002-04-12 09:54:03 +00002144fi
2145fi
2146ac_ct_CC=$ac_cv_prog_ac_ct_CC
2147if test -n "$ac_ct_CC"; then
2148 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2149echo "${ECHO_T}$ac_ct_CC" >&6
2150else
2151 echo "$as_me:$LINENO: result: no" >&5
2152echo "${ECHO_T}no" >&6
2153fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002154
Martin v. Löwis11437992002-04-12 09:54:03 +00002155 test -n "$ac_ct_CC" && break
2156done
Michael W. Hudson54241132001-12-07 15:38:26 +00002157
Martin v. Löwis11437992002-04-12 09:54:03 +00002158 CC=$ac_ct_CC
2159fi
2160
2161fi
2162
2163
Skip Montanaro6dead952003-09-25 14:50:04 +00002164test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2165See \`config.log' for more details." >&5
2166echo "$as_me: error: no acceptable C compiler found in \$PATH
2167See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002168 { (exit 1); exit 1; }; }
2169
2170# Provide some information about the compiler.
2171echo "$as_me:$LINENO:" \
2172 "checking for C compiler version" >&5
2173ac_compiler=`set X $ac_compile; echo $2`
2174{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2175 (eval $ac_compiler --version </dev/null >&5) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }
2179{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2180 (eval $ac_compiler -v </dev/null >&5) 2>&5
2181 ac_status=$?
2182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2183 (exit $ac_status); }
2184{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2185 (eval $ac_compiler -V </dev/null >&5) 2>&5
2186 ac_status=$?
2187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188 (exit $ac_status); }
2189
2190cat >conftest.$ac_ext <<_ACEOF
2191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002192/* confdefs.h. */
2193_ACEOF
2194cat confdefs.h >>conftest.$ac_ext
2195cat >>conftest.$ac_ext <<_ACEOF
2196/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002197
Martin v. Löwis11437992002-04-12 09:54:03 +00002198int
2199main ()
2200{
2201
2202 ;
2203 return 0;
2204}
2205_ACEOF
2206ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002207ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002208# Try to create an executable without -o first, disregard a.out.
2209# It will help us diagnose broken compilers, and finding out an intuition
2210# of exeext.
2211echo "$as_me:$LINENO: checking for C compiler default output" >&5
2212echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2213ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2214if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2215 (eval $ac_link_default) 2>&5
2216 ac_status=$?
2217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2218 (exit $ac_status); }; then
2219 # Find the output, starting from the most likely. This scheme is
2220# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2221# resort.
2222
2223# Be careful to initialize this variable, since it used to be cached.
2224# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2225ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002226# b.out is created by i960 compilers.
2227for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2228do
2229 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002230 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002231 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2232 ;;
2233 conftest.$ac_ext )
2234 # This is the source file.
2235 ;;
2236 [ab].out )
2237 # We found the default executable, but exeext='' is most
2238 # certainly right.
2239 break;;
2240 *.* )
2241 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2242 # FIXME: I believe we export ac_cv_exeext for Libtool,
2243 # but it would be cool to find out if it's true. Does anybody
2244 # maintain Libtool? --akim.
2245 export ac_cv_exeext
2246 break;;
2247 * )
2248 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002249 esac
2250done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002251else
Martin v. Löwis11437992002-04-12 09:54:03 +00002252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002253sed 's/^/| /' conftest.$ac_ext >&5
2254
2255{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2256See \`config.log' for more details." >&5
2257echo "$as_me: error: C compiler cannot create executables
2258See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002259 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002260fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002261
Martin v. Löwis11437992002-04-12 09:54:03 +00002262ac_exeext=$ac_cv_exeext
2263echo "$as_me:$LINENO: result: $ac_file" >&5
2264echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002265
Martin v. Löwis11437992002-04-12 09:54:03 +00002266# Check the compiler produces executables we can run. If not, either
2267# the compiler is broken, or we cross compile.
2268echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2269echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2270# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2271# If not cross compiling, check that we can run a simple program.
2272if test "$cross_compiling" != yes; then
2273 if { ac_try='./$ac_file'
2274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2275 (eval $ac_try) 2>&5
2276 ac_status=$?
2277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2278 (exit $ac_status); }; }; then
2279 cross_compiling=no
2280 else
2281 if test "$cross_compiling" = maybe; then
2282 cross_compiling=yes
2283 else
2284 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002285If you meant to cross compile, use \`--host'.
2286See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002287echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002288If you meant to cross compile, use \`--host'.
2289See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002290 { (exit 1); exit 1; }; }
2291 fi
2292 fi
2293fi
2294echo "$as_me:$LINENO: result: yes" >&5
2295echo "${ECHO_T}yes" >&6
2296
Skip Montanaro6dead952003-09-25 14:50:04 +00002297rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002298ac_clean_files=$ac_clean_files_save
2299# Check the compiler produces executables we can run. If not, either
2300# the compiler is broken, or we cross compile.
2301echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2302echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2303echo "$as_me:$LINENO: result: $cross_compiling" >&5
2304echo "${ECHO_T}$cross_compiling" >&6
2305
2306echo "$as_me:$LINENO: checking for suffix of executables" >&5
2307echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2309 (eval $ac_link) 2>&5
2310 ac_status=$?
2311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312 (exit $ac_status); }; then
2313 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2314# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2315# work properly (i.e., refer to `conftest.exe'), while it won't with
2316# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002317for ac_file in conftest.exe conftest conftest.*; do
2318 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002319 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002320 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002321 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2322 export ac_cv_exeext
2323 break;;
2324 * ) break;;
2325 esac
2326done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327else
Skip Montanaro6dead952003-09-25 14:50:04 +00002328 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2329See \`config.log' for more details." >&5
2330echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2331See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002332 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002333fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002334
Martin v. Löwis11437992002-04-12 09:54:03 +00002335rm -f conftest$ac_cv_exeext
2336echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2337echo "${ECHO_T}$ac_cv_exeext" >&6
2338
2339rm -f conftest.$ac_ext
2340EXEEXT=$ac_cv_exeext
2341ac_exeext=$EXEEXT
2342echo "$as_me:$LINENO: checking for suffix of object files" >&5
2343echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2344if test "${ac_cv_objext+set}" = set; then
2345 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002346else
Martin v. Löwis11437992002-04-12 09:54:03 +00002347 cat >conftest.$ac_ext <<_ACEOF
2348#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002349/* confdefs.h. */
2350_ACEOF
2351cat confdefs.h >>conftest.$ac_ext
2352cat >>conftest.$ac_ext <<_ACEOF
2353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
Martin v. Löwis11437992002-04-12 09:54:03 +00002355int
2356main ()
2357{
2358
2359 ;
2360 return 0;
2361}
2362_ACEOF
2363rm -f conftest.o conftest.obj
2364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2365 (eval $ac_compile) 2>&5
2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; then
2369 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2370 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002371 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002372 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2373 break;;
2374 esac
2375done
2376else
2377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002378sed 's/^/| /' conftest.$ac_ext >&5
2379
2380{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2381See \`config.log' for more details." >&5
2382echo "$as_me: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002384 { (exit 1); exit 1; }; }
2385fi
2386
2387rm -f conftest.$ac_cv_objext conftest.$ac_ext
2388fi
2389echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2390echo "${ECHO_T}$ac_cv_objext" >&6
2391OBJEXT=$ac_cv_objext
2392ac_objext=$OBJEXT
2393echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2394echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2395if test "${ac_cv_c_compiler_gnu+set}" = set; then
2396 echo $ECHO_N "(cached) $ECHO_C" >&6
2397else
2398 cat >conftest.$ac_ext <<_ACEOF
2399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002400/* confdefs.h. */
2401_ACEOF
2402cat confdefs.h >>conftest.$ac_ext
2403cat >>conftest.$ac_ext <<_ACEOF
2404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002405
Martin v. Löwis11437992002-04-12 09:54:03 +00002406int
2407main ()
2408{
2409#ifndef __GNUC__
2410 choke me
2411#endif
2412
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417rm -f conftest.$ac_objext
2418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2419 (eval $ac_compile) 2>&5
2420 ac_status=$?
2421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422 (exit $ac_status); } &&
2423 { ac_try='test -s conftest.$ac_objext'
2424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2425 (eval $ac_try) 2>&5
2426 ac_status=$?
2427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2428 (exit $ac_status); }; }; then
2429 ac_compiler_gnu=yes
2430else
2431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002432sed 's/^/| /' conftest.$ac_ext >&5
2433
Martin v. Löwis11437992002-04-12 09:54:03 +00002434ac_compiler_gnu=no
2435fi
2436rm -f conftest.$ac_objext conftest.$ac_ext
2437ac_cv_c_compiler_gnu=$ac_compiler_gnu
2438
2439fi
2440echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2441echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2442GCC=`test $ac_compiler_gnu = yes && echo yes`
2443ac_test_CFLAGS=${CFLAGS+set}
2444ac_save_CFLAGS=$CFLAGS
2445CFLAGS="-g"
2446echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2447echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2448if test "${ac_cv_prog_cc_g+set}" = set; then
2449 echo $ECHO_N "(cached) $ECHO_C" >&6
2450else
2451 cat >conftest.$ac_ext <<_ACEOF
2452#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002453/* confdefs.h. */
2454_ACEOF
2455cat confdefs.h >>conftest.$ac_ext
2456cat >>conftest.$ac_ext <<_ACEOF
2457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002458
Martin v. Löwis11437992002-04-12 09:54:03 +00002459int
2460main ()
2461{
2462
2463 ;
2464 return 0;
2465}
2466_ACEOF
2467rm -f conftest.$ac_objext
2468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2469 (eval $ac_compile) 2>&5
2470 ac_status=$?
2471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2472 (exit $ac_status); } &&
2473 { ac_try='test -s conftest.$ac_objext'
2474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2475 (eval $ac_try) 2>&5
2476 ac_status=$?
2477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2478 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002479 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002480else
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002482sed 's/^/| /' conftest.$ac_ext >&5
2483
Martin v. Löwis11437992002-04-12 09:54:03 +00002484ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002486rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002488echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2489echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002490if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002492elif test $ac_cv_prog_cc_g = yes; then
2493 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002494 CFLAGS="-g -O2"
2495 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002496 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002497 fi
2498else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002499 if test "$GCC" = yes; then
2500 CFLAGS="-O2"
2501 else
2502 CFLAGS=
2503 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002505echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2506echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2507if test "${ac_cv_prog_cc_stdc+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2509else
2510 ac_cv_prog_cc_stdc=no
2511ac_save_CC=$CC
2512cat >conftest.$ac_ext <<_ACEOF
2513#line $LINENO "configure"
2514/* confdefs.h. */
2515_ACEOF
2516cat confdefs.h >>conftest.$ac_ext
2517cat >>conftest.$ac_ext <<_ACEOF
2518/* end confdefs.h. */
2519#include <stdarg.h>
2520#include <stdio.h>
2521#include <sys/types.h>
2522#include <sys/stat.h>
2523/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2524struct buf { int x; };
2525FILE * (*rcsopen) (struct buf *, struct stat *, int);
2526static char *e (p, i)
2527 char **p;
2528 int i;
2529{
2530 return p[i];
2531}
2532static char *f (char * (*g) (char **, int), char **p, ...)
2533{
2534 char *s;
2535 va_list v;
2536 va_start (v,p);
2537 s = g (p, va_arg (v,int));
2538 va_end (v);
2539 return s;
2540}
2541int test (int i, double x);
2542struct s1 {int (*f) (int a);};
2543struct s2 {int (*f) (double a);};
2544int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2545int argc;
2546char **argv;
2547int
2548main ()
2549{
2550return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2551 ;
2552 return 0;
2553}
2554_ACEOF
2555# Don't try gcc -ansi; that turns off useful extensions and
2556# breaks some systems' header files.
2557# AIX -qlanglvl=ansi
2558# Ultrix and OSF/1 -std1
2559# HP-UX 10.20 and later -Ae
2560# HP-UX older versions -Aa -D_HPUX_SOURCE
2561# SVR4 -Xc -D__EXTENSIONS__
2562for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2563do
2564 CC="$ac_save_CC $ac_arg"
2565 rm -f conftest.$ac_objext
2566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2567 (eval $ac_compile) 2>&5
2568 ac_status=$?
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } &&
2571 { ac_try='test -s conftest.$ac_objext'
2572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2573 (eval $ac_try) 2>&5
2574 ac_status=$?
2575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2576 (exit $ac_status); }; }; then
2577 ac_cv_prog_cc_stdc=$ac_arg
2578break
2579else
2580 echo "$as_me: failed program was:" >&5
2581sed 's/^/| /' conftest.$ac_ext >&5
2582
2583fi
2584rm -f conftest.$ac_objext
2585done
2586rm -f conftest.$ac_ext conftest.$ac_objext
2587CC=$ac_save_CC
2588
2589fi
2590
2591case "x$ac_cv_prog_cc_stdc" in
2592 x|xno)
2593 echo "$as_me:$LINENO: result: none needed" >&5
2594echo "${ECHO_T}none needed" >&6 ;;
2595 *)
2596 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2597echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2598 CC="$CC $ac_cv_prog_cc_stdc" ;;
2599esac
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601# Some people use a C++ compiler to compile C. Since we use `exit',
2602# in C++ we need to declare it. In case someone uses the same compiler
2603# for both compiling C and C++ we need to have the C++ compiler decide
2604# the declaration of exit, since it's the most demanding environment.
2605cat >conftest.$ac_ext <<_ACEOF
2606#ifndef __cplusplus
2607 choke me
2608#endif
2609_ACEOF
2610rm -f conftest.$ac_objext
2611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2612 (eval $ac_compile) 2>&5
2613 ac_status=$?
2614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615 (exit $ac_status); } &&
2616 { ac_try='test -s conftest.$ac_objext'
2617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2618 (eval $ac_try) 2>&5
2619 ac_status=$?
2620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2621 (exit $ac_status); }; }; then
2622 for ac_declaration in \
2623 ''\
2624 '#include <stdlib.h>' \
2625 'extern "C" void std::exit (int) throw (); using std::exit;' \
2626 'extern "C" void std::exit (int); using std::exit;' \
2627 'extern "C" void exit (int) throw ();' \
2628 'extern "C" void exit (int);' \
2629 'void exit (int);'
2630do
2631 cat >conftest.$ac_ext <<_ACEOF
2632#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002633/* confdefs.h. */
2634_ACEOF
2635cat confdefs.h >>conftest.$ac_ext
2636cat >>conftest.$ac_ext <<_ACEOF
2637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002638#include <stdlib.h>
2639$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002640int
2641main ()
2642{
2643exit (42);
2644 ;
2645 return 0;
2646}
2647_ACEOF
2648rm -f conftest.$ac_objext
2649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2650 (eval $ac_compile) 2>&5
2651 ac_status=$?
2652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2653 (exit $ac_status); } &&
2654 { ac_try='test -s conftest.$ac_objext'
2655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2656 (eval $ac_try) 2>&5
2657 ac_status=$?
2658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659 (exit $ac_status); }; }; then
2660 :
2661else
2662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002663sed 's/^/| /' conftest.$ac_ext >&5
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665continue
2666fi
2667rm -f conftest.$ac_objext conftest.$ac_ext
2668 cat >conftest.$ac_ext <<_ACEOF
2669#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002670/* confdefs.h. */
2671_ACEOF
2672cat confdefs.h >>conftest.$ac_ext
2673cat >>conftest.$ac_ext <<_ACEOF
2674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002675$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002676int
2677main ()
2678{
2679exit (42);
2680 ;
2681 return 0;
2682}
2683_ACEOF
2684rm -f conftest.$ac_objext
2685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2686 (eval $ac_compile) 2>&5
2687 ac_status=$?
2688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2689 (exit $ac_status); } &&
2690 { ac_try='test -s conftest.$ac_objext'
2691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2692 (eval $ac_try) 2>&5
2693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 break
2697else
2698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002699sed 's/^/| /' conftest.$ac_ext >&5
2700
Martin v. Löwis11437992002-04-12 09:54:03 +00002701fi
2702rm -f conftest.$ac_objext conftest.$ac_ext
2703done
2704rm -f conftest*
2705if test -n "$ac_declaration"; then
2706 echo '#ifdef __cplusplus' >>confdefs.h
2707 echo $ac_declaration >>confdefs.h
2708 echo '#endif' >>confdefs.h
2709fi
2710
2711else
2712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002713sed 's/^/| /' conftest.$ac_ext >&5
2714
Martin v. Löwis11437992002-04-12 09:54:03 +00002715fi
2716rm -f conftest.$ac_objext conftest.$ac_ext
2717ac_ext=c
2718ac_cpp='$CPP $CPPFLAGS'
2719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2721ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002723
2724# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002725
2726ac_ext=c
2727ac_cpp='$CPP $CPPFLAGS'
2728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730ac_compiler_gnu=$ac_cv_c_compiler_gnu
2731echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2732echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002733# On Suns, sometimes $CPP names a directory.
2734if test -n "$CPP" && test -d "$CPP"; then
2735 CPP=
2736fi
2737if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 if test "${ac_cv_prog_CPP+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002740else
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 # Double quotes because CPP needs to be expanded
2742 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2743 do
2744 ac_preproc_ok=false
2745for ac_c_preproc_warn_flag in '' yes
2746do
2747 # Use a header file that comes with gcc, so configuring glibc
2748 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2750 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002751 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 # not just through cpp. "Syntax error" is here to catch this case.
2753 cat >conftest.$ac_ext <<_ACEOF
2754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002755/* confdefs.h. */
2756_ACEOF
2757cat confdefs.h >>conftest.$ac_ext
2758cat >>conftest.$ac_ext <<_ACEOF
2759/* end confdefs.h. */
2760#ifdef __STDC__
2761# include <limits.h>
2762#else
2763# include <assert.h>
2764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 Syntax error
2766_ACEOF
2767if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2768 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2769 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002770 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 rm -f conftest.er1
2772 cat conftest.err >&5
2773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2774 (exit $ac_status); } >/dev/null; then
2775 if test -s conftest.err; then
2776 ac_cpp_err=$ac_c_preproc_warn_flag
2777 else
2778 ac_cpp_err=
2779 fi
2780else
2781 ac_cpp_err=yes
2782fi
2783if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002784 :
2785else
Martin v. Löwis11437992002-04-12 09:54:03 +00002786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002787sed 's/^/| /' conftest.$ac_ext >&5
2788
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 # Broken: fails on valid input.
2790continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002792rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002793
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 # OK, works on sane cases. Now check whether non-existent headers
2795 # can be detected and how.
2796 cat >conftest.$ac_ext <<_ACEOF
2797#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002798/* confdefs.h. */
2799_ACEOF
2800cat confdefs.h >>conftest.$ac_ext
2801cat >>conftest.$ac_ext <<_ACEOF
2802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002803#include <ac_nonexistent.h>
2804_ACEOF
2805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2807 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002808 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 rm -f conftest.er1
2810 cat conftest.err >&5
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); } >/dev/null; then
2813 if test -s conftest.err; then
2814 ac_cpp_err=$ac_c_preproc_warn_flag
2815 else
2816 ac_cpp_err=
2817 fi
2818else
2819 ac_cpp_err=yes
2820fi
2821if test -z "$ac_cpp_err"; then
2822 # Broken: success on invalid input.
2823continue
2824else
2825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002826sed 's/^/| /' conftest.$ac_ext >&5
2827
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 # Passes both tests.
2829ac_preproc_ok=:
2830break
2831fi
2832rm -f conftest.err conftest.$ac_ext
2833
2834done
2835# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2836rm -f conftest.err conftest.$ac_ext
2837if $ac_preproc_ok; then
2838 break
2839fi
2840
2841 done
2842 ac_cv_prog_CPP=$CPP
2843
2844fi
2845 CPP=$ac_cv_prog_CPP
2846else
2847 ac_cv_prog_CPP=$CPP
2848fi
2849echo "$as_me:$LINENO: result: $CPP" >&5
2850echo "${ECHO_T}$CPP" >&6
2851ac_preproc_ok=false
2852for ac_c_preproc_warn_flag in '' yes
2853do
2854 # Use a header file that comes with gcc, so configuring glibc
2855 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002856 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2857 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002858 # On the NeXT, cc -E runs the code through the compiler's parser,
2859 # not just through cpp. "Syntax error" is here to catch this case.
2860 cat >conftest.$ac_ext <<_ACEOF
2861#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002862/* confdefs.h. */
2863_ACEOF
2864cat confdefs.h >>conftest.$ac_ext
2865cat >>conftest.$ac_ext <<_ACEOF
2866/* end confdefs.h. */
2867#ifdef __STDC__
2868# include <limits.h>
2869#else
2870# include <assert.h>
2871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 Syntax error
2873_ACEOF
2874if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2876 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002877 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 rm -f conftest.er1
2879 cat conftest.err >&5
2880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881 (exit $ac_status); } >/dev/null; then
2882 if test -s conftest.err; then
2883 ac_cpp_err=$ac_c_preproc_warn_flag
2884 else
2885 ac_cpp_err=
2886 fi
2887else
2888 ac_cpp_err=yes
2889fi
2890if test -z "$ac_cpp_err"; then
2891 :
2892else
2893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002894sed 's/^/| /' conftest.$ac_ext >&5
2895
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 # Broken: fails on valid input.
2897continue
2898fi
2899rm -f conftest.err conftest.$ac_ext
2900
2901 # OK, works on sane cases. Now check whether non-existent headers
2902 # can be detected and how.
2903 cat >conftest.$ac_ext <<_ACEOF
2904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002905/* confdefs.h. */
2906_ACEOF
2907cat confdefs.h >>conftest.$ac_ext
2908cat >>conftest.$ac_ext <<_ACEOF
2909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002910#include <ac_nonexistent.h>
2911_ACEOF
2912if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2913 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2914 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002915 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002916 rm -f conftest.er1
2917 cat conftest.err >&5
2918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919 (exit $ac_status); } >/dev/null; then
2920 if test -s conftest.err; then
2921 ac_cpp_err=$ac_c_preproc_warn_flag
2922 else
2923 ac_cpp_err=
2924 fi
2925else
2926 ac_cpp_err=yes
2927fi
2928if test -z "$ac_cpp_err"; then
2929 # Broken: success on invalid input.
2930continue
2931else
2932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002933sed 's/^/| /' conftest.$ac_ext >&5
2934
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 # Passes both tests.
2936ac_preproc_ok=:
2937break
2938fi
2939rm -f conftest.err conftest.$ac_ext
2940
2941done
2942# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2943rm -f conftest.err conftest.$ac_ext
2944if $ac_preproc_ok; then
2945 :
2946else
Skip Montanaro6dead952003-09-25 14:50:04 +00002947 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2948See \`config.log' for more details." >&5
2949echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2950See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 { (exit 1); exit 1; }; }
2952fi
2953
2954ac_ext=c
2955ac_cpp='$CPP $CPPFLAGS'
2956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2958ac_compiler_gnu=$ac_cv_c_compiler_gnu
2959
2960
Skip Montanaro6dead952003-09-25 14:50:04 +00002961echo "$as_me:$LINENO: checking for egrep" >&5
2962echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2963if test "${ac_cv_prog_egrep+set}" = set; then
2964 echo $ECHO_N "(cached) $ECHO_C" >&6
2965else
2966 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2967 then ac_cv_prog_egrep='grep -E'
2968 else ac_cv_prog_egrep='egrep'
2969 fi
2970fi
2971echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2972echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2973 EGREP=$ac_cv_prog_egrep
2974
2975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976
2977echo "$as_me:$LINENO: checking for AIX" >&5
2978echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2979cat >conftest.$ac_ext <<_ACEOF
2980#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002981/* confdefs.h. */
2982_ACEOF
2983cat confdefs.h >>conftest.$ac_ext
2984cat >>conftest.$ac_ext <<_ACEOF
2985/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002986#ifdef _AIX
2987 yes
2988#endif
2989
Martin v. Löwis11437992002-04-12 09:54:03 +00002990_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002992 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002993 echo "$as_me:$LINENO: result: yes" >&5
2994echo "${ECHO_T}yes" >&6
2995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998
2999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000 echo "$as_me:$LINENO: result: no" >&5
3001echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002fi
3003rm -f conftest*
3004
Michael W. Hudson54241132001-12-07 15:38:26 +00003005
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003007# Check for unsupported systems
3008case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003009Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003010 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3011 echo See README for details.
3012 exit 1;;
3013esac
3014
Michael W. Hudson54241132001-12-07 15:38:26 +00003015
Martin v. Löwis11437992002-04-12 09:54:03 +00003016echo "$as_me:$LINENO: checking for --with-suffix" >&5
3017echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003018
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003019# Check whether --with-suffix or --without-suffix was given.
3020if test "${with_suffix+set}" = set; then
3021 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003022
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003023 case $withval in
3024 no) EXEEXT=;;
3025 yes) EXEEXT=.exe;;
3026 *) EXEEXT=$withval;;
3027 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003028fi;
3029echo "$as_me:$LINENO: result: $EXEEXT" >&5
3030echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003031
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003032# Test whether we're running on a non-case-sensitive system, in which
3033# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3036echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003037if test ! -d CaseSensitiveTestDir; then
3038mkdir CaseSensitiveTestDir
3039fi
3040
3041if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003042then
Martin v. Löwis11437992002-04-12 09:54:03 +00003043 echo "$as_me:$LINENO: result: yes" >&5
3044echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003045 BUILDEXEEXT=.exe
3046else
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 echo "$as_me:$LINENO: result: no" >&5
3048echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003049 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003050fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003051rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003052
Guido van Rossumdd997f71998-10-07 19:58:26 +00003053case $MACHDEP in
3054bsdos*)
3055 case $CC in
3056 gcc) CC="$CC -D_HAVE_BSDI";;
3057 esac;;
3058esac
3059
Guido van Rossum24b1e751997-08-21 02:29:16 +00003060case $ac_sys_system in
3061hp*|HP*)
3062 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003063 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003064 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003065Monterey*)
3066 case $CC in
3067 cc) CC="$CC -Wl,-Bexport";;
3068 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003069SunOS*)
3070 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003071
3072cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003073#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003074_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003075
3076 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003077esac
3078
Michael W. Hudson54241132001-12-07 15:38:26 +00003079
3080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: checking LIBRARY" >&5
3082echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003083if test -z "$LIBRARY"
3084then
3085 LIBRARY='libpython$(VERSION).a'
3086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003087echo "$as_me:$LINENO: result: $LIBRARY" >&5
3088echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003089
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003090# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003091# name of the library into which to insert object files). BLDLIBRARY is also
3092# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3093# is blank as the main program is not linked directly against LDLIBRARY.
3094# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3095# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3096# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3097# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003098#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003099# RUNSHARED is used to run shared python without installed libraries
3100#
3101# INSTSONAME is the name of the shared library that will be use to install
3102# on the system - some systems like version suffix, others don't
3103
3104
Michael W. Hudson54241132001-12-07 15:38:26 +00003105
3106
3107
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003108
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003109LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003110BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003111INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003112DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003113LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003114RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003115
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003116# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003117# If CXX is set, and if it is needed to link a main function that was
3118# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3119# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003120# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003121# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003122
Martin v. Löwis11437992002-04-12 09:54:03 +00003123echo "$as_me:$LINENO: checking LINKCC" >&5
3124echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003125if test -z "$LINKCC"
3126then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003127 if test -z "$CXX"; then
3128 LINKCC="\$(PURIFY) \$(CC)"
3129 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003130 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003131 $CXX -c conftest.$ac_ext 2>&5
3132 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3133 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3134 then
3135 LINKCC="\$(PURIFY) \$(CC)"
3136 else
3137 LINKCC="\$(PURIFY) \$(CXX)"
3138 fi
3139 rm -fr conftest*
3140 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003141 case $ac_sys_system in
3142 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003143 exp_extra="\"\""
3144 if test $ac_sys_release -ge 5 -o \
3145 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3146 exp_extra="."
3147 fi
3148 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003149 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003150 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003151 esac
3152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003153echo "$as_me:$LINENO: result: $LINKCC" >&5
3154echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003155
Martin v. Löwis11437992002-04-12 09:54:03 +00003156echo "$as_me:$LINENO: checking for --enable-shared" >&5
3157echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003158# Check whether --enable-shared or --disable-shared was given.
3159if test "${enable_shared+set}" = set; then
3160 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003161
Martin v. Löwis11437992002-04-12 09:54:03 +00003162fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163
3164if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003165then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003166 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003167 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003168 enable_shared="yes";;
3169 *)
3170 enable_shared="no";;
3171 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003173echo "$as_me:$LINENO: result: $enable_shared" >&5
3174echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003175
3176
Martin v. Löwis11437992002-04-12 09:54:03 +00003177echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3178echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003179
Guido van Rossumb8552162001-09-05 14:58:11 +00003180# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3181# library that we build, but we do not want to link against it (we
3182# will find it with a -framework option). For this reason there is an
3183# extra variable BLDLIBRARY against which Python and the extension
3184# modules are linked, BLDLIBRARY. This is normally the same as
3185# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003186if test "$enable_framework"
3187then
3188 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003189 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003190 BLDLIBRARY=''
3191else
3192 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003193fi
Jack Jansene578a632001-08-15 01:27:14 +00003194
Martin v. Löwis1142de32002-03-29 16:28:31 +00003195# Other platforms follow
3196if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003197
3198cat >>confdefs.h <<\_ACEOF
3199#define Py_ENABLE_SHARED 1
3200_ACEOF
3201
Martin v. Löwis1142de32002-03-29 16:28:31 +00003202 case $ac_sys_system in
3203 BeOS*)
3204 LDLIBRARY='libpython$(VERSION).so'
3205 ;;
3206 CYGWIN*)
3207 LDLIBRARY='libpython$(VERSION).dll.a'
3208 DLLLIBRARY='libpython$(VERSION).dll'
3209 ;;
3210 SunOS*)
3211 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003212 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003213 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003214 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003215 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003216 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003217 LDLIBRARY='libpython$(VERSION).so'
3218 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003219 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003220 INSTSONAME="$LDLIBRARY".$SOVERSION
3221 ;;
3222 hp*|HP*)
3223 LDLIBRARY='libpython$(VERSION).sl'
3224 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003225 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003226 ;;
3227 OSF*)
3228 LDLIBRARY='libpython$(VERSION).so'
3229 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003230 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003231 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003232 atheos*)
3233 LDLIBRARY='libpython$(VERSION).so'
3234 BLDLIBRARY='-L. -lpython$(VERSION)'
3235 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3236 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237 esac
Jason Tishler30765592003-09-04 11:04:06 +00003238else # shared is disabled
3239 case $ac_sys_system in
3240 CYGWIN*)
3241 BLDLIBRARY='$(LIBRARY)'
3242 LDLIBRARY='libpython$(VERSION).dll.a'
3243 ;;
3244 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245fi
3246
Martin v. Löwis11437992002-04-12 09:54:03 +00003247echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3248echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003249
Martin v. Löwis11437992002-04-12 09:54:03 +00003250if test -n "$ac_tool_prefix"; then
3251 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3252set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3253echo "$as_me:$LINENO: checking for $ac_word" >&5
3254echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255if test "${ac_cv_prog_RANLIB+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257else
3258 if test -n "$RANLIB"; then
3259 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3260else
Martin v. Löwis11437992002-04-12 09:54:03 +00003261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3262for as_dir in $PATH
3263do
3264 IFS=$as_save_IFS
3265 test -z "$as_dir" && as_dir=.
3266 for ac_exec_ext in '' $ac_executable_extensions; do
3267 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3268 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3269 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3270 break 2
3271 fi
3272done
3273done
3274
Guido van Rossum627b2d71993-12-24 10:39:16 +00003275fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003277RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003279 echo "$as_me:$LINENO: result: $RANLIB" >&5
3280echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281else
Martin v. Löwis11437992002-04-12 09:54:03 +00003282 echo "$as_me:$LINENO: result: no" >&5
3283echo "${ECHO_T}no" >&6
3284fi
3285
3286fi
3287if test -z "$ac_cv_prog_RANLIB"; then
3288 ac_ct_RANLIB=$RANLIB
3289 # Extract the first word of "ranlib", so it can be a program name with args.
3290set dummy ranlib; ac_word=$2
3291echo "$as_me:$LINENO: checking for $ac_word" >&5
3292echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3293if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3294 echo $ECHO_N "(cached) $ECHO_C" >&6
3295else
3296 if test -n "$ac_ct_RANLIB"; then
3297 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3298else
3299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
3304 for ac_exec_ext in '' $ac_executable_extensions; do
3305 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3306 ac_cv_prog_ac_ct_RANLIB="ranlib"
3307 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3308 break 2
3309 fi
3310done
3311done
3312
3313 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3314fi
3315fi
3316ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3317if test -n "$ac_ct_RANLIB"; then
3318 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3319echo "${ECHO_T}$ac_ct_RANLIB" >&6
3320else
3321 echo "$as_me:$LINENO: result: no" >&5
3322echo "${ECHO_T}no" >&6
3323fi
3324
3325 RANLIB=$ac_ct_RANLIB
3326else
3327 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329
3330
Guido van Rossum7f43da71994-08-01 12:15:30 +00003331for ac_prog in ar aal
3332do
Martin v. Löwis11437992002-04-12 09:54:03 +00003333 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003334set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003335echo "$as_me:$LINENO: checking for $ac_word" >&5
3336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3337if test "${ac_cv_prog_AR+set}" = set; then
3338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339else
3340 if test -n "$AR"; then
3341 ac_cv_prog_AR="$AR" # Let the user override the test.
3342else
Martin v. Löwis11437992002-04-12 09:54:03 +00003343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
3348 for ac_exec_ext in '' $ac_executable_extensions; do
3349 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3350 ac_cv_prog_AR="$ac_prog"
3351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3352 break 2
3353 fi
3354done
3355done
3356
Guido van Rossum7f43da71994-08-01 12:15:30 +00003357fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003359AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 echo "$as_me:$LINENO: result: $AR" >&5
3362echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363else
Martin v. Löwis11437992002-04-12 09:54:03 +00003364 echo "$as_me:$LINENO: result: no" >&5
3365echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003366fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003369done
3370test -n "$AR" || AR="ar"
3371
Michael W. Hudson54241132001-12-07 15:38:26 +00003372
Neil Schemenauera42c8272001-03-31 00:01:55 +00003373case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003374bsdos*|hp*|HP*)
3375 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003376 if test -z "$INSTALL"
3377 then
3378 INSTALL="${srcdir}/install-sh -c"
3379 fi
3380esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003381ac_aux_dir=
3382for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3383 if test -f $ac_dir/install-sh; then
3384 ac_aux_dir=$ac_dir
3385 ac_install_sh="$ac_aux_dir/install-sh -c"
3386 break
3387 elif test -f $ac_dir/install.sh; then
3388 ac_aux_dir=$ac_dir
3389 ac_install_sh="$ac_aux_dir/install.sh -c"
3390 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003391 elif test -f $ac_dir/shtool; then
3392 ac_aux_dir=$ac_dir
3393 ac_install_sh="$ac_aux_dir/shtool install -c"
3394 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003395 fi
3396done
3397if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3399echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3400 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003401fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003402ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3403ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3404ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003405
3406# Find a good install program. We prefer a C program (faster),
3407# so one script is as good as another. But avoid the broken or
3408# incompatible versions:
3409# SysV /etc/install, /usr/sbin/install
3410# SunOS /usr/etc/install
3411# IRIX /sbin/install
3412# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003413# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003414# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3415# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3416# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3417# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003418echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3419echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003420if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003421if test "${ac_cv_path_install+set}" = set; then
3422 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003423else
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3425for as_dir in $PATH
3426do
3427 IFS=$as_save_IFS
3428 test -z "$as_dir" && as_dir=.
3429 # Account for people who put trailing slashes in PATH elements.
3430case $as_dir/ in
3431 ./ | .// | /cC/* | \
3432 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3433 /usr/ucb/* ) ;;
3434 *)
3435 # OSF1 and SCO ODT 3.0 have their own names for install.
3436 # Don't use installbsd from OSF since it installs stuff as root
3437 # by default.
3438 for ac_prog in ginstall scoinst install; do
3439 for ac_exec_ext in '' $ac_executable_extensions; do
3440 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3441 if test $ac_prog = install &&
3442 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3443 # AIX install. It has an incompatible calling convention.
3444 :
3445 elif test $ac_prog = install &&
3446 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3447 # program-specific install script used by HP pwplus--don't use.
3448 :
3449 else
3450 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3451 break 3
3452 fi
3453 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003454 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 done
3456 ;;
3457esac
3458done
3459
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460
3461fi
3462 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003463 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464 else
3465 # As a last resort, use the slow shell script. We don't cache a
3466 # path for INSTALL within a source directory, because that will
3467 # break other packages using the cache if that directory is
3468 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003470 fi
3471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003472echo "$as_me:$LINENO: result: $INSTALL" >&5
3473echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474
3475# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3476# It thinks the first close brace ends the variable substitution.
3477test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003480
3481test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3482
Michael W. Hudson54241132001-12-07 15:38:26 +00003483
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003484# Not every filesystem supports hard links
3485
3486if test -z "$LN" ; then
3487 case $ac_sys_system in
3488 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003489 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003490 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003491 *) LN=ln;;
3492 esac
3493fi
3494
Fred Drake109d9862001-07-11 06:27:56 +00003495# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003496echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3497echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3498
Fred Drake109d9862001-07-11 06:27:56 +00003499# Check whether --with-pydebug or --without-pydebug was given.
3500if test "${with_pydebug+set}" = set; then
3501 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003502
Fred Drake109d9862001-07-11 06:27:56 +00003503if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003504then
3505
3506cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003507#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003508_ACEOF
3509
3510 echo "$as_me:$LINENO: result: yes" >&5
3511echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003512 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003513else echo "$as_me:$LINENO: result: no" >&5
3514echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003515fi
3516else
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 echo "$as_me:$LINENO: result: no" >&5
3518echo "${ECHO_T}no" >&6
3519fi;
Fred Drake109d9862001-07-11 06:27:56 +00003520
Skip Montanarodecc6a42003-01-01 20:07:49 +00003521# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3522# merged with this chunk of code?
3523
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003525# ------------------------
3526# (The following bit of code is complicated enough - please keep things
3527# indented properly. Just pretend you're editing Python code. ;-)
3528
3529# There are two parallel sets of case statements below, one that checks to
3530# see if OPT was set and one that does BASECFLAGS setting based upon
3531# compiler and platform. BASECFLAGS tweaks need to be made even if the
3532# user set OPT.
3533
3534# tweak OPT based on compiler and platform, only if the user didn't set
3535# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003537if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003539 case $GCC in
3540 yes)
3541 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003542 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003543 if test "$Py_DEBUG" = 'true' ; then
3544 # Optimization messes up debuggers, so turn it off for
3545 # debug builds.
3546 OPT="-g -Wall -Wstrict-prototypes"
3547 else
3548 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003549 fi
3550 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003551 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003552 OPT="-O3 -Wall -Wstrict-prototypes"
3553 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003554 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003555 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003556 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3557 ;;
3558 esac
Fred Drake109d9862001-07-11 06:27:56 +00003559 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003560
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003561 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562 OPT="-O"
3563 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003565
3566 # The current (beta) Monterey compiler dies with optimizations
3567 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003568 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003569 Monterey*)
3570 OPT=""
3571 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003572 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003573
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003574fi
3575
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576
3577# tweak BASECFLAGS based on compiler and platform
3578case $GCC in
3579yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003580 # Python violates C99 rules, by casting between incompatible
3581 # pointer types. GCC may generate bad code as a result of that,
3582 # so use -fno-strict-aliasing if supported.
3583 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3584echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3585 ac_save_cc="$CC"
3586 CC="$CC -fno-strict-aliasing"
3587 if test "$cross_compiling" = yes; then
3588 ac_cv_no_strict_aliasing_ok=no
3589else
3590 cat >conftest.$ac_ext <<_ACEOF
3591#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003597int main() { return 0; }
3598_ACEOF
3599rm -f conftest$ac_exeext
3600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3601 (eval $ac_link) 2>&5
3602 ac_status=$?
3603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3606 (eval $ac_try) 2>&5
3607 ac_status=$?
3608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3609 (exit $ac_status); }; }; then
3610 ac_cv_no_strict_aliasing_ok=yes
3611else
3612 echo "$as_me: program exited with status $ac_status" >&5
3613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003614sed 's/^/| /' conftest.$ac_ext >&5
3615
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003616( exit $ac_status )
3617ac_cv_no_strict_aliasing_ok=no
3618fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003619rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003620fi
3621 CC="$ac_save_cc"
3622 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3624 if test $ac_cv_no_strict_aliasing_ok = yes
3625 then
3626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3627 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628 case $ac_sys_system in
3629 SCO_SV*)
3630 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3631 ;;
3632 # is there any other compiler on Darwin besides gcc?
3633 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003634 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003635 ;;
3636 esac
3637 ;;
3638
3639*)
3640 case $ac_sys_system in
3641 OpenUNIX*|UnixWare*)
3642 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3643 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003644 OSF*)
3645 BASECFLAGS="$BASECFLAGS -ieee -std"
3646 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003647 SCO_SV*)
3648 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3649 ;;
3650 esac
3651 ;;
3652esac
3653
Fred Drakee1ceaa02001-12-04 20:55:47 +00003654if test "$Py_DEBUG" = 'true'; then
3655 :
3656else
3657 OPT="-DNDEBUG $OPT"
3658fi
3659
Guido van Rossum563e7081996-09-10 18:20:48 +00003660if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003661then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003662 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003663fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3666echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3667if test "${ac_cv_opt_olimit_ok+set}" = set; then
3668 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003669else
3670 ac_save_cc="$CC"
3671CC="$CC -OPT:Olimit=0"
3672if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003673 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003674else
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 cat >conftest.$ac_ext <<_ACEOF
3676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003677/* confdefs.h. */
3678_ACEOF
3679cat confdefs.h >>conftest.$ac_ext
3680cat >>conftest.$ac_ext <<_ACEOF
3681/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003682int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683_ACEOF
3684rm -f conftest$ac_exeext
3685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3686 (eval $ac_link) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003695 ac_cv_opt_olimit_ok=yes
3696else
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 echo "$as_me: program exited with status $ac_status" >&5
3698echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003699sed 's/^/| /' conftest.$ac_ext >&5
3700
Martin v. Löwis11437992002-04-12 09:54:03 +00003701( exit $ac_status )
3702ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003703fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003704rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003705fi
Guido van Rossum91922671997-10-09 20:24:13 +00003706CC="$ac_save_cc"
3707fi
3708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3710echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003711if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003712 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003713 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3714 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3715 # environment?
3716 Darwin*)
3717 ;;
3718 *)
3719 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3720 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003721 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3724echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3725 if test "${ac_cv_olimit_ok+set}" = set; then
3726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003727else
3728 ac_save_cc="$CC"
3729 CC="$CC -Olimit 1500"
3730 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003731 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003732else
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 cat >conftest.$ac_ext <<_ACEOF
3734#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003735/* confdefs.h. */
3736_ACEOF
3737cat confdefs.h >>conftest.$ac_ext
3738cat >>conftest.$ac_ext <<_ACEOF
3739/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003740int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741_ACEOF
3742rm -f conftest$ac_exeext
3743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3744 (eval $ac_link) 2>&5
3745 ac_status=$?
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3749 (eval $ac_try) 2>&5
3750 ac_status=$?
3751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3752 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003753 ac_cv_olimit_ok=yes
3754else
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 echo "$as_me: program exited with status $ac_status" >&5
3756echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003757sed 's/^/| /' conftest.$ac_ext >&5
3758
Martin v. Löwis11437992002-04-12 09:54:03 +00003759( exit $ac_status )
3760ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003761fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003762rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003763fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003764 CC="$ac_save_cc"
3765fi
3766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3768echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003769 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003770 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003771 fi
3772fi
3773
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003774# On some compilers, pthreads are available without further options
3775# (e.g. MacOS X). On some of these systems, the compiler will not
3776# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3777# So we have to see first whether pthreads are available without
3778# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003779echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3780echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3781if test "${ac_cv_pthread_is_default+set}" = set; then
3782 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003783else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003784 if test "$cross_compiling" = yes; then
3785 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003786else
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 cat >conftest.$ac_ext <<_ACEOF
3788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003789/* confdefs.h. */
3790_ACEOF
3791cat confdefs.h >>conftest.$ac_ext
3792cat >>conftest.$ac_ext <<_ACEOF
3793/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794
Martin v. Löwis130fb172001-07-19 11:00:41 +00003795#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003796
3797void* routine(void* p){return NULL;}
3798
3799int main(){
3800 pthread_t p;
3801 if(pthread_create(&p,NULL,routine,NULL)!=0)
3802 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003803 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003804 return 0;
3805}
3806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807_ACEOF
3808rm -f conftest$ac_exeext
3809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3810 (eval $ac_link) 2>&5
3811 ac_status=$?
3812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3815 (eval $ac_try) 2>&5
3816 ac_status=$?
3817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3818 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003819
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003820 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003821 ac_cv_kthread=no
3822 ac_cv_pthread=no
3823
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003824else
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 echo "$as_me: program exited with status $ac_status" >&5
3826echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003827sed 's/^/| /' conftest.$ac_ext >&5
3828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829( exit $ac_status )
3830ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003831fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003832rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003833fi
3834
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003835fi
3836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3838echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003839
Michael W. Hudson54241132001-12-07 15:38:26 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842then
3843 ac_cv_kpthread=no
3844else
3845# -Kpthread, if available, provides the right #defines
3846# and linker options to make pthread_create available
3847# Some compilers won't report that they do not support -Kpthread,
3848# so we need to run a program to see whether it really made the
3849# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003850echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3851echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3852if test "${ac_cv_kpthread+set}" = set; then
3853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003854else
3855 ac_save_cc="$CC"
3856CC="$CC -Kpthread"
3857if test "$cross_compiling" = yes; then
3858 ac_cv_kpthread=no
3859else
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 cat >conftest.$ac_ext <<_ACEOF
3861#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* confdefs.h. */
3863_ACEOF
3864cat confdefs.h >>conftest.$ac_ext
3865cat >>conftest.$ac_ext <<_ACEOF
3866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003867
3868#include <pthread.h>
3869
3870void* routine(void* p){return NULL;}
3871
3872int main(){
3873 pthread_t p;
3874 if(pthread_create(&p,NULL,routine,NULL)!=0)
3875 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003876 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003877 return 0;
3878}
3879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880_ACEOF
3881rm -f conftest$ac_exeext
3882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3883 (eval $ac_link) 2>&5
3884 ac_status=$?
3885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3888 (eval $ac_try) 2>&5
3889 ac_status=$?
3890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3891 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003892 ac_cv_kpthread=yes
3893else
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 echo "$as_me: program exited with status $ac_status" >&5
3895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003896sed 's/^/| /' conftest.$ac_ext >&5
3897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898( exit $ac_status )
3899ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003900fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003901rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003902fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003903CC="$ac_save_cc"
3904fi
3905
Martin v. Löwis11437992002-04-12 09:54:03 +00003906echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3907echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003908fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003909
Skip Montanarod8d39a02003-07-10 20:44:10 +00003910if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003911then
3912# -Kthread, if available, provides the right #defines
3913# and linker options to make pthread_create available
3914# Some compilers won't report that they do not support -Kthread,
3915# so we need to run a program to see whether it really made the
3916# function available.
3917echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3918echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3919if test "${ac_cv_kthread+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3921else
3922 ac_save_cc="$CC"
3923CC="$CC -Kthread"
3924if test "$cross_compiling" = yes; then
3925 ac_cv_kthread=no
3926else
3927 cat >conftest.$ac_ext <<_ACEOF
3928#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003934
3935#include <pthread.h>
3936
3937void* routine(void* p){return NULL;}
3938
3939int main(){
3940 pthread_t p;
3941 if(pthread_create(&p,NULL,routine,NULL)!=0)
3942 return 1;
3943 (void)pthread_detach(p);
3944 return 0;
3945}
3946
3947_ACEOF
3948rm -f conftest$ac_exeext
3949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3950 (eval $ac_link) 2>&5
3951 ac_status=$?
3952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3955 (eval $ac_try) 2>&5
3956 ac_status=$?
3957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3958 (exit $ac_status); }; }; then
3959 ac_cv_kthread=yes
3960else
3961 echo "$as_me: program exited with status $ac_status" >&5
3962echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003963sed 's/^/| /' conftest.$ac_ext >&5
3964
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003965( exit $ac_status )
3966ac_cv_kthread=no
3967fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003968rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003969fi
3970CC="$ac_save_cc"
3971fi
3972
3973echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3974echo "${ECHO_T}$ac_cv_kthread" >&6
3975fi
3976
Skip Montanarod8d39a02003-07-10 20:44:10 +00003977if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003978then
3979# -pthread, if available, provides the right #defines
3980# and linker options to make pthread_create available
3981# Some compilers won't report that they do not support -pthread,
3982# so we need to run a program to see whether it really made the
3983# function available.
3984echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3985echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3986if test "${ac_cv_thread+set}" = set; then
3987 echo $ECHO_N "(cached) $ECHO_C" >&6
3988else
3989 ac_save_cc="$CC"
3990CC="$CC -pthread"
3991if test "$cross_compiling" = yes; then
3992 ac_cv_pthread=no
3993else
3994 cat >conftest.$ac_ext <<_ACEOF
3995#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003996/* confdefs.h. */
3997_ACEOF
3998cat confdefs.h >>conftest.$ac_ext
3999cat >>conftest.$ac_ext <<_ACEOF
4000/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004001
4002#include <pthread.h>
4003
4004void* routine(void* p){return NULL;}
4005
4006int main(){
4007 pthread_t p;
4008 if(pthread_create(&p,NULL,routine,NULL)!=0)
4009 return 1;
4010 (void)pthread_detach(p);
4011 return 0;
4012}
4013
4014_ACEOF
4015rm -f conftest$ac_exeext
4016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4017 (eval $ac_link) 2>&5
4018 ac_status=$?
4019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4022 (eval $ac_try) 2>&5
4023 ac_status=$?
4024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4025 (exit $ac_status); }; }; then
4026 ac_cv_pthread=yes
4027else
4028 echo "$as_me: program exited with status $ac_status" >&5
4029echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004030sed 's/^/| /' conftest.$ac_ext >&5
4031
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004032( exit $ac_status )
4033ac_cv_pthread=no
4034fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004035rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004036fi
4037CC="$ac_save_cc"
4038fi
4039
4040echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4041echo "${ECHO_T}$ac_cv_pthread" >&6
4042fi
4043
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004044# If we have set a CC compiler flag for thread support then
4045# check if it works for CXX, too.
4046ac_cv_cxx_thread=no
4047if test ! -z "$CXX"
4048then
4049echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4050echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4051ac_save_cxx="$CXX"
4052
4053if test "$ac_cv_kpthread" = "yes"
4054then
4055 CXX="$CXX -Kpthread"
4056 ac_cv_cxx_thread=yes
4057elif test "$ac_cv_kthread" = "yes"
4058then
4059 CXX="$CXX -Kthread"
4060 ac_cv_cxx_thread=yes
4061elif test "$ac_cv_pthread" = "yes"
4062then
4063 CXX="$CXX -pthread"
4064 ac_cv_cxx_thread=yes
4065fi
4066
4067if test $ac_cv_cxx_thread = yes
4068then
4069 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4070 $CXX -c conftest.$ac_ext 2>&5
4071 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4072 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4073 then
4074 ac_cv_cxx_thread=yes
4075 else
4076 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004077 fi
4078 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004079fi
4080fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004081CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004082echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4083echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4084
Michael W. Hudson54241132001-12-07 15:38:26 +00004085
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004086# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004087echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4088echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4089if test "${ac_cv_header_stdc+set}" = set; then
4090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091else
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 cat >conftest.$ac_ext <<_ACEOF
4093#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004094/* confdefs.h. */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004099#include <stdlib.h>
4100#include <stdarg.h>
4101#include <string.h>
4102#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004103
Skip Montanaro6dead952003-09-25 14:50:04 +00004104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
Martin v. Löwis11437992002-04-12 09:54:03 +00004111_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004112rm -f conftest.$ac_objext
4113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4114 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004117 (exit $ac_status); } &&
4118 { ac_try='test -s conftest.$ac_objext'
4119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4120 (eval $ac_try) 2>&5
4121 ac_status=$?
4122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4123 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124 ac_cv_header_stdc=yes
4125else
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004127sed 's/^/| /' conftest.$ac_ext >&5
4128
4129ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004130fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004131rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132
4133if test $ac_cv_header_stdc = yes; then
4134 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 cat >conftest.$ac_ext <<_ACEOF
4136#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004137/* confdefs.h. */
4138_ACEOF
4139cat confdefs.h >>conftest.$ac_ext
4140cat >>conftest.$ac_ext <<_ACEOF
4141/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004143
4144_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004146 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147 :
4148else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149 ac_cv_header_stdc=no
4150fi
4151rm -f conftest*
4152
4153fi
4154
4155if test $ac_cv_header_stdc = yes; then
4156 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 cat >conftest.$ac_ext <<_ACEOF
4158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004159/* confdefs.h. */
4160_ACEOF
4161cat confdefs.h >>conftest.$ac_ext
4162cat >>conftest.$ac_ext <<_ACEOF
4163/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
4166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004168 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169 :
4170else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 ac_cv_header_stdc=no
4172fi
4173rm -f conftest*
4174
4175fi
4176
4177if test $ac_cv_header_stdc = yes; then
4178 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004180 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181else
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 cat >conftest.$ac_ext <<_ACEOF
4183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* confdefs.h. */
4185_ACEOF
4186cat confdefs.h >>conftest.$ac_ext
4187cat >>conftest.$ac_ext <<_ACEOF
4188/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004189#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004190#if ((' ' & 0x0FF) == 0x020)
4191# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4192# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4193#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004194# define ISLOWER(c) \
4195 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 || ('j' <= (c) && (c) <= 'r') \
4197 || ('s' <= (c) && (c) <= 'z'))
4198# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4199#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4202int
4203main ()
4204{
4205 int i;
4206 for (i = 0; i < 256; i++)
4207 if (XOR (islower (i), ISLOWER (i))
4208 || toupper (i) != TOUPPER (i))
4209 exit(2);
4210 exit (0);
4211}
4212_ACEOF
4213rm -f conftest$ac_exeext
4214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4215 (eval $ac_link) 2>&5
4216 ac_status=$?
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4220 (eval $ac_try) 2>&5
4221 ac_status=$?
4222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224 :
4225else
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 echo "$as_me: program exited with status $ac_status" >&5
4227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004228sed 's/^/| /' conftest.$ac_ext >&5
4229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230( exit $ac_status )
4231ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004232fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004233rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004234fi
4235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004236fi
4237echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4238echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004239if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004240
4241cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004243_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004244
4245fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
Skip Montanarob9820a32004-01-17 00:16:12 +00004247# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4258 inttypes.h stdint.h unistd.h
4259do
4260as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4261echo "$as_me:$LINENO: checking for $ac_header" >&5
4262echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4263if eval "test \"\${$as_ac_Header+set}\" = set"; then
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
4265else
4266 cat >conftest.$ac_ext <<_ACEOF
4267#line $LINENO "configure"
4268/* confdefs.h. */
4269_ACEOF
4270cat confdefs.h >>conftest.$ac_ext
4271cat >>conftest.$ac_ext <<_ACEOF
4272/* end confdefs.h. */
4273$ac_includes_default
4274
4275#include <$ac_header>
4276_ACEOF
4277rm -f conftest.$ac_objext
4278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4279 (eval $ac_compile) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); } &&
4283 { ac_try='test -s conftest.$ac_objext'
4284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4285 (eval $ac_try) 2>&5
4286 ac_status=$?
4287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288 (exit $ac_status); }; }; then
4289 eval "$as_ac_Header=yes"
4290else
4291 echo "$as_me: failed program was:" >&5
4292sed 's/^/| /' conftest.$ac_ext >&5
4293
4294eval "$as_ac_Header=no"
4295fi
4296rm -f conftest.$ac_objext conftest.$ac_ext
4297fi
4298echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4299echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4300if test `eval echo '${'$as_ac_Header'}'` = yes; then
4301 cat >>confdefs.h <<_ACEOF
4302#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4303_ACEOF
4304
4305fi
4306
4307done
4308
4309
Martin v. Löwis11437992002-04-12 09:54:03 +00004310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
Skip Montanaro7befb992004-02-10 16:50:21 +00004346for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4347libintl.h ncurses.h poll.h pthread.h \
4348stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004349unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004350sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004351sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00004352sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004353sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4354bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004355do
Martin v. Löwis11437992002-04-12 09:54:03 +00004356as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4357if eval "test \"\${$as_ac_Header+set}\" = set"; then
4358 echo "$as_me:$LINENO: checking for $ac_header" >&5
4359echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4360if eval "test \"\${$as_ac_Header+set}\" = set"; then
4361 echo $ECHO_N "(cached) $ECHO_C" >&6
4362fi
4363echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4364echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365else
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 # Is the header compilable?
4367echo "$as_me:$LINENO: checking $ac_header usability" >&5
4368echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4369cat >conftest.$ac_ext <<_ACEOF
4370#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004371/* confdefs.h. */
4372_ACEOF
4373cat confdefs.h >>conftest.$ac_ext
4374cat >>conftest.$ac_ext <<_ACEOF
4375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004376$ac_includes_default
4377#include <$ac_header>
4378_ACEOF
4379rm -f conftest.$ac_objext
4380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4381 (eval $ac_compile) 2>&5
4382 ac_status=$?
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4384 (exit $ac_status); } &&
4385 { ac_try='test -s conftest.$ac_objext'
4386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4387 (eval $ac_try) 2>&5
4388 ac_status=$?
4389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390 (exit $ac_status); }; }; then
4391 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004392else
Martin v. Löwis11437992002-04-12 09:54:03 +00004393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004394sed 's/^/| /' conftest.$ac_ext >&5
4395
Martin v. Löwis11437992002-04-12 09:54:03 +00004396ac_header_compiler=no
4397fi
4398rm -f conftest.$ac_objext conftest.$ac_ext
4399echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4400echo "${ECHO_T}$ac_header_compiler" >&6
4401
4402# Is the header present?
4403echo "$as_me:$LINENO: checking $ac_header presence" >&5
4404echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4405cat >conftest.$ac_ext <<_ACEOF
4406#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004407/* confdefs.h. */
4408_ACEOF
4409cat confdefs.h >>conftest.$ac_ext
4410cat >>conftest.$ac_ext <<_ACEOF
4411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004412#include <$ac_header>
4413_ACEOF
4414if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4415 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4416 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004417 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004418 rm -f conftest.er1
4419 cat conftest.err >&5
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); } >/dev/null; then
4422 if test -s conftest.err; then
4423 ac_cpp_err=$ac_c_preproc_warn_flag
4424 else
4425 ac_cpp_err=
4426 fi
4427else
4428 ac_cpp_err=yes
4429fi
4430if test -z "$ac_cpp_err"; then
4431 ac_header_preproc=yes
4432else
4433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004434sed 's/^/| /' conftest.$ac_ext >&5
4435
Martin v. Löwis11437992002-04-12 09:54:03 +00004436 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004438rm -f conftest.err conftest.$ac_ext
4439echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4440echo "${ECHO_T}$ac_header_preproc" >&6
4441
4442# So? What about this header?
4443case $ac_header_compiler:$ac_header_preproc in
4444 yes:no )
4445 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4446echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4447 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004448echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4449 (
4450 cat <<\_ASBOX
4451## ------------------------------------ ##
4452## Report this to bug-autoconf@gnu.org. ##
4453## ------------------------------------ ##
4454_ASBOX
4455 ) |
4456 sed "s/^/$as_me: WARNING: /" >&2
4457 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004458 no:yes )
4459 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4460echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4461 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4462echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4463 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004464echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4465 (
4466 cat <<\_ASBOX
4467## ------------------------------------ ##
4468## Report this to bug-autoconf@gnu.org. ##
4469## ------------------------------------ ##
4470_ASBOX
4471 ) |
4472 sed "s/^/$as_me: WARNING: /" >&2
4473 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004474esac
4475echo "$as_me:$LINENO: checking for $ac_header" >&5
4476echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4477if eval "test \"\${$as_ac_Header+set}\" = set"; then
4478 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004479else
Martin v. Löwis11437992002-04-12 09:54:03 +00004480 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004482echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4483echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4484
4485fi
4486if test `eval echo '${'$as_ac_Header'}'` = yes; then
4487 cat >>confdefs.h <<_ACEOF
4488#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4489_ACEOF
4490
4491fi
4492
Guido van Rossum627b2d71993-12-24 10:39:16 +00004493done
4494
Martin v. Löwis11437992002-04-12 09:54:03 +00004495
4496
4497
4498
4499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004501for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4502 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4503echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4504echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4505if eval "test \"\${$as_ac_Header+set}\" = set"; then
4506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004507else
Martin v. Löwis11437992002-04-12 09:54:03 +00004508 cat >conftest.$ac_ext <<_ACEOF
4509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004510/* confdefs.h. */
4511_ACEOF
4512cat confdefs.h >>conftest.$ac_ext
4513cat >>conftest.$ac_ext <<_ACEOF
4514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515#include <sys/types.h>
4516#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004517
Martin v. Löwis11437992002-04-12 09:54:03 +00004518int
4519main ()
4520{
4521if ((DIR *) 0)
4522return 0;
4523 ;
4524 return 0;
4525}
4526_ACEOF
4527rm -f conftest.$ac_objext
4528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4529 (eval $ac_compile) 2>&5
4530 ac_status=$?
4531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532 (exit $ac_status); } &&
4533 { ac_try='test -s conftest.$ac_objext'
4534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4535 (eval $ac_try) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); }; }; then
4539 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004540else
Martin v. Löwis11437992002-04-12 09:54:03 +00004541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004542sed 's/^/| /' conftest.$ac_ext >&5
4543
Martin v. Löwis11437992002-04-12 09:54:03 +00004544eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004546rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004548echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4549echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4550if test `eval echo '${'$as_ac_Header'}'` = yes; then
4551 cat >>confdefs.h <<_ACEOF
4552#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4553_ACEOF
4554
4555ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004557
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004558done
4559# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4560if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004561 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4562echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4563if test "${ac_cv_search_opendir+set}" = set; then
4564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565else
Martin v. Löwis11437992002-04-12 09:54:03 +00004566 ac_func_search_save_LIBS=$LIBS
4567ac_cv_search_opendir=no
4568cat >conftest.$ac_ext <<_ACEOF
4569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004570/* confdefs.h. */
4571_ACEOF
4572cat confdefs.h >>conftest.$ac_ext
4573cat >>conftest.$ac_ext <<_ACEOF
4574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004575
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004576/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004577#ifdef __cplusplus
4578extern "C"
4579#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004580/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004581 builtin and then its argument prototype would still apply. */
4582char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004583int
4584main ()
4585{
4586opendir ();
4587 ;
4588 return 0;
4589}
4590_ACEOF
4591rm -f conftest.$ac_objext conftest$ac_exeext
4592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4593 (eval $ac_link) 2>&5
4594 ac_status=$?
4595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4596 (exit $ac_status); } &&
4597 { ac_try='test -s conftest$ac_exeext'
4598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4599 (eval $ac_try) 2>&5
4600 ac_status=$?
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); }; }; then
4603 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604else
Martin v. Löwis11437992002-04-12 09:54:03 +00004605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004606sed 's/^/| /' conftest.$ac_ext >&5
4607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004609rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4610if test "$ac_cv_search_opendir" = no; then
4611 for ac_lib in dir; do
4612 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4613 cat >conftest.$ac_ext <<_ACEOF
4614#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004615/* confdefs.h. */
4616_ACEOF
4617cat confdefs.h >>conftest.$ac_ext
4618cat >>conftest.$ac_ext <<_ACEOF
4619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004620
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004621/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004622#ifdef __cplusplus
4623extern "C"
4624#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004625/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004626 builtin and then its argument prototype would still apply. */
4627char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004628int
4629main ()
4630{
4631opendir ();
4632 ;
4633 return 0;
4634}
4635_ACEOF
4636rm -f conftest.$ac_objext conftest$ac_exeext
4637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4638 (eval $ac_link) 2>&5
4639 ac_status=$?
4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641 (exit $ac_status); } &&
4642 { ac_try='test -s conftest$ac_exeext'
4643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4644 (eval $ac_try) 2>&5
4645 ac_status=$?
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); }; }; then
4648 ac_cv_search_opendir="-l$ac_lib"
4649break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650else
Martin v. Löwis11437992002-04-12 09:54:03 +00004651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004652sed 's/^/| /' conftest.$ac_ext >&5
4653
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4656 done
4657fi
4658LIBS=$ac_func_search_save_LIBS
4659fi
4660echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4661echo "${ECHO_T}$ac_cv_search_opendir" >&6
4662if test "$ac_cv_search_opendir" != no; then
4663 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004664
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004666
Michael W. Hudson54241132001-12-07 15:38:26 +00004667else
Martin v. Löwis11437992002-04-12 09:54:03 +00004668 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4669echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4670if test "${ac_cv_search_opendir+set}" = set; then
4671 echo $ECHO_N "(cached) $ECHO_C" >&6
4672else
4673 ac_func_search_save_LIBS=$LIBS
4674ac_cv_search_opendir=no
4675cat >conftest.$ac_ext <<_ACEOF
4676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004677/* confdefs.h. */
4678_ACEOF
4679cat confdefs.h >>conftest.$ac_ext
4680cat >>conftest.$ac_ext <<_ACEOF
4681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004682
4683/* Override any gcc2 internal prototype to avoid an error. */
4684#ifdef __cplusplus
4685extern "C"
4686#endif
4687/* We use char because int might match the return type of a gcc2
4688 builtin and then its argument prototype would still apply. */
4689char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004690int
4691main ()
4692{
4693opendir ();
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698rm -f conftest.$ac_objext conftest$ac_exeext
4699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4700 (eval $ac_link) 2>&5
4701 ac_status=$?
4702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4703 (exit $ac_status); } &&
4704 { ac_try='test -s conftest$ac_exeext'
4705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4706 (eval $ac_try) 2>&5
4707 ac_status=$?
4708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4709 (exit $ac_status); }; }; then
4710 ac_cv_search_opendir="none required"
4711else
4712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004713sed 's/^/| /' conftest.$ac_ext >&5
4714
Martin v. Löwis11437992002-04-12 09:54:03 +00004715fi
4716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4717if test "$ac_cv_search_opendir" = no; then
4718 for ac_lib in x; do
4719 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4720 cat >conftest.$ac_ext <<_ACEOF
4721#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004722/* confdefs.h. */
4723_ACEOF
4724cat confdefs.h >>conftest.$ac_ext
4725cat >>conftest.$ac_ext <<_ACEOF
4726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004727
4728/* Override any gcc2 internal prototype to avoid an error. */
4729#ifdef __cplusplus
4730extern "C"
4731#endif
4732/* We use char because int might match the return type of a gcc2
4733 builtin and then its argument prototype would still apply. */
4734char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004735int
4736main ()
4737{
4738opendir ();
4739 ;
4740 return 0;
4741}
4742_ACEOF
4743rm -f conftest.$ac_objext conftest$ac_exeext
4744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4745 (eval $ac_link) 2>&5
4746 ac_status=$?
4747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4748 (exit $ac_status); } &&
4749 { ac_try='test -s conftest$ac_exeext'
4750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4751 (eval $ac_try) 2>&5
4752 ac_status=$?
4753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4754 (exit $ac_status); }; }; then
4755 ac_cv_search_opendir="-l$ac_lib"
4756break
4757else
4758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004759sed 's/^/| /' conftest.$ac_ext >&5
4760
Martin v. Löwis11437992002-04-12 09:54:03 +00004761fi
4762rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4763 done
4764fi
4765LIBS=$ac_func_search_save_LIBS
4766fi
4767echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4768echo "${ECHO_T}$ac_cv_search_opendir" >&6
4769if test "$ac_cv_search_opendir" != no; then
4770 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4771
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004772fi
4773
4774fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004775
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004776echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4777echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4778if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4779 echo $ECHO_N "(cached) $ECHO_C" >&6
4780else
4781 cat >conftest.$ac_ext <<_ACEOF
4782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004783/* confdefs.h. */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004788#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004789int
4790main ()
4791{
4792return makedev(0, 0);
4793 ;
4794 return 0;
4795}
4796_ACEOF
4797rm -f conftest.$ac_objext conftest$ac_exeext
4798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4799 (eval $ac_link) 2>&5
4800 ac_status=$?
4801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4802 (exit $ac_status); } &&
4803 { ac_try='test -s conftest$ac_exeext'
4804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4805 (eval $ac_try) 2>&5
4806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); }; }; then
4809 ac_cv_header_sys_types_h_makedev=yes
4810else
4811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004812sed 's/^/| /' conftest.$ac_ext >&5
4813
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004814ac_cv_header_sys_types_h_makedev=no
4815fi
4816rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4817
4818fi
4819echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4820echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4821
4822if test $ac_cv_header_sys_types_h_makedev = no; then
4823if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4824 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4825echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4826if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4827 echo $ECHO_N "(cached) $ECHO_C" >&6
4828fi
4829echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4830echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4831else
4832 # Is the header compilable?
4833echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4834echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4835cat >conftest.$ac_ext <<_ACEOF
4836#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004837/* confdefs.h. */
4838_ACEOF
4839cat confdefs.h >>conftest.$ac_ext
4840cat >>conftest.$ac_ext <<_ACEOF
4841/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004842$ac_includes_default
4843#include <sys/mkdev.h>
4844_ACEOF
4845rm -f conftest.$ac_objext
4846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4847 (eval $ac_compile) 2>&5
4848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); } &&
4851 { ac_try='test -s conftest.$ac_objext'
4852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4853 (eval $ac_try) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); }; }; then
4857 ac_header_compiler=yes
4858else
4859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004860sed 's/^/| /' conftest.$ac_ext >&5
4861
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004862ac_header_compiler=no
4863fi
4864rm -f conftest.$ac_objext conftest.$ac_ext
4865echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4866echo "${ECHO_T}$ac_header_compiler" >&6
4867
4868# Is the header present?
4869echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4870echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4871cat >conftest.$ac_ext <<_ACEOF
4872#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004873/* confdefs.h. */
4874_ACEOF
4875cat confdefs.h >>conftest.$ac_ext
4876cat >>conftest.$ac_ext <<_ACEOF
4877/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004878#include <sys/mkdev.h>
4879_ACEOF
4880if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4881 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4882 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004883 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004884 rm -f conftest.er1
4885 cat conftest.err >&5
4886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4887 (exit $ac_status); } >/dev/null; then
4888 if test -s conftest.err; then
4889 ac_cpp_err=$ac_c_preproc_warn_flag
4890 else
4891 ac_cpp_err=
4892 fi
4893else
4894 ac_cpp_err=yes
4895fi
4896if test -z "$ac_cpp_err"; then
4897 ac_header_preproc=yes
4898else
4899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004900sed 's/^/| /' conftest.$ac_ext >&5
4901
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004902 ac_header_preproc=no
4903fi
4904rm -f conftest.err conftest.$ac_ext
4905echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4906echo "${ECHO_T}$ac_header_preproc" >&6
4907
4908# So? What about this header?
4909case $ac_header_compiler:$ac_header_preproc in
4910 yes:no )
4911 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4912echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4913 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004914echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4915 (
4916 cat <<\_ASBOX
4917## ------------------------------------ ##
4918## Report this to bug-autoconf@gnu.org. ##
4919## ------------------------------------ ##
4920_ASBOX
4921 ) |
4922 sed "s/^/$as_me: WARNING: /" >&2
4923 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004924 no:yes )
4925 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4926echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4927 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4928echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4929 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004930echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4931 (
4932 cat <<\_ASBOX
4933## ------------------------------------ ##
4934## Report this to bug-autoconf@gnu.org. ##
4935## ------------------------------------ ##
4936_ASBOX
4937 ) |
4938 sed "s/^/$as_me: WARNING: /" >&2
4939 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004940esac
4941echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4942echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4943if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4944 echo $ECHO_N "(cached) $ECHO_C" >&6
4945else
4946 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4947fi
4948echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4949echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4950
4951fi
4952if test $ac_cv_header_sys_mkdev_h = yes; then
4953
4954cat >>confdefs.h <<\_ACEOF
4955#define MAJOR_IN_MKDEV 1
4956_ACEOF
4957
4958fi
4959
4960
4961
4962 if test $ac_cv_header_sys_mkdev_h = no; then
4963 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4964 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4965echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4966if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4967 echo $ECHO_N "(cached) $ECHO_C" >&6
4968fi
4969echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4970echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4971else
4972 # Is the header compilable?
4973echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4974echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4975cat >conftest.$ac_ext <<_ACEOF
4976#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004977/* confdefs.h. */
4978_ACEOF
4979cat confdefs.h >>conftest.$ac_ext
4980cat >>conftest.$ac_ext <<_ACEOF
4981/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004982$ac_includes_default
4983#include <sys/sysmacros.h>
4984_ACEOF
4985rm -f conftest.$ac_objext
4986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4987 (eval $ac_compile) 2>&5
4988 ac_status=$?
4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 (exit $ac_status); } &&
4991 { ac_try='test -s conftest.$ac_objext'
4992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4993 (eval $ac_try) 2>&5
4994 ac_status=$?
4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996 (exit $ac_status); }; }; then
4997 ac_header_compiler=yes
4998else
4999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005000sed 's/^/| /' conftest.$ac_ext >&5
5001
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005002ac_header_compiler=no
5003fi
5004rm -f conftest.$ac_objext conftest.$ac_ext
5005echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5006echo "${ECHO_T}$ac_header_compiler" >&6
5007
5008# Is the header present?
5009echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5010echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5011cat >conftest.$ac_ext <<_ACEOF
5012#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005013/* confdefs.h. */
5014_ACEOF
5015cat confdefs.h >>conftest.$ac_ext
5016cat >>conftest.$ac_ext <<_ACEOF
5017/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005018#include <sys/sysmacros.h>
5019_ACEOF
5020if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5021 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5022 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005023 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005024 rm -f conftest.er1
5025 cat conftest.err >&5
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); } >/dev/null; then
5028 if test -s conftest.err; then
5029 ac_cpp_err=$ac_c_preproc_warn_flag
5030 else
5031 ac_cpp_err=
5032 fi
5033else
5034 ac_cpp_err=yes
5035fi
5036if test -z "$ac_cpp_err"; then
5037 ac_header_preproc=yes
5038else
5039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005040sed 's/^/| /' conftest.$ac_ext >&5
5041
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005042 ac_header_preproc=no
5043fi
5044rm -f conftest.err conftest.$ac_ext
5045echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5046echo "${ECHO_T}$ac_header_preproc" >&6
5047
5048# So? What about this header?
5049case $ac_header_compiler:$ac_header_preproc in
5050 yes:no )
5051 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5052echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5053 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005054echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5055 (
5056 cat <<\_ASBOX
5057## ------------------------------------ ##
5058## Report this to bug-autoconf@gnu.org. ##
5059## ------------------------------------ ##
5060_ASBOX
5061 ) |
5062 sed "s/^/$as_me: WARNING: /" >&2
5063 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005064 no:yes )
5065 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5066echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5067 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5068echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5069 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005070echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5071 (
5072 cat <<\_ASBOX
5073## ------------------------------------ ##
5074## Report this to bug-autoconf@gnu.org. ##
5075## ------------------------------------ ##
5076_ASBOX
5077 ) |
5078 sed "s/^/$as_me: WARNING: /" >&2
5079 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005080esac
5081echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5082echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5083if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
5085else
5086 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5087fi
5088echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5089echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5090
5091fi
5092if test $ac_cv_header_sys_sysmacros_h = yes; then
5093
5094cat >>confdefs.h <<\_ACEOF
5095#define MAJOR_IN_SYSMACROS 1
5096_ACEOF
5097
5098fi
5099
5100
5101 fi
5102fi
5103
Michael W. Hudson54241132001-12-07 15:38:26 +00005104
Guido van Rossum627b2d71993-12-24 10:39:16 +00005105# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005106was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005107echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5108echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5109cat >conftest.$ac_ext <<_ACEOF
5110#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005111/* confdefs.h. */
5112_ACEOF
5113cat confdefs.h >>conftest.$ac_ext
5114cat >>conftest.$ac_ext <<_ACEOF
5115/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005117
5118_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005120 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005121 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005122else
Martin v. Löwis11437992002-04-12 09:54:03 +00005123
5124
5125cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005127_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005128
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005129
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130fi
5131rm -f conftest*
5132
Martin v. Löwis11437992002-04-12 09:54:03 +00005133echo "$as_me:$LINENO: result: $was_it_defined" >&5
5134echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005135
Neal Norwitz11690112002-07-30 01:08:28 +00005136# Check whether using makedev requires defining _OSF_SOURCE
5137echo "$as_me:$LINENO: checking for makedev" >&5
5138echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5139cat >conftest.$ac_ext <<_ACEOF
5140#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005141/* confdefs.h. */
5142_ACEOF
5143cat confdefs.h >>conftest.$ac_ext
5144cat >>conftest.$ac_ext <<_ACEOF
5145/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005146#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005147int
5148main ()
5149{
5150 makedev(0, 0)
5151 ;
5152 return 0;
5153}
5154_ACEOF
5155rm -f conftest.$ac_objext conftest$ac_exeext
5156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5157 (eval $ac_link) 2>&5
5158 ac_status=$?
5159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160 (exit $ac_status); } &&
5161 { ac_try='test -s conftest$ac_exeext'
5162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5163 (eval $ac_try) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
5167 ac_cv_has_makedev=yes
5168else
5169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005170sed 's/^/| /' conftest.$ac_ext >&5
5171
Neal Norwitz11690112002-07-30 01:08:28 +00005172ac_cv_has_makedev=no
5173fi
5174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5175if test "$ac_cv_has_makedev" = "no"; then
5176 # we didn't link, try if _OSF_SOURCE will allow us to link
5177 cat >conftest.$ac_ext <<_ACEOF
5178#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005179/* confdefs.h. */
5180_ACEOF
5181cat confdefs.h >>conftest.$ac_ext
5182cat >>conftest.$ac_ext <<_ACEOF
5183/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005184
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005185#define _OSF_SOURCE 1
5186#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005187
Neal Norwitz11690112002-07-30 01:08:28 +00005188int
5189main ()
5190{
5191 makedev(0, 0)
5192 ;
5193 return 0;
5194}
5195_ACEOF
5196rm -f conftest.$ac_objext conftest$ac_exeext
5197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5198 (eval $ac_link) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); } &&
5202 { ac_try='test -s conftest$ac_exeext'
5203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5204 (eval $ac_try) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); }; }; then
5208 ac_cv_has_makedev=yes
5209else
5210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005211sed 's/^/| /' conftest.$ac_ext >&5
5212
Neal Norwitz11690112002-07-30 01:08:28 +00005213ac_cv_has_makedev=no
5214fi
5215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5216 if test "$ac_cv_has_makedev" = "yes"; then
5217
5218cat >>confdefs.h <<\_ACEOF
5219#define _OSF_SOURCE 1
5220_ACEOF
5221
5222 fi
5223fi
5224echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5225echo "${ECHO_T}$ac_cv_has_makedev" >&6
5226if test "$ac_cv_has_makedev" = "yes"; then
5227
5228cat >>confdefs.h <<\_ACEOF
5229#define HAVE_MAKEDEV 1
5230_ACEOF
5231
5232fi
5233
Martin v. Löwis399a6892002-10-04 10:22:02 +00005234# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5235# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5236# defined, but the compiler does not support pragma redefine_extname,
5237# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5238# structures (such as rlimit64) without declaring them. As a
5239# work-around, disable LFS on such configurations
5240
5241use_lfs=yes
5242echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5243echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5244cat >conftest.$ac_ext <<_ACEOF
5245#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005246/* confdefs.h. */
5247_ACEOF
5248cat confdefs.h >>conftest.$ac_ext
5249cat >>conftest.$ac_ext <<_ACEOF
5250/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005251
5252#define _LARGEFILE_SOURCE 1
5253#define _FILE_OFFSET_BITS 64
5254#include <sys/resource.h>
5255
Martin v. Löwis399a6892002-10-04 10:22:02 +00005256int
5257main ()
5258{
5259struct rlimit foo;
5260 ;
5261 return 0;
5262}
5263_ACEOF
5264rm -f conftest.$ac_objext
5265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5266 (eval $ac_compile) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); } &&
5270 { ac_try='test -s conftest.$ac_objext'
5271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5272 (eval $ac_try) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); }; }; then
5276 sol_lfs_bug=no
5277else
5278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005279sed 's/^/| /' conftest.$ac_ext >&5
5280
Martin v. Löwis399a6892002-10-04 10:22:02 +00005281sol_lfs_bug=yes
5282fi
5283rm -f conftest.$ac_objext conftest.$ac_ext
5284echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5285echo "${ECHO_T}$sol_lfs_bug" >&6
5286if test "$sol_lfs_bug" = "yes"; then
5287 use_lfs=no
5288fi
5289
5290if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005291# Two defines needed to enable largefile support on various platforms
5292# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005293
Martin v. Löwis11437992002-04-12 09:54:03 +00005294cat >>confdefs.h <<\_ACEOF
5295#define _LARGEFILE_SOURCE 1
5296_ACEOF
5297
5298
5299cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005300#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005301_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005302
Martin v. Löwis399a6892002-10-04 10:22:02 +00005303fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005304
Guido van Rossum84e7b241996-08-19 21:59:00 +00005305# Add some code to confdefs.h so that the test for off_t works on SCO
5306cat >> confdefs.h <<\EOF
5307#if defined(SCO_DS)
5308#undef _OFF_T
5309#endif
5310EOF
5311
Guido van Rossumef2255b2000-03-10 22:30:29 +00005312# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005313echo "$as_me:$LINENO: checking for mode_t" >&5
5314echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5315if test "${ac_cv_type_mode_t+set}" = set; then
5316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005317else
Martin v. Löwis11437992002-04-12 09:54:03 +00005318 cat >conftest.$ac_ext <<_ACEOF
5319#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005320/* confdefs.h. */
5321_ACEOF
5322cat confdefs.h >>conftest.$ac_ext
5323cat >>conftest.$ac_ext <<_ACEOF
5324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005325$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005326int
5327main ()
5328{
5329if ((mode_t *) 0)
5330 return 0;
5331if (sizeof (mode_t))
5332 return 0;
5333 ;
5334 return 0;
5335}
5336_ACEOF
5337rm -f conftest.$ac_objext
5338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5339 (eval $ac_compile) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); } &&
5343 { ac_try='test -s conftest.$ac_objext'
5344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5345 (eval $ac_try) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005349 ac_cv_type_mode_t=yes
5350else
Martin v. Löwis11437992002-04-12 09:54:03 +00005351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005352sed 's/^/| /' conftest.$ac_ext >&5
5353
Martin v. Löwis11437992002-04-12 09:54:03 +00005354ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005356rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005358echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5359echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5360if test $ac_cv_type_mode_t = yes; then
5361 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005362else
Martin v. Löwis11437992002-04-12 09:54:03 +00005363
5364cat >>confdefs.h <<_ACEOF
5365#define mode_t int
5366_ACEOF
5367
5368fi
5369
5370echo "$as_me:$LINENO: checking for off_t" >&5
5371echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5372if test "${ac_cv_type_off_t+set}" = set; then
5373 echo $ECHO_N "(cached) $ECHO_C" >&6
5374else
5375 cat >conftest.$ac_ext <<_ACEOF
5376#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005377/* confdefs.h. */
5378_ACEOF
5379cat confdefs.h >>conftest.$ac_ext
5380cat >>conftest.$ac_ext <<_ACEOF
5381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005383int
5384main ()
5385{
5386if ((off_t *) 0)
5387 return 0;
5388if (sizeof (off_t))
5389 return 0;
5390 ;
5391 return 0;
5392}
5393_ACEOF
5394rm -f conftest.$ac_objext
5395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5396 (eval $ac_compile) 2>&5
5397 ac_status=$?
5398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399 (exit $ac_status); } &&
5400 { ac_try='test -s conftest.$ac_objext'
5401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5402 (eval $ac_try) 2>&5
5403 ac_status=$?
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005406 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005407else
Martin v. Löwis11437992002-04-12 09:54:03 +00005408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005409sed 's/^/| /' conftest.$ac_ext >&5
5410
Martin v. Löwis11437992002-04-12 09:54:03 +00005411ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005413rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005415echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5416echo "${ECHO_T}$ac_cv_type_off_t" >&6
5417if test $ac_cv_type_off_t = yes; then
5418 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419else
Martin v. Löwis11437992002-04-12 09:54:03 +00005420
5421cat >>confdefs.h <<_ACEOF
5422#define off_t long
5423_ACEOF
5424
5425fi
5426
5427echo "$as_me:$LINENO: checking for pid_t" >&5
5428echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5429if test "${ac_cv_type_pid_t+set}" = set; then
5430 echo $ECHO_N "(cached) $ECHO_C" >&6
5431else
5432 cat >conftest.$ac_ext <<_ACEOF
5433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005434/* confdefs.h. */
5435_ACEOF
5436cat confdefs.h >>conftest.$ac_ext
5437cat >>conftest.$ac_ext <<_ACEOF
5438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005439$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005440int
5441main ()
5442{
5443if ((pid_t *) 0)
5444 return 0;
5445if (sizeof (pid_t))
5446 return 0;
5447 ;
5448 return 0;
5449}
5450_ACEOF
5451rm -f conftest.$ac_objext
5452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5453 (eval $ac_compile) 2>&5
5454 ac_status=$?
5455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456 (exit $ac_status); } &&
5457 { ac_try='test -s conftest.$ac_objext'
5458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5459 (eval $ac_try) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005463 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005464else
Martin v. Löwis11437992002-04-12 09:54:03 +00005465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005466sed 's/^/| /' conftest.$ac_ext >&5
5467
Martin v. Löwis11437992002-04-12 09:54:03 +00005468ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005469fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005470rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005472echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5473echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5474if test $ac_cv_type_pid_t = yes; then
5475 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005476else
Martin v. Löwis11437992002-04-12 09:54:03 +00005477
5478cat >>confdefs.h <<_ACEOF
5479#define pid_t int
5480_ACEOF
5481
5482fi
5483
5484echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5485echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5486if test "${ac_cv_type_signal+set}" = set; then
5487 echo $ECHO_N "(cached) $ECHO_C" >&6
5488else
5489 cat >conftest.$ac_ext <<_ACEOF
5490#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005491/* confdefs.h. */
5492_ACEOF
5493cat confdefs.h >>conftest.$ac_ext
5494cat >>conftest.$ac_ext <<_ACEOF
5495/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005496#include <sys/types.h>
5497#include <signal.h>
5498#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005499# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005500#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005501#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005502extern "C" void (*signal (int, void (*)(int)))(int);
5503#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005504void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005505#endif
5506
Martin v. Löwis11437992002-04-12 09:54:03 +00005507int
5508main ()
5509{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005510int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005511 ;
5512 return 0;
5513}
5514_ACEOF
5515rm -f conftest.$ac_objext
5516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5517 (eval $ac_compile) 2>&5
5518 ac_status=$?
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); } &&
5521 { ac_try='test -s conftest.$ac_objext'
5522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5523 (eval $ac_try) 2>&5
5524 ac_status=$?
5525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5526 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005527 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005528else
Martin v. Löwis11437992002-04-12 09:54:03 +00005529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005530sed 's/^/| /' conftest.$ac_ext >&5
5531
Martin v. Löwis11437992002-04-12 09:54:03 +00005532ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005534rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005536echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5537echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005538
Martin v. Löwis11437992002-04-12 09:54:03 +00005539cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005540#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005541_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005542
Michael W. Hudson54241132001-12-07 15:38:26 +00005543
Martin v. Löwis11437992002-04-12 09:54:03 +00005544echo "$as_me:$LINENO: checking for size_t" >&5
5545echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5546if test "${ac_cv_type_size_t+set}" = set; then
5547 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548else
Martin v. Löwis11437992002-04-12 09:54:03 +00005549 cat >conftest.$ac_ext <<_ACEOF
5550#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005551/* confdefs.h. */
5552_ACEOF
5553cat confdefs.h >>conftest.$ac_ext
5554cat >>conftest.$ac_ext <<_ACEOF
5555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005556$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005557int
5558main ()
5559{
5560if ((size_t *) 0)
5561 return 0;
5562if (sizeof (size_t))
5563 return 0;
5564 ;
5565 return 0;
5566}
5567_ACEOF
5568rm -f conftest.$ac_objext
5569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5570 (eval $ac_compile) 2>&5
5571 ac_status=$?
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573 (exit $ac_status); } &&
5574 { ac_try='test -s conftest.$ac_objext'
5575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576 (eval $ac_try) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005580 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005581else
Martin v. Löwis11437992002-04-12 09:54:03 +00005582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005583sed 's/^/| /' conftest.$ac_ext >&5
5584
Martin v. Löwis11437992002-04-12 09:54:03 +00005585ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005587rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005589echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5590echo "${ECHO_T}$ac_cv_type_size_t" >&6
5591if test $ac_cv_type_size_t = yes; then
5592 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005593else
Martin v. Löwis11437992002-04-12 09:54:03 +00005594
5595cat >>confdefs.h <<_ACEOF
5596#define size_t unsigned
5597_ACEOF
5598
5599fi
5600
5601echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5602echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5603if test "${ac_cv_type_uid_t+set}" = set; then
5604 echo $ECHO_N "(cached) $ECHO_C" >&6
5605else
5606 cat >conftest.$ac_ext <<_ACEOF
5607#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005608/* confdefs.h. */
5609_ACEOF
5610cat confdefs.h >>conftest.$ac_ext
5611cat >>conftest.$ac_ext <<_ACEOF
5612/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005613#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005614
5615_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005617 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005618 ac_cv_type_uid_t=yes
5619else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005620 ac_cv_type_uid_t=no
5621fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005622rm -f conftest*
5623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005625echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5626echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005627if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628
Martin v. Löwis11437992002-04-12 09:54:03 +00005629cat >>confdefs.h <<\_ACEOF
5630#define uid_t int
5631_ACEOF
5632
5633
5634cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005636_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005637
5638fi
5639
Jack Jansendd19cf82001-12-06 22:36:17 +00005640
Michael W. Hudson54241132001-12-07 15:38:26 +00005641# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005642# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005643echo "$as_me:$LINENO: checking for int" >&5
5644echo $ECHO_N "checking for int... $ECHO_C" >&6
5645if test "${ac_cv_type_int+set}" = set; then
5646 echo $ECHO_N "(cached) $ECHO_C" >&6
5647else
5648 cat >conftest.$ac_ext <<_ACEOF
5649#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005650/* confdefs.h. */
5651_ACEOF
5652cat confdefs.h >>conftest.$ac_ext
5653cat >>conftest.$ac_ext <<_ACEOF
5654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005655$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005656int
5657main ()
5658{
5659if ((int *) 0)
5660 return 0;
5661if (sizeof (int))
5662 return 0;
5663 ;
5664 return 0;
5665}
5666_ACEOF
5667rm -f conftest.$ac_objext
5668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5669 (eval $ac_compile) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); } &&
5673 { ac_try='test -s conftest.$ac_objext'
5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); }; }; then
5679 ac_cv_type_int=yes
5680else
5681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005682sed 's/^/| /' conftest.$ac_ext >&5
5683
Martin v. Löwis11437992002-04-12 09:54:03 +00005684ac_cv_type_int=no
5685fi
5686rm -f conftest.$ac_objext conftest.$ac_ext
5687fi
5688echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5689echo "${ECHO_T}$ac_cv_type_int" >&6
5690
5691echo "$as_me:$LINENO: checking size of int" >&5
5692echo $ECHO_N "checking size of int... $ECHO_C" >&6
5693if test "${ac_cv_sizeof_int+set}" = set; then
5694 echo $ECHO_N "(cached) $ECHO_C" >&6
5695else
5696 if test "$ac_cv_type_int" = yes; then
5697 # The cast to unsigned long works around a bug in the HP C Compiler
5698 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5699 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5700 # This bug is HP SR number 8606223364.
5701 if test "$cross_compiling" = yes; then
5702 # Depending upon the size, compute the lo and hi bounds.
5703cat >conftest.$ac_ext <<_ACEOF
5704#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005705/* confdefs.h. */
5706_ACEOF
5707cat confdefs.h >>conftest.$ac_ext
5708cat >>conftest.$ac_ext <<_ACEOF
5709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005710$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005711int
5712main ()
5713{
5714static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5715test_array [0] = 0
5716
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5723 (eval $ac_compile) 2>&5
5724 ac_status=$?
5725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726 (exit $ac_status); } &&
5727 { ac_try='test -s conftest.$ac_objext'
5728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5733 ac_lo=0 ac_mid=0
5734 while :; do
5735 cat >conftest.$ac_ext <<_ACEOF
5736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005737/* confdefs.h. */
5738_ACEOF
5739cat confdefs.h >>conftest.$ac_ext
5740cat >>conftest.$ac_ext <<_ACEOF
5741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005742$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005743int
5744main ()
5745{
5746static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5747test_array [0] = 0
5748
5749 ;
5750 return 0;
5751}
5752_ACEOF
5753rm -f conftest.$ac_objext
5754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5755 (eval $ac_compile) 2>&5
5756 ac_status=$?
5757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758 (exit $ac_status); } &&
5759 { ac_try='test -s conftest.$ac_objext'
5760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761 (eval $ac_try) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); }; }; then
5765 ac_hi=$ac_mid; break
5766else
5767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005768sed 's/^/| /' conftest.$ac_ext >&5
5769
Martin v. Löwis11437992002-04-12 09:54:03 +00005770ac_lo=`expr $ac_mid + 1`
5771 if test $ac_lo -le $ac_mid; then
5772 ac_lo= ac_hi=
5773 break
5774 fi
5775 ac_mid=`expr 2 '*' $ac_mid + 1`
5776fi
5777rm -f conftest.$ac_objext conftest.$ac_ext
5778 done
5779else
5780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005781sed 's/^/| /' conftest.$ac_ext >&5
5782
Martin v. Löwis11437992002-04-12 09:54:03 +00005783cat >conftest.$ac_ext <<_ACEOF
5784#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005785/* confdefs.h. */
5786_ACEOF
5787cat confdefs.h >>conftest.$ac_ext
5788cat >>conftest.$ac_ext <<_ACEOF
5789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005791int
5792main ()
5793{
5794static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5795test_array [0] = 0
5796
5797 ;
5798 return 0;
5799}
5800_ACEOF
5801rm -f conftest.$ac_objext
5802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5803 (eval $ac_compile) 2>&5
5804 ac_status=$?
5805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5806 (exit $ac_status); } &&
5807 { ac_try='test -s conftest.$ac_objext'
5808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5809 (eval $ac_try) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); }; }; then
5813 ac_hi=-1 ac_mid=-1
5814 while :; do
5815 cat >conftest.$ac_ext <<_ACEOF
5816#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005817/* confdefs.h. */
5818_ACEOF
5819cat confdefs.h >>conftest.$ac_ext
5820cat >>conftest.$ac_ext <<_ACEOF
5821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005822$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005823int
5824main ()
5825{
5826static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5827test_array [0] = 0
5828
5829 ;
5830 return 0;
5831}
5832_ACEOF
5833rm -f conftest.$ac_objext
5834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5835 (eval $ac_compile) 2>&5
5836 ac_status=$?
5837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5838 (exit $ac_status); } &&
5839 { ac_try='test -s conftest.$ac_objext'
5840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5841 (eval $ac_try) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); }; }; then
5845 ac_lo=$ac_mid; break
5846else
5847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005848sed 's/^/| /' conftest.$ac_ext >&5
5849
Martin v. Löwis11437992002-04-12 09:54:03 +00005850ac_hi=`expr '(' $ac_mid ')' - 1`
5851 if test $ac_mid -le $ac_hi; then
5852 ac_lo= ac_hi=
5853 break
5854 fi
5855 ac_mid=`expr 2 '*' $ac_mid`
5856fi
5857rm -f conftest.$ac_objext conftest.$ac_ext
5858 done
5859else
5860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005861sed 's/^/| /' conftest.$ac_ext >&5
5862
Martin v. Löwis11437992002-04-12 09:54:03 +00005863ac_lo= ac_hi=
5864fi
5865rm -f conftest.$ac_objext conftest.$ac_ext
5866fi
5867rm -f conftest.$ac_objext conftest.$ac_ext
5868# Binary search between lo and hi bounds.
5869while test "x$ac_lo" != "x$ac_hi"; do
5870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5871 cat >conftest.$ac_ext <<_ACEOF
5872#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005873/* confdefs.h. */
5874_ACEOF
5875cat confdefs.h >>conftest.$ac_ext
5876cat >>conftest.$ac_ext <<_ACEOF
5877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005878$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005879int
5880main ()
5881{
5882static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5883test_array [0] = 0
5884
5885 ;
5886 return 0;
5887}
5888_ACEOF
5889rm -f conftest.$ac_objext
5890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5891 (eval $ac_compile) 2>&5
5892 ac_status=$?
5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894 (exit $ac_status); } &&
5895 { ac_try='test -s conftest.$ac_objext'
5896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897 (eval $ac_try) 2>&5
5898 ac_status=$?
5899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900 (exit $ac_status); }; }; then
5901 ac_hi=$ac_mid
5902else
5903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005904sed 's/^/| /' conftest.$ac_ext >&5
5905
Martin v. Löwis11437992002-04-12 09:54:03 +00005906ac_lo=`expr '(' $ac_mid ')' + 1`
5907fi
5908rm -f conftest.$ac_objext conftest.$ac_ext
5909done
5910case $ac_lo in
5911?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005912'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5913See \`config.log' for more details." >&5
5914echo "$as_me: error: cannot compute sizeof (int), 77
5915See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005916 { (exit 1); exit 1; }; } ;;
5917esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005918else
5919 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005920 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5921See \`config.log' for more details." >&5
5922echo "$as_me: error: cannot run test program while cross compiling
5923See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005925else
Martin v. Löwis11437992002-04-12 09:54:03 +00005926 cat >conftest.$ac_ext <<_ACEOF
5927#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005928/* confdefs.h. */
5929_ACEOF
5930cat confdefs.h >>conftest.$ac_ext
5931cat >>conftest.$ac_ext <<_ACEOF
5932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005933$ac_includes_default
5934long longval () { return (long) (sizeof (int)); }
5935unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005936#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005937#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005938int
5939main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005940{
Martin v. Löwis11437992002-04-12 09:54:03 +00005941
5942 FILE *f = fopen ("conftest.val", "w");
5943 if (! f)
5944 exit (1);
5945 if (((long) (sizeof (int))) < 0)
5946 {
5947 long i = longval ();
5948 if (i != ((long) (sizeof (int))))
5949 exit (1);
5950 fprintf (f, "%ld\n", i);
5951 }
5952 else
5953 {
5954 unsigned long i = ulongval ();
5955 if (i != ((long) (sizeof (int))))
5956 exit (1);
5957 fprintf (f, "%lu\n", i);
5958 }
5959 exit (ferror (f) || fclose (f) != 0);
5960
5961 ;
5962 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005963}
Martin v. Löwis11437992002-04-12 09:54:03 +00005964_ACEOF
5965rm -f conftest$ac_exeext
5966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5967 (eval $ac_link) 2>&5
5968 ac_status=$?
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5972 (eval $ac_try) 2>&5
5973 ac_status=$?
5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975 (exit $ac_status); }; }; then
5976 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005977else
Martin v. Löwis11437992002-04-12 09:54:03 +00005978 echo "$as_me: program exited with status $ac_status" >&5
5979echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005980sed 's/^/| /' conftest.$ac_ext >&5
5981
Martin v. Löwis11437992002-04-12 09:54:03 +00005982( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005983{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5984See \`config.log' for more details." >&5
5985echo "$as_me: error: cannot compute sizeof (int), 77
5986See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 { (exit 1); exit 1; }; }
5988fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005989rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005990fi
5991fi
5992rm -f conftest.val
5993else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005994 ac_cv_sizeof_int=0
5995fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005997echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5998echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5999cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006000#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006001_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006002
6003
Martin v. Löwis11437992002-04-12 09:54:03 +00006004echo "$as_me:$LINENO: checking for long" >&5
6005echo $ECHO_N "checking for long... $ECHO_C" >&6
6006if test "${ac_cv_type_long+set}" = set; then
6007 echo $ECHO_N "(cached) $ECHO_C" >&6
6008else
6009 cat >conftest.$ac_ext <<_ACEOF
6010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006011/* confdefs.h. */
6012_ACEOF
6013cat confdefs.h >>conftest.$ac_ext
6014cat >>conftest.$ac_ext <<_ACEOF
6015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006016$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006017int
6018main ()
6019{
6020if ((long *) 0)
6021 return 0;
6022if (sizeof (long))
6023 return 0;
6024 ;
6025 return 0;
6026}
6027_ACEOF
6028rm -f conftest.$ac_objext
6029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6030 (eval $ac_compile) 2>&5
6031 ac_status=$?
6032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6033 (exit $ac_status); } &&
6034 { ac_try='test -s conftest.$ac_objext'
6035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6036 (eval $ac_try) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); }; }; then
6040 ac_cv_type_long=yes
6041else
6042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006043sed 's/^/| /' conftest.$ac_ext >&5
6044
Martin v. Löwis11437992002-04-12 09:54:03 +00006045ac_cv_type_long=no
6046fi
6047rm -f conftest.$ac_objext conftest.$ac_ext
6048fi
6049echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6050echo "${ECHO_T}$ac_cv_type_long" >&6
6051
6052echo "$as_me:$LINENO: checking size of long" >&5
6053echo $ECHO_N "checking size of long... $ECHO_C" >&6
6054if test "${ac_cv_sizeof_long+set}" = set; then
6055 echo $ECHO_N "(cached) $ECHO_C" >&6
6056else
6057 if test "$ac_cv_type_long" = yes; then
6058 # The cast to unsigned long works around a bug in the HP C Compiler
6059 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6060 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6061 # This bug is HP SR number 8606223364.
6062 if test "$cross_compiling" = yes; then
6063 # Depending upon the size, compute the lo and hi bounds.
6064cat >conftest.$ac_ext <<_ACEOF
6065#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006066/* confdefs.h. */
6067_ACEOF
6068cat confdefs.h >>conftest.$ac_ext
6069cat >>conftest.$ac_ext <<_ACEOF
6070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006071$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006072int
6073main ()
6074{
6075static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6076test_array [0] = 0
6077
6078 ;
6079 return 0;
6080}
6081_ACEOF
6082rm -f conftest.$ac_objext
6083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6084 (eval $ac_compile) 2>&5
6085 ac_status=$?
6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6087 (exit $ac_status); } &&
6088 { ac_try='test -s conftest.$ac_objext'
6089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6090 (eval $ac_try) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); }; }; then
6094 ac_lo=0 ac_mid=0
6095 while :; do
6096 cat >conftest.$ac_ext <<_ACEOF
6097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006098/* confdefs.h. */
6099_ACEOF
6100cat confdefs.h >>conftest.$ac_ext
6101cat >>conftest.$ac_ext <<_ACEOF
6102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006103$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006104int
6105main ()
6106{
6107static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6108test_array [0] = 0
6109
6110 ;
6111 return 0;
6112}
6113_ACEOF
6114rm -f conftest.$ac_objext
6115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6116 (eval $ac_compile) 2>&5
6117 ac_status=$?
6118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6119 (exit $ac_status); } &&
6120 { ac_try='test -s conftest.$ac_objext'
6121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6122 (eval $ac_try) 2>&5
6123 ac_status=$?
6124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125 (exit $ac_status); }; }; then
6126 ac_hi=$ac_mid; break
6127else
6128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006129sed 's/^/| /' conftest.$ac_ext >&5
6130
Martin v. Löwis11437992002-04-12 09:54:03 +00006131ac_lo=`expr $ac_mid + 1`
6132 if test $ac_lo -le $ac_mid; then
6133 ac_lo= ac_hi=
6134 break
6135 fi
6136 ac_mid=`expr 2 '*' $ac_mid + 1`
6137fi
6138rm -f conftest.$ac_objext conftest.$ac_ext
6139 done
6140else
6141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006142sed 's/^/| /' conftest.$ac_ext >&5
6143
Martin v. Löwis11437992002-04-12 09:54:03 +00006144cat >conftest.$ac_ext <<_ACEOF
6145#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006146/* confdefs.h. */
6147_ACEOF
6148cat confdefs.h >>conftest.$ac_ext
6149cat >>conftest.$ac_ext <<_ACEOF
6150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006151$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006152int
6153main ()
6154{
6155static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6156test_array [0] = 0
6157
6158 ;
6159 return 0;
6160}
6161_ACEOF
6162rm -f conftest.$ac_objext
6163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6164 (eval $ac_compile) 2>&5
6165 ac_status=$?
6166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6167 (exit $ac_status); } &&
6168 { ac_try='test -s conftest.$ac_objext'
6169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6170 (eval $ac_try) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); }; }; then
6174 ac_hi=-1 ac_mid=-1
6175 while :; do
6176 cat >conftest.$ac_ext <<_ACEOF
6177#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006178/* confdefs.h. */
6179_ACEOF
6180cat confdefs.h >>conftest.$ac_ext
6181cat >>conftest.$ac_ext <<_ACEOF
6182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006183$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006184int
6185main ()
6186{
6187static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6188test_array [0] = 0
6189
6190 ;
6191 return 0;
6192}
6193_ACEOF
6194rm -f conftest.$ac_objext
6195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6196 (eval $ac_compile) 2>&5
6197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); } &&
6200 { ac_try='test -s conftest.$ac_objext'
6201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6202 (eval $ac_try) 2>&5
6203 ac_status=$?
6204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205 (exit $ac_status); }; }; then
6206 ac_lo=$ac_mid; break
6207else
6208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006209sed 's/^/| /' conftest.$ac_ext >&5
6210
Martin v. Löwis11437992002-04-12 09:54:03 +00006211ac_hi=`expr '(' $ac_mid ')' - 1`
6212 if test $ac_mid -le $ac_hi; then
6213 ac_lo= ac_hi=
6214 break
6215 fi
6216 ac_mid=`expr 2 '*' $ac_mid`
6217fi
6218rm -f conftest.$ac_objext conftest.$ac_ext
6219 done
6220else
6221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006222sed 's/^/| /' conftest.$ac_ext >&5
6223
Martin v. Löwis11437992002-04-12 09:54:03 +00006224ac_lo= ac_hi=
6225fi
6226rm -f conftest.$ac_objext conftest.$ac_ext
6227fi
6228rm -f conftest.$ac_objext conftest.$ac_ext
6229# Binary search between lo and hi bounds.
6230while test "x$ac_lo" != "x$ac_hi"; do
6231 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6232 cat >conftest.$ac_ext <<_ACEOF
6233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006234/* confdefs.h. */
6235_ACEOF
6236cat confdefs.h >>conftest.$ac_ext
6237cat >>conftest.$ac_ext <<_ACEOF
6238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006240int
6241main ()
6242{
6243static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6244test_array [0] = 0
6245
6246 ;
6247 return 0;
6248}
6249_ACEOF
6250rm -f conftest.$ac_objext
6251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6252 (eval $ac_compile) 2>&5
6253 ac_status=$?
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); } &&
6256 { ac_try='test -s conftest.$ac_objext'
6257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; }; then
6262 ac_hi=$ac_mid
6263else
6264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006265sed 's/^/| /' conftest.$ac_ext >&5
6266
Martin v. Löwis11437992002-04-12 09:54:03 +00006267ac_lo=`expr '(' $ac_mid ')' + 1`
6268fi
6269rm -f conftest.$ac_objext conftest.$ac_ext
6270done
6271case $ac_lo in
6272?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006273'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6274See \`config.log' for more details." >&5
6275echo "$as_me: error: cannot compute sizeof (long), 77
6276See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006277 { (exit 1); exit 1; }; } ;;
6278esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006279else
6280 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006281 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6282See \`config.log' for more details." >&5
6283echo "$as_me: error: cannot run test program while cross compiling
6284See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006285 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006286else
Martin v. Löwis11437992002-04-12 09:54:03 +00006287 cat >conftest.$ac_ext <<_ACEOF
6288#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006289/* confdefs.h. */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006294$ac_includes_default
6295long longval () { return (long) (sizeof (long)); }
6296unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006297#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006298#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006299int
6300main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006301{
Martin v. Löwis11437992002-04-12 09:54:03 +00006302
6303 FILE *f = fopen ("conftest.val", "w");
6304 if (! f)
6305 exit (1);
6306 if (((long) (sizeof (long))) < 0)
6307 {
6308 long i = longval ();
6309 if (i != ((long) (sizeof (long))))
6310 exit (1);
6311 fprintf (f, "%ld\n", i);
6312 }
6313 else
6314 {
6315 unsigned long i = ulongval ();
6316 if (i != ((long) (sizeof (long))))
6317 exit (1);
6318 fprintf (f, "%lu\n", i);
6319 }
6320 exit (ferror (f) || fclose (f) != 0);
6321
6322 ;
6323 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006324}
Martin v. Löwis11437992002-04-12 09:54:03 +00006325_ACEOF
6326rm -f conftest$ac_exeext
6327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6328 (eval $ac_link) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6333 (eval $ac_try) 2>&5
6334 ac_status=$?
6335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6336 (exit $ac_status); }; }; then
6337 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006338else
Martin v. Löwis11437992002-04-12 09:54:03 +00006339 echo "$as_me: program exited with status $ac_status" >&5
6340echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006341sed 's/^/| /' conftest.$ac_ext >&5
6342
Martin v. Löwis11437992002-04-12 09:54:03 +00006343( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006344{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6345See \`config.log' for more details." >&5
6346echo "$as_me: error: cannot compute sizeof (long), 77
6347See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006348 { (exit 1); exit 1; }; }
6349fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006350rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006351fi
6352fi
6353rm -f conftest.val
6354else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006355 ac_cv_sizeof_long=0
6356fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006358echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6359echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6360cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006361#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006362_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006363
6364
Martin v. Löwis11437992002-04-12 09:54:03 +00006365echo "$as_me:$LINENO: checking for void *" >&5
6366echo $ECHO_N "checking for void *... $ECHO_C" >&6
6367if test "${ac_cv_type_void_p+set}" = set; then
6368 echo $ECHO_N "(cached) $ECHO_C" >&6
6369else
6370 cat >conftest.$ac_ext <<_ACEOF
6371#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006372/* confdefs.h. */
6373_ACEOF
6374cat confdefs.h >>conftest.$ac_ext
6375cat >>conftest.$ac_ext <<_ACEOF
6376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006377$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006378int
6379main ()
6380{
6381if ((void * *) 0)
6382 return 0;
6383if (sizeof (void *))
6384 return 0;
6385 ;
6386 return 0;
6387}
6388_ACEOF
6389rm -f conftest.$ac_objext
6390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6391 (eval $ac_compile) 2>&5
6392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); } &&
6395 { ac_try='test -s conftest.$ac_objext'
6396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6397 (eval $ac_try) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); }; }; then
6401 ac_cv_type_void_p=yes
6402else
6403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006404sed 's/^/| /' conftest.$ac_ext >&5
6405
Martin v. Löwis11437992002-04-12 09:54:03 +00006406ac_cv_type_void_p=no
6407fi
6408rm -f conftest.$ac_objext conftest.$ac_ext
6409fi
6410echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6411echo "${ECHO_T}$ac_cv_type_void_p" >&6
6412
6413echo "$as_me:$LINENO: checking size of void *" >&5
6414echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6415if test "${ac_cv_sizeof_void_p+set}" = set; then
6416 echo $ECHO_N "(cached) $ECHO_C" >&6
6417else
6418 if test "$ac_cv_type_void_p" = yes; then
6419 # The cast to unsigned long works around a bug in the HP C Compiler
6420 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6421 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6422 # This bug is HP SR number 8606223364.
6423 if test "$cross_compiling" = yes; then
6424 # Depending upon the size, compute the lo and hi bounds.
6425cat >conftest.$ac_ext <<_ACEOF
6426#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006427/* confdefs.h. */
6428_ACEOF
6429cat confdefs.h >>conftest.$ac_ext
6430cat >>conftest.$ac_ext <<_ACEOF
6431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006432$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006433int
6434main ()
6435{
6436static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6437test_array [0] = 0
6438
6439 ;
6440 return 0;
6441}
6442_ACEOF
6443rm -f conftest.$ac_objext
6444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6445 (eval $ac_compile) 2>&5
6446 ac_status=$?
6447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6448 (exit $ac_status); } &&
6449 { ac_try='test -s conftest.$ac_objext'
6450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6451 (eval $ac_try) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); }; }; then
6455 ac_lo=0 ac_mid=0
6456 while :; do
6457 cat >conftest.$ac_ext <<_ACEOF
6458#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006459/* confdefs.h. */
6460_ACEOF
6461cat confdefs.h >>conftest.$ac_ext
6462cat >>conftest.$ac_ext <<_ACEOF
6463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006464$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006465int
6466main ()
6467{
6468static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6469test_array [0] = 0
6470
6471 ;
6472 return 0;
6473}
6474_ACEOF
6475rm -f conftest.$ac_objext
6476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6477 (eval $ac_compile) 2>&5
6478 ac_status=$?
6479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6480 (exit $ac_status); } &&
6481 { ac_try='test -s conftest.$ac_objext'
6482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6483 (eval $ac_try) 2>&5
6484 ac_status=$?
6485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486 (exit $ac_status); }; }; then
6487 ac_hi=$ac_mid; break
6488else
6489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006490sed 's/^/| /' conftest.$ac_ext >&5
6491
Martin v. Löwis11437992002-04-12 09:54:03 +00006492ac_lo=`expr $ac_mid + 1`
6493 if test $ac_lo -le $ac_mid; then
6494 ac_lo= ac_hi=
6495 break
6496 fi
6497 ac_mid=`expr 2 '*' $ac_mid + 1`
6498fi
6499rm -f conftest.$ac_objext conftest.$ac_ext
6500 done
6501else
6502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006503sed 's/^/| /' conftest.$ac_ext >&5
6504
Martin v. Löwis11437992002-04-12 09:54:03 +00006505cat >conftest.$ac_ext <<_ACEOF
6506#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006507/* confdefs.h. */
6508_ACEOF
6509cat confdefs.h >>conftest.$ac_ext
6510cat >>conftest.$ac_ext <<_ACEOF
6511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006512$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006513int
6514main ()
6515{
6516static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6517test_array [0] = 0
6518
6519 ;
6520 return 0;
6521}
6522_ACEOF
6523rm -f conftest.$ac_objext
6524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6525 (eval $ac_compile) 2>&5
6526 ac_status=$?
6527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528 (exit $ac_status); } &&
6529 { ac_try='test -s conftest.$ac_objext'
6530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6531 (eval $ac_try) 2>&5
6532 ac_status=$?
6533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534 (exit $ac_status); }; }; then
6535 ac_hi=-1 ac_mid=-1
6536 while :; do
6537 cat >conftest.$ac_ext <<_ACEOF
6538#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006539/* confdefs.h. */
6540_ACEOF
6541cat confdefs.h >>conftest.$ac_ext
6542cat >>conftest.$ac_ext <<_ACEOF
6543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006544$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006545int
6546main ()
6547{
6548static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6549test_array [0] = 0
6550
6551 ;
6552 return 0;
6553}
6554_ACEOF
6555rm -f conftest.$ac_objext
6556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6557 (eval $ac_compile) 2>&5
6558 ac_status=$?
6559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6560 (exit $ac_status); } &&
6561 { ac_try='test -s conftest.$ac_objext'
6562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6563 (eval $ac_try) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); }; }; then
6567 ac_lo=$ac_mid; break
6568else
6569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006570sed 's/^/| /' conftest.$ac_ext >&5
6571
Martin v. Löwis11437992002-04-12 09:54:03 +00006572ac_hi=`expr '(' $ac_mid ')' - 1`
6573 if test $ac_mid -le $ac_hi; then
6574 ac_lo= ac_hi=
6575 break
6576 fi
6577 ac_mid=`expr 2 '*' $ac_mid`
6578fi
6579rm -f conftest.$ac_objext conftest.$ac_ext
6580 done
6581else
6582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006583sed 's/^/| /' conftest.$ac_ext >&5
6584
Martin v. Löwis11437992002-04-12 09:54:03 +00006585ac_lo= ac_hi=
6586fi
6587rm -f conftest.$ac_objext conftest.$ac_ext
6588fi
6589rm -f conftest.$ac_objext conftest.$ac_ext
6590# Binary search between lo and hi bounds.
6591while test "x$ac_lo" != "x$ac_hi"; do
6592 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6593 cat >conftest.$ac_ext <<_ACEOF
6594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006595/* confdefs.h. */
6596_ACEOF
6597cat confdefs.h >>conftest.$ac_ext
6598cat >>conftest.$ac_ext <<_ACEOF
6599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006600$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006601int
6602main ()
6603{
6604static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6605test_array [0] = 0
6606
6607 ;
6608 return 0;
6609}
6610_ACEOF
6611rm -f conftest.$ac_objext
6612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6613 (eval $ac_compile) 2>&5
6614 ac_status=$?
6615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6616 (exit $ac_status); } &&
6617 { ac_try='test -s conftest.$ac_objext'
6618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6619 (eval $ac_try) 2>&5
6620 ac_status=$?
6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622 (exit $ac_status); }; }; then
6623 ac_hi=$ac_mid
6624else
6625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Martin v. Löwis11437992002-04-12 09:54:03 +00006628ac_lo=`expr '(' $ac_mid ')' + 1`
6629fi
6630rm -f conftest.$ac_objext conftest.$ac_ext
6631done
6632case $ac_lo in
6633?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006634'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6635See \`config.log' for more details." >&5
6636echo "$as_me: error: cannot compute sizeof (void *), 77
6637See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006638 { (exit 1); exit 1; }; } ;;
6639esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006640else
6641 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006642 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6643See \`config.log' for more details." >&5
6644echo "$as_me: error: cannot run test program while cross compiling
6645See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006646 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006647else
Martin v. Löwis11437992002-04-12 09:54:03 +00006648 cat >conftest.$ac_ext <<_ACEOF
6649#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006650/* confdefs.h. */
6651_ACEOF
6652cat confdefs.h >>conftest.$ac_ext
6653cat >>conftest.$ac_ext <<_ACEOF
6654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006655$ac_includes_default
6656long longval () { return (long) (sizeof (void *)); }
6657unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006658#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006659#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006660int
6661main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006662{
Martin v. Löwis11437992002-04-12 09:54:03 +00006663
6664 FILE *f = fopen ("conftest.val", "w");
6665 if (! f)
6666 exit (1);
6667 if (((long) (sizeof (void *))) < 0)
6668 {
6669 long i = longval ();
6670 if (i != ((long) (sizeof (void *))))
6671 exit (1);
6672 fprintf (f, "%ld\n", i);
6673 }
6674 else
6675 {
6676 unsigned long i = ulongval ();
6677 if (i != ((long) (sizeof (void *))))
6678 exit (1);
6679 fprintf (f, "%lu\n", i);
6680 }
6681 exit (ferror (f) || fclose (f) != 0);
6682
6683 ;
6684 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006685}
Martin v. Löwis11437992002-04-12 09:54:03 +00006686_ACEOF
6687rm -f conftest$ac_exeext
6688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6689 (eval $ac_link) 2>&5
6690 ac_status=$?
6691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6694 (eval $ac_try) 2>&5
6695 ac_status=$?
6696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6697 (exit $ac_status); }; }; then
6698 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006699else
Martin v. Löwis11437992002-04-12 09:54:03 +00006700 echo "$as_me: program exited with status $ac_status" >&5
6701echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006702sed 's/^/| /' conftest.$ac_ext >&5
6703
Martin v. Löwis11437992002-04-12 09:54:03 +00006704( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006705{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6706See \`config.log' for more details." >&5
6707echo "$as_me: error: cannot compute sizeof (void *), 77
6708See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006709 { (exit 1); exit 1; }; }
6710fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006711rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006712fi
6713fi
6714rm -f conftest.val
6715else
Guido van Rossumad678af1998-10-02 14:42:15 +00006716 ac_cv_sizeof_void_p=0
6717fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006719echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6720echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6721cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006722#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006723_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006724
6725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726echo "$as_me:$LINENO: checking for short" >&5
6727echo $ECHO_N "checking for short... $ECHO_C" >&6
6728if test "${ac_cv_type_short+set}" = set; then
6729 echo $ECHO_N "(cached) $ECHO_C" >&6
6730else
6731 cat >conftest.$ac_ext <<_ACEOF
6732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006738$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006739int
6740main ()
6741{
6742if ((short *) 0)
6743 return 0;
6744if (sizeof (short))
6745 return 0;
6746 ;
6747 return 0;
6748}
6749_ACEOF
6750rm -f conftest.$ac_objext
6751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6752 (eval $ac_compile) 2>&5
6753 ac_status=$?
6754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755 (exit $ac_status); } &&
6756 { ac_try='test -s conftest.$ac_objext'
6757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6758 (eval $ac_try) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); }; }; then
6762 ac_cv_type_short=yes
6763else
6764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006765sed 's/^/| /' conftest.$ac_ext >&5
6766
Martin v. Löwis11437992002-04-12 09:54:03 +00006767ac_cv_type_short=no
6768fi
6769rm -f conftest.$ac_objext conftest.$ac_ext
6770fi
6771echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6772echo "${ECHO_T}$ac_cv_type_short" >&6
6773
6774echo "$as_me:$LINENO: checking size of short" >&5
6775echo $ECHO_N "checking size of short... $ECHO_C" >&6
6776if test "${ac_cv_sizeof_short+set}" = set; then
6777 echo $ECHO_N "(cached) $ECHO_C" >&6
6778else
6779 if test "$ac_cv_type_short" = yes; then
6780 # The cast to unsigned long works around a bug in the HP C Compiler
6781 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6782 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6783 # This bug is HP SR number 8606223364.
6784 if test "$cross_compiling" = yes; then
6785 # Depending upon the size, compute the lo and hi bounds.
6786cat >conftest.$ac_ext <<_ACEOF
6787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006788/* confdefs.h. */
6789_ACEOF
6790cat confdefs.h >>conftest.$ac_ext
6791cat >>conftest.$ac_ext <<_ACEOF
6792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006794int
6795main ()
6796{
6797static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6798test_array [0] = 0
6799
6800 ;
6801 return 0;
6802}
6803_ACEOF
6804rm -f conftest.$ac_objext
6805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6806 (eval $ac_compile) 2>&5
6807 ac_status=$?
6808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 (exit $ac_status); } &&
6810 { ac_try='test -s conftest.$ac_objext'
6811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6812 (eval $ac_try) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); }; }; then
6816 ac_lo=0 ac_mid=0
6817 while :; do
6818 cat >conftest.$ac_ext <<_ACEOF
6819#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006820/* confdefs.h. */
6821_ACEOF
6822cat confdefs.h >>conftest.$ac_ext
6823cat >>conftest.$ac_ext <<_ACEOF
6824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006826int
6827main ()
6828{
6829static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6830test_array [0] = 0
6831
6832 ;
6833 return 0;
6834}
6835_ACEOF
6836rm -f conftest.$ac_objext
6837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6838 (eval $ac_compile) 2>&5
6839 ac_status=$?
6840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6841 (exit $ac_status); } &&
6842 { ac_try='test -s conftest.$ac_objext'
6843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6844 (eval $ac_try) 2>&5
6845 ac_status=$?
6846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6847 (exit $ac_status); }; }; then
6848 ac_hi=$ac_mid; break
6849else
6850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006851sed 's/^/| /' conftest.$ac_ext >&5
6852
Martin v. Löwis11437992002-04-12 09:54:03 +00006853ac_lo=`expr $ac_mid + 1`
6854 if test $ac_lo -le $ac_mid; then
6855 ac_lo= ac_hi=
6856 break
6857 fi
6858 ac_mid=`expr 2 '*' $ac_mid + 1`
6859fi
6860rm -f conftest.$ac_objext conftest.$ac_ext
6861 done
6862else
6863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006864sed 's/^/| /' conftest.$ac_ext >&5
6865
Martin v. Löwis11437992002-04-12 09:54:03 +00006866cat >conftest.$ac_ext <<_ACEOF
6867#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006873$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006874int
6875main ()
6876{
6877static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6878test_array [0] = 0
6879
6880 ;
6881 return 0;
6882}
6883_ACEOF
6884rm -f conftest.$ac_objext
6885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6886 (eval $ac_compile) 2>&5
6887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); } &&
6890 { ac_try='test -s conftest.$ac_objext'
6891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6892 (eval $ac_try) 2>&5
6893 ac_status=$?
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895 (exit $ac_status); }; }; then
6896 ac_hi=-1 ac_mid=-1
6897 while :; do
6898 cat >conftest.$ac_ext <<_ACEOF
6899#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006900/* confdefs.h. */
6901_ACEOF
6902cat confdefs.h >>conftest.$ac_ext
6903cat >>conftest.$ac_ext <<_ACEOF
6904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006905$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006906int
6907main ()
6908{
6909static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6910test_array [0] = 0
6911
6912 ;
6913 return 0;
6914}
6915_ACEOF
6916rm -f conftest.$ac_objext
6917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6918 (eval $ac_compile) 2>&5
6919 ac_status=$?
6920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6921 (exit $ac_status); } &&
6922 { ac_try='test -s conftest.$ac_objext'
6923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6924 (eval $ac_try) 2>&5
6925 ac_status=$?
6926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6927 (exit $ac_status); }; }; then
6928 ac_lo=$ac_mid; break
6929else
6930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006931sed 's/^/| /' conftest.$ac_ext >&5
6932
Martin v. Löwis11437992002-04-12 09:54:03 +00006933ac_hi=`expr '(' $ac_mid ')' - 1`
6934 if test $ac_mid -le $ac_hi; then
6935 ac_lo= ac_hi=
6936 break
6937 fi
6938 ac_mid=`expr 2 '*' $ac_mid`
6939fi
6940rm -f conftest.$ac_objext conftest.$ac_ext
6941 done
6942else
6943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006944sed 's/^/| /' conftest.$ac_ext >&5
6945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946ac_lo= ac_hi=
6947fi
6948rm -f conftest.$ac_objext conftest.$ac_ext
6949fi
6950rm -f conftest.$ac_objext conftest.$ac_ext
6951# Binary search between lo and hi bounds.
6952while test "x$ac_lo" != "x$ac_hi"; do
6953 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6954 cat >conftest.$ac_ext <<_ACEOF
6955#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006956/* confdefs.h. */
6957_ACEOF
6958cat confdefs.h >>conftest.$ac_ext
6959cat >>conftest.$ac_ext <<_ACEOF
6960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006961$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006962int
6963main ()
6964{
6965static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6966test_array [0] = 0
6967
6968 ;
6969 return 0;
6970}
6971_ACEOF
6972rm -f conftest.$ac_objext
6973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6974 (eval $ac_compile) 2>&5
6975 ac_status=$?
6976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6977 (exit $ac_status); } &&
6978 { ac_try='test -s conftest.$ac_objext'
6979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6980 (eval $ac_try) 2>&5
6981 ac_status=$?
6982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); }; }; then
6984 ac_hi=$ac_mid
6985else
6986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006987sed 's/^/| /' conftest.$ac_ext >&5
6988
Martin v. Löwis11437992002-04-12 09:54:03 +00006989ac_lo=`expr '(' $ac_mid ')' + 1`
6990fi
6991rm -f conftest.$ac_objext conftest.$ac_ext
6992done
6993case $ac_lo in
6994?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006995'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
6996See \`config.log' for more details." >&5
6997echo "$as_me: error: cannot compute sizeof (short), 77
6998See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006999 { (exit 1); exit 1; }; } ;;
7000esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007001else
7002 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007003 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7004See \`config.log' for more details." >&5
7005echo "$as_me: error: cannot run test program while cross compiling
7006See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007008else
Martin v. Löwis11437992002-04-12 09:54:03 +00007009 cat >conftest.$ac_ext <<_ACEOF
7010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007011/* confdefs.h. */
7012_ACEOF
7013cat confdefs.h >>conftest.$ac_ext
7014cat >>conftest.$ac_ext <<_ACEOF
7015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007016$ac_includes_default
7017long longval () { return (long) (sizeof (short)); }
7018unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007019#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007020#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007021int
7022main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007023{
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
7025 FILE *f = fopen ("conftest.val", "w");
7026 if (! f)
7027 exit (1);
7028 if (((long) (sizeof (short))) < 0)
7029 {
7030 long i = longval ();
7031 if (i != ((long) (sizeof (short))))
7032 exit (1);
7033 fprintf (f, "%ld\n", i);
7034 }
7035 else
7036 {
7037 unsigned long i = ulongval ();
7038 if (i != ((long) (sizeof (short))))
7039 exit (1);
7040 fprintf (f, "%lu\n", i);
7041 }
7042 exit (ferror (f) || fclose (f) != 0);
7043
7044 ;
7045 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007046}
Martin v. Löwis11437992002-04-12 09:54:03 +00007047_ACEOF
7048rm -f conftest$ac_exeext
7049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7050 (eval $ac_link) 2>&5
7051 ac_status=$?
7052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7055 (eval $ac_try) 2>&5
7056 ac_status=$?
7057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7058 (exit $ac_status); }; }; then
7059 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007060else
Martin v. Löwis11437992002-04-12 09:54:03 +00007061 echo "$as_me: program exited with status $ac_status" >&5
7062echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007063sed 's/^/| /' conftest.$ac_ext >&5
7064
Martin v. Löwis11437992002-04-12 09:54:03 +00007065( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007066{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7067See \`config.log' for more details." >&5
7068echo "$as_me: error: cannot compute sizeof (short), 77
7069See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007070 { (exit 1); exit 1; }; }
7071fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007072rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007073fi
7074fi
7075rm -f conftest.val
7076else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007077 ac_cv_sizeof_short=0
7078fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007079fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007080echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7081echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7082cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007083#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007084_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085
7086
Martin v. Löwis11437992002-04-12 09:54:03 +00007087echo "$as_me:$LINENO: checking for float" >&5
7088echo $ECHO_N "checking for float... $ECHO_C" >&6
7089if test "${ac_cv_type_float+set}" = set; then
7090 echo $ECHO_N "(cached) $ECHO_C" >&6
7091else
7092 cat >conftest.$ac_ext <<_ACEOF
7093#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007099$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007100int
7101main ()
7102{
7103if ((float *) 0)
7104 return 0;
7105if (sizeof (float))
7106 return 0;
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
7112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7113 (eval $ac_compile) 2>&5
7114 ac_status=$?
7115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7116 (exit $ac_status); } &&
7117 { ac_try='test -s conftest.$ac_objext'
7118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7119 (eval $ac_try) 2>&5
7120 ac_status=$?
7121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122 (exit $ac_status); }; }; then
7123 ac_cv_type_float=yes
7124else
7125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007126sed 's/^/| /' conftest.$ac_ext >&5
7127
Martin v. Löwis11437992002-04-12 09:54:03 +00007128ac_cv_type_float=no
7129fi
7130rm -f conftest.$ac_objext conftest.$ac_ext
7131fi
7132echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7133echo "${ECHO_T}$ac_cv_type_float" >&6
7134
7135echo "$as_me:$LINENO: checking size of float" >&5
7136echo $ECHO_N "checking size of float... $ECHO_C" >&6
7137if test "${ac_cv_sizeof_float+set}" = set; then
7138 echo $ECHO_N "(cached) $ECHO_C" >&6
7139else
7140 if test "$ac_cv_type_float" = yes; then
7141 # The cast to unsigned long works around a bug in the HP C Compiler
7142 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7143 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7144 # This bug is HP SR number 8606223364.
7145 if test "$cross_compiling" = yes; then
7146 # Depending upon the size, compute the lo and hi bounds.
7147cat >conftest.$ac_ext <<_ACEOF
7148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007149/* confdefs.h. */
7150_ACEOF
7151cat confdefs.h >>conftest.$ac_ext
7152cat >>conftest.$ac_ext <<_ACEOF
7153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007154$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007155int
7156main ()
7157{
7158static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7159test_array [0] = 0
7160
7161 ;
7162 return 0;
7163}
7164_ACEOF
7165rm -f conftest.$ac_objext
7166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7167 (eval $ac_compile) 2>&5
7168 ac_status=$?
7169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7170 (exit $ac_status); } &&
7171 { ac_try='test -s conftest.$ac_objext'
7172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7173 (eval $ac_try) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); }; }; then
7177 ac_lo=0 ac_mid=0
7178 while :; do
7179 cat >conftest.$ac_ext <<_ACEOF
7180#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007186$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007187int
7188main ()
7189{
7190static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7191test_array [0] = 0
7192
7193 ;
7194 return 0;
7195}
7196_ACEOF
7197rm -f conftest.$ac_objext
7198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7199 (eval $ac_compile) 2>&5
7200 ac_status=$?
7201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7202 (exit $ac_status); } &&
7203 { ac_try='test -s conftest.$ac_objext'
7204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7205 (eval $ac_try) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); }; }; then
7209 ac_hi=$ac_mid; break
7210else
7211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007212sed 's/^/| /' conftest.$ac_ext >&5
7213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214ac_lo=`expr $ac_mid + 1`
7215 if test $ac_lo -le $ac_mid; then
7216 ac_lo= ac_hi=
7217 break
7218 fi
7219 ac_mid=`expr 2 '*' $ac_mid + 1`
7220fi
7221rm -f conftest.$ac_objext conftest.$ac_ext
7222 done
7223else
7224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007225sed 's/^/| /' conftest.$ac_ext >&5
7226
Martin v. Löwis11437992002-04-12 09:54:03 +00007227cat >conftest.$ac_ext <<_ACEOF
7228#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007229/* confdefs.h. */
7230_ACEOF
7231cat confdefs.h >>conftest.$ac_ext
7232cat >>conftest.$ac_ext <<_ACEOF
7233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007234$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007235int
7236main ()
7237{
7238static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7239test_array [0] = 0
7240
7241 ;
7242 return 0;
7243}
7244_ACEOF
7245rm -f conftest.$ac_objext
7246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7247 (eval $ac_compile) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
7251 { ac_try='test -s conftest.$ac_objext'
7252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7253 (eval $ac_try) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7257 ac_hi=-1 ac_mid=-1
7258 while :; do
7259 cat >conftest.$ac_ext <<_ACEOF
7260#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007261/* confdefs.h. */
7262_ACEOF
7263cat confdefs.h >>conftest.$ac_ext
7264cat >>conftest.$ac_ext <<_ACEOF
7265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007266$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007267int
7268main ()
7269{
7270static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7271test_array [0] = 0
7272
7273 ;
7274 return 0;
7275}
7276_ACEOF
7277rm -f conftest.$ac_objext
7278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7279 (eval $ac_compile) 2>&5
7280 ac_status=$?
7281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282 (exit $ac_status); } &&
7283 { ac_try='test -s conftest.$ac_objext'
7284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7285 (eval $ac_try) 2>&5
7286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); }; }; then
7289 ac_lo=$ac_mid; break
7290else
7291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007292sed 's/^/| /' conftest.$ac_ext >&5
7293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294ac_hi=`expr '(' $ac_mid ')' - 1`
7295 if test $ac_mid -le $ac_hi; then
7296 ac_lo= ac_hi=
7297 break
7298 fi
7299 ac_mid=`expr 2 '*' $ac_mid`
7300fi
7301rm -f conftest.$ac_objext conftest.$ac_ext
7302 done
7303else
7304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007305sed 's/^/| /' conftest.$ac_ext >&5
7306
Martin v. Löwis11437992002-04-12 09:54:03 +00007307ac_lo= ac_hi=
7308fi
7309rm -f conftest.$ac_objext conftest.$ac_ext
7310fi
7311rm -f conftest.$ac_objext conftest.$ac_ext
7312# Binary search between lo and hi bounds.
7313while test "x$ac_lo" != "x$ac_hi"; do
7314 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7315 cat >conftest.$ac_ext <<_ACEOF
7316#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007317/* confdefs.h. */
7318_ACEOF
7319cat confdefs.h >>conftest.$ac_ext
7320cat >>conftest.$ac_ext <<_ACEOF
7321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007322$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007323int
7324main ()
7325{
7326static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7327test_array [0] = 0
7328
7329 ;
7330 return 0;
7331}
7332_ACEOF
7333rm -f conftest.$ac_objext
7334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7335 (eval $ac_compile) 2>&5
7336 ac_status=$?
7337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7338 (exit $ac_status); } &&
7339 { ac_try='test -s conftest.$ac_objext'
7340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7341 (eval $ac_try) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); }; }; then
7345 ac_hi=$ac_mid
7346else
7347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007348sed 's/^/| /' conftest.$ac_ext >&5
7349
Martin v. Löwis11437992002-04-12 09:54:03 +00007350ac_lo=`expr '(' $ac_mid ')' + 1`
7351fi
7352rm -f conftest.$ac_objext conftest.$ac_ext
7353done
7354case $ac_lo in
7355?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007356'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7357See \`config.log' for more details." >&5
7358echo "$as_me: error: cannot compute sizeof (float), 77
7359See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 { (exit 1); exit 1; }; } ;;
7361esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007362else
7363 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007364 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7365See \`config.log' for more details." >&5
7366echo "$as_me: error: cannot run test program while cross compiling
7367See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007369else
Martin v. Löwis11437992002-04-12 09:54:03 +00007370 cat >conftest.$ac_ext <<_ACEOF
7371#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007372/* confdefs.h. */
7373_ACEOF
7374cat confdefs.h >>conftest.$ac_ext
7375cat >>conftest.$ac_ext <<_ACEOF
7376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007377$ac_includes_default
7378long longval () { return (long) (sizeof (float)); }
7379unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007380#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007381#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007382int
7383main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007384{
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
7386 FILE *f = fopen ("conftest.val", "w");
7387 if (! f)
7388 exit (1);
7389 if (((long) (sizeof (float))) < 0)
7390 {
7391 long i = longval ();
7392 if (i != ((long) (sizeof (float))))
7393 exit (1);
7394 fprintf (f, "%ld\n", i);
7395 }
7396 else
7397 {
7398 unsigned long i = ulongval ();
7399 if (i != ((long) (sizeof (float))))
7400 exit (1);
7401 fprintf (f, "%lu\n", i);
7402 }
7403 exit (ferror (f) || fclose (f) != 0);
7404
7405 ;
7406 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007407}
Martin v. Löwis11437992002-04-12 09:54:03 +00007408_ACEOF
7409rm -f conftest$ac_exeext
7410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7411 (eval $ac_link) 2>&5
7412 ac_status=$?
7413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7416 (eval $ac_try) 2>&5
7417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); }; }; then
7420 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007421else
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 echo "$as_me: program exited with status $ac_status" >&5
7423echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007424sed 's/^/| /' conftest.$ac_ext >&5
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007427{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7428See \`config.log' for more details." >&5
7429echo "$as_me: error: cannot compute sizeof (float), 77
7430See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007431 { (exit 1); exit 1; }; }
7432fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007433rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007434fi
7435fi
7436rm -f conftest.val
7437else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007438 ac_cv_sizeof_float=0
7439fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007440fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007441echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7442echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7443cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007445_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446
7447
Martin v. Löwis11437992002-04-12 09:54:03 +00007448echo "$as_me:$LINENO: checking for double" >&5
7449echo $ECHO_N "checking for double... $ECHO_C" >&6
7450if test "${ac_cv_type_double+set}" = set; then
7451 echo $ECHO_N "(cached) $ECHO_C" >&6
7452else
7453 cat >conftest.$ac_ext <<_ACEOF
7454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007455/* confdefs.h. */
7456_ACEOF
7457cat confdefs.h >>conftest.$ac_ext
7458cat >>conftest.$ac_ext <<_ACEOF
7459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007461int
7462main ()
7463{
7464if ((double *) 0)
7465 return 0;
7466if (sizeof (double))
7467 return 0;
7468 ;
7469 return 0;
7470}
7471_ACEOF
7472rm -f conftest.$ac_objext
7473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7474 (eval $ac_compile) 2>&5
7475 ac_status=$?
7476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7477 (exit $ac_status); } &&
7478 { ac_try='test -s conftest.$ac_objext'
7479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7480 (eval $ac_try) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); }; }; then
7484 ac_cv_type_double=yes
7485else
7486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007487sed 's/^/| /' conftest.$ac_ext >&5
7488
Martin v. Löwis11437992002-04-12 09:54:03 +00007489ac_cv_type_double=no
7490fi
7491rm -f conftest.$ac_objext conftest.$ac_ext
7492fi
7493echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7494echo "${ECHO_T}$ac_cv_type_double" >&6
7495
7496echo "$as_me:$LINENO: checking size of double" >&5
7497echo $ECHO_N "checking size of double... $ECHO_C" >&6
7498if test "${ac_cv_sizeof_double+set}" = set; then
7499 echo $ECHO_N "(cached) $ECHO_C" >&6
7500else
7501 if test "$ac_cv_type_double" = yes; then
7502 # The cast to unsigned long works around a bug in the HP C Compiler
7503 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7504 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7505 # This bug is HP SR number 8606223364.
7506 if test "$cross_compiling" = yes; then
7507 # Depending upon the size, compute the lo and hi bounds.
7508cat >conftest.$ac_ext <<_ACEOF
7509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007510/* confdefs.h. */
7511_ACEOF
7512cat confdefs.h >>conftest.$ac_ext
7513cat >>conftest.$ac_ext <<_ACEOF
7514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007515$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007516int
7517main ()
7518{
7519static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7520test_array [0] = 0
7521
7522 ;
7523 return 0;
7524}
7525_ACEOF
7526rm -f conftest.$ac_objext
7527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7528 (eval $ac_compile) 2>&5
7529 ac_status=$?
7530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531 (exit $ac_status); } &&
7532 { ac_try='test -s conftest.$ac_objext'
7533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7534 (eval $ac_try) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); }; }; then
7538 ac_lo=0 ac_mid=0
7539 while :; do
7540 cat >conftest.$ac_ext <<_ACEOF
7541#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007547$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007548int
7549main ()
7550{
7551static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7552test_array [0] = 0
7553
7554 ;
7555 return 0;
7556}
7557_ACEOF
7558rm -f conftest.$ac_objext
7559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7560 (eval $ac_compile) 2>&5
7561 ac_status=$?
7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7563 (exit $ac_status); } &&
7564 { ac_try='test -s conftest.$ac_objext'
7565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7566 (eval $ac_try) 2>&5
7567 ac_status=$?
7568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569 (exit $ac_status); }; }; then
7570 ac_hi=$ac_mid; break
7571else
7572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007573sed 's/^/| /' conftest.$ac_ext >&5
7574
Martin v. Löwis11437992002-04-12 09:54:03 +00007575ac_lo=`expr $ac_mid + 1`
7576 if test $ac_lo -le $ac_mid; then
7577 ac_lo= ac_hi=
7578 break
7579 fi
7580 ac_mid=`expr 2 '*' $ac_mid + 1`
7581fi
7582rm -f conftest.$ac_objext conftest.$ac_ext
7583 done
7584else
7585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007586sed 's/^/| /' conftest.$ac_ext >&5
7587
Martin v. Löwis11437992002-04-12 09:54:03 +00007588cat >conftest.$ac_ext <<_ACEOF
7589#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
7599static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7600test_array [0] = 0
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
7607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7608 (eval $ac_compile) 2>&5
7609 ac_status=$?
7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7611 (exit $ac_status); } &&
7612 { ac_try='test -s conftest.$ac_objext'
7613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7614 (eval $ac_try) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); }; }; then
7618 ac_hi=-1 ac_mid=-1
7619 while :; do
7620 cat >conftest.$ac_ext <<_ACEOF
7621#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007622/* confdefs.h. */
7623_ACEOF
7624cat confdefs.h >>conftest.$ac_ext
7625cat >>conftest.$ac_ext <<_ACEOF
7626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007627$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
7631static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
7639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7640 (eval $ac_compile) 2>&5
7641 ac_status=$?
7642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7643 (exit $ac_status); } &&
7644 { ac_try='test -s conftest.$ac_objext'
7645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7646 (eval $ac_try) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); }; }; then
7650 ac_lo=$ac_mid; break
7651else
7652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007653sed 's/^/| /' conftest.$ac_ext >&5
7654
Martin v. Löwis11437992002-04-12 09:54:03 +00007655ac_hi=`expr '(' $ac_mid ')' - 1`
7656 if test $ac_mid -le $ac_hi; then
7657 ac_lo= ac_hi=
7658 break
7659 fi
7660 ac_mid=`expr 2 '*' $ac_mid`
7661fi
7662rm -f conftest.$ac_objext conftest.$ac_ext
7663 done
7664else
7665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007666sed 's/^/| /' conftest.$ac_ext >&5
7667
Martin v. Löwis11437992002-04-12 09:54:03 +00007668ac_lo= ac_hi=
7669fi
7670rm -f conftest.$ac_objext conftest.$ac_ext
7671fi
7672rm -f conftest.$ac_objext conftest.$ac_ext
7673# Binary search between lo and hi bounds.
7674while test "x$ac_lo" != "x$ac_hi"; do
7675 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7676 cat >conftest.$ac_ext <<_ACEOF
7677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007678/* confdefs.h. */
7679_ACEOF
7680cat confdefs.h >>conftest.$ac_ext
7681cat >>conftest.$ac_ext <<_ACEOF
7682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007683$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007684int
7685main ()
7686{
7687static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7688test_array [0] = 0
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
7694rm -f conftest.$ac_objext
7695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7696 (eval $ac_compile) 2>&5
7697 ac_status=$?
7698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699 (exit $ac_status); } &&
7700 { ac_try='test -s conftest.$ac_objext'
7701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7702 (eval $ac_try) 2>&5
7703 ac_status=$?
7704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7705 (exit $ac_status); }; }; then
7706 ac_hi=$ac_mid
7707else
7708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711ac_lo=`expr '(' $ac_mid ')' + 1`
7712fi
7713rm -f conftest.$ac_objext conftest.$ac_ext
7714done
7715case $ac_lo in
7716?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007717'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7718See \`config.log' for more details." >&5
7719echo "$as_me: error: cannot compute sizeof (double), 77
7720See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007721 { (exit 1); exit 1; }; } ;;
7722esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007723else
7724 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007725 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7726See \`config.log' for more details." >&5
7727echo "$as_me: error: cannot run test program while cross compiling
7728See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007730else
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 cat >conftest.$ac_ext <<_ACEOF
7732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007733/* confdefs.h. */
7734_ACEOF
7735cat confdefs.h >>conftest.$ac_ext
7736cat >>conftest.$ac_ext <<_ACEOF
7737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007738$ac_includes_default
7739long longval () { return (long) (sizeof (double)); }
7740unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007741#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007742#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007743int
7744main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007745{
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
7747 FILE *f = fopen ("conftest.val", "w");
7748 if (! f)
7749 exit (1);
7750 if (((long) (sizeof (double))) < 0)
7751 {
7752 long i = longval ();
7753 if (i != ((long) (sizeof (double))))
7754 exit (1);
7755 fprintf (f, "%ld\n", i);
7756 }
7757 else
7758 {
7759 unsigned long i = ulongval ();
7760 if (i != ((long) (sizeof (double))))
7761 exit (1);
7762 fprintf (f, "%lu\n", i);
7763 }
7764 exit (ferror (f) || fclose (f) != 0);
7765
7766 ;
7767 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007768}
Martin v. Löwis11437992002-04-12 09:54:03 +00007769_ACEOF
7770rm -f conftest$ac_exeext
7771if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7772 (eval $ac_link) 2>&5
7773 ac_status=$?
7774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7775 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7777 (eval $ac_try) 2>&5
7778 ac_status=$?
7779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780 (exit $ac_status); }; }; then
7781 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007782else
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 echo "$as_me: program exited with status $ac_status" >&5
7784echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007785sed 's/^/| /' conftest.$ac_ext >&5
7786
Martin v. Löwis11437992002-04-12 09:54:03 +00007787( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007788{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7789See \`config.log' for more details." >&5
7790echo "$as_me: error: cannot compute sizeof (double), 77
7791See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 { (exit 1); exit 1; }; }
7793fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007794rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007795fi
7796fi
7797rm -f conftest.val
7798else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007799 ac_cv_sizeof_double=0
7800fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007802echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7803echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7804cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007805#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007806_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809echo "$as_me:$LINENO: checking for fpos_t" >&5
7810echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7811if test "${ac_cv_type_fpos_t+set}" = set; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
7813else
7814 cat >conftest.$ac_ext <<_ACEOF
7815#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007816/* confdefs.h. */
7817_ACEOF
7818cat confdefs.h >>conftest.$ac_ext
7819cat >>conftest.$ac_ext <<_ACEOF
7820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007821$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007822int
7823main ()
7824{
7825if ((fpos_t *) 0)
7826 return 0;
7827if (sizeof (fpos_t))
7828 return 0;
7829 ;
7830 return 0;
7831}
7832_ACEOF
7833rm -f conftest.$ac_objext
7834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7835 (eval $ac_compile) 2>&5
7836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); } &&
7839 { ac_try='test -s conftest.$ac_objext'
7840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7841 (eval $ac_try) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); }; }; then
7845 ac_cv_type_fpos_t=yes
7846else
7847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007848sed 's/^/| /' conftest.$ac_ext >&5
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850ac_cv_type_fpos_t=no
7851fi
7852rm -f conftest.$ac_objext conftest.$ac_ext
7853fi
7854echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7855echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7856
7857echo "$as_me:$LINENO: checking size of fpos_t" >&5
7858echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7859if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7860 echo $ECHO_N "(cached) $ECHO_C" >&6
7861else
7862 if test "$ac_cv_type_fpos_t" = yes; then
7863 # The cast to unsigned long works around a bug in the HP C Compiler
7864 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7865 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7866 # This bug is HP SR number 8606223364.
7867 if test "$cross_compiling" = yes; then
7868 # Depending upon the size, compute the lo and hi bounds.
7869cat >conftest.$ac_ext <<_ACEOF
7870#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007871/* confdefs.h. */
7872_ACEOF
7873cat confdefs.h >>conftest.$ac_ext
7874cat >>conftest.$ac_ext <<_ACEOF
7875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007877int
7878main ()
7879{
7880static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7881test_array [0] = 0
7882
7883 ;
7884 return 0;
7885}
7886_ACEOF
7887rm -f conftest.$ac_objext
7888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7889 (eval $ac_compile) 2>&5
7890 ac_status=$?
7891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7892 (exit $ac_status); } &&
7893 { ac_try='test -s conftest.$ac_objext'
7894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7895 (eval $ac_try) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); }; }; then
7899 ac_lo=0 ac_mid=0
7900 while :; do
7901 cat >conftest.$ac_ext <<_ACEOF
7902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* confdefs.h. */
7904_ACEOF
7905cat confdefs.h >>conftest.$ac_ext
7906cat >>conftest.$ac_ext <<_ACEOF
7907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007908$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007909int
7910main ()
7911{
7912static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7913test_array [0] = 0
7914
7915 ;
7916 return 0;
7917}
7918_ACEOF
7919rm -f conftest.$ac_objext
7920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7921 (eval $ac_compile) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); } &&
7925 { ac_try='test -s conftest.$ac_objext'
7926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927 (eval $ac_try) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); }; }; then
7931 ac_hi=$ac_mid; break
7932else
7933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007934sed 's/^/| /' conftest.$ac_ext >&5
7935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936ac_lo=`expr $ac_mid + 1`
7937 if test $ac_lo -le $ac_mid; then
7938 ac_lo= ac_hi=
7939 break
7940 fi
7941 ac_mid=`expr 2 '*' $ac_mid + 1`
7942fi
7943rm -f conftest.$ac_objext conftest.$ac_ext
7944 done
7945else
7946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007947sed 's/^/| /' conftest.$ac_ext >&5
7948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949cat >conftest.$ac_ext <<_ACEOF
7950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007951/* confdefs.h. */
7952_ACEOF
7953cat confdefs.h >>conftest.$ac_ext
7954cat >>conftest.$ac_ext <<_ACEOF
7955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007956$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007957int
7958main ()
7959{
7960static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7961test_array [0] = 0
7962
7963 ;
7964 return 0;
7965}
7966_ACEOF
7967rm -f conftest.$ac_objext
7968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7969 (eval $ac_compile) 2>&5
7970 ac_status=$?
7971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7972 (exit $ac_status); } &&
7973 { ac_try='test -s conftest.$ac_objext'
7974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7975 (eval $ac_try) 2>&5
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); }; }; then
7979 ac_hi=-1 ac_mid=-1
7980 while :; do
7981 cat >conftest.$ac_ext <<_ACEOF
7982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* confdefs.h. */
7984_ACEOF
7985cat confdefs.h >>conftest.$ac_ext
7986cat >>conftest.$ac_ext <<_ACEOF
7987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007988$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
7992static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7993test_array [0] = 0
7994
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext
8000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8001 (eval $ac_compile) 2>&5
8002 ac_status=$?
8003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004 (exit $ac_status); } &&
8005 { ac_try='test -s conftest.$ac_objext'
8006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8007 (eval $ac_try) 2>&5
8008 ac_status=$?
8009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8010 (exit $ac_status); }; }; then
8011 ac_lo=$ac_mid; break
8012else
8013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008014sed 's/^/| /' conftest.$ac_ext >&5
8015
Martin v. Löwis11437992002-04-12 09:54:03 +00008016ac_hi=`expr '(' $ac_mid ')' - 1`
8017 if test $ac_mid -le $ac_hi; then
8018 ac_lo= ac_hi=
8019 break
8020 fi
8021 ac_mid=`expr 2 '*' $ac_mid`
8022fi
8023rm -f conftest.$ac_objext conftest.$ac_ext
8024 done
8025else
8026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008027sed 's/^/| /' conftest.$ac_ext >&5
8028
Martin v. Löwis11437992002-04-12 09:54:03 +00008029ac_lo= ac_hi=
8030fi
8031rm -f conftest.$ac_objext conftest.$ac_ext
8032fi
8033rm -f conftest.$ac_objext conftest.$ac_ext
8034# Binary search between lo and hi bounds.
8035while test "x$ac_lo" != "x$ac_hi"; do
8036 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8037 cat >conftest.$ac_ext <<_ACEOF
8038#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* confdefs.h. */
8040_ACEOF
8041cat confdefs.h >>conftest.$ac_ext
8042cat >>conftest.$ac_ext <<_ACEOF
8043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008044$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008045int
8046main ()
8047{
8048static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8049test_array [0] = 0
8050
8051 ;
8052 return 0;
8053}
8054_ACEOF
8055rm -f conftest.$ac_objext
8056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8057 (eval $ac_compile) 2>&5
8058 ac_status=$?
8059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060 (exit $ac_status); } &&
8061 { ac_try='test -s conftest.$ac_objext'
8062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8063 (eval $ac_try) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); }; }; then
8067 ac_hi=$ac_mid
8068else
8069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008070sed 's/^/| /' conftest.$ac_ext >&5
8071
Martin v. Löwis11437992002-04-12 09:54:03 +00008072ac_lo=`expr '(' $ac_mid ')' + 1`
8073fi
8074rm -f conftest.$ac_objext conftest.$ac_ext
8075done
8076case $ac_lo in
8077?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008078'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8079See \`config.log' for more details." >&5
8080echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8081See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 { (exit 1); exit 1; }; } ;;
8083esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008084else
8085 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008086 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8087See \`config.log' for more details." >&5
8088echo "$as_me: error: cannot run test program while cross compiling
8089See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008091else
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 cat >conftest.$ac_ext <<_ACEOF
8093#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099$ac_includes_default
8100long longval () { return (long) (sizeof (fpos_t)); }
8101unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008102#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008103#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008104int
8105main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008106{
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
8108 FILE *f = fopen ("conftest.val", "w");
8109 if (! f)
8110 exit (1);
8111 if (((long) (sizeof (fpos_t))) < 0)
8112 {
8113 long i = longval ();
8114 if (i != ((long) (sizeof (fpos_t))))
8115 exit (1);
8116 fprintf (f, "%ld\n", i);
8117 }
8118 else
8119 {
8120 unsigned long i = ulongval ();
8121 if (i != ((long) (sizeof (fpos_t))))
8122 exit (1);
8123 fprintf (f, "%lu\n", i);
8124 }
8125 exit (ferror (f) || fclose (f) != 0);
8126
8127 ;
8128 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008129}
Martin v. Löwis11437992002-04-12 09:54:03 +00008130_ACEOF
8131rm -f conftest$ac_exeext
8132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8133 (eval $ac_link) 2>&5
8134 ac_status=$?
8135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8138 (eval $ac_try) 2>&5
8139 ac_status=$?
8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141 (exit $ac_status); }; }; then
8142 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008143else
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 echo "$as_me: program exited with status $ac_status" >&5
8145echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008146sed 's/^/| /' conftest.$ac_ext >&5
8147
Martin v. Löwis11437992002-04-12 09:54:03 +00008148( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008149{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8150See \`config.log' for more details." >&5
8151echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8152See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008153 { (exit 1); exit 1; }; }
8154fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008155rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008156fi
8157fi
8158rm -f conftest.val
8159else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008160 ac_cv_sizeof_fpos_t=0
8161fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008162fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008163echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8164echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8165cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008166#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008167_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168
Michael W. Hudson54241132001-12-07 15:38:26 +00008169
8170
Martin v. Löwis11437992002-04-12 09:54:03 +00008171echo "$as_me:$LINENO: checking for long long support" >&5
8172echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008173have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008174cat >conftest.$ac_ext <<_ACEOF
8175#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008176/* confdefs.h. */
8177_ACEOF
8178cat confdefs.h >>conftest.$ac_ext
8179cat >>conftest.$ac_ext <<_ACEOF
8180/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181
Martin v. Löwis11437992002-04-12 09:54:03 +00008182int
8183main ()
8184{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008185long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008186 ;
8187 return 0;
8188}
8189_ACEOF
8190rm -f conftest.$ac_objext
8191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8192 (eval $ac_compile) 2>&5
8193 ac_status=$?
8194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195 (exit $ac_status); } &&
8196 { ac_try='test -s conftest.$ac_objext'
8197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8198 (eval $ac_try) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); }; }; then
8202
8203
8204cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008205#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008206_ACEOF
8207
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008208 have_long_long=yes
8209
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008210else
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008212sed 's/^/| /' conftest.$ac_ext >&5
8213
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008215rm -f conftest.$ac_objext conftest.$ac_ext
8216echo "$as_me:$LINENO: result: $have_long_long" >&5
8217echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008218if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008219echo "$as_me:$LINENO: checking for long long" >&5
8220echo $ECHO_N "checking for long long... $ECHO_C" >&6
8221if test "${ac_cv_type_long_long+set}" = set; then
8222 echo $ECHO_N "(cached) $ECHO_C" >&6
8223else
8224 cat >conftest.$ac_ext <<_ACEOF
8225#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008226/* confdefs.h. */
8227_ACEOF
8228cat confdefs.h >>conftest.$ac_ext
8229cat >>conftest.$ac_ext <<_ACEOF
8230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008231$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008232int
8233main ()
8234{
8235if ((long long *) 0)
8236 return 0;
8237if (sizeof (long long))
8238 return 0;
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243rm -f conftest.$ac_objext
8244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8245 (eval $ac_compile) 2>&5
8246 ac_status=$?
8247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8248 (exit $ac_status); } &&
8249 { ac_try='test -s conftest.$ac_objext'
8250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8251 (eval $ac_try) 2>&5
8252 ac_status=$?
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); }; }; then
8255 ac_cv_type_long_long=yes
8256else
8257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008258sed 's/^/| /' conftest.$ac_ext >&5
8259
Martin v. Löwis11437992002-04-12 09:54:03 +00008260ac_cv_type_long_long=no
8261fi
8262rm -f conftest.$ac_objext conftest.$ac_ext
8263fi
8264echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8265echo "${ECHO_T}$ac_cv_type_long_long" >&6
8266
8267echo "$as_me:$LINENO: checking size of long long" >&5
8268echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8269if test "${ac_cv_sizeof_long_long+set}" = set; then
8270 echo $ECHO_N "(cached) $ECHO_C" >&6
8271else
8272 if test "$ac_cv_type_long_long" = yes; then
8273 # The cast to unsigned long works around a bug in the HP C Compiler
8274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8276 # This bug is HP SR number 8606223364.
8277 if test "$cross_compiling" = yes; then
8278 # Depending upon the size, compute the lo and hi bounds.
8279cat >conftest.$ac_ext <<_ACEOF
8280#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* confdefs.h. */
8282_ACEOF
8283cat confdefs.h >>conftest.$ac_ext
8284cat >>conftest.$ac_ext <<_ACEOF
8285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008287int
8288main ()
8289{
8290static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8291test_array [0] = 0
8292
8293 ;
8294 return 0;
8295}
8296_ACEOF
8297rm -f conftest.$ac_objext
8298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8299 (eval $ac_compile) 2>&5
8300 ac_status=$?
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); } &&
8303 { ac_try='test -s conftest.$ac_objext'
8304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8305 (eval $ac_try) 2>&5
8306 ac_status=$?
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); }; }; then
8309 ac_lo=0 ac_mid=0
8310 while :; do
8311 cat >conftest.$ac_ext <<_ACEOF
8312#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008313/* confdefs.h. */
8314_ACEOF
8315cat confdefs.h >>conftest.$ac_ext
8316cat >>conftest.$ac_ext <<_ACEOF
8317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008318$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008319int
8320main ()
8321{
8322static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8323test_array [0] = 0
8324
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
8330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8331 (eval $ac_compile) 2>&5
8332 ac_status=$?
8333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); } &&
8335 { ac_try='test -s conftest.$ac_objext'
8336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8337 (eval $ac_try) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); }; }; then
8341 ac_hi=$ac_mid; break
8342else
8343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008344sed 's/^/| /' conftest.$ac_ext >&5
8345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346ac_lo=`expr $ac_mid + 1`
8347 if test $ac_lo -le $ac_mid; then
8348 ac_lo= ac_hi=
8349 break
8350 fi
8351 ac_mid=`expr 2 '*' $ac_mid + 1`
8352fi
8353rm -f conftest.$ac_objext conftest.$ac_ext
8354 done
8355else
8356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008357sed 's/^/| /' conftest.$ac_ext >&5
8358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359cat >conftest.$ac_ext <<_ACEOF
8360#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008361/* confdefs.h. */
8362_ACEOF
8363cat confdefs.h >>conftest.$ac_ext
8364cat >>conftest.$ac_ext <<_ACEOF
8365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008366$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008367int
8368main ()
8369{
8370static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8371test_array [0] = 0
8372
8373 ;
8374 return 0;
8375}
8376_ACEOF
8377rm -f conftest.$ac_objext
8378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8379 (eval $ac_compile) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); } &&
8383 { ac_try='test -s conftest.$ac_objext'
8384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8385 (eval $ac_try) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); }; }; then
8389 ac_hi=-1 ac_mid=-1
8390 while :; do
8391 cat >conftest.$ac_ext <<_ACEOF
8392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008393/* confdefs.h. */
8394_ACEOF
8395cat confdefs.h >>conftest.$ac_ext
8396cat >>conftest.$ac_ext <<_ACEOF
8397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008398$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008399int
8400main ()
8401{
8402static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8403test_array [0] = 0
8404
8405 ;
8406 return 0;
8407}
8408_ACEOF
8409rm -f conftest.$ac_objext
8410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8411 (eval $ac_compile) 2>&5
8412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); } &&
8415 { ac_try='test -s conftest.$ac_objext'
8416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8417 (eval $ac_try) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); }; }; then
8421 ac_lo=$ac_mid; break
8422else
8423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008424sed 's/^/| /' conftest.$ac_ext >&5
8425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426ac_hi=`expr '(' $ac_mid ')' - 1`
8427 if test $ac_mid -le $ac_hi; then
8428 ac_lo= ac_hi=
8429 break
8430 fi
8431 ac_mid=`expr 2 '*' $ac_mid`
8432fi
8433rm -f conftest.$ac_objext conftest.$ac_ext
8434 done
8435else
8436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008437sed 's/^/| /' conftest.$ac_ext >&5
8438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439ac_lo= ac_hi=
8440fi
8441rm -f conftest.$ac_objext conftest.$ac_ext
8442fi
8443rm -f conftest.$ac_objext conftest.$ac_ext
8444# Binary search between lo and hi bounds.
8445while test "x$ac_lo" != "x$ac_hi"; do
8446 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8447 cat >conftest.$ac_ext <<_ACEOF
8448#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008449/* confdefs.h. */
8450_ACEOF
8451cat confdefs.h >>conftest.$ac_ext
8452cat >>conftest.$ac_ext <<_ACEOF
8453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008455int
8456main ()
8457{
8458static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8459test_array [0] = 0
8460
8461 ;
8462 return 0;
8463}
8464_ACEOF
8465rm -f conftest.$ac_objext
8466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8467 (eval $ac_compile) 2>&5
8468 ac_status=$?
8469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470 (exit $ac_status); } &&
8471 { ac_try='test -s conftest.$ac_objext'
8472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8473 (eval $ac_try) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); }; }; then
8477 ac_hi=$ac_mid
8478else
8479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008480sed 's/^/| /' conftest.$ac_ext >&5
8481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482ac_lo=`expr '(' $ac_mid ')' + 1`
8483fi
8484rm -f conftest.$ac_objext conftest.$ac_ext
8485done
8486case $ac_lo in
8487?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008488'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8489See \`config.log' for more details." >&5
8490echo "$as_me: error: cannot compute sizeof (long long), 77
8491See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 { (exit 1); exit 1; }; } ;;
8493esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008494else
8495 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008496 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8497See \`config.log' for more details." >&5
8498echo "$as_me: error: cannot run test program while cross compiling
8499See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008501else
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 cat >conftest.$ac_ext <<_ACEOF
8503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008504/* confdefs.h. */
8505_ACEOF
8506cat confdefs.h >>conftest.$ac_ext
8507cat >>conftest.$ac_ext <<_ACEOF
8508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008509$ac_includes_default
8510long longval () { return (long) (sizeof (long long)); }
8511unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008512#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008513#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008516{
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
8518 FILE *f = fopen ("conftest.val", "w");
8519 if (! f)
8520 exit (1);
8521 if (((long) (sizeof (long long))) < 0)
8522 {
8523 long i = longval ();
8524 if (i != ((long) (sizeof (long long))))
8525 exit (1);
8526 fprintf (f, "%ld\n", i);
8527 }
8528 else
8529 {
8530 unsigned long i = ulongval ();
8531 if (i != ((long) (sizeof (long long))))
8532 exit (1);
8533 fprintf (f, "%lu\n", i);
8534 }
8535 exit (ferror (f) || fclose (f) != 0);
8536
8537 ;
8538 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008539}
Martin v. Löwis11437992002-04-12 09:54:03 +00008540_ACEOF
8541rm -f conftest$ac_exeext
8542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8543 (eval $ac_link) 2>&5
8544 ac_status=$?
8545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8546 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8548 (eval $ac_try) 2>&5
8549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); }; }; then
8552 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008553else
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 echo "$as_me: program exited with status $ac_status" >&5
8555echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008556sed 's/^/| /' conftest.$ac_ext >&5
8557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008559{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8560See \`config.log' for more details." >&5
8561echo "$as_me: error: cannot compute sizeof (long long), 77
8562See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 { (exit 1); exit 1; }; }
8564fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008565rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
8567fi
8568rm -f conftest.val
8569else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008570 ac_cv_sizeof_long_long=0
8571fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008573echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8574echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8575cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008576#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008577_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578
Michael W. Hudson54241132001-12-07 15:38:26 +00008579
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008580fi
8581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8583echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008584have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008585cat >conftest.$ac_ext <<_ACEOF
8586#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008587/* confdefs.h. */
8588_ACEOF
8589cat confdefs.h >>conftest.$ac_ext
8590cat >>conftest.$ac_ext <<_ACEOF
8591/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593int
8594main ()
8595{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008596uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 ;
8598 return 0;
8599}
8600_ACEOF
8601rm -f conftest.$ac_objext
8602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8603 (eval $ac_compile) 2>&5
8604 ac_status=$?
8605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606 (exit $ac_status); } &&
8607 { ac_try='test -s conftest.$ac_objext'
8608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8609 (eval $ac_try) 2>&5
8610 ac_status=$?
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); }; }; then
8613
8614
8615cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008616#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
8618
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008619 have_uintptr_t=yes
8620
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008621else
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008623sed 's/^/| /' conftest.$ac_ext >&5
8624
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008625fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008626rm -f conftest.$ac_objext conftest.$ac_ext
8627echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8628echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008629if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008630echo "$as_me:$LINENO: checking for uintptr_t" >&5
8631echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8632if test "${ac_cv_type_uintptr_t+set}" = set; then
8633 echo $ECHO_N "(cached) $ECHO_C" >&6
8634else
8635 cat >conftest.$ac_ext <<_ACEOF
8636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008637/* confdefs.h. */
8638_ACEOF
8639cat confdefs.h >>conftest.$ac_ext
8640cat >>conftest.$ac_ext <<_ACEOF
8641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008643int
8644main ()
8645{
8646if ((uintptr_t *) 0)
8647 return 0;
8648if (sizeof (uintptr_t))
8649 return 0;
8650 ;
8651 return 0;
8652}
8653_ACEOF
8654rm -f conftest.$ac_objext
8655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8656 (eval $ac_compile) 2>&5
8657 ac_status=$?
8658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659 (exit $ac_status); } &&
8660 { ac_try='test -s conftest.$ac_objext'
8661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8662 (eval $ac_try) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); }; }; then
8666 ac_cv_type_uintptr_t=yes
8667else
8668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008669sed 's/^/| /' conftest.$ac_ext >&5
8670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671ac_cv_type_uintptr_t=no
8672fi
8673rm -f conftest.$ac_objext conftest.$ac_ext
8674fi
8675echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8676echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8677
8678echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8679echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8680if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8681 echo $ECHO_N "(cached) $ECHO_C" >&6
8682else
8683 if test "$ac_cv_type_uintptr_t" = yes; then
8684 # The cast to unsigned long works around a bug in the HP C Compiler
8685 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687 # This bug is HP SR number 8606223364.
8688 if test "$cross_compiling" = yes; then
8689 # Depending upon the size, compute the lo and hi bounds.
8690cat >conftest.$ac_ext <<_ACEOF
8691#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008692/* confdefs.h. */
8693_ACEOF
8694cat confdefs.h >>conftest.$ac_ext
8695cat >>conftest.$ac_ext <<_ACEOF
8696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008697$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008698int
8699main ()
8700{
8701static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8702test_array [0] = 0
8703
8704 ;
8705 return 0;
8706}
8707_ACEOF
8708rm -f conftest.$ac_objext
8709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8710 (eval $ac_compile) 2>&5
8711 ac_status=$?
8712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8713 (exit $ac_status); } &&
8714 { ac_try='test -s conftest.$ac_objext'
8715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8716 (eval $ac_try) 2>&5
8717 ac_status=$?
8718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719 (exit $ac_status); }; }; then
8720 ac_lo=0 ac_mid=0
8721 while :; do
8722 cat >conftest.$ac_ext <<_ACEOF
8723#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008729$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008730int
8731main ()
8732{
8733static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8734test_array [0] = 0
8735
8736 ;
8737 return 0;
8738}
8739_ACEOF
8740rm -f conftest.$ac_objext
8741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8742 (eval $ac_compile) 2>&5
8743 ac_status=$?
8744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8745 (exit $ac_status); } &&
8746 { ac_try='test -s conftest.$ac_objext'
8747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8748 (eval $ac_try) 2>&5
8749 ac_status=$?
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); }; }; then
8752 ac_hi=$ac_mid; break
8753else
8754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008755sed 's/^/| /' conftest.$ac_ext >&5
8756
Martin v. Löwis11437992002-04-12 09:54:03 +00008757ac_lo=`expr $ac_mid + 1`
8758 if test $ac_lo -le $ac_mid; then
8759 ac_lo= ac_hi=
8760 break
8761 fi
8762 ac_mid=`expr 2 '*' $ac_mid + 1`
8763fi
8764rm -f conftest.$ac_objext conftest.$ac_ext
8765 done
8766else
8767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008768sed 's/^/| /' conftest.$ac_ext >&5
8769
Martin v. Löwis11437992002-04-12 09:54:03 +00008770cat >conftest.$ac_ext <<_ACEOF
8771#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008772/* confdefs.h. */
8773_ACEOF
8774cat confdefs.h >>conftest.$ac_ext
8775cat >>conftest.$ac_ext <<_ACEOF
8776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008777$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
8781static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8782test_array [0] = 0
8783
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext
8789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8790 (eval $ac_compile) 2>&5
8791 ac_status=$?
8792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8793 (exit $ac_status); } &&
8794 { ac_try='test -s conftest.$ac_objext'
8795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8796 (eval $ac_try) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); }; }; then
8800 ac_hi=-1 ac_mid=-1
8801 while :; do
8802 cat >conftest.$ac_ext <<_ACEOF
8803#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* confdefs.h. */
8805_ACEOF
8806cat confdefs.h >>conftest.$ac_ext
8807cat >>conftest.$ac_ext <<_ACEOF
8808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
8812{
8813static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8814test_array [0] = 0
8815
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext
8821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8822 (eval $ac_compile) 2>&5
8823 ac_status=$?
8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825 (exit $ac_status); } &&
8826 { ac_try='test -s conftest.$ac_objext'
8827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8828 (eval $ac_try) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); }; }; then
8832 ac_lo=$ac_mid; break
8833else
8834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008835sed 's/^/| /' conftest.$ac_ext >&5
8836
Martin v. Löwis11437992002-04-12 09:54:03 +00008837ac_hi=`expr '(' $ac_mid ')' - 1`
8838 if test $ac_mid -le $ac_hi; then
8839 ac_lo= ac_hi=
8840 break
8841 fi
8842 ac_mid=`expr 2 '*' $ac_mid`
8843fi
8844rm -f conftest.$ac_objext conftest.$ac_ext
8845 done
8846else
8847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008848sed 's/^/| /' conftest.$ac_ext >&5
8849
Martin v. Löwis11437992002-04-12 09:54:03 +00008850ac_lo= ac_hi=
8851fi
8852rm -f conftest.$ac_objext conftest.$ac_ext
8853fi
8854rm -f conftest.$ac_objext conftest.$ac_ext
8855# Binary search between lo and hi bounds.
8856while test "x$ac_lo" != "x$ac_hi"; do
8857 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8858 cat >conftest.$ac_ext <<_ACEOF
8859#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008866int
8867main ()
8868{
8869static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8870test_array [0] = 0
8871
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876rm -f conftest.$ac_objext
8877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8878 (eval $ac_compile) 2>&5
8879 ac_status=$?
8880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881 (exit $ac_status); } &&
8882 { ac_try='test -s conftest.$ac_objext'
8883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8884 (eval $ac_try) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); }; }; then
8888 ac_hi=$ac_mid
8889else
8890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893ac_lo=`expr '(' $ac_mid ')' + 1`
8894fi
8895rm -f conftest.$ac_objext conftest.$ac_ext
8896done
8897case $ac_lo in
8898?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008899'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8900See \`config.log' for more details." >&5
8901echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8902See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 { (exit 1); exit 1; }; } ;;
8904esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008905else
8906 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008907 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8908See \`config.log' for more details." >&5
8909echo "$as_me: error: cannot run test program while cross compiling
8910See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008912else
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 cat >conftest.$ac_ext <<_ACEOF
8914#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008915/* confdefs.h. */
8916_ACEOF
8917cat confdefs.h >>conftest.$ac_ext
8918cat >>conftest.$ac_ext <<_ACEOF
8919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920$ac_includes_default
8921long longval () { return (long) (sizeof (uintptr_t)); }
8922unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008923#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008924#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008925int
8926main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008927{
Martin v. Löwis11437992002-04-12 09:54:03 +00008928
8929 FILE *f = fopen ("conftest.val", "w");
8930 if (! f)
8931 exit (1);
8932 if (((long) (sizeof (uintptr_t))) < 0)
8933 {
8934 long i = longval ();
8935 if (i != ((long) (sizeof (uintptr_t))))
8936 exit (1);
8937 fprintf (f, "%ld\n", i);
8938 }
8939 else
8940 {
8941 unsigned long i = ulongval ();
8942 if (i != ((long) (sizeof (uintptr_t))))
8943 exit (1);
8944 fprintf (f, "%lu\n", i);
8945 }
8946 exit (ferror (f) || fclose (f) != 0);
8947
8948 ;
8949 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008950}
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
8952rm -f conftest$ac_exeext
8953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8954 (eval $ac_link) 2>&5
8955 ac_status=$?
8956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8957 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8959 (eval $ac_try) 2>&5
8960 ac_status=$?
8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962 (exit $ac_status); }; }; then
8963 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008964else
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 echo "$as_me: program exited with status $ac_status" >&5
8966echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008967sed 's/^/| /' conftest.$ac_ext >&5
8968
Martin v. Löwis11437992002-04-12 09:54:03 +00008969( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008970{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8971See \`config.log' for more details." >&5
8972echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8973See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 { (exit 1); exit 1; }; }
8975fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008976rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008977fi
8978fi
8979rm -f conftest.val
8980else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008981 ac_cv_sizeof_uintptr_t=0
8982fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008983fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008984echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8985echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8986cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008987#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008988_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989
Michael W. Hudson54241132001-12-07 15:38:26 +00008990
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008991fi
8992
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008993# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008994echo "$as_me:$LINENO: checking size of off_t" >&5
8995echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8996if test "${ac_cv_sizeof_off_t+set}" = set; then
8997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008998else
8999 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009000 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001else
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 cat >conftest.$ac_ext <<_ACEOF
9003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009004/* confdefs.h. */
9005_ACEOF
9006cat confdefs.h >>conftest.$ac_ext
9007cat >>conftest.$ac_ext <<_ACEOF
9008/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009#include <stdio.h>
9010#include <sys/types.h>
9011main()
9012{
9013 FILE *f=fopen("conftestval", "w");
9014 if (!f) exit(1);
9015 fprintf(f, "%d\n", sizeof(off_t));
9016 exit(0);
9017}
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
9019rm -f conftest$ac_exeext
9020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9021 (eval $ac_link) 2>&5
9022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9026 (eval $ac_try) 2>&5
9027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009030 ac_cv_sizeof_off_t=`cat conftestval`
9031else
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 echo "$as_me: program exited with status $ac_status" >&5
9033echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009034sed 's/^/| /' conftest.$ac_ext >&5
9035
Martin v. Löwis11437992002-04-12 09:54:03 +00009036( exit $ac_status )
9037ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009038fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009039rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009040fi
9041
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009042fi
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9045echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9046
9047cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009048#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009050
Michael W. Hudson54241132001-12-07 15:38:26 +00009051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9053echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009054if test "$have_long_long" = yes -a \
9055 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9056 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058cat >>confdefs.h <<\_ACEOF
9059#define HAVE_LARGEFILE_SUPPORT 1
9060_ACEOF
9061
9062 echo "$as_me:$LINENO: result: yes" >&5
9063echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064else
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 echo "$as_me:$LINENO: result: no" >&5
9066echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009067fi
9068
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009069# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009070echo "$as_me:$LINENO: checking size of time_t" >&5
9071echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9072if test "${ac_cv_sizeof_time_t+set}" = set; then
9073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009074else
9075 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009076 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009077else
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 cat >conftest.$ac_ext <<_ACEOF
9079#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009080/* confdefs.h. */
9081_ACEOF
9082cat confdefs.h >>conftest.$ac_ext
9083cat >>conftest.$ac_ext <<_ACEOF
9084/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009085#include <stdio.h>
9086#include <time.h>
9087main()
9088{
9089 FILE *f=fopen("conftestval", "w");
9090 if (!f) exit(1);
9091 fprintf(f, "%d\n", sizeof(time_t));
9092 exit(0);
9093}
Martin v. Löwis11437992002-04-12 09:54:03 +00009094_ACEOF
9095rm -f conftest$ac_exeext
9096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9097 (eval $ac_link) 2>&5
9098 ac_status=$?
9099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9102 (eval $ac_try) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009106 ac_cv_sizeof_time_t=`cat conftestval`
9107else
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 echo "$as_me: program exited with status $ac_status" >&5
9109echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009110sed 's/^/| /' conftest.$ac_ext >&5
9111
Martin v. Löwis11437992002-04-12 09:54:03 +00009112( exit $ac_status )
9113ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009114fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009115rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009116fi
9117
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009118fi
9119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9121echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9122
9123cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009124#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009125_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009126
Michael W. Hudson54241132001-12-07 15:38:26 +00009127
9128
Trent Mick635f6fb2000-08-23 21:33:05 +00009129# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009130ac_save_cc="$CC"
9131if test "$ac_cv_kpthread" = "yes"
9132then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009133elif test "$ac_cv_kthread" = "yes"
9134then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009135elif test "$ac_cv_pthread" = "yes"
9136then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009137fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009138echo "$as_me:$LINENO: checking for pthread_t" >&5
9139echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009140have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >conftest.$ac_ext <<_ACEOF
9142#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009143/* confdefs.h. */
9144_ACEOF
9145cat confdefs.h >>conftest.$ac_ext
9146cat >>conftest.$ac_ext <<_ACEOF
9147/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009148#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009149int
9150main ()
9151{
Guido van Rossum12580492000-09-24 16:47:19 +00009152pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 ;
9154 return 0;
9155}
9156_ACEOF
9157rm -f conftest.$ac_objext
9158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9159 (eval $ac_compile) 2>&5
9160 ac_status=$?
9161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9162 (exit $ac_status); } &&
9163 { ac_try='test -s conftest.$ac_objext'
9164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9165 (eval $ac_try) 2>&5
9166 ac_status=$?
9167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009169 have_pthread_t=yes
9170else
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009172sed 's/^/| /' conftest.$ac_ext >&5
9173
Trent Mick635f6fb2000-08-23 21:33:05 +00009174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009175rm -f conftest.$ac_objext conftest.$ac_ext
9176echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9177echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009178if test "$have_pthread_t" = yes ; then
9179 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9181echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9182 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9183 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009184else
9185 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009186 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009187else
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 cat >conftest.$ac_ext <<_ACEOF
9189#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009190/* confdefs.h. */
9191_ACEOF
9192cat confdefs.h >>conftest.$ac_ext
9193cat >>conftest.$ac_ext <<_ACEOF
9194/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009195#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009196#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009197 main()
9198 {
9199 FILE *f=fopen("conftestval", "w");
9200 if (!f) exit(1);
9201 fprintf(f, "%d\n", sizeof(pthread_t));
9202 exit(0);
9203 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009204_ACEOF
9205rm -f conftest$ac_exeext
9206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9207 (eval $ac_link) 2>&5
9208 ac_status=$?
9209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9212 (eval $ac_try) 2>&5
9213 ac_status=$?
9214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9215 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009216 ac_cv_sizeof_pthread_t=`cat conftestval`
9217else
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 echo "$as_me: program exited with status $ac_status" >&5
9219echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009220sed 's/^/| /' conftest.$ac_ext >&5
9221
Martin v. Löwis11437992002-04-12 09:54:03 +00009222( exit $ac_status )
9223ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009224fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009225rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009226fi
9227
Trent Mick635f6fb2000-08-23 21:33:05 +00009228fi
9229
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9231echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9232
9233cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009234#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009235_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009236
9237fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009238CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009239
Martin v. Löwis11437992002-04-12 09:54:03 +00009240echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9241echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009242# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9243if test "${enable_toolbox_glue+set}" = set; then
9244 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009245
Martin v. Löwis11437992002-04-12 09:54:03 +00009246fi;
Jack Jansene578a632001-08-15 01:27:14 +00009247
9248if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009249then
Jack Jansene578a632001-08-15 01:27:14 +00009250 case $ac_sys_system/$ac_sys_release in
9251 Darwin/*)
9252 enable_toolbox_glue="yes";;
9253 *)
9254 enable_toolbox_glue="no";;
9255 esac
9256fi
9257case "$enable_toolbox_glue" in
9258yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009259 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009260 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009261 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
9263cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009264#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009265_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009266
9267 ;;
9268*)
9269 extra_frameworks=""
9270 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009271 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009272 ;;
9273esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009274echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9275echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009276
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009277
9278case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009279 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009280 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009281 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009283 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009284 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009285 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009286 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289esac
9290
Martin v. Löwis11437992002-04-12 09:54:03 +00009291echo "$as_me:$LINENO: checking for --enable-framework" >&5
9292echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009293if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009295 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009297 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009298
Martin v. Löwis11437992002-04-12 09:54:03 +00009299cat >>confdefs.h <<\_ACEOF
9300#define WITH_NEXT_FRAMEWORK 1
9301_ACEOF
9302
9303 echo "$as_me:$LINENO: result: yes" >&5
9304echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305else
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 echo "$as_me:$LINENO: result: no" >&5
9307echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308fi
9309
Martin v. Löwis11437992002-04-12 09:54:03 +00009310echo "$as_me:$LINENO: checking for dyld" >&5
9311echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009312case $ac_sys_system/$ac_sys_release in
9313 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314
Martin v. Löwis11437992002-04-12 09:54:03 +00009315cat >>confdefs.h <<\_ACEOF
9316#define WITH_DYLD 1
9317_ACEOF
9318
9319 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9320echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009321 ;;
9322 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009323 echo "$as_me:$LINENO: result: no" >&5
9324echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009325 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009326esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009327
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329
Michael W. Hudson54241132001-12-07 15:38:26 +00009330
9331
9332
9333
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009335# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009336echo "$as_me:$LINENO: checking SO" >&5
9337echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338if test -z "$SO"
9339then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009340 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009341 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009342 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009343 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009345else
9346 # this might also be a termcap variable, see #610332
9347 echo
9348 echo '====================================================================='
9349 echo '+ +'
9350 echo '+ WARNING: You have set SO in your environment. +'
9351 echo '+ Do you really mean to change the extension for shared libraries? +'
9352 echo '+ Continuing in 10 seconds to let you to ponder. +'
9353 echo '+ +'
9354 echo '====================================================================='
9355 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009357echo "$as_me:$LINENO: result: $SO" >&5
9358echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009359# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009360# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009361# (Shared libraries in this instance are shared modules to be loaded into
9362# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: checking LDSHARED" >&5
9364echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009365if test -z "$LDSHARED"
9366then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009367 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009368 AIX*)
9369 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009370 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009371 ;;
9372 BeOS*)
9373 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009374 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009375 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009376 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009377 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009379 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009380 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009381 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009382 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009384 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009385 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009386 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9387 if test "$enable_framework" ; then
9388 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009389 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9390 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009391 else
9392 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009393 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009394 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009395 Darwin/*)
9396 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9397 if test "$enable_framework" ; then
9398 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009399 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9400 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009401 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009402 # No framework, use the Python app as bundle-loader
9403 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009404 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009405 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009406 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009407 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009408 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009409 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009410 then
9411 LDSHARED="cc -shared ${LDFLAGS}"
9412 else
9413 LDSHARED="ld -Bshareable ${LDFLAGS}"
9414 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009415 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009416 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009417 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009418 then LDSHARED='$(CC) -shared'
9419 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009420 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009421 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009422 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009423 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009424 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009425 *) LDSHARED="ld";;
9426 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009428echo "$as_me:$LINENO: result: $LDSHARED" >&5
9429echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009430BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009432# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009433echo "$as_me:$LINENO: checking CCSHARED" >&5
9434echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009435if test -z "$CCSHARED"
9436then
Guido van Rossum07397971997-04-29 21:49:50 +00009437 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009438 SunOS*) if test "$GCC" = yes;
9439 then CCSHARED="-fPIC";
9440 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009441 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009442 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009443 else CCSHARED="+z";
9444 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009445 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009446 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009447 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009448 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009449 if test "$GCC" = "yes"
9450 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009451 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009452 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009453 SCO_SV*)
9454 if test "$GCC" = "yes"
9455 then CCSHARED="-fPIC"
9456 else CCSHARED="-Kpic -belf"
9457 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009458 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009459 IRIX*/6*) case $CC in
9460 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009461 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009462 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009463 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009464 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009465fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009466echo "$as_me:$LINENO: result: $CCSHARED" >&5
9467echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009468# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009470echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9471echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009472if test -z "$LINKFORSHARED"
9473then
Guido van Rossum07397971997-04-29 21:49:50 +00009474 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009475 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009476 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009477 LINKFORSHARED="-Wl,-E -Wl,+s";;
9478# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009479 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009480 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009481 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009483 # -u __dummy makes the linker aware of the objc runtime
9484 # in System.framework; otherwise, __objcInit (referenced in
9485 # crt1.o) gets erroneously defined as common, which breaks dynamic
9486 # loading of any modules which reference it in System.framework.
9487 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9488 # not used by the core itself but which needs to be in the core so
9489 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009490 # -prebind is no longer used, because it actually seems to give a
9491 # slowdown in stead of a speedup, maybe due to the large number of
9492 # dynamic loads Python does.
9493 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009494 if test "$enable_framework"
9495 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009496 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009497 fi
9498 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009499 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009500 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009501 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9504 then
9505 LINKFORSHARED="-Wl,--export-dynamic"
9506 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009507 SunOS/5*) case $CC in
9508 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009509 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009510 then
9511 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009512 fi;;
9513 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009514 CYGWIN*)
9515 if test $enable_shared = "no"
9516 then
9517 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9518 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009519 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009520fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009521echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9522echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009523
Michael W. Hudson54241132001-12-07 15:38:26 +00009524
Martin v. Löwis11437992002-04-12 09:54:03 +00009525echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9526echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009527if test ! "$LIBRARY" = "$LDLIBRARY"
9528then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009529 case $ac_sys_system in
9530 CYGWIN*)
9531 # Cygwin needs CCSHARED when building extension DLLs
9532 # but not when building the interpreter DLL.
9533 CFLAGSFORSHARED='';;
9534 *)
9535 CFLAGSFORSHARED='$(CCSHARED)'
9536 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009538echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9539echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009540
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009541# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9542# library (with --enable-shared).
9543# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009544# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9545# if it is not required, since it creates a dependency of the shared library
9546# to LIBS. This, in turn, means that applications linking the shared libpython
9547# don't need to link LIBS explicitly. The default should be only changed
9548# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009549
9550echo "$as_me:$LINENO: checking SHLIBS" >&5
9551echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9552case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009553 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009554 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009555esac
9556echo "$as_me:$LINENO: result: $SHLIBS" >&5
9557echo "${ECHO_T}$SHLIBS" >&6
9558
9559
Guido van Rossum627b2d71993-12-24 10:39:16 +00009560# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009561
9562echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9563echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9564if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9565 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009566else
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009568LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009569cat >conftest.$ac_ext <<_ACEOF
9570#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009571/* confdefs.h. */
9572_ACEOF
9573cat confdefs.h >>conftest.$ac_ext
9574cat >>conftest.$ac_ext <<_ACEOF
9575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009576
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009577/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009578#ifdef __cplusplus
9579extern "C"
9580#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009581/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 builtin and then its argument prototype would still apply. */
9583char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
9587dlopen ();
9588 ;
9589 return 0;
9590}
9591_ACEOF
9592rm -f conftest.$ac_objext conftest$ac_exeext
9593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9594 (eval $ac_link) 2>&5
9595 ac_status=$?
9596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); } &&
9598 { ac_try='test -s conftest$ac_exeext'
9599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9600 (eval $ac_try) 2>&5
9601 ac_status=$?
9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603 (exit $ac_status); }; }; then
9604 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009605else
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009607sed 's/^/| /' conftest.$ac_ext >&5
9608
Martin v. Löwis11437992002-04-12 09:54:03 +00009609ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009610fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009611rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9612LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009613fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009614echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9615echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9616if test $ac_cv_lib_dl_dlopen = yes; then
9617 cat >>confdefs.h <<_ACEOF
9618#define HAVE_LIBDL 1
9619_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009620
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009621 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009622
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009623fi
9624 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009625
9626echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9627echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9628if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630else
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009632LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009633cat >conftest.$ac_ext <<_ACEOF
9634#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009635/* confdefs.h. */
9636_ACEOF
9637cat confdefs.h >>conftest.$ac_ext
9638cat >>conftest.$ac_ext <<_ACEOF
9639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009641/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009642#ifdef __cplusplus
9643extern "C"
9644#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009645/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 builtin and then its argument prototype would still apply. */
9647char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009648int
9649main ()
9650{
9651shl_load ();
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656rm -f conftest.$ac_objext conftest$ac_exeext
9657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9658 (eval $ac_link) 2>&5
9659 ac_status=$?
9660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9661 (exit $ac_status); } &&
9662 { ac_try='test -s conftest$ac_exeext'
9663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9664 (eval $ac_try) 2>&5
9665 ac_status=$?
9666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667 (exit $ac_status); }; }; then
9668 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009669else
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009671sed 's/^/| /' conftest.$ac_ext >&5
9672
Martin v. Löwis11437992002-04-12 09:54:03 +00009673ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009674fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009677fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009678echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9679echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9680if test $ac_cv_lib_dld_shl_load = yes; then
9681 cat >>confdefs.h <<_ACEOF
9682#define HAVE_LIBDLD 1
9683_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009684
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009685 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009686
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687fi
9688 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009689
9690# only check for sem_ini if thread support is requested
9691if test "$with_threads" = "yes" -o -z "$with_threads"; then
9692 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009693echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9694if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009696else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009697 ac_func_search_save_LIBS=$LIBS
9698ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009699cat >conftest.$ac_ext <<_ACEOF
9700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* confdefs.h. */
9702_ACEOF
9703cat confdefs.h >>conftest.$ac_ext
9704cat >>conftest.$ac_ext <<_ACEOF
9705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009706
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009707/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009708#ifdef __cplusplus
9709extern "C"
9710#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009711/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 builtin and then its argument prototype would still apply. */
9713char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009714int
9715main ()
9716{
9717sem_init ();
9718 ;
9719 return 0;
9720}
9721_ACEOF
9722rm -f conftest.$ac_objext conftest$ac_exeext
9723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9724 (eval $ac_link) 2>&5
9725 ac_status=$?
9726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727 (exit $ac_status); } &&
9728 { ac_try='test -s conftest$ac_exeext'
9729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9730 (eval $ac_try) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009734 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009735else
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009737sed 's/^/| /' conftest.$ac_ext >&5
9738
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009739fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009741if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009742 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009743 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9744 cat >conftest.$ac_ext <<_ACEOF
9745#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* confdefs.h. */
9747_ACEOF
9748cat confdefs.h >>conftest.$ac_ext
9749cat >>conftest.$ac_ext <<_ACEOF
9750/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009751
9752/* Override any gcc2 internal prototype to avoid an error. */
9753#ifdef __cplusplus
9754extern "C"
9755#endif
9756/* We use char because int might match the return type of a gcc2
9757 builtin and then its argument prototype would still apply. */
9758char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009759int
9760main ()
9761{
9762sem_init ();
9763 ;
9764 return 0;
9765}
Martin v. Löwis11437992002-04-12 09:54:03 +00009766_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779 ac_cv_search_sem_init="-l$ac_lib"
9780break
9781else
9782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009785fi
9786rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9787 done
9788fi
9789LIBS=$ac_func_search_save_LIBS
9790fi
9791echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9792echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9793if test "$ac_cv_search_sem_init" != no; then
9794 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009795
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009796fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009797 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009798 # posix4 on Solaris 2.6
9799 # pthread (first!) on Linux
9800fi
9801
Martin v. Löwis19d17342003-06-14 21:03:05 +00009802# check if we need libintl for locale functions
9803echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9804echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9805if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9806 echo $ECHO_N "(cached) $ECHO_C" >&6
9807else
9808 ac_check_lib_save_LIBS=$LIBS
9809LIBS="-lintl $LIBS"
9810cat >conftest.$ac_ext <<_ACEOF
9811#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009812/* confdefs.h. */
9813_ACEOF
9814cat confdefs.h >>conftest.$ac_ext
9815cat >>conftest.$ac_ext <<_ACEOF
9816/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009817
9818/* Override any gcc2 internal prototype to avoid an error. */
9819#ifdef __cplusplus
9820extern "C"
9821#endif
9822/* We use char because int might match the return type of a gcc2
9823 builtin and then its argument prototype would still apply. */
9824char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009825int
9826main ()
9827{
9828textdomain ();
9829 ;
9830 return 0;
9831}
9832_ACEOF
9833rm -f conftest.$ac_objext conftest$ac_exeext
9834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9835 (eval $ac_link) 2>&5
9836 ac_status=$?
9837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838 (exit $ac_status); } &&
9839 { ac_try='test -s conftest$ac_exeext'
9840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9841 (eval $ac_try) 2>&5
9842 ac_status=$?
9843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844 (exit $ac_status); }; }; then
9845 ac_cv_lib_intl_textdomain=yes
9846else
9847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009848sed 's/^/| /' conftest.$ac_ext >&5
9849
Martin v. Löwis19d17342003-06-14 21:03:05 +00009850ac_cv_lib_intl_textdomain=no
9851fi
9852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9853LIBS=$ac_check_lib_save_LIBS
9854fi
9855echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9856echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9857if test $ac_cv_lib_intl_textdomain = yes; then
9858
9859cat >>confdefs.h <<\_ACEOF
9860#define WITH_LIBINTL 1
9861_ACEOF
9862
9863fi
9864
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009865
9866# checks for system dependent C++ extensions support
9867case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9869echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9870 cat >conftest.$ac_ext <<_ACEOF
9871#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009872/* confdefs.h. */
9873_ACEOF
9874cat confdefs.h >>conftest.$ac_ext
9875cat >>conftest.$ac_ext <<_ACEOF
9876/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009877#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009878int
9879main ()
9880{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009881loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ;
9883 return 0;
9884}
9885_ACEOF
9886rm -f conftest.$ac_objext conftest$ac_exeext
9887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9888 (eval $ac_link) 2>&5
9889 ac_status=$?
9890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9891 (exit $ac_status); } &&
9892 { ac_try='test -s conftest$ac_exeext'
9893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9894 (eval $ac_try) 2>&5
9895 ac_status=$?
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899cat >>confdefs.h <<\_ACEOF
9900#define AIX_GENUINE_CPLUSPLUS 1
9901_ACEOF
9902
9903 echo "$as_me:$LINENO: result: yes" >&5
9904echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009905else
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009907sed 's/^/| /' conftest.$ac_ext >&5
9908
Martin v. Löwis11437992002-04-12 09:54:03 +00009909echo "$as_me:$LINENO: result: no" >&5
9910echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009912rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009913 *) ;;
9914esac
9915
Guido van Rossum70c7f481998-03-26 18:44:10 +00009916# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009917# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009918echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9919echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9920if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009922else
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009924LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009925cat >conftest.$ac_ext <<_ACEOF
9926#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* confdefs.h. */
9928_ACEOF
9929cat confdefs.h >>conftest.$ac_ext
9930cat >>conftest.$ac_ext <<_ACEOF
9931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009934#ifdef __cplusplus
9935extern "C"
9936#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 builtin and then its argument prototype would still apply. */
9939char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009940int
9941main ()
9942{
9943t_open ();
9944 ;
9945 return 0;
9946}
9947_ACEOF
9948rm -f conftest.$ac_objext conftest$ac_exeext
9949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9950 (eval $ac_link) 2>&5
9951 ac_status=$?
9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953 (exit $ac_status); } &&
9954 { ac_try='test -s conftest$ac_exeext'
9955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9956 (eval $ac_try) 2>&5
9957 ac_status=$?
9958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9959 (exit $ac_status); }; }; then
9960 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009961else
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009963sed 's/^/| /' conftest.$ac_ext >&5
9964
Martin v. Löwis11437992002-04-12 09:54:03 +00009965ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009966fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9968LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009970echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9971echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9972if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009973 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009974fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009975 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009976echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9977echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9978if test "${ac_cv_lib_socket_socket+set}" = set; then
9979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009980else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009982LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009983cat >conftest.$ac_ext <<_ACEOF
9984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 builtin and then its argument prototype would still apply. */
9997char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009998int
9999main ()
10000{
10001socket ();
10002 ;
10003 return 0;
10004}
10005_ACEOF
10006rm -f conftest.$ac_objext conftest$ac_exeext
10007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10008 (eval $ac_link) 2>&5
10009 ac_status=$?
10010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 (exit $ac_status); } &&
10012 { ac_try='test -s conftest$ac_exeext'
10013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014 (eval $ac_try) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); }; }; then
10018 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010021sed 's/^/| /' conftest.$ac_ext >&5
10022
Martin v. Löwis11437992002-04-12 09:54:03 +000010023ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10026LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010027fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010028echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10029echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10030if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010031 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010032fi
10033 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010034
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010035case "$ac_sys_system" in
10036BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010037echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10038echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10039if test "${ac_cv_lib_net_socket+set}" = set; then
10040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010041else
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010043LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010044cat >conftest.$ac_ext <<_ACEOF
10045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* confdefs.h. */
10047_ACEOF
10048cat confdefs.h >>conftest.$ac_ext
10049cat >>conftest.$ac_ext <<_ACEOF
10050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
Guido van Rossumad678af1998-10-02 14:42:15 +000010052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010053#ifdef __cplusplus
10054extern "C"
10055#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 builtin and then its argument prototype would still apply. */
10058char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010059int
10060main ()
10061{
10062socket ();
10063 ;
10064 return 0;
10065}
10066_ACEOF
10067rm -f conftest.$ac_objext conftest$ac_exeext
10068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10069 (eval $ac_link) 2>&5
10070 ac_status=$?
10071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10072 (exit $ac_status); } &&
10073 { ac_try='test -s conftest$ac_exeext'
10074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10075 (eval $ac_try) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); }; }; then
10079 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010080else
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010082sed 's/^/| /' conftest.$ac_ext >&5
10083
Martin v. Löwis11437992002-04-12 09:54:03 +000010084ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10087LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010089echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10090echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10091if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010092 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010093fi
10094 # BeOS
10095;;
10096esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010097
Martin v. Löwis11437992002-04-12 09:54:03 +000010098echo "$as_me:$LINENO: checking for --with-libs" >&5
10099echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10100
Guido van Rossuma68acba1996-07-31 17:36:39 +000010101# Check whether --with-libs or --without-libs was given.
10102if test "${with_libs+set}" = set; then
10103 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010104
10105echo "$as_me:$LINENO: result: $withval" >&5
10106echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010107LIBS="$withval $LIBS"
10108
10109else
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 echo "$as_me:$LINENO: result: no" >&5
10111echo "${ECHO_T}no" >&6
10112fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010113
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010114# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010115
10116
Martin v. Löwis11437992002-04-12 09:54:03 +000010117echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10118echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10119
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010120# Check whether --with-signal-module or --without-signal-module was given.
10121if test "${with_signal_module+set}" = set; then
10122 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010123
Martin v. Löwis11437992002-04-12 09:54:03 +000010124fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010125
10126if test -z "$with_signal_module"
10127then with_signal_module="yes"
10128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010129echo "$as_me:$LINENO: result: $with_signal_module" >&5
10130echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010131
10132if test "${with_signal_module}" = "yes"; then
10133 USE_SIGNAL_MODULE=""
10134 SIGNAL_OBJS=""
10135else
10136 USE_SIGNAL_MODULE="#"
10137 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10138fi
10139
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010140# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010141
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010142USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010143
Martin v. Löwis11437992002-04-12 09:54:03 +000010144echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10145echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10146
Guido van Rossumec2f0731997-01-22 20:54:01 +000010147
10148# Check whether --with-dec-threads or --without-dec-threads was given.
10149if test "${with_dec_threads+set}" = set; then
10150 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010151
10152echo "$as_me:$LINENO: result: $withval" >&5
10153echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010154LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010155if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010156 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010157fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010158else
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 echo "$as_me:$LINENO: result: no" >&5
10160echo "${ECHO_T}no" >&6
10161fi;
10162
10163# Templates for things AC_DEFINEd more than once.
10164# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010165
10166
Martin v. Löwis11437992002-04-12 09:54:03 +000010167
10168
10169
10170
10171
10172echo "$as_me:$LINENO: checking for --with-threads" >&5
10173echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10174
Guido van Rossumec2f0731997-01-22 20:54:01 +000010175# Check whether --with-threads or --without-threads was given.
10176if test "${with_threads+set}" = set; then
10177 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010178
Martin v. Löwis11437992002-04-12 09:54:03 +000010179fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010180
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010181# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010183# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010184if test "${with_thread+set}" = set; then
10185 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010186 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010187fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010188
10189if test -z "$with_threads"
10190then with_threads="yes"
10191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010192echo "$as_me:$LINENO: result: $with_threads" >&5
10193echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010194
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010195
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010196if test "$with_threads" = "no"
10197then
10198 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199elif test "$ac_cv_pthread_is_default" = yes
10200then
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010203_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010204
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010207#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010208_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010209
10210 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010212elif test "$ac_cv_kpthread" = "yes"
10213then
10214 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010215 if test "$ac_cv_cxx_thread" = "yes"; then
10216 CXX="$CXX -Kpthread"
10217 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010219#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010220_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010221
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010222 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010223 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010224elif test "$ac_cv_kthread" = "yes"
10225then
10226 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010227 if test "$ac_cv_cxx_thread" = "yes"; then
10228 CXX="$CXX -Kthread"
10229 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010230 cat >>confdefs.h <<\_ACEOF
10231#define WITH_THREAD 1
10232_ACEOF
10233
10234 posix_threads=yes
10235 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010236elif test "$ac_cv_pthread" = "yes"
10237then
10238 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010239 if test "$ac_cv_cxx_thread" = "yes"; then
10240 CXX="$CXX -pthread"
10241 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010242 cat >>confdefs.h <<\_ACEOF
10243#define WITH_THREAD 1
10244_ACEOF
10245
10246 posix_threads=yes
10247 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010248else
10249 if test ! -z "$with_threads" -a -d "$with_threads"
10250 then LDFLAGS="$LDFLAGS -L$with_threads"
10251 fi
10252 if test ! -z "$withval" -a -d "$withval"
10253 then LDFLAGS="$LDFLAGS -L$withval"
10254 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010255
10256 # According to the POSIX spec, a pthreads implementation must
10257 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10259echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10260 cat >conftest.$ac_ext <<_ACEOF
10261#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010262/* confdefs.h. */
10263_ACEOF
10264cat confdefs.h >>conftest.$ac_ext
10265cat >>conftest.$ac_ext <<_ACEOF
10266/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010267
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010268#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010269#ifdef _POSIX_THREADS
10270yes
10271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010272
10273_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010275 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010276 unistd_defines_pthreads=yes
10277else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010278 unistd_defines_pthreads=no
10279fi
10280rm -f conftest*
10281
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10283echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010286#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010287_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010288
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 if test "${ac_cv_header_cthreads_h+set}" = set; then
10290 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10291echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10292if test "${ac_cv_header_cthreads_h+set}" = set; then
10293 echo $ECHO_N "(cached) $ECHO_C" >&6
10294fi
10295echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10296echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010297else
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 # Is the header compilable?
10299echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10300echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10301cat >conftest.$ac_ext <<_ACEOF
10302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* confdefs.h. */
10304_ACEOF
10305cat confdefs.h >>conftest.$ac_ext
10306cat >>conftest.$ac_ext <<_ACEOF
10307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308$ac_includes_default
10309#include <cthreads.h>
10310_ACEOF
10311rm -f conftest.$ac_objext
10312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10313 (eval $ac_compile) 2>&5
10314 ac_status=$?
10315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316 (exit $ac_status); } &&
10317 { ac_try='test -s conftest.$ac_objext'
10318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10319 (eval $ac_try) 2>&5
10320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); }; }; then
10323 ac_header_compiler=yes
10324else
10325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010326sed 's/^/| /' conftest.$ac_ext >&5
10327
Martin v. Löwis11437992002-04-12 09:54:03 +000010328ac_header_compiler=no
10329fi
10330rm -f conftest.$ac_objext conftest.$ac_ext
10331echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10332echo "${ECHO_T}$ac_header_compiler" >&6
10333
10334# Is the header present?
10335echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10336echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10337cat >conftest.$ac_ext <<_ACEOF
10338#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010339/* confdefs.h. */
10340_ACEOF
10341cat confdefs.h >>conftest.$ac_ext
10342cat >>conftest.$ac_ext <<_ACEOF
10343/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010344#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010345_ACEOF
10346if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10347 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10348 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010349 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 rm -f conftest.er1
10351 cat conftest.err >&5
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } >/dev/null; then
10354 if test -s conftest.err; then
10355 ac_cpp_err=$ac_c_preproc_warn_flag
10356 else
10357 ac_cpp_err=
10358 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010359else
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ac_cpp_err=yes
10361fi
10362if test -z "$ac_cpp_err"; then
10363 ac_header_preproc=yes
10364else
10365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010366sed 's/^/| /' conftest.$ac_ext >&5
10367
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010370rm -f conftest.err conftest.$ac_ext
10371echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10372echo "${ECHO_T}$ac_header_preproc" >&6
10373
10374# So? What about this header?
10375case $ac_header_compiler:$ac_header_preproc in
10376 yes:no )
10377 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10378echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10379 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010380echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10381 (
10382 cat <<\_ASBOX
10383## ------------------------------------ ##
10384## Report this to bug-autoconf@gnu.org. ##
10385## ------------------------------------ ##
10386_ASBOX
10387 ) |
10388 sed "s/^/$as_me: WARNING: /" >&2
10389 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 no:yes )
10391 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10392echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10393 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10394echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10395 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010396echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10397 (
10398 cat <<\_ASBOX
10399## ------------------------------------ ##
10400## Report this to bug-autoconf@gnu.org. ##
10401## ------------------------------------ ##
10402_ASBOX
10403 ) |
10404 sed "s/^/$as_me: WARNING: /" >&2
10405 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010406esac
10407echo "$as_me:$LINENO: checking for cthreads.h" >&5
10408echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10409if test "${ac_cv_header_cthreads_h+set}" = set; then
10410 echo $ECHO_N "(cached) $ECHO_C" >&6
10411else
10412 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010414echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10415echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10416
10417fi
10418if test $ac_cv_header_cthreads_h = yes; then
10419 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010420#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010421_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010422
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010424#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010425_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010426
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
10428cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010429#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010430_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010431
10432 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010433 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010434else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010435
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10437 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10438echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10439if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10440 echo $ECHO_N "(cached) $ECHO_C" >&6
10441fi
10442echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10443echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010444else
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 # Is the header compilable?
10446echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10447echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10448cat >conftest.$ac_ext <<_ACEOF
10449#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* confdefs.h. */
10451_ACEOF
10452cat confdefs.h >>conftest.$ac_ext
10453cat >>conftest.$ac_ext <<_ACEOF
10454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010455$ac_includes_default
10456#include <mach/cthreads.h>
10457_ACEOF
10458rm -f conftest.$ac_objext
10459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10460 (eval $ac_compile) 2>&5
10461 ac_status=$?
10462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10463 (exit $ac_status); } &&
10464 { ac_try='test -s conftest.$ac_objext'
10465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10466 (eval $ac_try) 2>&5
10467 ac_status=$?
10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10469 (exit $ac_status); }; }; then
10470 ac_header_compiler=yes
10471else
10472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010473sed 's/^/| /' conftest.$ac_ext >&5
10474
Martin v. Löwis11437992002-04-12 09:54:03 +000010475ac_header_compiler=no
10476fi
10477rm -f conftest.$ac_objext conftest.$ac_ext
10478echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10479echo "${ECHO_T}$ac_header_compiler" >&6
10480
10481# Is the header present?
10482echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10483echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10484cat >conftest.$ac_ext <<_ACEOF
10485#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* confdefs.h. */
10487_ACEOF
10488cat confdefs.h >>conftest.$ac_ext
10489cat >>conftest.$ac_ext <<_ACEOF
10490/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010491#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010492_ACEOF
10493if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10494 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10495 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010496 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010497 rm -f conftest.er1
10498 cat conftest.err >&5
10499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10500 (exit $ac_status); } >/dev/null; then
10501 if test -s conftest.err; then
10502 ac_cpp_err=$ac_c_preproc_warn_flag
10503 else
10504 ac_cpp_err=
10505 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010506else
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ac_cpp_err=yes
10508fi
10509if test -z "$ac_cpp_err"; then
10510 ac_header_preproc=yes
10511else
10512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010513sed 's/^/| /' conftest.$ac_ext >&5
10514
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010517rm -f conftest.err conftest.$ac_ext
10518echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10519echo "${ECHO_T}$ac_header_preproc" >&6
10520
10521# So? What about this header?
10522case $ac_header_compiler:$ac_header_preproc in
10523 yes:no )
10524 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10525echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10526 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010527echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10528 (
10529 cat <<\_ASBOX
10530## ------------------------------------ ##
10531## Report this to bug-autoconf@gnu.org. ##
10532## ------------------------------------ ##
10533_ASBOX
10534 ) |
10535 sed "s/^/$as_me: WARNING: /" >&2
10536 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010537 no:yes )
10538 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10539echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10540 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10541echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10542 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010543echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10544 (
10545 cat <<\_ASBOX
10546## ------------------------------------ ##
10547## Report this to bug-autoconf@gnu.org. ##
10548## ------------------------------------ ##
10549_ASBOX
10550 ) |
10551 sed "s/^/$as_me: WARNING: /" >&2
10552 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010553esac
10554echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10555echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10556if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10557 echo $ECHO_N "(cached) $ECHO_C" >&6
10558else
10559 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010561echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10562echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10563
10564fi
10565if test $ac_cv_header_mach_cthreads_h = yes; then
10566 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010567#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010568_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010569
Martin v. Löwis11437992002-04-12 09:54:03 +000010570 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010571#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010572_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010573
Martin v. Löwis11437992002-04-12 09:54:03 +000010574
10575cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010576#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010577_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010578
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010579 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010580else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 echo "$as_me:$LINENO: checking for --with-pth" >&5
10583echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10584
10585# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010586if test "${with_pth+set}" = set; then
10587 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010588 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010589echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010590 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010591#define WITH_THREAD 1
10592_ACEOF
10593
10594
10595cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010596#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010597_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010598
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010599 LIBS="-lpth $LIBS"
10600 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010601else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010602 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010603echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010604
10605 # Just looking for pthread_create in libpthread is not enough:
10606 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10607 # So we really have to include pthread.h, and then link.
10608 _libs=$LIBS
10609 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10611echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10612 cat >conftest.$ac_ext <<_ACEOF
10613#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* confdefs.h. */
10615_ACEOF
10616cat confdefs.h >>conftest.$ac_ext
10617cat >>conftest.$ac_ext <<_ACEOF
10618/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010619#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010620
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010621void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010622int
10623main ()
10624{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010625
10626pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ;
10628 return 0;
10629}
10630_ACEOF
10631rm -f conftest.$ac_objext conftest$ac_exeext
10632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10633 (eval $ac_link) 2>&5
10634 ac_status=$?
10635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636 (exit $ac_status); } &&
10637 { ac_try='test -s conftest$ac_exeext'
10638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10639 (eval $ac_try) 2>&5
10640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); }; }; then
10643
10644 echo "$as_me:$LINENO: result: yes" >&5
10645echo "${ECHO_T}yes" >&6
10646 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010647#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010648_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010649
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010650 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010651 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010652else
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010654sed 's/^/| /' conftest.$ac_ext >&5
10655
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010657 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10659echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10660if test "${ac_cv_func_pthread_detach+set}" = set; then
10661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010662else
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 cat >conftest.$ac_ext <<_ACEOF
10664#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* confdefs.h. */
10666_ACEOF
10667cat confdefs.h >>conftest.$ac_ext
10668cat >>conftest.$ac_ext <<_ACEOF
10669/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010670/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010671 which can conflict with char pthread_detach (); below.
10672 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010673 <limits.h> exists even on freestanding compilers. Under hpux,
10674 including <limits.h> includes <sys/time.h> and causes problems
10675 checking for functions defined therein. */
10676#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010677# include <limits.h>
10678#else
10679# include <assert.h>
10680#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010681/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010682#ifdef __cplusplus
10683extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010684{
Martin v. Löwis11437992002-04-12 09:54:03 +000010685#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010686/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 builtin and then its argument prototype would still apply. */
10688char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010689/* The GNU C library defines this for functions which it implements
10690 to always fail with ENOSYS. Some functions are actually named
10691 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010692#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010693choke me
10694#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010695char (*f) () = pthread_detach;
10696#endif
10697#ifdef __cplusplus
10698}
Guido van Rossumad678af1998-10-02 14:42:15 +000010699#endif
10700
Skip Montanaro6dead952003-09-25 14:50:04 +000010701int
10702main ()
10703{
10704return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest.$ac_objext conftest$ac_exeext
10710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10711 (eval $ac_link) 2>&5
10712 ac_status=$?
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); } &&
10715 { ac_try='test -s conftest$ac_exeext'
10716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10717 (eval $ac_try) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); }; }; then
10721 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010722else
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010724sed 's/^/| /' conftest.$ac_ext >&5
10725
Martin v. Löwis11437992002-04-12 09:54:03 +000010726ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010728rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010730echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10731echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10732if test $ac_cv_func_pthread_detach = yes; then
10733 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010734#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010735_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010736
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010737 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010738 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010739else
Guido van Rossumad678af1998-10-02 14:42:15 +000010740
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010741 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10742 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10743echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10744if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10745 echo $ECHO_N "(cached) $ECHO_C" >&6
10746fi
10747echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10748echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10749else
10750 # Is the header compilable?
10751echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10752echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10753cat >conftest.$ac_ext <<_ACEOF
10754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010755/* confdefs.h. */
10756_ACEOF
10757cat confdefs.h >>conftest.$ac_ext
10758cat >>conftest.$ac_ext <<_ACEOF
10759/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010760$ac_includes_default
10761#include <atheos/threads.h>
10762_ACEOF
10763rm -f conftest.$ac_objext
10764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10765 (eval $ac_compile) 2>&5
10766 ac_status=$?
10767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10768 (exit $ac_status); } &&
10769 { ac_try='test -s conftest.$ac_objext'
10770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10771 (eval $ac_try) 2>&5
10772 ac_status=$?
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); }; }; then
10775 ac_header_compiler=yes
10776else
10777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010778sed 's/^/| /' conftest.$ac_ext >&5
10779
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010780ac_header_compiler=no
10781fi
10782rm -f conftest.$ac_objext conftest.$ac_ext
10783echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10784echo "${ECHO_T}$ac_header_compiler" >&6
10785
10786# Is the header present?
10787echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10788echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10789cat >conftest.$ac_ext <<_ACEOF
10790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010791/* confdefs.h. */
10792_ACEOF
10793cat confdefs.h >>conftest.$ac_ext
10794cat >>conftest.$ac_ext <<_ACEOF
10795/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010796#include <atheos/threads.h>
10797_ACEOF
10798if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10799 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10800 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010801 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010802 rm -f conftest.er1
10803 cat conftest.err >&5
10804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10805 (exit $ac_status); } >/dev/null; then
10806 if test -s conftest.err; then
10807 ac_cpp_err=$ac_c_preproc_warn_flag
10808 else
10809 ac_cpp_err=
10810 fi
10811else
10812 ac_cpp_err=yes
10813fi
10814if test -z "$ac_cpp_err"; then
10815 ac_header_preproc=yes
10816else
10817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010818sed 's/^/| /' conftest.$ac_ext >&5
10819
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010820 ac_header_preproc=no
10821fi
10822rm -f conftest.err conftest.$ac_ext
10823echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10824echo "${ECHO_T}$ac_header_preproc" >&6
10825
10826# So? What about this header?
10827case $ac_header_compiler:$ac_header_preproc in
10828 yes:no )
10829 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10830echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10831 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010832echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10833 (
10834 cat <<\_ASBOX
10835## ------------------------------------ ##
10836## Report this to bug-autoconf@gnu.org. ##
10837## ------------------------------------ ##
10838_ASBOX
10839 ) |
10840 sed "s/^/$as_me: WARNING: /" >&2
10841 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010842 no:yes )
10843 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10844echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10845 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10846echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10847 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010848echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10849 (
10850 cat <<\_ASBOX
10851## ------------------------------------ ##
10852## Report this to bug-autoconf@gnu.org. ##
10853## ------------------------------------ ##
10854_ASBOX
10855 ) |
10856 sed "s/^/$as_me: WARNING: /" >&2
10857 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010858esac
10859echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10860echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10861if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10862 echo $ECHO_N "(cached) $ECHO_C" >&6
10863else
10864 ac_cv_header_atheos_threads_h=$ac_header_preproc
10865fi
10866echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10867echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10868
10869fi
10870if test $ac_cv_header_atheos_threads_h = yes; then
10871 cat >>confdefs.h <<\_ACEOF
10872#define WITH_THREAD 1
10873_ACEOF
10874
10875
10876cat >>confdefs.h <<\_ACEOF
10877#define ATHEOS_THREADS 1
10878_ACEOF
10879
10880 THREADOBJ="Python/thread.o"
10881else
10882
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10884 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10885echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10886if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10887 echo $ECHO_N "(cached) $ECHO_C" >&6
10888fi
10889echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10890echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010891else
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 # Is the header compilable?
10893echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10894echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10895cat >conftest.$ac_ext <<_ACEOF
10896#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010897/* confdefs.h. */
10898_ACEOF
10899cat confdefs.h >>conftest.$ac_ext
10900cat >>conftest.$ac_ext <<_ACEOF
10901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010902$ac_includes_default
10903#include <kernel/OS.h>
10904_ACEOF
10905rm -f conftest.$ac_objext
10906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10907 (eval $ac_compile) 2>&5
10908 ac_status=$?
10909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10910 (exit $ac_status); } &&
10911 { ac_try='test -s conftest.$ac_objext'
10912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10913 (eval $ac_try) 2>&5
10914 ac_status=$?
10915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); }; }; then
10917 ac_header_compiler=yes
10918else
10919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010920sed 's/^/| /' conftest.$ac_ext >&5
10921
Martin v. Löwis11437992002-04-12 09:54:03 +000010922ac_header_compiler=no
10923fi
10924rm -f conftest.$ac_objext conftest.$ac_ext
10925echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10926echo "${ECHO_T}$ac_header_compiler" >&6
10927
10928# Is the header present?
10929echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10930echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10931cat >conftest.$ac_ext <<_ACEOF
10932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010933/* confdefs.h. */
10934_ACEOF
10935cat confdefs.h >>conftest.$ac_ext
10936cat >>conftest.$ac_ext <<_ACEOF
10937/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010938#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010939_ACEOF
10940if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10941 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10942 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010943 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 rm -f conftest.er1
10945 cat conftest.err >&5
10946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947 (exit $ac_status); } >/dev/null; then
10948 if test -s conftest.err; then
10949 ac_cpp_err=$ac_c_preproc_warn_flag
10950 else
10951 ac_cpp_err=
10952 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010953else
Martin v. Löwis11437992002-04-12 09:54:03 +000010954 ac_cpp_err=yes
10955fi
10956if test -z "$ac_cpp_err"; then
10957 ac_header_preproc=yes
10958else
10959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010960sed 's/^/| /' conftest.$ac_ext >&5
10961
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010964rm -f conftest.err conftest.$ac_ext
10965echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10966echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968# So? What about this header?
10969case $ac_header_compiler:$ac_header_preproc in
10970 yes:no )
10971 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10972echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10973 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010974echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10975 (
10976 cat <<\_ASBOX
10977## ------------------------------------ ##
10978## Report this to bug-autoconf@gnu.org. ##
10979## ------------------------------------ ##
10980_ASBOX
10981 ) |
10982 sed "s/^/$as_me: WARNING: /" >&2
10983 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010984 no:yes )
10985 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10986echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10987 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10988echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10989 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010990echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10991 (
10992 cat <<\_ASBOX
10993## ------------------------------------ ##
10994## Report this to bug-autoconf@gnu.org. ##
10995## ------------------------------------ ##
10996_ASBOX
10997 ) |
10998 sed "s/^/$as_me: WARNING: /" >&2
10999 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000esac
11001echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11002echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11003if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11004 echo $ECHO_N "(cached) $ECHO_C" >&6
11005else
11006 ac_cv_header_kernel_OS_h=$ac_header_preproc
11007fi
11008echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11009echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11010
11011fi
11012if test $ac_cv_header_kernel_OS_h = yes; then
11013 cat >>confdefs.h <<\_ACEOF
11014#define WITH_THREAD 1
11015_ACEOF
11016
11017
11018cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011019#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011020_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011021
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011022 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011023else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011024
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11026echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11027if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029else
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011031LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011032cat >conftest.$ac_ext <<_ACEOF
11033#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011034/* confdefs.h. */
11035_ACEOF
11036cat confdefs.h >>conftest.$ac_ext
11037cat >>conftest.$ac_ext <<_ACEOF
11038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011039
Greg Steinadf63d62000-07-05 10:38:09 +000011040/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011041#ifdef __cplusplus
11042extern "C"
11043#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011044/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 builtin and then its argument prototype would still apply. */
11046char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011047int
11048main ()
11049{
11050pthread_create ();
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest.$ac_objext conftest$ac_exeext
11056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11057 (eval $ac_link) 2>&5
11058 ac_status=$?
11059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11060 (exit $ac_status); } &&
11061 { ac_try='test -s conftest$ac_exeext'
11062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11063 (eval $ac_try) 2>&5
11064 ac_status=$?
11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066 (exit $ac_status); }; }; then
11067 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011068else
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011070sed 's/^/| /' conftest.$ac_ext >&5
11071
Martin v. Löwis11437992002-04-12 09:54:03 +000011072ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011074rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11075LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011076fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011077echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11078echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11079if test $ac_cv_lib_pthreads_pthread_create = yes; then
11080 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011081#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011082_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011083
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011084 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011085 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011086 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011087else
Greg Steinadf63d62000-07-05 10:38:09 +000011088
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11090echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11091if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11092 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011093else
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011095LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011096cat >conftest.$ac_ext <<_ACEOF
11097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011098/* confdefs.h. */
11099_ACEOF
11100cat confdefs.h >>conftest.$ac_ext
11101cat >>conftest.$ac_ext <<_ACEOF
11102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011103
Guido van Rossum49545951997-12-02 19:28:29 +000011104/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011105#ifdef __cplusplus
11106extern "C"
11107#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011108/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 builtin and then its argument prototype would still apply. */
11110char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011111int
11112main ()
11113{
11114pthread_create ();
11115 ;
11116 return 0;
11117}
11118_ACEOF
11119rm -f conftest.$ac_objext conftest$ac_exeext
11120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11121 (eval $ac_link) 2>&5
11122 ac_status=$?
11123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11124 (exit $ac_status); } &&
11125 { ac_try='test -s conftest$ac_exeext'
11126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127 (eval $ac_try) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); }; }; then
11131 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011132else
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011134sed 's/^/| /' conftest.$ac_ext >&5
11135
Martin v. Löwis11437992002-04-12 09:54:03 +000011136ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11139LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011141echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11142echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11143if test $ac_cv_lib_c_r_pthread_create = yes; then
11144 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011145#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011146_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011147
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011148 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011149 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011150 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011151else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11154echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11155if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11156 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011157else
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011159LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011160cat >conftest.$ac_ext <<_ACEOF
11161#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011162/* confdefs.h. */
11163_ACEOF
11164cat confdefs.h >>conftest.$ac_ext
11165cat >>conftest.$ac_ext <<_ACEOF
11166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011168/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011169#ifdef __cplusplus
11170extern "C"
11171#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011172/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 builtin and then its argument prototype would still apply. */
11174char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011175int
11176main ()
11177{
11178__pthread_create_system ();
11179 ;
11180 return 0;
11181}
11182_ACEOF
11183rm -f conftest.$ac_objext conftest$ac_exeext
11184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11185 (eval $ac_link) 2>&5
11186 ac_status=$?
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); } &&
11189 { ac_try='test -s conftest$ac_exeext'
11190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; }; then
11195 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011196else
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011198sed 's/^/| /' conftest.$ac_ext >&5
11199
Martin v. Löwis11437992002-04-12 09:54:03 +000011200ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011202rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11203LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011205echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11206echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11207if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11208 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011209#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011210_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011211
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011212 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011213 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011214 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011215else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011216
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11218echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11219if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11220 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011221else
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011223LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011224cat >conftest.$ac_ext <<_ACEOF
11225#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* confdefs.h. */
11227_ACEOF
11228cat confdefs.h >>conftest.$ac_ext
11229cat >>conftest.$ac_ext <<_ACEOF
11230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Guido van Rossumb93a8621998-05-07 13:27:32 +000011232/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011233#ifdef __cplusplus
11234extern "C"
11235#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011236/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 builtin and then its argument prototype would still apply. */
11238char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011239int
11240main ()
11241{
11242pthread_create ();
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext conftest$ac_exeext
11248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11249 (eval $ac_link) 2>&5
11250 ac_status=$?
11251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252 (exit $ac_status); } &&
11253 { ac_try='test -s conftest$ac_exeext'
11254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255 (eval $ac_try) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); }; }; then
11259 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011260else
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011262sed 's/^/| /' conftest.$ac_ext >&5
11263
Martin v. Löwis11437992002-04-12 09:54:03 +000011264ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11267LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011269echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11270echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11271if test $ac_cv_lib_cma_pthread_create = yes; then
11272 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011273#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011274_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011275
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011276 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011277 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011278 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011280
Martin v. Löwis130fb172001-07-19 11:00:41 +000011281 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011282fi
11283
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011285fi
11286
Guido van Rossum0be3e491997-05-22 20:33:33 +000011287fi
11288
Guido van Rossum49545951997-12-02 19:28:29 +000011289fi
11290
Guido van Rossumb93a8621998-05-07 13:27:32 +000011291fi
11292
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011293
Michael W. Hudson54241132001-12-07 15:38:26 +000011294fi
11295
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011296
11297fi
11298
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11301fi;
11302fi
11303
11304
11305fi
11306
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011307
Michael W. Hudson54241132001-12-07 15:38:26 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11310echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11311if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011313else
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011315LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011316cat >conftest.$ac_ext <<_ACEOF
11317#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* confdefs.h. */
11319_ACEOF
11320cat confdefs.h >>conftest.$ac_ext
11321cat >>conftest.$ac_ext <<_ACEOF
11322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011324/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011325#ifdef __cplusplus
11326extern "C"
11327#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011328/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 builtin and then its argument prototype would still apply. */
11330char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011331int
11332main ()
11333{
11334usconfig ();
11335 ;
11336 return 0;
11337}
11338_ACEOF
11339rm -f conftest.$ac_objext conftest$ac_exeext
11340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11341 (eval $ac_link) 2>&5
11342 ac_status=$?
11343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11344 (exit $ac_status); } &&
11345 { ac_try='test -s conftest$ac_exeext'
11346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11347 (eval $ac_try) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); }; }; then
11351 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352else
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011354sed 's/^/| /' conftest.$ac_ext >&5
11355
Martin v. Löwis11437992002-04-12 09:54:03 +000011356ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011361echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11362echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11363if test $ac_cv_lib_mpc_usconfig = yes; then
11364 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011366_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011367
Martin v. Löwis130fb172001-07-19 11:00:41 +000011368 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011369 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011370 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371fi
11372
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011373
Neal Norwitza978ab02002-11-02 16:58:05 +000011374 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11376echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11377if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11378 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379else
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011381LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011382cat >conftest.$ac_ext <<_ACEOF
11383#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011390/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011391#ifdef __cplusplus
11392extern "C"
11393#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011394/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 builtin and then its argument prototype would still apply. */
11396char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011397int
11398main ()
11399{
11400thr_create ();
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405rm -f conftest.$ac_objext conftest$ac_exeext
11406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11407 (eval $ac_link) 2>&5
11408 ac_status=$?
11409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410 (exit $ac_status); } &&
11411 { ac_try='test -s conftest$ac_exeext'
11412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11413 (eval $ac_try) 2>&5
11414 ac_status=$?
11415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416 (exit $ac_status); }; }; then
11417 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011418else
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011420sed 's/^/| /' conftest.$ac_ext >&5
11421
Martin v. Löwis11437992002-04-12 09:54:03 +000011422ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11425LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011427echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11428echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11429if test $ac_cv_lib_thread_thr_create = yes; then
11430 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011433
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011434 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011435 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011436 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437fi
11438
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011439 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011440
Martin v. Löwis130fb172001-07-19 11:00:41 +000011441 if test "$USE_THREAD_MODULE" != "#"
11442 then
11443 # If the above checks didn't disable threads, (at least) OSF1
11444 # needs this '-threads' argument during linking.
11445 case $ac_sys_system in
11446 OSF1) LDLAST=-threads;;
11447 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011448 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011449fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011450
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011451if test "$posix_threads" = "yes"; then
11452 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011453
11454cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011455#define _POSIX_THREADS 1
11456_ACEOF
11457
11458 fi
11459
11460 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11461 case $ac_sys_system/$ac_sys_release in
11462 SunOS/5.6)
11463cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011464#define HAVE_PTHREAD_DESTRUCTOR 1
11465_ACEOF
11466
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011467 ;;
11468 SunOS/5.8)
11469cat >>confdefs.h <<\_ACEOF
11470#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11471_ACEOF
11472
11473 ;;
11474 esac
11475
11476 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11477echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11478 if test "${ac_cv_pthread_system_supported+set}" = set; then
11479 echo $ECHO_N "(cached) $ECHO_C" >&6
11480else
11481 if test "$cross_compiling" = yes; then
11482 ac_cv_pthread_system_supported=no
11483else
11484 cat >conftest.$ac_ext <<_ACEOF
11485#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* confdefs.h. */
11487_ACEOF
11488cat confdefs.h >>conftest.$ac_ext
11489cat >>conftest.$ac_ext <<_ACEOF
11490/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011491#include <pthread.h>
11492 void *foo(void *parm) {
11493 return NULL;
11494 }
11495 main() {
11496 pthread_attr_t attr;
11497 pthread_t id;
11498 if (pthread_attr_init(&attr)) exit(-1);
11499 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11500 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11501 exit(0);
11502 }
11503_ACEOF
11504rm -f conftest$ac_exeext
11505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11506 (eval $ac_link) 2>&5
11507 ac_status=$?
11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11511 (eval $ac_try) 2>&5
11512 ac_status=$?
11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514 (exit $ac_status); }; }; then
11515 ac_cv_pthread_system_supported=yes
11516else
11517 echo "$as_me: program exited with status $ac_status" >&5
11518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011519sed 's/^/| /' conftest.$ac_ext >&5
11520
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011521( exit $ac_status )
11522ac_cv_pthread_system_supported=no
11523fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011524rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011525fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011526
Guido van Rossum627b2d71993-12-24 10:39:16 +000011527fi
11528
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011529 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11530echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11531 if test "$ac_cv_pthread_system_supported" = "yes"; then
11532
11533cat >>confdefs.h <<\_ACEOF
11534#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11535_ACEOF
11536
11537 fi
11538
11539for ac_func in pthread_sigmask
11540do
11541as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11542echo "$as_me:$LINENO: checking for $ac_func" >&5
11543echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11544if eval "test \"\${$as_ac_var+set}\" = set"; then
11545 echo $ECHO_N "(cached) $ECHO_C" >&6
11546else
11547 cat >conftest.$ac_ext <<_ACEOF
11548#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011549/* confdefs.h. */
11550_ACEOF
11551cat confdefs.h >>conftest.$ac_ext
11552cat >>conftest.$ac_ext <<_ACEOF
11553/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011554/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011555 which can conflict with char $ac_func (); below.
11556 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011557 <limits.h> exists even on freestanding compilers. Under hpux,
11558 including <limits.h> includes <sys/time.h> and causes problems
11559 checking for functions defined therein. */
11560#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011561# include <limits.h>
11562#else
11563# include <assert.h>
11564#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011565/* Override any gcc2 internal prototype to avoid an error. */
11566#ifdef __cplusplus
11567extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011568{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011569#endif
11570/* We use char because int might match the return type of a gcc2
11571 builtin and then its argument prototype would still apply. */
11572char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011573/* The GNU C library defines this for functions which it implements
11574 to always fail with ENOSYS. Some functions are actually named
11575 something starting with __ and the normal name is an alias. */
11576#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11577choke me
11578#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011579char (*f) () = $ac_func;
11580#endif
11581#ifdef __cplusplus
11582}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011583#endif
11584
Skip Montanaro6dead952003-09-25 14:50:04 +000011585int
11586main ()
11587{
11588return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011589 ;
11590 return 0;
11591}
11592_ACEOF
11593rm -f conftest.$ac_objext conftest$ac_exeext
11594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11595 (eval $ac_link) 2>&5
11596 ac_status=$?
11597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598 (exit $ac_status); } &&
11599 { ac_try='test -s conftest$ac_exeext'
11600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11601 (eval $ac_try) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); }; }; then
11605 eval "$as_ac_var=yes"
11606else
11607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011608sed 's/^/| /' conftest.$ac_ext >&5
11609
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011610eval "$as_ac_var=no"
11611fi
11612rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11613fi
11614echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11615echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11616if test `eval echo '${'$as_ac_var'}'` = yes; then
11617 cat >>confdefs.h <<_ACEOF
11618#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11619_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011620 case $ac_sys_system in
11621 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622
Jason Tishlerfac083d2003-07-22 15:20:49 +000011623cat >>confdefs.h <<\_ACEOF
11624#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11625_ACEOF
11626
11627 ;;
11628 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011629fi
11630done
11631
11632fi
11633
11634
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011635# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
11637
11638echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11639echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011640# Check whether --enable-ipv6 or --disable-ipv6 was given.
11641if test "${enable_ipv6+set}" = set; then
11642 enableval="$enable_ipv6"
11643 case "$enableval" in
11644 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 echo "$as_me:$LINENO: result: no" >&5
11646echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011647 ipv6=no
11648 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 *) echo "$as_me:$LINENO: result: yes" >&5
11650echo "${ECHO_T}yes" >&6
11651 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011652#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011653_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011654
11655 ipv6=yes
11656 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011658else
Martin v. Löwis11437992002-04-12 09:54:03 +000011659
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 echo "$as_me:$LINENO: result: no" >&5
11662echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011663 ipv6=no
11664
11665else
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 cat >conftest.$ac_ext <<_ACEOF
11667#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* confdefs.h. */
11669_ACEOF
11670cat confdefs.h >>conftest.$ac_ext
11671cat >>conftest.$ac_ext <<_ACEOF
11672/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011673 /* AF_INET6 available check */
11674#include <sys/types.h>
11675#include <sys/socket.h>
11676main()
11677{
11678 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11679 exit(1);
11680 else
11681 exit(0);
11682}
11683
Martin v. Löwis11437992002-04-12 09:54:03 +000011684_ACEOF
11685rm -f conftest$ac_exeext
11686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11687 (eval $ac_link) 2>&5
11688 ac_status=$?
11689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11690 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11692 (eval $ac_try) 2>&5
11693 ac_status=$?
11694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11695 (exit $ac_status); }; }; then
11696 echo "$as_me:$LINENO: result: yes" >&5
11697echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011698 ipv6=yes
11699else
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 echo "$as_me: program exited with status $ac_status" >&5
11701echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011702sed 's/^/| /' conftest.$ac_ext >&5
11703
Martin v. Löwis11437992002-04-12 09:54:03 +000011704( exit $ac_status )
11705echo "$as_me:$LINENO: result: no" >&5
11706echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011707 ipv6=no
11708fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011709rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011710fi
11711
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011712if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011713 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11714echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11715 cat >conftest.$ac_ext <<_ACEOF
11716#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011722#include <sys/types.h>
11723#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011724int
11725main ()
11726{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011727struct sockaddr_in6 x;
11728x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext
11734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11735 (eval $ac_compile) 2>&5
11736 ac_status=$?
11737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11738 (exit $ac_status); } &&
11739 { ac_try='test -s conftest.$ac_objext'
11740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11741 (eval $ac_try) 2>&5
11742 ac_status=$?
11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); }; }; then
11745 echo "$as_me:$LINENO: result: yes" >&5
11746echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011747 ipv6=yes
11748else
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011750sed 's/^/| /' conftest.$ac_ext >&5
11751
Martin v. Löwis11437992002-04-12 09:54:03 +000011752echo "$as_me:$LINENO: result: no" >&5
11753echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011754 ipv6=no
11755fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011756rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011757fi
11758
11759if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011761#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011762_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011763
11764fi
11765
Martin v. Löwis11437992002-04-12 09:54:03 +000011766fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011767
11768ipv6type=unknown
11769ipv6lib=none
11770ipv6trylibc=no
11771
11772if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11774echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011775 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11776 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011777 case $i in
11778 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 cat >conftest.$ac_ext <<_ACEOF
11780#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011781/* confdefs.h. */
11782_ACEOF
11783cat confdefs.h >>conftest.$ac_ext
11784cat >>conftest.$ac_ext <<_ACEOF
11785/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011787#include <netinet/in.h>
11788#ifdef IPV6_INRIA_VERSION
11789yes
11790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011793 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011794 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795fi
11796rm -f conftest*
11797
11798 ;;
11799 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011800 cat >conftest.$ac_ext <<_ACEOF
11801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* confdefs.h. */
11803_ACEOF
11804cat confdefs.h >>conftest.$ac_ext
11805cat >>conftest.$ac_ext <<_ACEOF
11806/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011807
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011808#include <netinet/in.h>
11809#ifdef __KAME__
11810yes
11811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011812_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011814 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011815 ipv6type=$i;
11816 ipv6lib=inet6
11817 ipv6libdir=/usr/local/v6/lib
11818 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011819fi
11820rm -f conftest*
11821
11822 ;;
11823 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 cat >conftest.$ac_ext <<_ACEOF
11825#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* confdefs.h. */
11827_ACEOF
11828cat confdefs.h >>conftest.$ac_ext
11829cat >>conftest.$ac_ext <<_ACEOF
11830/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011832#include <features.h>
11833#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11834yes
11835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011836_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011838 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011839 ipv6type=$i;
11840 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011841fi
11842rm -f conftest*
11843
11844 ;;
11845 linux-inet6)
11846 if test -d /usr/inet6; then
11847 ipv6type=$i
11848 ipv6lib=inet6
11849 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011850 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011851 fi
11852 ;;
11853 solaris)
11854 if test -f /etc/netconfig; then
11855 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11856 ipv6type=$i
11857 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011858 fi
11859 fi
11860 ;;
11861 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 cat >conftest.$ac_ext <<_ACEOF
11863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011864/* confdefs.h. */
11865_ACEOF
11866cat confdefs.h >>conftest.$ac_ext
11867cat >>conftest.$ac_ext <<_ACEOF
11868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870#include <sys/param.h>
11871#ifdef _TOSHIBA_INET6
11872yes
11873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011876 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011877 ipv6type=$i;
11878 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011879 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011880fi
11881rm -f conftest*
11882
11883 ;;
11884 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011885 cat >conftest.$ac_ext <<_ACEOF
11886#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011893#include </usr/local/v6/include/sys/v6config.h>
11894#ifdef __V6D__
11895yes
11896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011899 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011900 ipv6type=$i;
11901 ipv6lib=v6;
11902 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011903 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011904fi
11905rm -f conftest*
11906
11907 ;;
11908 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 cat >conftest.$ac_ext <<_ACEOF
11910#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011911/* confdefs.h. */
11912_ACEOF
11913cat confdefs.h >>conftest.$ac_ext
11914cat >>conftest.$ac_ext <<_ACEOF
11915/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011917#include <sys/param.h>
11918#ifdef _ZETA_MINAMI_INET6
11919yes
11920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011923 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011924 ipv6type=$i;
11925 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011926 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011927fi
11928rm -f conftest*
11929
11930 ;;
11931 esac
11932 if test "$ipv6type" != "unknown"; then
11933 break
11934 fi
11935 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011936 echo "$as_me:$LINENO: result: $ipv6type" >&5
11937echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011938fi
11939
11940if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11941 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11942 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11943 echo "using lib$ipv6lib"
11944 else
11945 if test $ipv6trylibc = "yes"; then
11946 echo "using libc"
11947 else
11948 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11949 echo "You need to fetch lib$ipv6lib.a from appropriate"
11950 echo 'ipv6 kit and compile beforehand.'
11951 exit 1
11952 fi
11953 fi
11954fi
11955
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011956# Check for --with-doc-strings
11957echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11958echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11959
11960# Check whether --with-doc-strings or --without-doc-strings was given.
11961if test "${with_doc_strings+set}" = set; then
11962 withval="$with_doc_strings"
11963
11964fi;
11965
11966if test -z "$with_doc_strings"
11967then with_doc_strings="yes"
11968fi
11969if test "$with_doc_strings" != "no"
11970then
11971
11972cat >>confdefs.h <<\_ACEOF
11973#define WITH_DOC_STRINGS 1
11974_ACEOF
11975
11976fi
11977echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11978echo "${ECHO_T}$with_doc_strings" >&6
11979
Neil Schemenauera35c6882001-02-27 04:45:05 +000011980# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011981echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11982echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11983
Neil Schemenauera35c6882001-02-27 04:45:05 +000011984# Check whether --with-pymalloc or --without-pymalloc was given.
11985if test "${with_pymalloc+set}" = set; then
11986 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011987
Martin v. Löwis11437992002-04-12 09:54:03 +000011988fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011989
Neil Schemenauer16c22972002-03-22 15:34:49 +000011990if test -z "$with_pymalloc"
11991then with_pymalloc="yes"
11992fi
11993if test "$with_pymalloc" != "no"
11994then
Martin v. Löwis11437992002-04-12 09:54:03 +000011995
11996cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011997#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011998_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011999
12000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012001echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12002echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012003
Barry Warsawef82cd72000-06-30 16:21:01 +000012004# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012005echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12006echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12007
Barry Warsawef82cd72000-06-30 16:21:01 +000012008# Check whether --with-wctype-functions or --without-wctype-functions was given.
12009if test "${with_wctype_functions+set}" = set; then
12010 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012011
Barry Warsawef82cd72000-06-30 16:21:01 +000012012if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012013then
12014
12015cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012016#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012017_ACEOF
12018
12019 echo "$as_me:$LINENO: result: yes" >&5
12020echo "${ECHO_T}yes" >&6
12021else echo "$as_me:$LINENO: result: no" >&5
12022echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012023fi
12024else
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 echo "$as_me:$LINENO: result: no" >&5
12026echo "${ECHO_T}no" >&6
12027fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012029# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012030
Guido van Rossum98935bf2001-09-05 19:13:16 +000012031DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012032
Guido van Rossume97ee181999-12-20 21:27:22 +000012033# the dlopen() function means we might want to use dynload_shlib.o. some
12034# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012035
Thomas Wouters3a584202000-08-05 23:28:51 +000012036for ac_func in dlopen
12037do
Martin v. Löwis11437992002-04-12 09:54:03 +000012038as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12039echo "$as_me:$LINENO: checking for $ac_func" >&5
12040echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12041if eval "test \"\${$as_ac_var+set}\" = set"; then
12042 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012043else
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 cat >conftest.$ac_ext <<_ACEOF
12045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* confdefs.h. */
12047_ACEOF
12048cat confdefs.h >>conftest.$ac_ext
12049cat >>conftest.$ac_ext <<_ACEOF
12050/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012051/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012052 which can conflict with char $ac_func (); below.
12053 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012054 <limits.h> exists even on freestanding compilers. Under hpux,
12055 including <limits.h> includes <sys/time.h> and causes problems
12056 checking for functions defined therein. */
12057#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012058# include <limits.h>
12059#else
12060# include <assert.h>
12061#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012062/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012063#ifdef __cplusplus
12064extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012065{
Martin v. Löwis11437992002-04-12 09:54:03 +000012066#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012067/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 builtin and then its argument prototype would still apply. */
12069char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012070/* The GNU C library defines this for functions which it implements
12071 to always fail with ENOSYS. Some functions are actually named
12072 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012074choke me
12075#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012076char (*f) () = $ac_func;
12077#endif
12078#ifdef __cplusplus
12079}
Guido van Rossume97ee181999-12-20 21:27:22 +000012080#endif
12081
Skip Montanaro6dead952003-09-25 14:50:04 +000012082int
12083main ()
12084{
12085return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
12090rm -f conftest.$ac_objext conftest$ac_exeext
12091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12092 (eval $ac_link) 2>&5
12093 ac_status=$?
12094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12095 (exit $ac_status); } &&
12096 { ac_try='test -s conftest$ac_exeext'
12097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12098 (eval $ac_try) 2>&5
12099 ac_status=$?
12100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12101 (exit $ac_status); }; }; then
12102 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012103else
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012105sed 's/^/| /' conftest.$ac_ext >&5
12106
Martin v. Löwis11437992002-04-12 09:54:03 +000012107eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12113if test `eval echo '${'$as_ac_var'}'` = yes; then
12114 cat >>confdefs.h <<_ACEOF
12115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12116_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012117
Guido van Rossume97ee181999-12-20 21:27:22 +000012118fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012119done
Guido van Rossume97ee181999-12-20 21:27:22 +000012120
Michael W. Hudson54241132001-12-07 15:38:26 +000012121
Guido van Rossume97ee181999-12-20 21:27:22 +000012122# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12123# loading of modules.
12124
Martin v. Löwis11437992002-04-12 09:54:03 +000012125echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12126echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012127if test -z "$DYNLOADFILE"
12128then
12129 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012130 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12131 if test "$ac_cv_func_dlopen" = yes
12132 then DYNLOADFILE="dynload_shlib.o"
12133 else DYNLOADFILE="dynload_aix.o"
12134 fi
12135 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012136 BeOS*) DYNLOADFILE="dynload_beos.o";;
12137 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012138 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012139 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012140 *)
12141 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12142 # out any dynamic loading
12143 if test "$ac_cv_func_dlopen" = yes
12144 then DYNLOADFILE="dynload_shlib.o"
12145 else DYNLOADFILE="dynload_stub.o"
12146 fi
12147 ;;
12148 esac
12149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012150echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12151echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012152if test "$DYNLOADFILE" != "dynload_stub.o"
12153then
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
12155cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012156#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012157_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012158
12159fi
12160
Neil Schemenauer4e425612001-06-19 15:44:15 +000012161# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12162
Michael W. Hudson54241132001-12-07 15:38:26 +000012163
Martin v. Löwis11437992002-04-12 09:54:03 +000012164echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12165echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012166if test -z "$MACHDEP_OBJS"
12167then
Jack Jansene578a632001-08-15 01:27:14 +000012168 MACHDEP_OBJS=$extra_machdep_objs
12169else
12170 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012172echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12173echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012174
Guido van Rossum627b2d71993-12-24 10:39:16 +000012175# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
Martin v. Löwisd5843682002-11-21 20:41:28 +000012247for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012248 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012249 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012250 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012251 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012252 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012253 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012254 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012255 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012256 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012257 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012258 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012259do
Martin v. Löwis11437992002-04-12 09:54:03 +000012260as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12261echo "$as_me:$LINENO: checking for $ac_func" >&5
12262echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12263if eval "test \"\${$as_ac_var+set}\" = set"; then
12264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012265else
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 cat >conftest.$ac_ext <<_ACEOF
12267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* confdefs.h. */
12269_ACEOF
12270cat confdefs.h >>conftest.$ac_ext
12271cat >>conftest.$ac_ext <<_ACEOF
12272/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012273/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012274 which can conflict with char $ac_func (); below.
12275 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012276 <limits.h> exists even on freestanding compilers. Under hpux,
12277 including <limits.h> includes <sys/time.h> and causes problems
12278 checking for functions defined therein. */
12279#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012280# include <limits.h>
12281#else
12282# include <assert.h>
12283#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012284/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012285#ifdef __cplusplus
12286extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012287{
Martin v. Löwis11437992002-04-12 09:54:03 +000012288#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012289/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 builtin and then its argument prototype would still apply. */
12291char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012292/* The GNU C library defines this for functions which it implements
12293 to always fail with ENOSYS. Some functions are actually named
12294 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012296choke me
12297#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012298char (*f) () = $ac_func;
12299#endif
12300#ifdef __cplusplus
12301}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012302#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303
Skip Montanaro6dead952003-09-25 14:50:04 +000012304int
12305main ()
12306{
12307return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012308 ;
12309 return 0;
12310}
12311_ACEOF
12312rm -f conftest.$ac_objext conftest$ac_exeext
12313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12314 (eval $ac_link) 2>&5
12315 ac_status=$?
12316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12317 (exit $ac_status); } &&
12318 { ac_try='test -s conftest$ac_exeext'
12319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12320 (eval $ac_try) 2>&5
12321 ac_status=$?
12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323 (exit $ac_status); }; }; then
12324 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012325else
Martin v. Löwis11437992002-04-12 09:54:03 +000012326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012327sed 's/^/| /' conftest.$ac_ext >&5
12328
Martin v. Löwis11437992002-04-12 09:54:03 +000012329eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012331rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012333echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12334echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12335if test `eval echo '${'$as_ac_var'}'` = yes; then
12336 cat >>confdefs.h <<_ACEOF
12337#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12338_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012339
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012340fi
12341done
12342
Michael W. Hudson54241132001-12-07 15:38:26 +000012343
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012344# For some functions, having a definition is not sufficient, since
12345# we want to take their address.
12346echo "$as_me:$LINENO: checking for chroot" >&5
12347echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12348cat >conftest.$ac_ext <<_ACEOF
12349#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012350/* confdefs.h. */
12351_ACEOF
12352cat confdefs.h >>conftest.$ac_ext
12353cat >>conftest.$ac_ext <<_ACEOF
12354/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012355#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012356int
12357main ()
12358{
12359void *x=chroot
12360 ;
12361 return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext
12365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12366 (eval $ac_compile) 2>&5
12367 ac_status=$?
12368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369 (exit $ac_status); } &&
12370 { ac_try='test -s conftest.$ac_objext'
12371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12372 (eval $ac_try) 2>&5
12373 ac_status=$?
12374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); }; }; then
12376
12377cat >>confdefs.h <<\_ACEOF
12378#define HAVE_CHROOT 1
12379_ACEOF
12380
12381 echo "$as_me:$LINENO: result: yes" >&5
12382echo "${ECHO_T}yes" >&6
12383else
12384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012385sed 's/^/| /' conftest.$ac_ext >&5
12386
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012387echo "$as_me:$LINENO: result: no" >&5
12388echo "${ECHO_T}no" >&6
12389
12390fi
12391rm -f conftest.$ac_objext conftest.$ac_ext
12392echo "$as_me:$LINENO: checking for link" >&5
12393echo $ECHO_N "checking for link... $ECHO_C" >&6
12394cat >conftest.$ac_ext <<_ACEOF
12395#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* confdefs.h. */
12397_ACEOF
12398cat confdefs.h >>conftest.$ac_ext
12399cat >>conftest.$ac_ext <<_ACEOF
12400/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012401#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012402int
12403main ()
12404{
12405void *x=link
12406 ;
12407 return 0;
12408}
12409_ACEOF
12410rm -f conftest.$ac_objext
12411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12412 (eval $ac_compile) 2>&5
12413 ac_status=$?
12414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12415 (exit $ac_status); } &&
12416 { ac_try='test -s conftest.$ac_objext'
12417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12418 (eval $ac_try) 2>&5
12419 ac_status=$?
12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421 (exit $ac_status); }; }; then
12422
12423cat >>confdefs.h <<\_ACEOF
12424#define HAVE_LINK 1
12425_ACEOF
12426
12427 echo "$as_me:$LINENO: result: yes" >&5
12428echo "${ECHO_T}yes" >&6
12429else
12430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012431sed 's/^/| /' conftest.$ac_ext >&5
12432
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012433echo "$as_me:$LINENO: result: no" >&5
12434echo "${ECHO_T}no" >&6
12435
12436fi
12437rm -f conftest.$ac_objext conftest.$ac_ext
12438echo "$as_me:$LINENO: checking for symlink" >&5
12439echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12440cat >conftest.$ac_ext <<_ACEOF
12441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* confdefs.h. */
12443_ACEOF
12444cat confdefs.h >>conftest.$ac_ext
12445cat >>conftest.$ac_ext <<_ACEOF
12446/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012447#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012448int
12449main ()
12450{
12451void *x=symlink
12452 ;
12453 return 0;
12454}
12455_ACEOF
12456rm -f conftest.$ac_objext
12457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12458 (eval $ac_compile) 2>&5
12459 ac_status=$?
12460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461 (exit $ac_status); } &&
12462 { ac_try='test -s conftest.$ac_objext'
12463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12464 (eval $ac_try) 2>&5
12465 ac_status=$?
12466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467 (exit $ac_status); }; }; then
12468
12469cat >>confdefs.h <<\_ACEOF
12470#define HAVE_SYMLINK 1
12471_ACEOF
12472
12473 echo "$as_me:$LINENO: result: yes" >&5
12474echo "${ECHO_T}yes" >&6
12475else
12476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012477sed 's/^/| /' conftest.$ac_ext >&5
12478
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012479echo "$as_me:$LINENO: result: no" >&5
12480echo "${ECHO_T}no" >&6
12481
12482fi
12483rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012484echo "$as_me:$LINENO: checking for fchdir" >&5
12485echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12486cat >conftest.$ac_ext <<_ACEOF
12487#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* confdefs.h. */
12489_ACEOF
12490cat confdefs.h >>conftest.$ac_ext
12491cat >>conftest.$ac_ext <<_ACEOF
12492/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012493#include <unistd.h>
12494int
12495main ()
12496{
12497void *x=fchdir
12498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest.$ac_objext
12503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12504 (eval $ac_compile) 2>&5
12505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); } &&
12508 { ac_try='test -s conftest.$ac_objext'
12509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12510 (eval $ac_try) 2>&5
12511 ac_status=$?
12512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513 (exit $ac_status); }; }; then
12514
12515cat >>confdefs.h <<\_ACEOF
12516#define HAVE_FCHDIR 1
12517_ACEOF
12518
12519 echo "$as_me:$LINENO: result: yes" >&5
12520echo "${ECHO_T}yes" >&6
12521else
12522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012523sed 's/^/| /' conftest.$ac_ext >&5
12524
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012525echo "$as_me:$LINENO: result: no" >&5
12526echo "${ECHO_T}no" >&6
12527
12528fi
12529rm -f conftest.$ac_objext conftest.$ac_ext
12530echo "$as_me:$LINENO: checking for fsync" >&5
12531echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12532cat >conftest.$ac_ext <<_ACEOF
12533#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012534/* confdefs.h. */
12535_ACEOF
12536cat confdefs.h >>conftest.$ac_ext
12537cat >>conftest.$ac_ext <<_ACEOF
12538/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012539#include <unistd.h>
12540int
12541main ()
12542{
12543void *x=fsync
12544 ;
12545 return 0;
12546}
12547_ACEOF
12548rm -f conftest.$ac_objext
12549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12550 (eval $ac_compile) 2>&5
12551 ac_status=$?
12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553 (exit $ac_status); } &&
12554 { ac_try='test -s conftest.$ac_objext'
12555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556 (eval $ac_try) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); }; }; then
12560
12561cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012562#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012563_ACEOF
12564
12565 echo "$as_me:$LINENO: result: yes" >&5
12566echo "${ECHO_T}yes" >&6
12567else
12568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012569sed 's/^/| /' conftest.$ac_ext >&5
12570
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012571echo "$as_me:$LINENO: result: no" >&5
12572echo "${ECHO_T}no" >&6
12573
12574fi
12575rm -f conftest.$ac_objext conftest.$ac_ext
12576echo "$as_me:$LINENO: checking for fdatasync" >&5
12577echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12578cat >conftest.$ac_ext <<_ACEOF
12579#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012580/* confdefs.h. */
12581_ACEOF
12582cat confdefs.h >>conftest.$ac_ext
12583cat >>conftest.$ac_ext <<_ACEOF
12584/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012585#include <unistd.h>
12586int
12587main ()
12588{
12589void *x=fdatasync
12590 ;
12591 return 0;
12592}
12593_ACEOF
12594rm -f conftest.$ac_objext
12595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12596 (eval $ac_compile) 2>&5
12597 ac_status=$?
12598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599 (exit $ac_status); } &&
12600 { ac_try='test -s conftest.$ac_objext'
12601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12602 (eval $ac_try) 2>&5
12603 ac_status=$?
12604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12605 (exit $ac_status); }; }; then
12606
12607cat >>confdefs.h <<\_ACEOF
12608#define HAVE_FDATASYNC 1
12609_ACEOF
12610
12611 echo "$as_me:$LINENO: result: yes" >&5
12612echo "${ECHO_T}yes" >&6
12613else
12614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012615sed 's/^/| /' conftest.$ac_ext >&5
12616
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012617echo "$as_me:$LINENO: result: no" >&5
12618echo "${ECHO_T}no" >&6
12619
12620fi
12621rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012622
Martin v. Löwisd5843682002-11-21 20:41:28 +000012623# On some systems (eg. FreeBSD 5), we would find a definition of the
12624# functions ctermid_r, setgroups in the library, but no prototype
12625# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12626# address to avoid compiler warnings and potential miscompilations
12627# because of the missing prototypes.
12628
12629echo "$as_me:$LINENO: checking for ctermid_r" >&5
12630echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12631cat >conftest.$ac_ext <<_ACEOF
12632#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012633/* confdefs.h. */
12634_ACEOF
12635cat confdefs.h >>conftest.$ac_ext
12636cat >>conftest.$ac_ext <<_ACEOF
12637/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012638
12639#include "confdefs.h"
12640#include <stdio.h>
12641
Martin v. Löwisd5843682002-11-21 20:41:28 +000012642int
12643main ()
12644{
12645void* p = ctermid_r
12646 ;
12647 return 0;
12648}
12649_ACEOF
12650rm -f conftest.$ac_objext
12651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12652 (eval $ac_compile) 2>&5
12653 ac_status=$?
12654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655 (exit $ac_status); } &&
12656 { ac_try='test -s conftest.$ac_objext'
12657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12658 (eval $ac_try) 2>&5
12659 ac_status=$?
12660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12661 (exit $ac_status); }; }; then
12662
12663cat >>confdefs.h <<\_ACEOF
12664#define HAVE_CTERMID_R 1
12665_ACEOF
12666
12667 echo "$as_me:$LINENO: result: yes" >&5
12668echo "${ECHO_T}yes" >&6
12669else
12670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012671sed 's/^/| /' conftest.$ac_ext >&5
12672
Martin v. Löwisd5843682002-11-21 20:41:28 +000012673echo "$as_me:$LINENO: result: no" >&5
12674echo "${ECHO_T}no" >&6
12675
12676fi
12677rm -f conftest.$ac_objext conftest.$ac_ext
12678
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012679echo "$as_me:$LINENO: checking for flock" >&5
12680echo $ECHO_N "checking for flock... $ECHO_C" >&6
12681cat >conftest.$ac_ext <<_ACEOF
12682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* confdefs.h. */
12684_ACEOF
12685cat confdefs.h >>conftest.$ac_ext
12686cat >>conftest.$ac_ext <<_ACEOF
12687/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012688
12689#include "confdefs.h"
12690#include <sys/file.h>
12691
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012692int
12693main ()
12694{
12695void* p = flock
12696 ;
12697 return 0;
12698}
12699_ACEOF
12700rm -f conftest.$ac_objext
12701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12702 (eval $ac_compile) 2>&5
12703 ac_status=$?
12704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705 (exit $ac_status); } &&
12706 { ac_try='test -s conftest.$ac_objext'
12707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12708 (eval $ac_try) 2>&5
12709 ac_status=$?
12710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12711 (exit $ac_status); }; }; then
12712
12713cat >>confdefs.h <<\_ACEOF
12714#define HAVE_FLOCK 1
12715_ACEOF
12716
12717 echo "$as_me:$LINENO: result: yes" >&5
12718echo "${ECHO_T}yes" >&6
12719else
12720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012721sed 's/^/| /' conftest.$ac_ext >&5
12722
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012723echo "$as_me:$LINENO: result: no" >&5
12724echo "${ECHO_T}no" >&6
12725
12726fi
12727rm -f conftest.$ac_objext conftest.$ac_ext
12728
12729echo "$as_me:$LINENO: checking for getpagesize" >&5
12730echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12731cat >conftest.$ac_ext <<_ACEOF
12732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* confdefs.h. */
12734_ACEOF
12735cat confdefs.h >>conftest.$ac_ext
12736cat >>conftest.$ac_ext <<_ACEOF
12737/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012738
12739#include "confdefs.h"
12740#include <unistd.h>
12741
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012742int
12743main ()
12744{
12745void* p = getpagesize
12746 ;
12747 return 0;
12748}
12749_ACEOF
12750rm -f conftest.$ac_objext
12751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12752 (eval $ac_compile) 2>&5
12753 ac_status=$?
12754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12755 (exit $ac_status); } &&
12756 { ac_try='test -s conftest.$ac_objext'
12757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12758 (eval $ac_try) 2>&5
12759 ac_status=$?
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761 (exit $ac_status); }; }; then
12762
12763cat >>confdefs.h <<\_ACEOF
12764#define HAVE_GETPAGESIZE 1
12765_ACEOF
12766
12767 echo "$as_me:$LINENO: result: yes" >&5
12768echo "${ECHO_T}yes" >&6
12769else
12770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012771sed 's/^/| /' conftest.$ac_ext >&5
12772
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012773echo "$as_me:$LINENO: result: no" >&5
12774echo "${ECHO_T}no" >&6
12775
12776fi
12777rm -f conftest.$ac_objext conftest.$ac_ext
12778
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012779for ac_prog in true
12780do
12781 # Extract the first word of "$ac_prog", so it can be a program name with args.
12782set dummy $ac_prog; ac_word=$2
12783echo "$as_me:$LINENO: checking for $ac_word" >&5
12784echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12785if test "${ac_cv_prog_TRUE+set}" = set; then
12786 echo $ECHO_N "(cached) $ECHO_C" >&6
12787else
12788 if test -n "$TRUE"; then
12789 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12790else
12791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12792for as_dir in $PATH
12793do
12794 IFS=$as_save_IFS
12795 test -z "$as_dir" && as_dir=.
12796 for ac_exec_ext in '' $ac_executable_extensions; do
12797 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12798 ac_cv_prog_TRUE="$ac_prog"
12799 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12800 break 2
12801 fi
12802done
12803done
12804
12805fi
12806fi
12807TRUE=$ac_cv_prog_TRUE
12808if test -n "$TRUE"; then
12809 echo "$as_me:$LINENO: result: $TRUE" >&5
12810echo "${ECHO_T}$TRUE" >&6
12811else
12812 echo "$as_me:$LINENO: result: no" >&5
12813echo "${ECHO_T}no" >&6
12814fi
12815
12816 test -n "$TRUE" && break
12817done
12818test -n "$TRUE" || TRUE="/bin/true"
12819
12820
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012821echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12822echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12823if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12824 echo $ECHO_N "(cached) $ECHO_C" >&6
12825else
12826 ac_check_lib_save_LIBS=$LIBS
12827LIBS="-lc $LIBS"
12828cat >conftest.$ac_ext <<_ACEOF
12829#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012830/* confdefs.h. */
12831_ACEOF
12832cat confdefs.h >>conftest.$ac_ext
12833cat >>conftest.$ac_ext <<_ACEOF
12834/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012835
12836/* Override any gcc2 internal prototype to avoid an error. */
12837#ifdef __cplusplus
12838extern "C"
12839#endif
12840/* We use char because int might match the return type of a gcc2
12841 builtin and then its argument prototype would still apply. */
12842char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012843int
12844main ()
12845{
12846inet_aton ();
12847 ;
12848 return 0;
12849}
12850_ACEOF
12851rm -f conftest.$ac_objext conftest$ac_exeext
12852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12853 (eval $ac_link) 2>&5
12854 ac_status=$?
12855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856 (exit $ac_status); } &&
12857 { ac_try='test -s conftest$ac_exeext'
12858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12859 (eval $ac_try) 2>&5
12860 ac_status=$?
12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862 (exit $ac_status); }; }; then
12863 ac_cv_lib_c_inet_aton=yes
12864else
12865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012866sed 's/^/| /' conftest.$ac_ext >&5
12867
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012868ac_cv_lib_c_inet_aton=no
12869fi
12870rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12871LIBS=$ac_check_lib_save_LIBS
12872fi
12873echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12874echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12875if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012876 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012877else
12878
12879echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12880echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12881if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12882 echo $ECHO_N "(cached) $ECHO_C" >&6
12883else
12884 ac_check_lib_save_LIBS=$LIBS
12885LIBS="-lresolv $LIBS"
12886cat >conftest.$ac_ext <<_ACEOF
12887#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012888/* confdefs.h. */
12889_ACEOF
12890cat confdefs.h >>conftest.$ac_ext
12891cat >>conftest.$ac_ext <<_ACEOF
12892/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012893
12894/* Override any gcc2 internal prototype to avoid an error. */
12895#ifdef __cplusplus
12896extern "C"
12897#endif
12898/* We use char because int might match the return type of a gcc2
12899 builtin and then its argument prototype would still apply. */
12900char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012901int
12902main ()
12903{
12904inet_aton ();
12905 ;
12906 return 0;
12907}
12908_ACEOF
12909rm -f conftest.$ac_objext conftest$ac_exeext
12910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12911 (eval $ac_link) 2>&5
12912 ac_status=$?
12913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914 (exit $ac_status); } &&
12915 { ac_try='test -s conftest$ac_exeext'
12916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12917 (eval $ac_try) 2>&5
12918 ac_status=$?
12919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12920 (exit $ac_status); }; }; then
12921 ac_cv_lib_resolv_inet_aton=yes
12922else
12923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012924sed 's/^/| /' conftest.$ac_ext >&5
12925
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012926ac_cv_lib_resolv_inet_aton=no
12927fi
12928rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12929LIBS=$ac_check_lib_save_LIBS
12930fi
12931echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12932echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12933if test $ac_cv_lib_resolv_inet_aton = yes; then
12934 cat >>confdefs.h <<_ACEOF
12935#define HAVE_LIBRESOLV 1
12936_ACEOF
12937
12938 LIBS="-lresolv $LIBS"
12939
12940fi
12941
12942
12943fi
12944
12945
Martin v. Löwise9416172003-05-03 10:12:45 +000012946echo "$as_me:$LINENO: checking for hstrerror" >&5
12947echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12948cat >conftest.$ac_ext <<_ACEOF
12949#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012950/* confdefs.h. */
12951_ACEOF
12952cat confdefs.h >>conftest.$ac_ext
12953cat >>conftest.$ac_ext <<_ACEOF
12954/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012955
12956#include "confdefs.h"
12957#include <netdb.h>
12958
Martin v. Löwise9416172003-05-03 10:12:45 +000012959int
12960main ()
12961{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012962void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012963 ;
12964 return 0;
12965}
12966_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012967rm -f conftest.$ac_objext conftest$ac_exeext
12968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12969 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012970 ac_status=$?
12971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012973 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12975 (eval $ac_try) 2>&5
12976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); }; }; then
12979
12980cat >>confdefs.h <<\_ACEOF
12981#define HAVE_HSTRERROR 1
12982_ACEOF
12983
12984 echo "$as_me:$LINENO: result: yes" >&5
12985echo "${ECHO_T}yes" >&6
12986else
12987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012988sed 's/^/| /' conftest.$ac_ext >&5
12989
Martin v. Löwise9416172003-05-03 10:12:45 +000012990echo "$as_me:$LINENO: result: no" >&5
12991echo "${ECHO_T}no" >&6
12992
12993fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012995
12996echo "$as_me:$LINENO: checking for inet_aton" >&5
12997echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12998cat >conftest.$ac_ext <<_ACEOF
12999#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* confdefs.h. */
13001_ACEOF
13002cat confdefs.h >>conftest.$ac_ext
13003cat >>conftest.$ac_ext <<_ACEOF
13004/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013005
13006#include "confdefs.h"
13007#include <sys/socket.h>
13008#include <netinet/in.h>
13009#include <arpa/inet.h>
13010
Martin v. Löwise9416172003-05-03 10:12:45 +000013011int
13012main ()
13013{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013014void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013015 ;
13016 return 0;
13017}
13018_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013019rm -f conftest.$ac_objext conftest$ac_exeext
13020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13021 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013022 ac_status=$?
13023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13024 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013025 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13027 (eval $ac_try) 2>&5
13028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); }; }; then
13031
13032cat >>confdefs.h <<\_ACEOF
13033#define HAVE_INET_ATON 1
13034_ACEOF
13035
13036 echo "$as_me:$LINENO: result: yes" >&5
13037echo "${ECHO_T}yes" >&6
13038else
13039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013040sed 's/^/| /' conftest.$ac_ext >&5
13041
Martin v. Löwise9416172003-05-03 10:12:45 +000013042echo "$as_me:$LINENO: result: no" >&5
13043echo "${ECHO_T}no" >&6
13044
13045fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013047
13048echo "$as_me:$LINENO: checking for inet_pton" >&5
13049echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13050cat >conftest.$ac_ext <<_ACEOF
13051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013052/* confdefs.h. */
13053_ACEOF
13054cat confdefs.h >>conftest.$ac_ext
13055cat >>conftest.$ac_ext <<_ACEOF
13056/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013057
13058#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013059#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013060#include <sys/socket.h>
13061#include <netinet/in.h>
13062#include <arpa/inet.h>
13063
Martin v. Löwise9416172003-05-03 10:12:45 +000013064int
13065main ()
13066{
13067void* p = inet_pton
13068 ;
13069 return 0;
13070}
13071_ACEOF
13072rm -f conftest.$ac_objext
13073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13074 (eval $ac_compile) 2>&5
13075 ac_status=$?
13076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13077 (exit $ac_status); } &&
13078 { ac_try='test -s conftest.$ac_objext'
13079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080 (eval $ac_try) 2>&5
13081 ac_status=$?
13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083 (exit $ac_status); }; }; then
13084
13085cat >>confdefs.h <<\_ACEOF
13086#define HAVE_INET_PTON 1
13087_ACEOF
13088
13089 echo "$as_me:$LINENO: result: yes" >&5
13090echo "${ECHO_T}yes" >&6
13091else
13092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013093sed 's/^/| /' conftest.$ac_ext >&5
13094
Martin v. Löwise9416172003-05-03 10:12:45 +000013095echo "$as_me:$LINENO: result: no" >&5
13096echo "${ECHO_T}no" >&6
13097
13098fi
13099rm -f conftest.$ac_objext conftest.$ac_ext
13100
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013101# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013102echo "$as_me:$LINENO: checking for setgroups" >&5
13103echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13104cat >conftest.$ac_ext <<_ACEOF
13105#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* confdefs.h. */
13107_ACEOF
13108cat confdefs.h >>conftest.$ac_ext
13109cat >>conftest.$ac_ext <<_ACEOF
13110/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013111
13112#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013113#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013114#ifdef HAVE_GRP_H
13115#include <grp.h>
13116#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013117
Martin v. Löwisd5843682002-11-21 20:41:28 +000013118int
13119main ()
13120{
13121void* p = setgroups
13122 ;
13123 return 0;
13124}
13125_ACEOF
13126rm -f conftest.$ac_objext
13127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13128 (eval $ac_compile) 2>&5
13129 ac_status=$?
13130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131 (exit $ac_status); } &&
13132 { ac_try='test -s conftest.$ac_objext'
13133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13134 (eval $ac_try) 2>&5
13135 ac_status=$?
13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137 (exit $ac_status); }; }; then
13138
13139cat >>confdefs.h <<\_ACEOF
13140#define HAVE_SETGROUPS 1
13141_ACEOF
13142
13143 echo "$as_me:$LINENO: result: yes" >&5
13144echo "${ECHO_T}yes" >&6
13145else
13146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013147sed 's/^/| /' conftest.$ac_ext >&5
13148
Martin v. Löwisd5843682002-11-21 20:41:28 +000013149echo "$as_me:$LINENO: result: no" >&5
13150echo "${ECHO_T}no" >&6
13151
13152fi
13153rm -f conftest.$ac_objext conftest.$ac_ext
13154
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013155# check for openpty and forkpty
13156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013158for ac_func in openpty
13159do
Martin v. Löwis11437992002-04-12 09:54:03 +000013160as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13161echo "$as_me:$LINENO: checking for $ac_func" >&5
13162echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13163if eval "test \"\${$as_ac_var+set}\" = set"; then
13164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013165else
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 cat >conftest.$ac_ext <<_ACEOF
13167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013168/* confdefs.h. */
13169_ACEOF
13170cat confdefs.h >>conftest.$ac_ext
13171cat >>conftest.$ac_ext <<_ACEOF
13172/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013173/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013174 which can conflict with char $ac_func (); below.
13175 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013176 <limits.h> exists even on freestanding compilers. Under hpux,
13177 including <limits.h> includes <sys/time.h> and causes problems
13178 checking for functions defined therein. */
13179#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013180# include <limits.h>
13181#else
13182# include <assert.h>
13183#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013184/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013185#ifdef __cplusplus
13186extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013187{
Martin v. Löwis11437992002-04-12 09:54:03 +000013188#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013189/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 builtin and then its argument prototype would still apply. */
13191char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013192/* The GNU C library defines this for functions which it implements
13193 to always fail with ENOSYS. Some functions are actually named
13194 something starting with __ and the normal name is an alias. */
13195#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13196choke me
13197#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013198char (*f) () = $ac_func;
13199#endif
13200#ifdef __cplusplus
13201}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013202#endif
13203
Skip Montanaro6dead952003-09-25 14:50:04 +000013204int
13205main ()
13206{
13207return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 ;
13209 return 0;
13210}
13211_ACEOF
13212rm -f conftest.$ac_objext conftest$ac_exeext
13213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13214 (eval $ac_link) 2>&5
13215 ac_status=$?
13216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13217 (exit $ac_status); } &&
13218 { ac_try='test -s conftest$ac_exeext'
13219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13220 (eval $ac_try) 2>&5
13221 ac_status=$?
13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223 (exit $ac_status); }; }; then
13224 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013227sed 's/^/| /' conftest.$ac_ext >&5
13228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013233echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13234echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13235if test `eval echo '${'$as_ac_var'}'` = yes; then
13236 cat >>confdefs.h <<_ACEOF
13237#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13238_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013239
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013240else
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13242echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13243if test "${ac_cv_lib_util_openpty+set}" = set; then
13244 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013245else
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013247LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013248cat >conftest.$ac_ext <<_ACEOF
13249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* confdefs.h. */
13251_ACEOF
13252cat confdefs.h >>conftest.$ac_ext
13253cat >>conftest.$ac_ext <<_ACEOF
13254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013255
Fred Drake8cef4cf2000-06-28 16:40:38 +000013256/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013257#ifdef __cplusplus
13258extern "C"
13259#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013260/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 builtin and then its argument prototype would still apply. */
13262char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013263int
13264main ()
13265{
13266openpty ();
13267 ;
13268 return 0;
13269}
13270_ACEOF
13271rm -f conftest.$ac_objext conftest$ac_exeext
13272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13273 (eval $ac_link) 2>&5
13274 ac_status=$?
13275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276 (exit $ac_status); } &&
13277 { ac_try='test -s conftest$ac_exeext'
13278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13279 (eval $ac_try) 2>&5
13280 ac_status=$?
13281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282 (exit $ac_status); }; }; then
13283 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013284else
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013286sed 's/^/| /' conftest.$ac_ext >&5
13287
Martin v. Löwis11437992002-04-12 09:54:03 +000013288ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13291LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013293echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13294echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13295if test $ac_cv_lib_util_openpty = yes; then
13296 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013297#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013298_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013299 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013300fi
13301
13302fi
13303done
13304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Fred Drake8cef4cf2000-06-28 16:40:38 +000013306for ac_func in forkpty
13307do
Martin v. Löwis11437992002-04-12 09:54:03 +000013308as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13309echo "$as_me:$LINENO: checking for $ac_func" >&5
13310echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13311if eval "test \"\${$as_ac_var+set}\" = set"; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013313else
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 cat >conftest.$ac_ext <<_ACEOF
13315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013316/* confdefs.h. */
13317_ACEOF
13318cat confdefs.h >>conftest.$ac_ext
13319cat >>conftest.$ac_ext <<_ACEOF
13320/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013322 which can conflict with char $ac_func (); below.
13323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013324 <limits.h> exists even on freestanding compilers. Under hpux,
13325 including <limits.h> includes <sys/time.h> and causes problems
13326 checking for functions defined therein. */
13327#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013328# include <limits.h>
13329#else
13330# include <assert.h>
13331#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013332/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013333#ifdef __cplusplus
13334extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013335{
Martin v. Löwis11437992002-04-12 09:54:03 +000013336#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013337/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 builtin and then its argument prototype would still apply. */
13339char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013340/* The GNU C library defines this for functions which it implements
13341 to always fail with ENOSYS. Some functions are actually named
13342 something starting with __ and the normal name is an alias. */
13343#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13344choke me
13345#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013346char (*f) () = $ac_func;
13347#endif
13348#ifdef __cplusplus
13349}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013350#endif
13351
Skip Montanaro6dead952003-09-25 14:50:04 +000013352int
13353main ()
13354{
13355return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013356 ;
13357 return 0;
13358}
13359_ACEOF
13360rm -f conftest.$ac_objext conftest$ac_exeext
13361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13362 (eval $ac_link) 2>&5
13363 ac_status=$?
13364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365 (exit $ac_status); } &&
13366 { ac_try='test -s conftest$ac_exeext'
13367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13368 (eval $ac_try) 2>&5
13369 ac_status=$?
13370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13371 (exit $ac_status); }; }; then
13372 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013373else
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013375sed 's/^/| /' conftest.$ac_ext >&5
13376
Martin v. Löwis11437992002-04-12 09:54:03 +000013377eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013381echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13383if test `eval echo '${'$as_ac_var'}'` = yes; then
13384 cat >>confdefs.h <<_ACEOF
13385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13386_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013387
Fred Drake8cef4cf2000-06-28 16:40:38 +000013388else
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13390echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13391if test "${ac_cv_lib_util_forkpty+set}" = set; then
13392 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013393else
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013395LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013396cat >conftest.$ac_ext <<_ACEOF
13397#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* confdefs.h. */
13399_ACEOF
13400cat confdefs.h >>conftest.$ac_ext
13401cat >>conftest.$ac_ext <<_ACEOF
13402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Fred Drake8cef4cf2000-06-28 16:40:38 +000013404/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013405#ifdef __cplusplus
13406extern "C"
13407#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013408/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 builtin and then its argument prototype would still apply. */
13410char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013411int
13412main ()
13413{
13414forkpty ();
13415 ;
13416 return 0;
13417}
13418_ACEOF
13419rm -f conftest.$ac_objext conftest$ac_exeext
13420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13421 (eval $ac_link) 2>&5
13422 ac_status=$?
13423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13424 (exit $ac_status); } &&
13425 { ac_try='test -s conftest$ac_exeext'
13426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13427 (eval $ac_try) 2>&5
13428 ac_status=$?
13429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430 (exit $ac_status); }; }; then
13431 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013432else
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013434sed 's/^/| /' conftest.$ac_ext >&5
13435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13439LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013441echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13442echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13443if test $ac_cv_lib_util_forkpty = yes; then
13444 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013445#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013446_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013447 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013448fi
13449
13450fi
13451done
13452
Jack Jansendd19cf82001-12-06 22:36:17 +000013453
Michael W. Hudson54241132001-12-07 15:38:26 +000013454# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
13456
13457
13458
13459
13460
Fred Drake8cef4cf2000-06-28 16:40:38 +000013461for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13462do
Martin v. Löwis11437992002-04-12 09:54:03 +000013463as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13464echo "$as_me:$LINENO: checking for $ac_func" >&5
13465echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13466if eval "test \"\${$as_ac_var+set}\" = set"; then
13467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013468else
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 cat >conftest.$ac_ext <<_ACEOF
13470#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013471/* confdefs.h. */
13472_ACEOF
13473cat confdefs.h >>conftest.$ac_ext
13474cat >>conftest.$ac_ext <<_ACEOF
13475/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013476/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013477 which can conflict with char $ac_func (); below.
13478 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013479 <limits.h> exists even on freestanding compilers. Under hpux,
13480 including <limits.h> includes <sys/time.h> and causes problems
13481 checking for functions defined therein. */
13482#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013483# include <limits.h>
13484#else
13485# include <assert.h>
13486#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013487/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013488#ifdef __cplusplus
13489extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013490{
Martin v. Löwis11437992002-04-12 09:54:03 +000013491#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013492/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 builtin and then its argument prototype would still apply. */
13494char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013495/* The GNU C library defines this for functions which it implements
13496 to always fail with ENOSYS. Some functions are actually named
13497 something starting with __ and the normal name is an alias. */
13498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13499choke me
13500#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013501char (*f) () = $ac_func;
13502#endif
13503#ifdef __cplusplus
13504}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013505#endif
13506
Skip Montanaro6dead952003-09-25 14:50:04 +000013507int
13508main ()
13509{
13510return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 ;
13512 return 0;
13513}
13514_ACEOF
13515rm -f conftest.$ac_objext conftest$ac_exeext
13516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13517 (eval $ac_link) 2>&5
13518 ac_status=$?
13519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13520 (exit $ac_status); } &&
13521 { ac_try='test -s conftest$ac_exeext'
13522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13523 (eval $ac_try) 2>&5
13524 ac_status=$?
13525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526 (exit $ac_status); }; }; then
13527 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528else
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013530sed 's/^/| /' conftest.$ac_ext >&5
13531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013534rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013536echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13537echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13538if test `eval echo '${'$as_ac_var'}'` = yes; then
13539 cat >>confdefs.h <<_ACEOF
13540#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13541_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013542
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013544done
13545
Michael W. Hudson54241132001-12-07 15:38:26 +000013546
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
13548
13549
13550
13551
Martin v. Löwis1142de32002-03-29 16:28:31 +000013552for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013553do
Martin v. Löwis11437992002-04-12 09:54:03 +000013554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13555echo "$as_me:$LINENO: checking for $ac_func" >&5
13556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13557if eval "test \"\${$as_ac_var+set}\" = set"; then
13558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559else
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 cat >conftest.$ac_ext <<_ACEOF
13561#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013562/* confdefs.h. */
13563_ACEOF
13564cat confdefs.h >>conftest.$ac_ext
13565cat >>conftest.$ac_ext <<_ACEOF
13566/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013567/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013568 which can conflict with char $ac_func (); below.
13569 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013570 <limits.h> exists even on freestanding compilers. Under hpux,
13571 including <limits.h> includes <sys/time.h> and causes problems
13572 checking for functions defined therein. */
13573#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013574# include <limits.h>
13575#else
13576# include <assert.h>
13577#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013578/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013579#ifdef __cplusplus
13580extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013581{
Martin v. Löwis11437992002-04-12 09:54:03 +000013582#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013583/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 builtin and then its argument prototype would still apply. */
13585char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013586/* The GNU C library defines this for functions which it implements
13587 to always fail with ENOSYS. Some functions are actually named
13588 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013589#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013590choke me
13591#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013592char (*f) () = $ac_func;
13593#endif
13594#ifdef __cplusplus
13595}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013596#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597
Skip Montanaro6dead952003-09-25 14:50:04 +000013598int
13599main ()
13600{
13601return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
13606rm -f conftest.$ac_objext conftest$ac_exeext
13607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13608 (eval $ac_link) 2>&5
13609 ac_status=$?
13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611 (exit $ac_status); } &&
13612 { ac_try='test -s conftest$ac_exeext'
13613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13614 (eval $ac_try) 2>&5
13615 ac_status=$?
13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617 (exit $ac_status); }; }; then
13618 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013619else
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013621sed 's/^/| /' conftest.$ac_ext >&5
13622
Martin v. Löwis11437992002-04-12 09:54:03 +000013623eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013625rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013627echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13628echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13629if test `eval echo '${'$as_ac_var'}'` = yes; then
13630 cat >>confdefs.h <<_ACEOF
13631#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13632_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013633
Martin v. Löwis1142de32002-03-29 16:28:31 +000013634else
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013636fi
13637done
13638
13639
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
Martin v. Löwis1142de32002-03-29 16:28:31 +000013641for ac_func in getpgrp
13642do
Martin v. Löwis11437992002-04-12 09:54:03 +000013643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13644echo "$as_me:$LINENO: checking for $ac_func" >&5
13645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13646if eval "test \"\${$as_ac_var+set}\" = set"; then
13647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013648else
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 cat >conftest.$ac_ext <<_ACEOF
13650#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013651/* confdefs.h. */
13652_ACEOF
13653cat confdefs.h >>conftest.$ac_ext
13654cat >>conftest.$ac_ext <<_ACEOF
13655/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013656/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013657 which can conflict with char $ac_func (); below.
13658 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013659 <limits.h> exists even on freestanding compilers. Under hpux,
13660 including <limits.h> includes <sys/time.h> and causes problems
13661 checking for functions defined therein. */
13662#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013663# include <limits.h>
13664#else
13665# include <assert.h>
13666#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013667/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013668#ifdef __cplusplus
13669extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013670{
Martin v. Löwis11437992002-04-12 09:54:03 +000013671#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 builtin and then its argument prototype would still apply. */
13674char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013675/* The GNU C library defines this for functions which it implements
13676 to always fail with ENOSYS. Some functions are actually named
13677 something starting with __ and the normal name is an alias. */
13678#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13679choke me
13680#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013681char (*f) () = $ac_func;
13682#endif
13683#ifdef __cplusplus
13684}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013685#endif
13686
Skip Montanaro6dead952003-09-25 14:50:04 +000013687int
13688main ()
13689{
13690return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 ;
13692 return 0;
13693}
13694_ACEOF
13695rm -f conftest.$ac_objext conftest$ac_exeext
13696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13697 (eval $ac_link) 2>&5
13698 ac_status=$?
13699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13700 (exit $ac_status); } &&
13701 { ac_try='test -s conftest$ac_exeext'
13702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13703 (eval $ac_try) 2>&5
13704 ac_status=$?
13705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706 (exit $ac_status); }; }; then
13707 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013708else
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013710sed 's/^/| /' conftest.$ac_ext >&5
13711
Martin v. Löwis11437992002-04-12 09:54:03 +000013712eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013714rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013716echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13717echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13718if test `eval echo '${'$as_ac_var'}'` = yes; then
13719 cat >>confdefs.h <<_ACEOF
13720#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13721_ACEOF
13722 cat >conftest.$ac_ext <<_ACEOF
13723#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* confdefs.h. */
13725_ACEOF
13726cat confdefs.h >>conftest.$ac_ext
13727cat >>conftest.$ac_ext <<_ACEOF
13728/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013730int
13731main ()
13732{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 ;
13735 return 0;
13736}
13737_ACEOF
13738rm -f conftest.$ac_objext
13739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13740 (eval $ac_compile) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); } &&
13744 { ac_try='test -s conftest.$ac_objext'
13745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13746 (eval $ac_try) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); }; }; then
13750
13751cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013753_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755
Guido van Rossumf78abae1997-01-21 22:02:36 +000013756else
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013758sed 's/^/| /' conftest.$ac_ext >&5
13759
Guido van Rossum627b2d71993-12-24 10:39:16 +000013760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013761rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013762
Guido van Rossum627b2d71993-12-24 10:39:16 +000013763fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013764done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013765
Jack Jansen150753c2003-03-29 22:07:47 +000013766
13767for ac_func in setpgrp
13768do
13769as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13770echo "$as_me:$LINENO: checking for $ac_func" >&5
13771echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13772if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774else
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 cat >conftest.$ac_ext <<_ACEOF
13776#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013777/* confdefs.h. */
13778_ACEOF
13779cat confdefs.h >>conftest.$ac_ext
13780cat >>conftest.$ac_ext <<_ACEOF
13781/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013782/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013783 which can conflict with char $ac_func (); below.
13784 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013785 <limits.h> exists even on freestanding compilers. Under hpux,
13786 including <limits.h> includes <sys/time.h> and causes problems
13787 checking for functions defined therein. */
13788#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013789# include <limits.h>
13790#else
13791# include <assert.h>
13792#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013793/* Override any gcc2 internal prototype to avoid an error. */
13794#ifdef __cplusplus
13795extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013796{
Martin v. Löwis11437992002-04-12 09:54:03 +000013797#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013798/* We use char because int might match the return type of a gcc2
13799 builtin and then its argument prototype would still apply. */
13800char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013801/* The GNU C library defines this for functions which it implements
13802 to always fail with ENOSYS. Some functions are actually named
13803 something starting with __ and the normal name is an alias. */
13804#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13805choke me
13806#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013807char (*f) () = $ac_func;
13808#endif
13809#ifdef __cplusplus
13810}
Jack Jansen150753c2003-03-29 22:07:47 +000013811#endif
13812
Skip Montanaro6dead952003-09-25 14:50:04 +000013813int
13814main ()
13815{
13816return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 ;
13818 return 0;
13819}
13820_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013821rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13823 (eval $ac_link) 2>&5
13824 ac_status=$?
13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013826 (exit $ac_status); } &&
13827 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13829 (eval $ac_try) 2>&5
13830 ac_status=$?
13831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013833 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013834else
Jack Jansen150753c2003-03-29 22:07:47 +000013835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013836sed 's/^/| /' conftest.$ac_ext >&5
13837
Jack Jansen150753c2003-03-29 22:07:47 +000013838eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013839fi
Jack Jansen150753c2003-03-29 22:07:47 +000013840rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013841fi
Jack Jansen150753c2003-03-29 22:07:47 +000013842echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13843echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13844if test `eval echo '${'$as_ac_var'}'` = yes; then
13845 cat >>confdefs.h <<_ACEOF
13846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13847_ACEOF
13848 cat >conftest.$ac_ext <<_ACEOF
13849#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* confdefs.h. */
13851_ACEOF
13852cat confdefs.h >>conftest.$ac_ext
13853cat >>conftest.$ac_ext <<_ACEOF
13854/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013855#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013856int
13857main ()
13858{
13859setpgrp(0,0);
13860 ;
13861 return 0;
13862}
13863_ACEOF
13864rm -f conftest.$ac_objext
13865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13866 (eval $ac_compile) 2>&5
13867 ac_status=$?
13868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869 (exit $ac_status); } &&
13870 { ac_try='test -s conftest.$ac_objext'
13871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13872 (eval $ac_try) 2>&5
13873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
13877cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013878#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013879_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013880
Jack Jansen150753c2003-03-29 22:07:47 +000013881
13882else
13883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013884sed 's/^/| /' conftest.$ac_ext >&5
13885
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013886fi
Jack Jansen150753c2003-03-29 22:07:47 +000013887rm -f conftest.$ac_objext conftest.$ac_ext
13888
13889fi
13890done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013891
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
Thomas Wouters3a584202000-08-05 23:28:51 +000013893for ac_func in gettimeofday
13894do
Martin v. Löwis11437992002-04-12 09:54:03 +000013895as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13896echo "$as_me:$LINENO: checking for $ac_func" >&5
13897echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13898if eval "test \"\${$as_ac_var+set}\" = set"; then
13899 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900else
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 cat >conftest.$ac_ext <<_ACEOF
13902#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013903/* confdefs.h. */
13904_ACEOF
13905cat confdefs.h >>conftest.$ac_ext
13906cat >>conftest.$ac_ext <<_ACEOF
13907/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013908/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013909 which can conflict with char $ac_func (); below.
13910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013911 <limits.h> exists even on freestanding compilers. Under hpux,
13912 including <limits.h> includes <sys/time.h> and causes problems
13913 checking for functions defined therein. */
13914#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013915# include <limits.h>
13916#else
13917# include <assert.h>
13918#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013919/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#ifdef __cplusplus
13921extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013922{
Martin v. Löwis11437992002-04-12 09:54:03 +000013923#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013924/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 builtin and then its argument prototype would still apply. */
13926char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013927/* The GNU C library defines this for functions which it implements
13928 to always fail with ENOSYS. Some functions are actually named
13929 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013930#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013931choke me
13932#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013933char (*f) () = $ac_func;
13934#endif
13935#ifdef __cplusplus
13936}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013937#endif
13938
Skip Montanaro6dead952003-09-25 14:50:04 +000013939int
13940main ()
13941{
13942return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ;
13944 return 0;
13945}
13946_ACEOF
13947rm -f conftest.$ac_objext conftest$ac_exeext
13948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13949 (eval $ac_link) 2>&5
13950 ac_status=$?
13951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13952 (exit $ac_status); } &&
13953 { ac_try='test -s conftest$ac_exeext'
13954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13955 (eval $ac_try) 2>&5
13956 ac_status=$?
13957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13958 (exit $ac_status); }; }; then
13959 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013960else
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013962sed 's/^/| /' conftest.$ac_ext >&5
13963
Martin v. Löwis11437992002-04-12 09:54:03 +000013964eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013967fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13969echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13970if test `eval echo '${'$as_ac_var'}'` = yes; then
13971 cat >>confdefs.h <<_ACEOF
13972#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13973_ACEOF
13974 cat >conftest.$ac_ext <<_ACEOF
13975#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013976/* confdefs.h. */
13977_ACEOF
13978cat confdefs.h >>conftest.$ac_ext
13979cat >>conftest.$ac_ext <<_ACEOF
13980/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013981#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013982int
13983main ()
13984{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013985gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 ;
13987 return 0;
13988}
13989_ACEOF
13990rm -f conftest.$ac_objext
13991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13992 (eval $ac_compile) 2>&5
13993 ac_status=$?
13994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13995 (exit $ac_status); } &&
13996 { ac_try='test -s conftest.$ac_objext'
13997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13998 (eval $ac_try) 2>&5
13999 ac_status=$?
14000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14001 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014002 :
14003else
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014005sed 's/^/| /' conftest.$ac_ext >&5
14006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
14008cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014009#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014010_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Guido van Rossum627b2d71993-12-24 10:39:16 +000014013fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014014rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014017done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018
Michael W. Hudson54241132001-12-07 15:38:26 +000014019
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014020echo "$as_me:$LINENO: checking for major" >&5
14021echo $ECHO_N "checking for major... $ECHO_C" >&6
14022cat >conftest.$ac_ext <<_ACEOF
14023#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014029
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014030#if defined(MAJOR_IN_MKDEV)
14031#include <sys/mkdev.h>
14032#elif defined(MAJOR_IN_SYSMACROS)
14033#include <sys/sysmacros.h>
14034#else
14035#include <sys/types.h>
14036#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014037
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014038int
14039main ()
14040{
14041
14042 makedev(major(0),minor(0));
14043
14044 ;
14045 return 0;
14046}
14047_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014048rm -f conftest.$ac_objext conftest$ac_exeext
14049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14050 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014051 ac_status=$?
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014054 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14056 (eval $ac_try) 2>&5
14057 ac_status=$?
14058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059 (exit $ac_status); }; }; then
14060
14061
14062cat >>confdefs.h <<\_ACEOF
14063#define HAVE_DEVICE_MACROS 1
14064_ACEOF
14065
14066 echo "$as_me:$LINENO: result: yes" >&5
14067echo "${ECHO_T}yes" >&6
14068
14069else
14070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014071sed 's/^/| /' conftest.$ac_ext >&5
14072
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014073
14074 echo "$as_me:$LINENO: result: no" >&5
14075echo "${ECHO_T}no" >&6
14076
14077fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014079
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014080# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014081# for [no]getaddrinfo in netdb.h.
14082echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14083echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14084cat >conftest.$ac_ext <<_ACEOF
14085#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014086/* confdefs.h. */
14087_ACEOF
14088cat confdefs.h >>conftest.$ac_ext
14089cat >>conftest.$ac_ext <<_ACEOF
14090/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014091
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014092#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014093#include <sys/socket.h>
14094#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014095#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014096
Martin v. Löwis11437992002-04-12 09:54:03 +000014097int
14098main ()
14099{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014100
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014101getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 ;
14104 return 0;
14105}
14106_ACEOF
14107rm -f conftest.$ac_objext conftest$ac_exeext
14108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14109 (eval $ac_link) 2>&5
14110 ac_status=$?
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112 (exit $ac_status); } &&
14113 { ac_try='test -s conftest$ac_exeext'
14114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14115 (eval $ac_try) 2>&5
14116 ac_status=$?
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118 (exit $ac_status); }; }; then
14119
14120echo "$as_me:$LINENO: result: yes" >&5
14121echo "${ECHO_T}yes" >&6
14122echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14123echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014124if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 echo "$as_me:$LINENO: result: buggy" >&5
14126echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014127buggygetaddrinfo=yes
14128else
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 cat >conftest.$ac_ext <<_ACEOF
14130#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* confdefs.h. */
14132_ACEOF
14133cat confdefs.h >>conftest.$ac_ext
14134cat >>conftest.$ac_ext <<_ACEOF
14135/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014136
14137#include <sys/types.h>
14138#include <netdb.h>
14139#include <string.h>
14140#include <sys/socket.h>
14141#include <netinet/in.h>
14142
14143main()
14144{
14145 int passive, gaierr, inet4 = 0, inet6 = 0;
14146 struct addrinfo hints, *ai, *aitop;
14147 char straddr[INET6_ADDRSTRLEN], strport[16];
14148
14149 for (passive = 0; passive <= 1; passive++) {
14150 memset(&hints, 0, sizeof(hints));
14151 hints.ai_family = AF_UNSPEC;
14152 hints.ai_flags = passive ? AI_PASSIVE : 0;
14153 hints.ai_socktype = SOCK_STREAM;
14154 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14155 (void)gai_strerror(gaierr);
14156 goto bad;
14157 }
14158 for (ai = aitop; ai; ai = ai->ai_next) {
14159 if (ai->ai_addr == NULL ||
14160 ai->ai_addrlen == 0 ||
14161 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14162 straddr, sizeof(straddr), strport, sizeof(strport),
14163 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14164 goto bad;
14165 }
14166 switch (ai->ai_family) {
14167 case AF_INET:
14168 if (strcmp(strport, "54321") != 0) {
14169 goto bad;
14170 }
14171 if (passive) {
14172 if (strcmp(straddr, "0.0.0.0") != 0) {
14173 goto bad;
14174 }
14175 } else {
14176 if (strcmp(straddr, "127.0.0.1") != 0) {
14177 goto bad;
14178 }
14179 }
14180 inet4++;
14181 break;
14182 case AF_INET6:
14183 if (strcmp(strport, "54321") != 0) {
14184 goto bad;
14185 }
14186 if (passive) {
14187 if (strcmp(straddr, "::") != 0) {
14188 goto bad;
14189 }
14190 } else {
14191 if (strcmp(straddr, "::1") != 0) {
14192 goto bad;
14193 }
14194 }
14195 inet6++;
14196 break;
14197 case AF_UNSPEC:
14198 goto bad;
14199 break;
14200 default:
14201 /* another family support? */
14202 break;
14203 }
14204 }
14205 }
14206
14207 if (!(inet4 == 0 || inet4 == 2))
14208 goto bad;
14209 if (!(inet6 == 0 || inet6 == 2))
14210 goto bad;
14211
14212 if (aitop)
14213 freeaddrinfo(aitop);
14214 exit(0);
14215
14216 bad:
14217 if (aitop)
14218 freeaddrinfo(aitop);
14219 exit(1);
14220}
14221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222_ACEOF
14223rm -f conftest$ac_exeext
14224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14225 (eval $ac_link) 2>&5
14226 ac_status=$?
14227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14228 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230 (eval $ac_try) 2>&5
14231 ac_status=$?
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); }; }; then
14234 echo "$as_me:$LINENO: result: good" >&5
14235echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014236buggygetaddrinfo=no
14237else
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 echo "$as_me: program exited with status $ac_status" >&5
14239echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014240sed 's/^/| /' conftest.$ac_ext >&5
14241
Martin v. Löwis11437992002-04-12 09:54:03 +000014242( exit $ac_status )
14243echo "$as_me:$LINENO: result: buggy" >&5
14244echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014245buggygetaddrinfo=yes
14246fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014247rm -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 +000014248fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014249else
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014251sed 's/^/| /' conftest.$ac_ext >&5
14252
Martin v. Löwis11437992002-04-12 09:54:03 +000014253
14254echo "$as_me:$LINENO: result: no" >&5
14255echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014256buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014257
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014260
14261if test "$buggygetaddrinfo" = "yes"; then
14262 if test "$ipv6" = "yes"; then
14263 echo 'Fatal: You must get working getaddrinfo() function.'
14264 echo ' or you can specify "--disable-ipv6"'.
14265 exit 1
14266 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014267else
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
14269cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014270#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014271_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014272
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014275for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014276do
Martin v. Löwis11437992002-04-12 09:54:03 +000014277as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14278echo "$as_me:$LINENO: checking for $ac_func" >&5
14279echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14280if eval "test \"\${$as_ac_var+set}\" = set"; then
14281 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014282else
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 cat >conftest.$ac_ext <<_ACEOF
14284#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014285/* confdefs.h. */
14286_ACEOF
14287cat confdefs.h >>conftest.$ac_ext
14288cat >>conftest.$ac_ext <<_ACEOF
14289/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014290/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014291 which can conflict with char $ac_func (); below.
14292 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014293 <limits.h> exists even on freestanding compilers. Under hpux,
14294 including <limits.h> includes <sys/time.h> and causes problems
14295 checking for functions defined therein. */
14296#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014297# include <limits.h>
14298#else
14299# include <assert.h>
14300#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014301/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014302#ifdef __cplusplus
14303extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014304{
Martin v. Löwis11437992002-04-12 09:54:03 +000014305#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014306/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 builtin and then its argument prototype would still apply. */
14308char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014309/* The GNU C library defines this for functions which it implements
14310 to always fail with ENOSYS. Some functions are actually named
14311 something starting with __ and the normal name is an alias. */
14312#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14313choke me
14314#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014315char (*f) () = $ac_func;
14316#endif
14317#ifdef __cplusplus
14318}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014319#endif
14320
Skip Montanaro6dead952003-09-25 14:50:04 +000014321int
14322main ()
14323{
14324return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 ;
14326 return 0;
14327}
14328_ACEOF
14329rm -f conftest.$ac_objext conftest$ac_exeext
14330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14331 (eval $ac_link) 2>&5
14332 ac_status=$?
14333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14334 (exit $ac_status); } &&
14335 { ac_try='test -s conftest$ac_exeext'
14336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14337 (eval $ac_try) 2>&5
14338 ac_status=$?
14339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14340 (exit $ac_status); }; }; then
14341 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014342else
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014344sed 's/^/| /' conftest.$ac_ext >&5
14345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014350echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14351echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14352if test `eval echo '${'$as_ac_var'}'` = yes; then
14353 cat >>confdefs.h <<_ACEOF
14354#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14355_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014356
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014357fi
14358done
14359
Michael W. Hudson54241132001-12-07 15:38:26 +000014360
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014361# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014362echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14363echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14364if test "${ac_cv_header_time+set}" = set; then
14365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014366else
Martin v. Löwis11437992002-04-12 09:54:03 +000014367 cat >conftest.$ac_ext <<_ACEOF
14368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014369/* confdefs.h. */
14370_ACEOF
14371cat confdefs.h >>conftest.$ac_ext
14372cat >>conftest.$ac_ext <<_ACEOF
14373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014374#include <sys/types.h>
14375#include <sys/time.h>
14376#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Martin v. Löwis11437992002-04-12 09:54:03 +000014378int
14379main ()
14380{
14381if ((struct tm *) 0)
14382return 0;
14383 ;
14384 return 0;
14385}
14386_ACEOF
14387rm -f conftest.$ac_objext
14388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14389 (eval $ac_compile) 2>&5
14390 ac_status=$?
14391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14392 (exit $ac_status); } &&
14393 { ac_try='test -s conftest.$ac_objext'
14394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14395 (eval $ac_try) 2>&5
14396 ac_status=$?
14397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14398 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014399 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014400else
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014402sed 's/^/| /' conftest.$ac_ext >&5
14403
Martin v. Löwis11437992002-04-12 09:54:03 +000014404ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014406rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014408echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14409echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014410if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
14412cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014413#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014414_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014415
14416fi
14417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14419echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14420if test "${ac_cv_struct_tm+set}" = set; then
14421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014422else
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 cat >conftest.$ac_ext <<_ACEOF
14424#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014425/* confdefs.h. */
14426_ACEOF
14427cat confdefs.h >>conftest.$ac_ext
14428cat >>conftest.$ac_ext <<_ACEOF
14429/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014430#include <sys/types.h>
14431#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Martin v. Löwis11437992002-04-12 09:54:03 +000014433int
14434main ()
14435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014436struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ;
14438 return 0;
14439}
14440_ACEOF
14441rm -f conftest.$ac_objext
14442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14443 (eval $ac_compile) 2>&5
14444 ac_status=$?
14445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14446 (exit $ac_status); } &&
14447 { ac_try='test -s conftest.$ac_objext'
14448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14449 (eval $ac_try) 2>&5
14450 ac_status=$?
14451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14452 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014453 ac_cv_struct_tm=time.h
14454else
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014456sed 's/^/| /' conftest.$ac_ext >&5
14457
Martin v. Löwis11437992002-04-12 09:54:03 +000014458ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014460rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014461fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014462echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14463echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014464if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
14466cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014467#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014468_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014469
14470fi
14471
Martin v. Löwis11437992002-04-12 09:54:03 +000014472echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14473echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14474if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014476else
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 cat >conftest.$ac_ext <<_ACEOF
14478#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014479/* confdefs.h. */
14480_ACEOF
14481cat confdefs.h >>conftest.$ac_ext
14482cat >>conftest.$ac_ext <<_ACEOF
14483/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014484#include <sys/types.h>
14485#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014486
14487
Martin v. Löwis11437992002-04-12 09:54:03 +000014488int
14489main ()
14490{
14491static struct tm ac_aggr;
14492if (ac_aggr.tm_zone)
14493return 0;
14494 ;
14495 return 0;
14496}
14497_ACEOF
14498rm -f conftest.$ac_objext
14499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14500 (eval $ac_compile) 2>&5
14501 ac_status=$?
14502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14503 (exit $ac_status); } &&
14504 { ac_try='test -s conftest.$ac_objext'
14505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14506 (eval $ac_try) 2>&5
14507 ac_status=$?
14508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509 (exit $ac_status); }; }; then
14510 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014511else
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014513sed 's/^/| /' conftest.$ac_ext >&5
14514
14515cat >conftest.$ac_ext <<_ACEOF
14516#line $LINENO "configure"
14517/* confdefs.h. */
14518_ACEOF
14519cat confdefs.h >>conftest.$ac_ext
14520cat >>conftest.$ac_ext <<_ACEOF
14521/* end confdefs.h. */
14522#include <sys/types.h>
14523#include <$ac_cv_struct_tm>
14524
14525
14526int
14527main ()
14528{
14529static struct tm ac_aggr;
14530if (sizeof ac_aggr.tm_zone)
14531return 0;
14532 ;
14533 return 0;
14534}
14535_ACEOF
14536rm -f conftest.$ac_objext
14537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14538 (eval $ac_compile) 2>&5
14539 ac_status=$?
14540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14541 (exit $ac_status); } &&
14542 { ac_try='test -s conftest.$ac_objext'
14543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14544 (eval $ac_try) 2>&5
14545 ac_status=$?
14546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547 (exit $ac_status); }; }; then
14548 ac_cv_member_struct_tm_tm_zone=yes
14549else
14550 echo "$as_me: failed program was:" >&5
14551sed 's/^/| /' conftest.$ac_ext >&5
14552
Martin v. Löwis11437992002-04-12 09:54:03 +000014553ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014554fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014555rm -f conftest.$ac_objext conftest.$ac_ext
14556fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014557rm -f conftest.$ac_objext conftest.$ac_ext
14558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014559echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14560echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14561if test $ac_cv_member_struct_tm_tm_zone = yes; then
14562
14563cat >>confdefs.h <<_ACEOF
14564#define HAVE_STRUCT_TM_TM_ZONE 1
14565_ACEOF
14566
14567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014568fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014569
Martin v. Löwis11437992002-04-12 09:54:03 +000014570if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14571
14572cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014573#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014574_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014575
14576else
Martin v. Löwis11437992002-04-12 09:54:03 +000014577 echo "$as_me:$LINENO: checking for tzname" >&5
14578echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14579if test "${ac_cv_var_tzname+set}" = set; then
14580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014581else
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 cat >conftest.$ac_ext <<_ACEOF
14583#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014584/* confdefs.h. */
14585_ACEOF
14586cat confdefs.h >>conftest.$ac_ext
14587cat >>conftest.$ac_ext <<_ACEOF
14588/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014589#include <time.h>
14590#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014591extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594int
14595main ()
14596{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 ;
14599 return 0;
14600}
14601_ACEOF
14602rm -f conftest.$ac_objext conftest$ac_exeext
14603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14604 (eval $ac_link) 2>&5
14605 ac_status=$?
14606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607 (exit $ac_status); } &&
14608 { ac_try='test -s conftest$ac_exeext'
14609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14610 (eval $ac_try) 2>&5
14611 ac_status=$?
14612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014614 ac_cv_var_tzname=yes
14615else
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014617sed 's/^/| /' conftest.$ac_ext >&5
14618
Martin v. Löwis11437992002-04-12 09:54:03 +000014619ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014620fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014621rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014622fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014623echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14624echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014625 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
14627cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014628#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014630
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014631 fi
14632fi
14633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14635echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14636if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14637 echo $ECHO_N "(cached) $ECHO_C" >&6
14638else
14639 cat >conftest.$ac_ext <<_ACEOF
14640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014641/* confdefs.h. */
14642_ACEOF
14643cat confdefs.h >>conftest.$ac_ext
14644cat >>conftest.$ac_ext <<_ACEOF
14645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014646$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014647int
14648main ()
14649{
14650static struct stat ac_aggr;
14651if (ac_aggr.st_rdev)
14652return 0;
14653 ;
14654 return 0;
14655}
14656_ACEOF
14657rm -f conftest.$ac_objext
14658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14659 (eval $ac_compile) 2>&5
14660 ac_status=$?
14661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662 (exit $ac_status); } &&
14663 { ac_try='test -s conftest.$ac_objext'
14664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14665 (eval $ac_try) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); }; }; then
14669 ac_cv_member_struct_stat_st_rdev=yes
14670else
14671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014672sed 's/^/| /' conftest.$ac_ext >&5
14673
14674cat >conftest.$ac_ext <<_ACEOF
14675#line $LINENO "configure"
14676/* confdefs.h. */
14677_ACEOF
14678cat confdefs.h >>conftest.$ac_ext
14679cat >>conftest.$ac_ext <<_ACEOF
14680/* end confdefs.h. */
14681$ac_includes_default
14682int
14683main ()
14684{
14685static struct stat ac_aggr;
14686if (sizeof ac_aggr.st_rdev)
14687return 0;
14688 ;
14689 return 0;
14690}
14691_ACEOF
14692rm -f conftest.$ac_objext
14693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14694 (eval $ac_compile) 2>&5
14695 ac_status=$?
14696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697 (exit $ac_status); } &&
14698 { ac_try='test -s conftest.$ac_objext'
14699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14700 (eval $ac_try) 2>&5
14701 ac_status=$?
14702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14703 (exit $ac_status); }; }; then
14704 ac_cv_member_struct_stat_st_rdev=yes
14705else
14706 echo "$as_me: failed program was:" >&5
14707sed 's/^/| /' conftest.$ac_ext >&5
14708
Martin v. Löwis11437992002-04-12 09:54:03 +000014709ac_cv_member_struct_stat_st_rdev=no
14710fi
14711rm -f conftest.$ac_objext conftest.$ac_ext
14712fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014713rm -f conftest.$ac_objext conftest.$ac_ext
14714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014715echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14716echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14717if test $ac_cv_member_struct_stat_st_rdev = yes; then
14718
14719cat >>confdefs.h <<_ACEOF
14720#define HAVE_STRUCT_STAT_ST_RDEV 1
14721_ACEOF
14722
14723
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014724fi
14725
Martin v. Löwis11437992002-04-12 09:54:03 +000014726echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14727echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14728if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14729 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014730else
Martin v. Löwis11437992002-04-12 09:54:03 +000014731 cat >conftest.$ac_ext <<_ACEOF
14732#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014733/* confdefs.h. */
14734_ACEOF
14735cat confdefs.h >>conftest.$ac_ext
14736cat >>conftest.$ac_ext <<_ACEOF
14737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014738$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014739int
14740main ()
14741{
14742static struct stat ac_aggr;
14743if (ac_aggr.st_blksize)
14744return 0;
14745 ;
14746 return 0;
14747}
14748_ACEOF
14749rm -f conftest.$ac_objext
14750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14751 (eval $ac_compile) 2>&5
14752 ac_status=$?
14753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14754 (exit $ac_status); } &&
14755 { ac_try='test -s conftest.$ac_objext'
14756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14757 (eval $ac_try) 2>&5
14758 ac_status=$?
14759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14760 (exit $ac_status); }; }; then
14761 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014762else
Martin v. Löwis11437992002-04-12 09:54:03 +000014763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014764sed 's/^/| /' conftest.$ac_ext >&5
14765
14766cat >conftest.$ac_ext <<_ACEOF
14767#line $LINENO "configure"
14768/* confdefs.h. */
14769_ACEOF
14770cat confdefs.h >>conftest.$ac_ext
14771cat >>conftest.$ac_ext <<_ACEOF
14772/* end confdefs.h. */
14773$ac_includes_default
14774int
14775main ()
14776{
14777static struct stat ac_aggr;
14778if (sizeof ac_aggr.st_blksize)
14779return 0;
14780 ;
14781 return 0;
14782}
14783_ACEOF
14784rm -f conftest.$ac_objext
14785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14786 (eval $ac_compile) 2>&5
14787 ac_status=$?
14788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789 (exit $ac_status); } &&
14790 { ac_try='test -s conftest.$ac_objext'
14791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14792 (eval $ac_try) 2>&5
14793 ac_status=$?
14794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14795 (exit $ac_status); }; }; then
14796 ac_cv_member_struct_stat_st_blksize=yes
14797else
14798 echo "$as_me: failed program was:" >&5
14799sed 's/^/| /' conftest.$ac_ext >&5
14800
Martin v. Löwis11437992002-04-12 09:54:03 +000014801ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014803rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014804fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014805rm -f conftest.$ac_objext conftest.$ac_ext
14806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014807echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14808echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14809if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014810
Martin v. Löwis11437992002-04-12 09:54:03 +000014811cat >>confdefs.h <<_ACEOF
14812#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14813_ACEOF
14814
14815
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014816fi
14817
Martin v. Löwis11437992002-04-12 09:54:03 +000014818echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14819echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14820if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014822else
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 cat >conftest.$ac_ext <<_ACEOF
14824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014825/* confdefs.h. */
14826_ACEOF
14827cat confdefs.h >>conftest.$ac_ext
14828cat >>conftest.$ac_ext <<_ACEOF
14829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014831int
14832main ()
14833{
14834static struct stat ac_aggr;
14835if (ac_aggr.st_blocks)
14836return 0;
14837 ;
14838 return 0;
14839}
14840_ACEOF
14841rm -f conftest.$ac_objext
14842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14843 (eval $ac_compile) 2>&5
14844 ac_status=$?
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846 (exit $ac_status); } &&
14847 { ac_try='test -s conftest.$ac_objext'
14848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14849 (eval $ac_try) 2>&5
14850 ac_status=$?
14851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14852 (exit $ac_status); }; }; then
14853 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014854else
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014856sed 's/^/| /' conftest.$ac_ext >&5
14857
14858cat >conftest.$ac_ext <<_ACEOF
14859#line $LINENO "configure"
14860/* confdefs.h. */
14861_ACEOF
14862cat confdefs.h >>conftest.$ac_ext
14863cat >>conftest.$ac_ext <<_ACEOF
14864/* end confdefs.h. */
14865$ac_includes_default
14866int
14867main ()
14868{
14869static struct stat ac_aggr;
14870if (sizeof ac_aggr.st_blocks)
14871return 0;
14872 ;
14873 return 0;
14874}
14875_ACEOF
14876rm -f conftest.$ac_objext
14877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14878 (eval $ac_compile) 2>&5
14879 ac_status=$?
14880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881 (exit $ac_status); } &&
14882 { ac_try='test -s conftest.$ac_objext'
14883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14884 (eval $ac_try) 2>&5
14885 ac_status=$?
14886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14887 (exit $ac_status); }; }; then
14888 ac_cv_member_struct_stat_st_blocks=yes
14889else
14890 echo "$as_me: failed program was:" >&5
14891sed 's/^/| /' conftest.$ac_ext >&5
14892
Martin v. Löwis11437992002-04-12 09:54:03 +000014893ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014895rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014896fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014897rm -f conftest.$ac_objext conftest.$ac_ext
14898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014899echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14900echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14901if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014902
Martin v. Löwis11437992002-04-12 09:54:03 +000014903cat >>confdefs.h <<_ACEOF
14904#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14905_ACEOF
14906
14907
14908cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014909#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014910_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014911
14912else
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014914fi
14915
Michael W. Hudson54241132001-12-07 15:38:26 +000014916
Martin v. Löwis11437992002-04-12 09:54:03 +000014917
14918echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14919echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14920if test "${ac_cv_header_time_altzone+set}" = set; then
14921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014922else
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 cat >conftest.$ac_ext <<_ACEOF
14924#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014925/* confdefs.h. */
14926_ACEOF
14927cat confdefs.h >>conftest.$ac_ext
14928cat >>conftest.$ac_ext <<_ACEOF
14929/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014930#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014931int
14932main ()
14933{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014934return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 ;
14936 return 0;
14937}
14938_ACEOF
14939rm -f conftest.$ac_objext
14940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14941 (eval $ac_compile) 2>&5
14942 ac_status=$?
14943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14944 (exit $ac_status); } &&
14945 { ac_try='test -s conftest.$ac_objext'
14946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14947 (eval $ac_try) 2>&5
14948 ac_status=$?
14949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014951 ac_cv_header_time_altzone=yes
14952else
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014954sed 's/^/| /' conftest.$ac_ext >&5
14955
Martin v. Löwis11437992002-04-12 09:54:03 +000014956ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014958rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014959fi
14960
Martin v. Löwis11437992002-04-12 09:54:03 +000014961echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14962echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014963if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014964
14965cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014966#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014967_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014968
14969fi
14970
Guido van Rossumda88dad1995-01-26 00:46:29 +000014971was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014972echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14973echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14974cat >conftest.$ac_ext <<_ACEOF
14975#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014976/* confdefs.h. */
14977_ACEOF
14978cat confdefs.h >>conftest.$ac_ext
14979cat >>conftest.$ac_ext <<_ACEOF
14980/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014981
14982#include <sys/types.h>
14983#include <sys/select.h>
14984#include <sys/time.h>
14985
Martin v. Löwis11437992002-04-12 09:54:03 +000014986int
14987main ()
14988{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989;
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 ;
14991 return 0;
14992}
14993_ACEOF
14994rm -f conftest.$ac_objext
14995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14996 (eval $ac_compile) 2>&5
14997 ac_status=$?
14998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14999 (exit $ac_status); } &&
15000 { ac_try='test -s conftest.$ac_objext'
15001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15002 (eval $ac_try) 2>&5
15003 ac_status=$?
15004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005 (exit $ac_status); }; }; then
15006
15007
15008cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015009#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015010_ACEOF
15011
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015012 was_it_defined=yes
15013
Guido van Rossumf78abae1997-01-21 22:02:36 +000015014else
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015016sed 's/^/| /' conftest.$ac_ext >&5
15017
Guido van Rossum7f43da71994-08-01 12:15:30 +000015018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015019rm -f conftest.$ac_objext conftest.$ac_ext
15020echo "$as_me:$LINENO: result: $was_it_defined" >&5
15021echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015022
Martin v. Löwis11437992002-04-12 09:54:03 +000015023echo "$as_me:$LINENO: checking for addrinfo" >&5
15024echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15025if test "${ac_cv_struct_addrinfo+set}" = set; then
15026 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 cat >conftest.$ac_ext <<_ACEOF
15029#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015030/* confdefs.h. */
15031_ACEOF
15032cat confdefs.h >>conftest.$ac_ext
15033cat >>conftest.$ac_ext <<_ACEOF
15034/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015035
15036# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015037int
15038main ()
15039{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015040struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 ;
15042 return 0;
15043}
15044_ACEOF
15045rm -f conftest.$ac_objext
15046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15047 (eval $ac_compile) 2>&5
15048 ac_status=$?
15049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15050 (exit $ac_status); } &&
15051 { ac_try='test -s conftest.$ac_objext'
15052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15053 (eval $ac_try) 2>&5
15054 ac_status=$?
15055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15056 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015057 ac_cv_struct_addrinfo=yes
15058else
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015060sed 's/^/| /' conftest.$ac_ext >&5
15061
Martin v. Löwis11437992002-04-12 09:54:03 +000015062ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015064rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015065fi
15066
Martin v. Löwis11437992002-04-12 09:54:03 +000015067echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15068echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015069if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015070
15071cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015072#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015073_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015074
15075fi
15076
Martin v. Löwis11437992002-04-12 09:54:03 +000015077echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15078echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15079if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015081else
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 cat >conftest.$ac_ext <<_ACEOF
15083#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015084/* confdefs.h. */
15085_ACEOF
15086cat confdefs.h >>conftest.$ac_ext
15087cat >>conftest.$ac_ext <<_ACEOF
15088/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015089
15090# include <sys/types.h>
15091# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015092int
15093main ()
15094{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015095struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 ;
15097 return 0;
15098}
15099_ACEOF
15100rm -f conftest.$ac_objext
15101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15102 (eval $ac_compile) 2>&5
15103 ac_status=$?
15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 (exit $ac_status); } &&
15106 { ac_try='test -s conftest.$ac_objext'
15107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15108 (eval $ac_try) 2>&5
15109 ac_status=$?
15110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15111 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015112 ac_cv_struct_sockaddr_storage=yes
15113else
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015115sed 's/^/| /' conftest.$ac_ext >&5
15116
Martin v. Löwis11437992002-04-12 09:54:03 +000015117ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015119rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015120fi
15121
Martin v. Löwis11437992002-04-12 09:54:03 +000015122echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15123echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015124if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015125
15126cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015127#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015128_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015129
15130fi
15131
Guido van Rossum627b2d71993-12-24 10:39:16 +000015132# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015133
Michael W. Hudson54241132001-12-07 15:38:26 +000015134
Martin v. Löwis11437992002-04-12 09:54:03 +000015135echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15136echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15137if test "${ac_cv_c_char_unsigned+set}" = set; then
15138 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015139else
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 cat >conftest.$ac_ext <<_ACEOF
15141#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015142/* confdefs.h. */
15143_ACEOF
15144cat confdefs.h >>conftest.$ac_ext
15145cat >>conftest.$ac_ext <<_ACEOF
15146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015147$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015148int
15149main ()
15150{
15151static int test_array [1 - 2 * !(((char) -1) < 0)];
15152test_array [0] = 0
15153
15154 ;
15155 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015156}
Martin v. Löwis11437992002-04-12 09:54:03 +000015157_ACEOF
15158rm -f conftest.$ac_objext
15159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15160 (eval $ac_compile) 2>&5
15161 ac_status=$?
15162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15163 (exit $ac_status); } &&
15164 { ac_try='test -s conftest.$ac_objext'
15165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15166 (eval $ac_try) 2>&5
15167 ac_status=$?
15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015170 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015171else
15172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015173sed 's/^/| /' conftest.$ac_ext >&5
15174
Martin v. Löwis11437992002-04-12 09:54:03 +000015175ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015177rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015179echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15180echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015181if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015183#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015184_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015185
15186fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015187
Martin v. Löwis11437992002-04-12 09:54:03 +000015188echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15189echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15190if test "${ac_cv_c_const+set}" = set; then
15191 echo $ECHO_N "(cached) $ECHO_C" >&6
15192else
15193 cat >conftest.$ac_ext <<_ACEOF
15194#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015195/* confdefs.h. */
15196_ACEOF
15197cat confdefs.h >>conftest.$ac_ext
15198cat >>conftest.$ac_ext <<_ACEOF
15199/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015200
Martin v. Löwis11437992002-04-12 09:54:03 +000015201int
15202main ()
15203{
15204/* FIXME: Include the comments suggested by Paul. */
15205#ifndef __cplusplus
15206 /* Ultrix mips cc rejects this. */
15207 typedef int charset[2];
15208 const charset x;
15209 /* SunOS 4.1.1 cc rejects this. */
15210 char const *const *ccp;
15211 char **p;
15212 /* NEC SVR4.0.2 mips cc rejects this. */
15213 struct point {int x, y;};
15214 static struct point const zero = {0,0};
15215 /* AIX XL C 1.02.0.0 rejects this.
15216 It does not let you subtract one const X* pointer from another in
15217 an arm of an if-expression whose if-part is not a constant
15218 expression */
15219 const char *g = "string";
15220 ccp = &g + (g ? g-g : 0);
15221 /* HPUX 7.0 cc rejects these. */
15222 ++ccp;
15223 p = (char**) ccp;
15224 ccp = (char const *const *) p;
15225 { /* SCO 3.2v4 cc rejects this. */
15226 char *t;
15227 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015228
Martin v. Löwis11437992002-04-12 09:54:03 +000015229 *t++ = 0;
15230 }
15231 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15232 int x[] = {25, 17};
15233 const int *foo = &x[0];
15234 ++foo;
15235 }
15236 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15237 typedef const int *iptr;
15238 iptr p = 0;
15239 ++p;
15240 }
15241 { /* AIX XL C 1.02.0.0 rejects this saying
15242 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15243 struct s { int j; const int *ap[3]; };
15244 struct s *b; b->j = 5;
15245 }
15246 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15247 const int foo = 10;
15248 }
15249#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015250
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 ;
15252 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015253}
Martin v. Löwis11437992002-04-12 09:54:03 +000015254_ACEOF
15255rm -f conftest.$ac_objext
15256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15257 (eval $ac_compile) 2>&5
15258 ac_status=$?
15259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260 (exit $ac_status); } &&
15261 { ac_try='test -s conftest.$ac_objext'
15262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15263 (eval $ac_try) 2>&5
15264 ac_status=$?
15265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15266 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267 ac_cv_c_const=yes
15268else
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015270sed 's/^/| /' conftest.$ac_ext >&5
15271
Martin v. Löwis11437992002-04-12 09:54:03 +000015272ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015274rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015276echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15277echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015278if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015279
15280cat >>confdefs.h <<\_ACEOF
15281#define const
15282_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015283
15284fi
15285
Michael W. Hudson54241132001-12-07 15:38:26 +000015286
Guido van Rossumda88dad1995-01-26 00:46:29 +000015287works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015288echo "$as_me:$LINENO: checking for working volatile" >&5
15289echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15290cat >conftest.$ac_ext <<_ACEOF
15291#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015292/* confdefs.h. */
15293_ACEOF
15294cat confdefs.h >>conftest.$ac_ext
15295cat >>conftest.$ac_ext <<_ACEOF
15296/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015297
Martin v. Löwis11437992002-04-12 09:54:03 +000015298int
15299main ()
15300{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015301volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ;
15303 return 0;
15304}
15305_ACEOF
15306rm -f conftest.$ac_objext
15307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15308 (eval $ac_compile) 2>&5
15309 ac_status=$?
15310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311 (exit $ac_status); } &&
15312 { ac_try='test -s conftest.$ac_objext'
15313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15314 (eval $ac_try) 2>&5
15315 ac_status=$?
15316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015318 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015319else
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015321sed 's/^/| /' conftest.$ac_ext >&5
15322
Martin v. Löwis11437992002-04-12 09:54:03 +000015323
15324cat >>confdefs.h <<\_ACEOF
15325#define volatile
15326_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015327
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015328
Guido van Rossum627b2d71993-12-24 10:39:16 +000015329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015330rm -f conftest.$ac_objext conftest.$ac_ext
15331echo "$as_me:$LINENO: result: $works" >&5
15332echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015333
Guido van Rossumda88dad1995-01-26 00:46:29 +000015334works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015335echo "$as_me:$LINENO: checking for working signed char" >&5
15336echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15337cat >conftest.$ac_ext <<_ACEOF
15338#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015339/* confdefs.h. */
15340_ACEOF
15341cat confdefs.h >>conftest.$ac_ext
15342cat >>conftest.$ac_ext <<_ACEOF
15343/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015344
Martin v. Löwis11437992002-04-12 09:54:03 +000015345int
15346main ()
15347{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015348signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ;
15350 return 0;
15351}
15352_ACEOF
15353rm -f conftest.$ac_objext
15354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15355 (eval $ac_compile) 2>&5
15356 ac_status=$?
15357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15358 (exit $ac_status); } &&
15359 { ac_try='test -s conftest.$ac_objext'
15360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15361 (eval $ac_try) 2>&5
15362 ac_status=$?
15363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15364 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015365 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015366else
Martin v. Löwis11437992002-04-12 09:54:03 +000015367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015368sed 's/^/| /' conftest.$ac_ext >&5
15369
Martin v. Löwis11437992002-04-12 09:54:03 +000015370
15371cat >>confdefs.h <<\_ACEOF
15372#define signed
15373_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015374
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015375
Guido van Rossum7f43da71994-08-01 12:15:30 +000015376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015377rm -f conftest.$ac_objext conftest.$ac_ext
15378echo "$as_me:$LINENO: result: $works" >&5
15379echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015380
Guido van Rossumda88dad1995-01-26 00:46:29 +000015381have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015382echo "$as_me:$LINENO: checking for prototypes" >&5
15383echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15384cat >conftest.$ac_ext <<_ACEOF
15385#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015386/* confdefs.h. */
15387_ACEOF
15388cat confdefs.h >>conftest.$ac_ext
15389cat >>conftest.$ac_ext <<_ACEOF
15390/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015391int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015392int
15393main ()
15394{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015395return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 ;
15397 return 0;
15398}
15399_ACEOF
15400rm -f conftest.$ac_objext
15401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15402 (eval $ac_compile) 2>&5
15403 ac_status=$?
15404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405 (exit $ac_status); } &&
15406 { ac_try='test -s conftest.$ac_objext'
15407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15408 (eval $ac_try) 2>&5
15409 ac_status=$?
15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15411 (exit $ac_status); }; }; then
15412
15413
15414cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015415#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015416_ACEOF
15417
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015418 have_prototypes=yes
15419
Guido van Rossumf78abae1997-01-21 22:02:36 +000015420else
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015422sed 's/^/| /' conftest.$ac_ext >&5
15423
Guido van Rossum7f43da71994-08-01 12:15:30 +000015424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015425rm -f conftest.$ac_objext conftest.$ac_ext
15426echo "$as_me:$LINENO: result: $have_prototypes" >&5
15427echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015428
Guido van Rossumda88dad1995-01-26 00:46:29 +000015429works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015430echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15431echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15432cat >conftest.$ac_ext <<_ACEOF
15433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015434/* confdefs.h. */
15435_ACEOF
15436cat confdefs.h >>conftest.$ac_ext
15437cat >>conftest.$ac_ext <<_ACEOF
15438/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015439
15440#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015441int foo(int x, ...) {
15442 va_list va;
15443 va_start(va, x);
15444 va_arg(va, int);
15445 va_arg(va, char *);
15446 va_arg(va, double);
15447 return 0;
15448}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015449
Martin v. Löwis11437992002-04-12 09:54:03 +000015450int
15451main ()
15452{
Guido van Rossum90eea071996-08-30 20:58:57 +000015453return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 ;
15455 return 0;
15456}
15457_ACEOF
15458rm -f conftest.$ac_objext
15459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15460 (eval $ac_compile) 2>&5
15461 ac_status=$?
15462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463 (exit $ac_status); } &&
15464 { ac_try='test -s conftest.$ac_objext'
15465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15466 (eval $ac_try) 2>&5
15467 ac_status=$?
15468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469 (exit $ac_status); }; }; then
15470
15471
15472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015473#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015474_ACEOF
15475
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015476 works=yes
15477
Guido van Rossumf78abae1997-01-21 22:02:36 +000015478else
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015480sed 's/^/| /' conftest.$ac_ext >&5
15481
Guido van Rossum627b2d71993-12-24 10:39:16 +000015482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015483rm -f conftest.$ac_objext conftest.$ac_ext
15484echo "$as_me:$LINENO: result: $works" >&5
15485echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015486
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015487# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015488echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15489echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15490cat >conftest.$ac_ext <<_ACEOF
15491#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015492/* confdefs.h. */
15493_ACEOF
15494cat confdefs.h >>conftest.$ac_ext
15495cat >>conftest.$ac_ext <<_ACEOF
15496/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015497#include <sys/types.h>
15498#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015499int
15500main ()
15501{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015502struct sockaddr x;
15503x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 ;
15505 return 0;
15506}
15507_ACEOF
15508rm -f conftest.$ac_objext
15509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15510 (eval $ac_compile) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); } &&
15514 { ac_try='test -s conftest.$ac_objext'
15515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; }; then
15520 echo "$as_me:$LINENO: result: yes" >&5
15521echo "${ECHO_T}yes" >&6
15522
15523cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015524#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015525_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015526
15527else
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015529sed 's/^/| /' conftest.$ac_ext >&5
15530
Martin v. Löwis11437992002-04-12 09:54:03 +000015531echo "$as_me:$LINENO: result: no" >&5
15532echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015534rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015535
Guido van Rossumda88dad1995-01-26 00:46:29 +000015536va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015537echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15538echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15539cat >conftest.$ac_ext <<_ACEOF
15540#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015541/* confdefs.h. */
15542_ACEOF
15543cat confdefs.h >>conftest.$ac_ext
15544cat >>conftest.$ac_ext <<_ACEOF
15545/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015546
15547#ifdef HAVE_STDARG_PROTOTYPES
15548#include <stdarg.h>
15549#else
15550#include <varargs.h>
15551#endif
15552
Martin v. Löwis11437992002-04-12 09:54:03 +000015553int
15554main ()
15555{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015556va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015557 ;
15558 return 0;
15559}
15560_ACEOF
15561rm -f conftest.$ac_objext
15562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15563 (eval $ac_compile) 2>&5
15564 ac_status=$?
15565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15566 (exit $ac_status); } &&
15567 { ac_try='test -s conftest.$ac_objext'
15568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15569 (eval $ac_try) 2>&5
15570 ac_status=$?
15571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015573 :
15574else
Martin v. Löwis11437992002-04-12 09:54:03 +000015575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015576sed 's/^/| /' conftest.$ac_ext >&5
15577
Martin v. Löwis11437992002-04-12 09:54:03 +000015578
15579
15580cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015581#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015582_ACEOF
15583
Guido van Rossumda88dad1995-01-26 00:46:29 +000015584 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015585
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015587rm -f conftest.$ac_objext conftest.$ac_ext
15588echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15589echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015590
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015591# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
15593
15594
15595echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15596echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15597if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15598 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015599else
Martin v. Löwis11437992002-04-12 09:54:03 +000015600 cat >conftest.$ac_ext <<_ACEOF
15601#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015602/* confdefs.h. */
15603_ACEOF
15604cat confdefs.h >>conftest.$ac_ext
15605cat >>conftest.$ac_ext <<_ACEOF
15606/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015607/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015608 which can conflict with char gethostbyname_r (); below.
15609 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015610 <limits.h> exists even on freestanding compilers. Under hpux,
15611 including <limits.h> includes <sys/time.h> and causes problems
15612 checking for functions defined therein. */
15613#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015614# include <limits.h>
15615#else
15616# include <assert.h>
15617#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015618/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015619#ifdef __cplusplus
15620extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015621{
Martin v. Löwis11437992002-04-12 09:54:03 +000015622#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015623/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 builtin and then its argument prototype would still apply. */
15625char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015626/* The GNU C library defines this for functions which it implements
15627 to always fail with ENOSYS. Some functions are actually named
15628 something starting with __ and the normal name is an alias. */
15629#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15630choke me
15631#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015632char (*f) () = gethostbyname_r;
15633#endif
15634#ifdef __cplusplus
15635}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015636#endif
15637
Skip Montanaro6dead952003-09-25 14:50:04 +000015638int
15639main ()
15640{
15641return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015642 ;
15643 return 0;
15644}
15645_ACEOF
15646rm -f conftest.$ac_objext conftest$ac_exeext
15647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15648 (eval $ac_link) 2>&5
15649 ac_status=$?
15650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15651 (exit $ac_status); } &&
15652 { ac_try='test -s conftest$ac_exeext'
15653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15654 (eval $ac_try) 2>&5
15655 ac_status=$?
15656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15657 (exit $ac_status); }; }; then
15658 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015659else
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015661sed 's/^/| /' conftest.$ac_ext >&5
15662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015664fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015665rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015667echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15668echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15669if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015670
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015672#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015673_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015674
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15676echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015677 OLD_CFLAGS=$CFLAGS
15678 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 cat >conftest.$ac_ext <<_ACEOF
15680#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015681/* confdefs.h. */
15682_ACEOF
15683cat confdefs.h >>conftest.$ac_ext
15684cat >>conftest.$ac_ext <<_ACEOF
15685/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015686
15687# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689int
15690main ()
15691{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015692
15693 char *name;
15694 struct hostent *he, *res;
15695 char buffer[2048];
15696 int buflen = 2048;
15697 int h_errnop;
15698
15699 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
15701 ;
15702 return 0;
15703}
15704_ACEOF
15705rm -f conftest.$ac_objext
15706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15707 (eval $ac_compile) 2>&5
15708 ac_status=$?
15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15710 (exit $ac_status); } &&
15711 { ac_try='test -s conftest.$ac_objext'
15712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15713 (eval $ac_try) 2>&5
15714 ac_status=$?
15715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); }; }; then
15717
15718 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015719#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015720_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015721
Martin v. Löwis11437992002-04-12 09:54:03 +000015722
15723cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015724#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015725_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015726
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 echo "$as_me:$LINENO: result: yes" >&5
15728echo "${ECHO_T}yes" >&6
15729
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015730else
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015732sed 's/^/| /' conftest.$ac_ext >&5
15733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
15735 echo "$as_me:$LINENO: result: no" >&5
15736echo "${ECHO_T}no" >&6
15737 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15738echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15739 cat >conftest.$ac_ext <<_ACEOF
15740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* confdefs.h. */
15742_ACEOF
15743cat confdefs.h >>conftest.$ac_ext
15744cat >>conftest.$ac_ext <<_ACEOF
15745/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015746
15747# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015748
Martin v. Löwis11437992002-04-12 09:54:03 +000015749int
15750main ()
15751{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015752
15753 char *name;
15754 struct hostent *he;
15755 char buffer[2048];
15756 int buflen = 2048;
15757 int h_errnop;
15758
15759 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015760
15761 ;
15762 return 0;
15763}
15764_ACEOF
15765rm -f conftest.$ac_objext
15766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15767 (eval $ac_compile) 2>&5
15768 ac_status=$?
15769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15770 (exit $ac_status); } &&
15771 { ac_try='test -s conftest.$ac_objext'
15772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15773 (eval $ac_try) 2>&5
15774 ac_status=$?
15775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15776 (exit $ac_status); }; }; then
15777
15778 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015779#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015780_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015781
Martin v. Löwis11437992002-04-12 09:54:03 +000015782
15783cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015784#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015785_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 echo "$as_me:$LINENO: result: yes" >&5
15788echo "${ECHO_T}yes" >&6
15789
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015790else
Martin v. Löwis11437992002-04-12 09:54:03 +000015791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015792sed 's/^/| /' conftest.$ac_ext >&5
15793
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
15795 echo "$as_me:$LINENO: result: no" >&5
15796echo "${ECHO_T}no" >&6
15797 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15798echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15799 cat >conftest.$ac_ext <<_ACEOF
15800#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015801/* confdefs.h. */
15802_ACEOF
15803cat confdefs.h >>conftest.$ac_ext
15804cat >>conftest.$ac_ext <<_ACEOF
15805/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015806
15807# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
Martin v. Löwis11437992002-04-12 09:54:03 +000015809int
15810main ()
15811{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015812
15813 char *name;
15814 struct hostent *he;
15815 struct hostent_data data;
15816
15817 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
15819 ;
15820 return 0;
15821}
15822_ACEOF
15823rm -f conftest.$ac_objext
15824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15825 (eval $ac_compile) 2>&5
15826 ac_status=$?
15827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15828 (exit $ac_status); } &&
15829 { ac_try='test -s conftest.$ac_objext'
15830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15831 (eval $ac_try) 2>&5
15832 ac_status=$?
15833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834 (exit $ac_status); }; }; then
15835
15836 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015837#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015838_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015839
Martin v. Löwis11437992002-04-12 09:54:03 +000015840
15841cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015842#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015843_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 echo "$as_me:$LINENO: result: yes" >&5
15846echo "${ECHO_T}yes" >&6
15847
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015848else
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015850sed 's/^/| /' conftest.$ac_ext >&5
15851
Martin v. Löwis11437992002-04-12 09:54:03 +000015852
15853 echo "$as_me:$LINENO: result: no" >&5
15854echo "${ECHO_T}no" >&6
15855
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015856fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015857rm -f conftest.$ac_objext conftest.$ac_ext
15858
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015860rm -f conftest.$ac_objext conftest.$ac_ext
15861
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015863rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015864 CFLAGS=$OLD_CFLAGS
15865
15866else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868
15869for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015870do
Martin v. Löwis11437992002-04-12 09:54:03 +000015871as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15872echo "$as_me:$LINENO: checking for $ac_func" >&5
15873echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15874if eval "test \"\${$as_ac_var+set}\" = set"; then
15875 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015876else
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 cat >conftest.$ac_ext <<_ACEOF
15878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015879/* confdefs.h. */
15880_ACEOF
15881cat confdefs.h >>conftest.$ac_ext
15882cat >>conftest.$ac_ext <<_ACEOF
15883/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015884/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015885 which can conflict with char $ac_func (); below.
15886 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015887 <limits.h> exists even on freestanding compilers. Under hpux,
15888 including <limits.h> includes <sys/time.h> and causes problems
15889 checking for functions defined therein. */
15890#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015891# include <limits.h>
15892#else
15893# include <assert.h>
15894#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015895/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015896#ifdef __cplusplus
15897extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015898{
Martin v. Löwis11437992002-04-12 09:54:03 +000015899#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015900/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 builtin and then its argument prototype would still apply. */
15902char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015903/* The GNU C library defines this for functions which it implements
15904 to always fail with ENOSYS. Some functions are actually named
15905 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015906#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015907choke me
15908#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015909char (*f) () = $ac_func;
15910#endif
15911#ifdef __cplusplus
15912}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015913#endif
15914
Skip Montanaro6dead952003-09-25 14:50:04 +000015915int
15916main ()
15917{
15918return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015919 ;
15920 return 0;
15921}
15922_ACEOF
15923rm -f conftest.$ac_objext conftest$ac_exeext
15924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15925 (eval $ac_link) 2>&5
15926 ac_status=$?
15927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15928 (exit $ac_status); } &&
15929 { ac_try='test -s conftest$ac_exeext'
15930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15931 (eval $ac_try) 2>&5
15932 ac_status=$?
15933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15934 (exit $ac_status); }; }; then
15935 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015936else
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015938sed 's/^/| /' conftest.$ac_ext >&5
15939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015941fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015944echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15945echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15946if test `eval echo '${'$as_ac_var'}'` = yes; then
15947 cat >>confdefs.h <<_ACEOF
15948#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15949_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015950
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015951fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015952done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015953
Michael W. Hudson54241132001-12-07 15:38:26 +000015954
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015955fi
15956
Michael W. Hudson54241132001-12-07 15:38:26 +000015957
15958
15959
15960
15961
15962
Guido van Rossum627b2d71993-12-24 10:39:16 +000015963# checks for system services
15964# (none yet)
15965
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015966# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015967echo "$as_me:$LINENO: checking for __fpu_control" >&5
15968echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15969if test "${ac_cv_func___fpu_control+set}" = set; then
15970 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015971else
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 cat >conftest.$ac_ext <<_ACEOF
15973#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015974/* confdefs.h. */
15975_ACEOF
15976cat confdefs.h >>conftest.$ac_ext
15977cat >>conftest.$ac_ext <<_ACEOF
15978/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015979/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015980 which can conflict with char __fpu_control (); below.
15981 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015982 <limits.h> exists even on freestanding compilers. Under hpux,
15983 including <limits.h> includes <sys/time.h> and causes problems
15984 checking for functions defined therein. */
15985#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015986# include <limits.h>
15987#else
15988# include <assert.h>
15989#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015990/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015991#ifdef __cplusplus
15992extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015993{
Martin v. Löwis11437992002-04-12 09:54:03 +000015994#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 builtin and then its argument prototype would still apply. */
15997char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015998/* The GNU C library defines this for functions which it implements
15999 to always fail with ENOSYS. Some functions are actually named
16000 something starting with __ and the normal name is an alias. */
16001#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16002choke me
16003#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016004char (*f) () = __fpu_control;
16005#endif
16006#ifdef __cplusplus
16007}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016008#endif
16009
Skip Montanaro6dead952003-09-25 14:50:04 +000016010int
16011main ()
16012{
16013return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 ;
16015 return 0;
16016}
16017_ACEOF
16018rm -f conftest.$ac_objext conftest$ac_exeext
16019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16020 (eval $ac_link) 2>&5
16021 ac_status=$?
16022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16023 (exit $ac_status); } &&
16024 { ac_try='test -s conftest$ac_exeext'
16025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16026 (eval $ac_try) 2>&5
16027 ac_status=$?
16028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029 (exit $ac_status); }; }; then
16030 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016031else
Martin v. Löwis11437992002-04-12 09:54:03 +000016032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016033sed 's/^/| /' conftest.$ac_ext >&5
16034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016037rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016039echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16040echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16041if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016042 :
16043else
Martin v. Löwis11437992002-04-12 09:54:03 +000016044
16045echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16046echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16047if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016049else
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016051LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016052cat >conftest.$ac_ext <<_ACEOF
16053#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016054/* confdefs.h. */
16055_ACEOF
16056cat confdefs.h >>conftest.$ac_ext
16057cat >>conftest.$ac_ext <<_ACEOF
16058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016061#ifdef __cplusplus
16062extern "C"
16063#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016065 builtin and then its argument prototype would still apply. */
16066char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016067int
16068main ()
16069{
16070__fpu_control ();
16071 ;
16072 return 0;
16073}
16074_ACEOF
16075rm -f conftest.$ac_objext conftest$ac_exeext
16076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16077 (eval $ac_link) 2>&5
16078 ac_status=$?
16079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16080 (exit $ac_status); } &&
16081 { ac_try='test -s conftest$ac_exeext'
16082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16083 (eval $ac_try) 2>&5
16084 ac_status=$?
16085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16086 (exit $ac_status); }; }; then
16087 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016088else
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016090sed 's/^/| /' conftest.$ac_ext >&5
16091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16095LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016097echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16098echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16099if test $ac_cv_lib_ieee___fpu_control = yes; then
16100 cat >>confdefs.h <<_ACEOF
16101#define HAVE_LIBIEEE 1
16102_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016103
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016104 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016105
Guido van Rossum627b2d71993-12-24 10:39:16 +000016106fi
16107
Michael W. Hudson54241132001-12-07 15:38:26 +000016108
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016109fi
16110
Michael W. Hudson54241132001-12-07 15:38:26 +000016111
Guido van Rossum7f253911997-05-09 02:42:48 +000016112# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016113echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16114echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16115
Guido van Rossum7f253911997-05-09 02:42:48 +000016116# Check whether --with-fpectl or --without-fpectl was given.
16117if test "${with_fpectl+set}" = set; then
16118 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016119
Guido van Rossum7f253911997-05-09 02:42:48 +000016120if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016121then
16122
16123cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016124#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016125_ACEOF
16126
16127 echo "$as_me:$LINENO: result: yes" >&5
16128echo "${ECHO_T}yes" >&6
16129else echo "$as_me:$LINENO: result: no" >&5
16130echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016131fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016132else
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 echo "$as_me:$LINENO: result: no" >&5
16134echo "${ECHO_T}no" >&6
16135fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016136
Guido van Rossum7f43da71994-08-01 12:15:30 +000016137# check for --with-libm=...
16138
Guido van Rossum563e7081996-09-10 18:20:48 +000016139case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016140Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016141BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016142*) LIBM=-lm
16143esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016144echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16145echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16146
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016147# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016148if test "${with_libm+set}" = set; then
16149 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016150
Guido van Rossum7f253911997-05-09 02:42:48 +000016151if test "$withval" = no
16152then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016153 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16154echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016155elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016156then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016157 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16158echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16159else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16160echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16161 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016162fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016163else
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16165echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16166fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016167
16168# check for --with-libc=...
16169
Martin v. Löwis11437992002-04-12 09:54:03 +000016170echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16171echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16172
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016173# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016174if test "${with_libc+set}" = set; then
16175 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016176
Guido van Rossum7f253911997-05-09 02:42:48 +000016177if test "$withval" = no
16178then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016179 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16180echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016181elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016182then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16184echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16185else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16186echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16187 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016188fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016189else
Martin v. Löwis11437992002-04-12 09:54:03 +000016190 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16191echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16192fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016193
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016194# check for hypot() in math library
16195LIBS_SAVE=$LIBS
16196LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016197
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016198for ac_func in hypot
16199do
Martin v. Löwis11437992002-04-12 09:54:03 +000016200as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16201echo "$as_me:$LINENO: checking for $ac_func" >&5
16202echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16203if eval "test \"\${$as_ac_var+set}\" = set"; then
16204 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016205else
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 cat >conftest.$ac_ext <<_ACEOF
16207#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016208/* confdefs.h. */
16209_ACEOF
16210cat confdefs.h >>conftest.$ac_ext
16211cat >>conftest.$ac_ext <<_ACEOF
16212/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016213/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016214 which can conflict with char $ac_func (); below.
16215 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016216 <limits.h> exists even on freestanding compilers. Under hpux,
16217 including <limits.h> includes <sys/time.h> and causes problems
16218 checking for functions defined therein. */
16219#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016220# include <limits.h>
16221#else
16222# include <assert.h>
16223#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016224/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016225#ifdef __cplusplus
16226extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016227{
Martin v. Löwis11437992002-04-12 09:54:03 +000016228#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016229/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 builtin and then its argument prototype would still apply. */
16231char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016232/* The GNU C library defines this for functions which it implements
16233 to always fail with ENOSYS. Some functions are actually named
16234 something starting with __ and the normal name is an alias. */
16235#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16236choke me
16237#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016238char (*f) () = $ac_func;
16239#endif
16240#ifdef __cplusplus
16241}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016242#endif
16243
Skip Montanaro6dead952003-09-25 14:50:04 +000016244int
16245main ()
16246{
16247return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 ;
16249 return 0;
16250}
16251_ACEOF
16252rm -f conftest.$ac_objext conftest$ac_exeext
16253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16254 (eval $ac_link) 2>&5
16255 ac_status=$?
16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16257 (exit $ac_status); } &&
16258 { ac_try='test -s conftest$ac_exeext'
16259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16260 (eval $ac_try) 2>&5
16261 ac_status=$?
16262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16263 (exit $ac_status); }; }; then
16264 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016265else
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016267sed 's/^/| /' conftest.$ac_ext >&5
16268
Martin v. Löwis11437992002-04-12 09:54:03 +000016269eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016271rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016273echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16274echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16275if test `eval echo '${'$as_ac_var'}'` = yes; then
16276 cat >>confdefs.h <<_ACEOF
16277#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16278_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016279
Michael W. Hudson54241132001-12-07 15:38:26 +000016280else
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016282fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016283done
16284
Michael W. Hudson54241132001-12-07 15:38:26 +000016285
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016286LIBS=$LIBS_SAVE
16287
Guido van Rossumef2255b2000-03-10 22:30:29 +000016288# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016289if test "${ac_cv_header_wchar_h+set}" = set; then
16290 echo "$as_me:$LINENO: checking for wchar.h" >&5
16291echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16292if test "${ac_cv_header_wchar_h+set}" = set; then
16293 echo $ECHO_N "(cached) $ECHO_C" >&6
16294fi
16295echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16296echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016297else
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 # Is the header compilable?
16299echo "$as_me:$LINENO: checking wchar.h usability" >&5
16300echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16301cat >conftest.$ac_ext <<_ACEOF
16302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016303/* confdefs.h. */
16304_ACEOF
16305cat confdefs.h >>conftest.$ac_ext
16306cat >>conftest.$ac_ext <<_ACEOF
16307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016308$ac_includes_default
16309#include <wchar.h>
16310_ACEOF
16311rm -f conftest.$ac_objext
16312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16313 (eval $ac_compile) 2>&5
16314 ac_status=$?
16315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16316 (exit $ac_status); } &&
16317 { ac_try='test -s conftest.$ac_objext'
16318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16319 (eval $ac_try) 2>&5
16320 ac_status=$?
16321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16322 (exit $ac_status); }; }; then
16323 ac_header_compiler=yes
16324else
16325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016326sed 's/^/| /' conftest.$ac_ext >&5
16327
Martin v. Löwis11437992002-04-12 09:54:03 +000016328ac_header_compiler=no
16329fi
16330rm -f conftest.$ac_objext conftest.$ac_ext
16331echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16332echo "${ECHO_T}$ac_header_compiler" >&6
16333
16334# Is the header present?
16335echo "$as_me:$LINENO: checking wchar.h presence" >&5
16336echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16337cat >conftest.$ac_ext <<_ACEOF
16338#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016339/* confdefs.h. */
16340_ACEOF
16341cat confdefs.h >>conftest.$ac_ext
16342cat >>conftest.$ac_ext <<_ACEOF
16343/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016344#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016345_ACEOF
16346if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16347 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16348 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016349 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 rm -f conftest.er1
16351 cat conftest.err >&5
16352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16353 (exit $ac_status); } >/dev/null; then
16354 if test -s conftest.err; then
16355 ac_cpp_err=$ac_c_preproc_warn_flag
16356 else
16357 ac_cpp_err=
16358 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016359else
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 ac_cpp_err=yes
16361fi
16362if test -z "$ac_cpp_err"; then
16363 ac_header_preproc=yes
16364else
16365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016366sed 's/^/| /' conftest.$ac_ext >&5
16367
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016370rm -f conftest.err conftest.$ac_ext
16371echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16372echo "${ECHO_T}$ac_header_preproc" >&6
16373
16374# So? What about this header?
16375case $ac_header_compiler:$ac_header_preproc in
16376 yes:no )
16377 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16378echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16379 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016380echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16381 (
16382 cat <<\_ASBOX
16383## ------------------------------------ ##
16384## Report this to bug-autoconf@gnu.org. ##
16385## ------------------------------------ ##
16386_ASBOX
16387 ) |
16388 sed "s/^/$as_me: WARNING: /" >&2
16389 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016390 no:yes )
16391 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16392echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16393 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16394echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16395 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016396echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16397 (
16398 cat <<\_ASBOX
16399## ------------------------------------ ##
16400## Report this to bug-autoconf@gnu.org. ##
16401## ------------------------------------ ##
16402_ASBOX
16403 ) |
16404 sed "s/^/$as_me: WARNING: /" >&2
16405 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016406esac
16407echo "$as_me:$LINENO: checking for wchar.h" >&5
16408echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16409if test "${ac_cv_header_wchar_h+set}" = set; then
16410 echo $ECHO_N "(cached) $ECHO_C" >&6
16411else
16412 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016414echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16415echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16416
16417fi
16418if test $ac_cv_header_wchar_h = yes; then
16419
16420
16421cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016422#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016423_ACEOF
16424
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016425 wchar_h="yes"
16426
Guido van Rossumef2255b2000-03-10 22:30:29 +000016427else
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016429
16430fi
16431
Michael W. Hudson54241132001-12-07 15:38:26 +000016432
Martin v. Löwis11437992002-04-12 09:54:03 +000016433
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016434# determine wchar_t size
16435if test "$wchar_h" = yes
16436then
Martin v. Löwis11437992002-04-12 09:54:03 +000016437 echo "$as_me:$LINENO: checking for wchar_t" >&5
16438echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16439if test "${ac_cv_type_wchar_t+set}" = set; then
16440 echo $ECHO_N "(cached) $ECHO_C" >&6
16441else
16442 cat >conftest.$ac_ext <<_ACEOF
16443#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016444/* confdefs.h. */
16445_ACEOF
16446cat confdefs.h >>conftest.$ac_ext
16447cat >>conftest.$ac_ext <<_ACEOF
16448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016449#include <wchar.h>
16450
Martin v. Löwis11437992002-04-12 09:54:03 +000016451int
16452main ()
16453{
16454if ((wchar_t *) 0)
16455 return 0;
16456if (sizeof (wchar_t))
16457 return 0;
16458 ;
16459 return 0;
16460}
16461_ACEOF
16462rm -f conftest.$ac_objext
16463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16464 (eval $ac_compile) 2>&5
16465 ac_status=$?
16466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16467 (exit $ac_status); } &&
16468 { ac_try='test -s conftest.$ac_objext'
16469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16470 (eval $ac_try) 2>&5
16471 ac_status=$?
16472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473 (exit $ac_status); }; }; then
16474 ac_cv_type_wchar_t=yes
16475else
16476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016477sed 's/^/| /' conftest.$ac_ext >&5
16478
Martin v. Löwis11437992002-04-12 09:54:03 +000016479ac_cv_type_wchar_t=no
16480fi
16481rm -f conftest.$ac_objext conftest.$ac_ext
16482fi
16483echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16484echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16485
16486echo "$as_me:$LINENO: checking size of wchar_t" >&5
16487echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16488if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16489 echo $ECHO_N "(cached) $ECHO_C" >&6
16490else
16491 if test "$ac_cv_type_wchar_t" = yes; then
16492 # The cast to unsigned long works around a bug in the HP C Compiler
16493 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16494 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16495 # This bug is HP SR number 8606223364.
16496 if test "$cross_compiling" = yes; then
16497 # Depending upon the size, compute the lo and hi bounds.
16498cat >conftest.$ac_ext <<_ACEOF
16499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016500/* confdefs.h. */
16501_ACEOF
16502cat confdefs.h >>conftest.$ac_ext
16503cat >>conftest.$ac_ext <<_ACEOF
16504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016505#include <wchar.h>
16506
Martin v. Löwis11437992002-04-12 09:54:03 +000016507int
16508main ()
16509{
16510static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16511test_array [0] = 0
16512
16513 ;
16514 return 0;
16515}
16516_ACEOF
16517rm -f conftest.$ac_objext
16518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16519 (eval $ac_compile) 2>&5
16520 ac_status=$?
16521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16522 (exit $ac_status); } &&
16523 { ac_try='test -s conftest.$ac_objext'
16524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16525 (eval $ac_try) 2>&5
16526 ac_status=$?
16527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16528 (exit $ac_status); }; }; then
16529 ac_lo=0 ac_mid=0
16530 while :; do
16531 cat >conftest.$ac_ext <<_ACEOF
16532#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016533/* confdefs.h. */
16534_ACEOF
16535cat confdefs.h >>conftest.$ac_ext
16536cat >>conftest.$ac_ext <<_ACEOF
16537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016538#include <wchar.h>
16539
Martin v. Löwis11437992002-04-12 09:54:03 +000016540int
16541main ()
16542{
16543static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16544test_array [0] = 0
16545
16546 ;
16547 return 0;
16548}
16549_ACEOF
16550rm -f conftest.$ac_objext
16551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16552 (eval $ac_compile) 2>&5
16553 ac_status=$?
16554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16555 (exit $ac_status); } &&
16556 { ac_try='test -s conftest.$ac_objext'
16557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16558 (eval $ac_try) 2>&5
16559 ac_status=$?
16560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16561 (exit $ac_status); }; }; then
16562 ac_hi=$ac_mid; break
16563else
16564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016565sed 's/^/| /' conftest.$ac_ext >&5
16566
Martin v. Löwis11437992002-04-12 09:54:03 +000016567ac_lo=`expr $ac_mid + 1`
16568 if test $ac_lo -le $ac_mid; then
16569 ac_lo= ac_hi=
16570 break
16571 fi
16572 ac_mid=`expr 2 '*' $ac_mid + 1`
16573fi
16574rm -f conftest.$ac_objext conftest.$ac_ext
16575 done
16576else
16577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016578sed 's/^/| /' conftest.$ac_ext >&5
16579
Martin v. Löwis11437992002-04-12 09:54:03 +000016580cat >conftest.$ac_ext <<_ACEOF
16581#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016582/* confdefs.h. */
16583_ACEOF
16584cat confdefs.h >>conftest.$ac_ext
16585cat >>conftest.$ac_ext <<_ACEOF
16586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016587#include <wchar.h>
16588
Martin v. Löwis11437992002-04-12 09:54:03 +000016589int
16590main ()
16591{
16592static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16593test_array [0] = 0
16594
16595 ;
16596 return 0;
16597}
16598_ACEOF
16599rm -f conftest.$ac_objext
16600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16601 (eval $ac_compile) 2>&5
16602 ac_status=$?
16603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604 (exit $ac_status); } &&
16605 { ac_try='test -s conftest.$ac_objext'
16606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16607 (eval $ac_try) 2>&5
16608 ac_status=$?
16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610 (exit $ac_status); }; }; then
16611 ac_hi=-1 ac_mid=-1
16612 while :; do
16613 cat >conftest.$ac_ext <<_ACEOF
16614#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016615/* confdefs.h. */
16616_ACEOF
16617cat confdefs.h >>conftest.$ac_ext
16618cat >>conftest.$ac_ext <<_ACEOF
16619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016620#include <wchar.h>
16621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622int
16623main ()
16624{
16625static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16626test_array [0] = 0
16627
16628 ;
16629 return 0;
16630}
16631_ACEOF
16632rm -f conftest.$ac_objext
16633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16634 (eval $ac_compile) 2>&5
16635 ac_status=$?
16636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16637 (exit $ac_status); } &&
16638 { ac_try='test -s conftest.$ac_objext'
16639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16640 (eval $ac_try) 2>&5
16641 ac_status=$?
16642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16643 (exit $ac_status); }; }; then
16644 ac_lo=$ac_mid; break
16645else
16646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016647sed 's/^/| /' conftest.$ac_ext >&5
16648
Martin v. Löwis11437992002-04-12 09:54:03 +000016649ac_hi=`expr '(' $ac_mid ')' - 1`
16650 if test $ac_mid -le $ac_hi; then
16651 ac_lo= ac_hi=
16652 break
16653 fi
16654 ac_mid=`expr 2 '*' $ac_mid`
16655fi
16656rm -f conftest.$ac_objext conftest.$ac_ext
16657 done
16658else
16659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016660sed 's/^/| /' conftest.$ac_ext >&5
16661
Martin v. Löwis11437992002-04-12 09:54:03 +000016662ac_lo= ac_hi=
16663fi
16664rm -f conftest.$ac_objext conftest.$ac_ext
16665fi
16666rm -f conftest.$ac_objext conftest.$ac_ext
16667# Binary search between lo and hi bounds.
16668while test "x$ac_lo" != "x$ac_hi"; do
16669 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16670 cat >conftest.$ac_ext <<_ACEOF
16671#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016672/* confdefs.h. */
16673_ACEOF
16674cat confdefs.h >>conftest.$ac_ext
16675cat >>conftest.$ac_ext <<_ACEOF
16676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016677#include <wchar.h>
16678
Martin v. Löwis11437992002-04-12 09:54:03 +000016679int
16680main ()
16681{
16682static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16683test_array [0] = 0
16684
16685 ;
16686 return 0;
16687}
16688_ACEOF
16689rm -f conftest.$ac_objext
16690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16691 (eval $ac_compile) 2>&5
16692 ac_status=$?
16693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694 (exit $ac_status); } &&
16695 { ac_try='test -s conftest.$ac_objext'
16696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16697 (eval $ac_try) 2>&5
16698 ac_status=$?
16699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16700 (exit $ac_status); }; }; then
16701 ac_hi=$ac_mid
16702else
16703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016704sed 's/^/| /' conftest.$ac_ext >&5
16705
Martin v. Löwis11437992002-04-12 09:54:03 +000016706ac_lo=`expr '(' $ac_mid ')' + 1`
16707fi
16708rm -f conftest.$ac_objext conftest.$ac_ext
16709done
16710case $ac_lo in
16711?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016712'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16713See \`config.log' for more details." >&5
16714echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16715See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016716 { (exit 1); exit 1; }; } ;;
16717esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016718else
16719 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016720 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16721See \`config.log' for more details." >&5
16722echo "$as_me: error: cannot run test program while cross compiling
16723See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016724 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016725else
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 cat >conftest.$ac_ext <<_ACEOF
16727#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016728/* confdefs.h. */
16729_ACEOF
16730cat confdefs.h >>conftest.$ac_ext
16731cat >>conftest.$ac_ext <<_ACEOF
16732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016733#include <wchar.h>
16734
16735long longval () { return (long) (sizeof (wchar_t)); }
16736unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016737#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016738#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016739int
16740main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016741{
Martin v. Löwis11437992002-04-12 09:54:03 +000016742
16743 FILE *f = fopen ("conftest.val", "w");
16744 if (! f)
16745 exit (1);
16746 if (((long) (sizeof (wchar_t))) < 0)
16747 {
16748 long i = longval ();
16749 if (i != ((long) (sizeof (wchar_t))))
16750 exit (1);
16751 fprintf (f, "%ld\n", i);
16752 }
16753 else
16754 {
16755 unsigned long i = ulongval ();
16756 if (i != ((long) (sizeof (wchar_t))))
16757 exit (1);
16758 fprintf (f, "%lu\n", i);
16759 }
16760 exit (ferror (f) || fclose (f) != 0);
16761
16762 ;
16763 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016764}
Martin v. Löwis11437992002-04-12 09:54:03 +000016765_ACEOF
16766rm -f conftest$ac_exeext
16767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16768 (eval $ac_link) 2>&5
16769 ac_status=$?
16770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16773 (eval $ac_try) 2>&5
16774 ac_status=$?
16775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16776 (exit $ac_status); }; }; then
16777 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016778else
Martin v. Löwis11437992002-04-12 09:54:03 +000016779 echo "$as_me: program exited with status $ac_status" >&5
16780echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016781sed 's/^/| /' conftest.$ac_ext >&5
16782
Martin v. Löwis11437992002-04-12 09:54:03 +000016783( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016784{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16785See \`config.log' for more details." >&5
16786echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16787See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016788 { (exit 1); exit 1; }; }
16789fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016790rm -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 +000016791fi
16792fi
16793rm -f conftest.val
16794else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016795 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016796fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016798echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16799echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16800cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016801#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016802_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016803
Michael W. Hudson54241132001-12-07 15:38:26 +000016804
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016805fi
16806
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016807echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16808echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16809have_ucs4_tcl=no
16810cat >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öwisfa3bdea2003-09-04 18:50:54 +000016817
16818#include <tcl.h>
16819#if TCL_UTF_MAX != 6
16820# error "NOT UCS4_TCL"
16821#endif
16822int
16823main ()
16824{
16825
16826 ;
16827 return 0;
16828}
16829_ACEOF
16830rm -f conftest.$ac_objext
16831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16832 (eval $ac_compile) 2>&5
16833 ac_status=$?
16834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835 (exit $ac_status); } &&
16836 { ac_try='test -s conftest.$ac_objext'
16837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16838 (eval $ac_try) 2>&5
16839 ac_status=$?
16840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16841 (exit $ac_status); }; }; then
16842
16843
16844cat >>confdefs.h <<\_ACEOF
16845#define HAVE_UCS4_TCL 1
16846_ACEOF
16847
16848 have_ucs4_tcl=yes
16849
16850else
16851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016852sed 's/^/| /' conftest.$ac_ext >&5
16853
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016854fi
16855rm -f conftest.$ac_objext conftest.$ac_ext
16856echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16857echo "${ECHO_T}$have_ucs4_tcl" >&6
16858
Skip Montanaro6dead952003-09-25 14:50:04 +000016859# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016860if test "$wchar_h" = yes
16861then
16862 # check whether wchar_t is signed or not
16863 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16864echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16865 if test "${ac_cv_wchar_t_signed+set}" = set; then
16866 echo $ECHO_N "(cached) $ECHO_C" >&6
16867else
16868
16869 if test "$cross_compiling" = yes; then
16870 ac_cv_wchar_t_signed=yes
16871else
16872 cat >conftest.$ac_ext <<_ACEOF
16873#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016874/* confdefs.h. */
16875_ACEOF
16876cat confdefs.h >>conftest.$ac_ext
16877cat >>conftest.$ac_ext <<_ACEOF
16878/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016879
16880 #include <wchar.h>
16881 int main()
16882 {
16883 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16884 }
16885
16886_ACEOF
16887rm -f conftest$ac_exeext
16888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16889 (eval $ac_link) 2>&5
16890 ac_status=$?
16891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16892 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16894 (eval $ac_try) 2>&5
16895 ac_status=$?
16896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16897 (exit $ac_status); }; }; then
16898 ac_cv_wchar_t_signed=yes
16899else
16900 echo "$as_me: program exited with status $ac_status" >&5
16901echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016902sed 's/^/| /' conftest.$ac_ext >&5
16903
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016904( exit $ac_status )
16905ac_cv_wchar_t_signed=no
16906fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016907rm -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 +000016908fi
16909fi
16910
16911 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16912echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16913fi
16914
Martin v. Löwis11437992002-04-12 09:54:03 +000016915echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16916echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016917# Check whether --enable-unicode or --disable-unicode was given.
16918if test "${enable_unicode+set}" = set; then
16919 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016920
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016921else
16922 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016923fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016924
16925if test $enable_unicode = yes
16926then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016927 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016928 case "$have_ucs4_tcl" in
16929 yes) enable_unicode="ucs4"
16930 ;;
16931 *) enable_unicode="ucs2"
16932 ;;
16933 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016934fi
16935
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016936
16937
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016938case "$enable_unicode" in
16939ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016941#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016942_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016943
16944 ;;
16945ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016946 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016947#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016948_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016949
16950 ;;
16951esac
16952
Michael W. Hudson54241132001-12-07 15:38:26 +000016953
Martin v. Löwis11437992002-04-12 09:54:03 +000016954
16955
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016956
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016957if test "$enable_unicode" = "no"
16958then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016959 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 echo "$as_me:$LINENO: result: not used" >&5
16961echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016962else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016963 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016964
16965cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016966#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016967_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016968
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016969
16970 # wchar_t is only usable if it maps to an unsigned type
16971 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
16972 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016973 then
16974 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976cat >>confdefs.h <<\_ACEOF
16977#define HAVE_USABLE_WCHAR_T 1
16978_ACEOF
16979
16980 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016981#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016982_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016983
16984 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16985 then
16986 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016987 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016988#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016989_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016990
16991 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16992 then
16993 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016995#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016996_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016997
16998 else
16999 PY_UNICODE_TYPE="no type found"
17000 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017001 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17002echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017003fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017004
17005# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017006echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17007echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17008if test "${ac_cv_c_bigendian+set}" = set; then
17009 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017010else
Martin v. Löwis11437992002-04-12 09:54:03 +000017011 # See if sys/param.h defines the BYTE_ORDER macro.
17012cat >conftest.$ac_ext <<_ACEOF
17013#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017014/* confdefs.h. */
17015_ACEOF
17016cat confdefs.h >>conftest.$ac_ext
17017cat >>conftest.$ac_ext <<_ACEOF
17018/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017019#include <sys/types.h>
17020#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017021
Martin v. Löwis11437992002-04-12 09:54:03 +000017022int
17023main ()
17024{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017025#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17026 bogus endian macros
17027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017028
17029 ;
17030 return 0;
17031}
17032_ACEOF
17033rm -f conftest.$ac_objext
17034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17035 (eval $ac_compile) 2>&5
17036 ac_status=$?
17037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17038 (exit $ac_status); } &&
17039 { ac_try='test -s conftest.$ac_objext'
17040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17041 (eval $ac_try) 2>&5
17042 ac_status=$?
17043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17044 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017045 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017046cat >conftest.$ac_ext <<_ACEOF
17047#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017048/* confdefs.h. */
17049_ACEOF
17050cat confdefs.h >>conftest.$ac_ext
17051cat >>conftest.$ac_ext <<_ACEOF
17052/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017053#include <sys/types.h>
17054#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017055
Martin v. Löwis11437992002-04-12 09:54:03 +000017056int
17057main ()
17058{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017059#if BYTE_ORDER != BIG_ENDIAN
17060 not big endian
17061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017062
17063 ;
17064 return 0;
17065}
17066_ACEOF
17067rm -f conftest.$ac_objext
17068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17069 (eval $ac_compile) 2>&5
17070 ac_status=$?
17071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072 (exit $ac_status); } &&
17073 { ac_try='test -s conftest.$ac_objext'
17074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17075 (eval $ac_try) 2>&5
17076 ac_status=$?
17077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017079 ac_cv_c_bigendian=yes
17080else
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017082sed 's/^/| /' conftest.$ac_ext >&5
17083
Martin v. Löwis11437992002-04-12 09:54:03 +000017084ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017086rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017087else
Martin v. Löwis11437992002-04-12 09:54:03 +000017088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017089sed 's/^/| /' conftest.$ac_ext >&5
17090
Martin v. Löwis11437992002-04-12 09:54:03 +000017091# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017092if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017093 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 ac_cv_c_bigendian=unknown
17095 cat >conftest.$ac_ext <<_ACEOF
17096#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017097/* confdefs.h. */
17098_ACEOF
17099cat confdefs.h >>conftest.$ac_ext
17100cat >>conftest.$ac_ext <<_ACEOF
17101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017102short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17103short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17104void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17105short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17106short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17107void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017108int
17109main ()
17110{
17111 _ascii (); _ebcdic ();
17112 ;
17113 return 0;
17114}
17115_ACEOF
17116rm -f conftest.$ac_objext
17117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17118 (eval $ac_compile) 2>&5
17119 ac_status=$?
17120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17121 (exit $ac_status); } &&
17122 { ac_try='test -s conftest.$ac_objext'
17123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17124 (eval $ac_try) 2>&5
17125 ac_status=$?
17126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17127 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017128 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017129 ac_cv_c_bigendian=yes
17130fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017131if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017132 if test "$ac_cv_c_bigendian" = unknown; then
17133 ac_cv_c_bigendian=no
17134 else
17135 # finding both strings is unlikely to happen, but who knows?
17136 ac_cv_c_bigendian=unknown
17137 fi
17138fi
17139else
17140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017141sed 's/^/| /' conftest.$ac_ext >&5
17142
Martin v. Löwis11437992002-04-12 09:54:03 +000017143fi
17144rm -f conftest.$ac_objext conftest.$ac_ext
17145else
17146 cat >conftest.$ac_ext <<_ACEOF
17147#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017148/* confdefs.h. */
17149_ACEOF
17150cat confdefs.h >>conftest.$ac_ext
17151cat >>conftest.$ac_ext <<_ACEOF
17152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017153int
17154main ()
17155{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017156 /* Are we little or big endian? From Harbison&Steele. */
17157 union
17158 {
17159 long l;
17160 char c[sizeof (long)];
17161 } u;
17162 u.l = 1;
17163 exit (u.c[sizeof (long) - 1] == 1);
17164}
Martin v. Löwis11437992002-04-12 09:54:03 +000017165_ACEOF
17166rm -f conftest$ac_exeext
17167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17168 (eval $ac_link) 2>&5
17169 ac_status=$?
17170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17171 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17173 (eval $ac_try) 2>&5
17174 ac_status=$?
17175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017177 ac_cv_c_bigendian=no
17178else
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 echo "$as_me: program exited with status $ac_status" >&5
17180echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017181sed 's/^/| /' conftest.$ac_ext >&5
17182
Martin v. Löwis11437992002-04-12 09:54:03 +000017183( exit $ac_status )
17184ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017185fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017186rm -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 +000017187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017188fi
17189rm -f conftest.$ac_objext conftest.$ac_ext
17190fi
17191echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17192echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17193case $ac_cv_c_bigendian in
17194 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017195
Martin v. Löwis11437992002-04-12 09:54:03 +000017196cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017197#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017198_ACEOF
17199 ;;
17200 no)
17201 ;;
17202 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017203 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017204presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017205echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017206presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17207 { (exit 1); exit 1; }; } ;;
17208esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017209
Michael W. Hudson54241132001-12-07 15:38:26 +000017210
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017211# Check whether right shifting a negative integer extends the sign bit
17212# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017213echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17214echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17215if test "${ac_cv_rshift_extends_sign+set}" = set; then
17216 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017217else
Martin v. Löwis11437992002-04-12 09:54:03 +000017218
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017219if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017220 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017221else
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 cat >conftest.$ac_ext <<_ACEOF
17223#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017224/* confdefs.h. */
17225_ACEOF
17226cat confdefs.h >>conftest.$ac_ext
17227cat >>conftest.$ac_ext <<_ACEOF
17228/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017229
17230int main()
17231{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017232 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017233}
17234
Martin v. Löwis11437992002-04-12 09:54:03 +000017235_ACEOF
17236rm -f conftest$ac_exeext
17237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17238 (eval $ac_link) 2>&5
17239 ac_status=$?
17240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17243 (eval $ac_try) 2>&5
17244 ac_status=$?
17245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17246 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017247 ac_cv_rshift_extends_sign=yes
17248else
Martin v. Löwis11437992002-04-12 09:54:03 +000017249 echo "$as_me: program exited with status $ac_status" >&5
17250echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017251sed 's/^/| /' conftest.$ac_ext >&5
17252
Martin v. Löwis11437992002-04-12 09:54:03 +000017253( exit $ac_status )
17254ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017255fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017256rm -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 +000017257fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017258fi
17259
Martin v. Löwis11437992002-04-12 09:54:03 +000017260echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17261echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017262if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017263then
Martin v. Löwis11437992002-04-12 09:54:03 +000017264
17265cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017266#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017267_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017268
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017269fi
17270
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017271# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017272echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17273echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17274if test "${ac_cv_have_getc_unlocked+set}" = set; then
17275 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017276else
Martin v. Löwis11437992002-04-12 09:54:03 +000017277
17278cat >conftest.$ac_ext <<_ACEOF
17279#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017280/* confdefs.h. */
17281_ACEOF
17282cat confdefs.h >>conftest.$ac_ext
17283cat >>conftest.$ac_ext <<_ACEOF
17284/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017285#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017286int
17287main ()
17288{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017289
17290 FILE *f = fopen("/dev/null", "r");
17291 flockfile(f);
17292 getc_unlocked(f);
17293 funlockfile(f);
17294
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 ;
17296 return 0;
17297}
17298_ACEOF
17299rm -f conftest.$ac_objext conftest$ac_exeext
17300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17301 (eval $ac_link) 2>&5
17302 ac_status=$?
17303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304 (exit $ac_status); } &&
17305 { ac_try='test -s conftest$ac_exeext'
17306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17307 (eval $ac_try) 2>&5
17308 ac_status=$?
17309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17310 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017311 ac_cv_have_getc_unlocked=yes
17312else
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017314sed 's/^/| /' conftest.$ac_ext >&5
17315
Martin v. Löwis11437992002-04-12 09:54:03 +000017316ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017318rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017319fi
17320
Martin v. Löwis11437992002-04-12 09:54:03 +000017321echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17322echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017323if test "$ac_cv_have_getc_unlocked" = yes
17324then
Martin v. Löwis11437992002-04-12 09:54:03 +000017325
17326cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017327#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017328_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017329
17330fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017331
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017332# check for readline 2.2
17333cat >conftest.$ac_ext <<_ACEOF
17334#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017335/* confdefs.h. */
17336_ACEOF
17337cat confdefs.h >>conftest.$ac_ext
17338cat >>conftest.$ac_ext <<_ACEOF
17339/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017340#include <readline/readline.h>
17341_ACEOF
17342if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17344 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017345 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017346 rm -f conftest.er1
17347 cat conftest.err >&5
17348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17349 (exit $ac_status); } >/dev/null; then
17350 if test -s conftest.err; then
17351 ac_cpp_err=$ac_c_preproc_warn_flag
17352 else
17353 ac_cpp_err=
17354 fi
17355else
17356 ac_cpp_err=yes
17357fi
17358if test -z "$ac_cpp_err"; then
17359 have_readline=yes
17360else
17361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017362sed 's/^/| /' conftest.$ac_ext >&5
17363
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017364 have_readline=no
17365fi
17366rm -f conftest.err conftest.$ac_ext
17367if test $have_readline = yes
17368then
17369 cat >conftest.$ac_ext <<_ACEOF
17370#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017371/* confdefs.h. */
17372_ACEOF
17373cat confdefs.h >>conftest.$ac_ext
17374cat >>conftest.$ac_ext <<_ACEOF
17375/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017376#include <readline/readline.h>
17377
17378_ACEOF
17379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017380 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017381
17382cat >>confdefs.h <<\_ACEOF
17383#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17384_ACEOF
17385
17386fi
17387rm -f conftest*
17388
17389fi
17390
Martin v. Löwis0daad592001-09-30 21:09:59 +000017391# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017392echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17393echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17394if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017396else
Martin v. Löwis11437992002-04-12 09:54:03 +000017397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017398LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017399cat >conftest.$ac_ext <<_ACEOF
17400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017401/* confdefs.h. */
17402_ACEOF
17403cat confdefs.h >>conftest.$ac_ext
17404cat >>conftest.$ac_ext <<_ACEOF
17405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017406
Guido van Rossum353ae582001-07-10 16:45:32 +000017407/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017408#ifdef __cplusplus
17409extern "C"
17410#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017411/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 builtin and then its argument prototype would still apply. */
17413char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017414int
17415main ()
17416{
17417rl_pre_input_hook ();
17418 ;
17419 return 0;
17420}
17421_ACEOF
17422rm -f conftest.$ac_objext conftest$ac_exeext
17423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17424 (eval $ac_link) 2>&5
17425 ac_status=$?
17426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17427 (exit $ac_status); } &&
17428 { ac_try='test -s conftest$ac_exeext'
17429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17430 (eval $ac_try) 2>&5
17431 ac_status=$?
17432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433 (exit $ac_status); }; }; then
17434 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017435else
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017437sed 's/^/| /' conftest.$ac_ext >&5
17438
Martin v. Löwis11437992002-04-12 09:54:03 +000017439ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17442LIBS=$ac_check_lib_save_LIBS
17443fi
17444echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17445echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17446if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017447
Martin v. Löwis11437992002-04-12 09:54:03 +000017448cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017449#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017450_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017451
Martin v. Löwis0daad592001-09-30 21:09:59 +000017452fi
17453
Michael W. Hudson54241132001-12-07 15:38:26 +000017454
Martin v. Löwis0daad592001-09-30 21:09:59 +000017455# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017456echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17457echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17458if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17459 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017460else
Martin v. Löwis11437992002-04-12 09:54:03 +000017461 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017462LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017463cat >conftest.$ac_ext <<_ACEOF
17464#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017465/* confdefs.h. */
17466_ACEOF
17467cat confdefs.h >>conftest.$ac_ext
17468cat >>conftest.$ac_ext <<_ACEOF
17469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017470
Martin v. Löwis0daad592001-09-30 21:09:59 +000017471/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017472#ifdef __cplusplus
17473extern "C"
17474#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017475/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017476 builtin and then its argument prototype would still apply. */
17477char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017478int
17479main ()
17480{
17481rl_completion_matches ();
17482 ;
17483 return 0;
17484}
17485_ACEOF
17486rm -f conftest.$ac_objext conftest$ac_exeext
17487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17488 (eval $ac_link) 2>&5
17489 ac_status=$?
17490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17491 (exit $ac_status); } &&
17492 { ac_try='test -s conftest$ac_exeext'
17493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17494 (eval $ac_try) 2>&5
17495 ac_status=$?
17496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497 (exit $ac_status); }; }; then
17498 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017499else
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017501sed 's/^/| /' conftest.$ac_ext >&5
17502
Martin v. Löwis11437992002-04-12 09:54:03 +000017503ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17506LIBS=$ac_check_lib_save_LIBS
17507fi
17508echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17509echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17510if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017511
Martin v. Löwis11437992002-04-12 09:54:03 +000017512cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017513#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017514_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017515
Guido van Rossum353ae582001-07-10 16:45:32 +000017516fi
17517
Jack Jansendd19cf82001-12-06 22:36:17 +000017518
Martin v. Löwis11437992002-04-12 09:54:03 +000017519echo "$as_me:$LINENO: checking for broken nice()" >&5
17520echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17521if test "${ac_cv_broken_nice+set}" = set; then
17522 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017523else
Martin v. Löwis11437992002-04-12 09:54:03 +000017524
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017525if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017526 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017527else
Martin v. Löwis11437992002-04-12 09:54:03 +000017528 cat >conftest.$ac_ext <<_ACEOF
17529#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017530/* confdefs.h. */
17531_ACEOF
17532cat confdefs.h >>conftest.$ac_ext
17533cat >>conftest.$ac_ext <<_ACEOF
17534/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017535
17536int main()
17537{
17538 int val1 = nice(1);
17539 if (val1 != -1 && val1 == nice(2))
17540 exit(0);
17541 exit(1);
17542}
17543
Martin v. Löwis11437992002-04-12 09:54:03 +000017544_ACEOF
17545rm -f conftest$ac_exeext
17546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17547 (eval $ac_link) 2>&5
17548 ac_status=$?
17549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17552 (eval $ac_try) 2>&5
17553 ac_status=$?
17554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17555 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017556 ac_cv_broken_nice=yes
17557else
Martin v. Löwis11437992002-04-12 09:54:03 +000017558 echo "$as_me: program exited with status $ac_status" >&5
17559echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017560sed 's/^/| /' conftest.$ac_ext >&5
17561
Martin v. Löwis11437992002-04-12 09:54:03 +000017562( exit $ac_status )
17563ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017564fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017565rm -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 +000017566fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017567fi
17568
Martin v. Löwis11437992002-04-12 09:54:03 +000017569echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17570echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017571if test "$ac_cv_broken_nice" = yes
17572then
Martin v. Löwis11437992002-04-12 09:54:03 +000017573
17574cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017575#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017576_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017577
17578fi
17579
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017580# tzset(3) exists and works like we expect it to
17581echo "$as_me:$LINENO: checking for working tzset()" >&5
17582echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17583if test "${ac_cv_working_tzset+set}" = set; then
17584 echo $ECHO_N "(cached) $ECHO_C" >&6
17585else
17586
17587if test "$cross_compiling" = yes; then
17588 ac_cv_working_tzset=no
17589else
17590 cat >conftest.$ac_ext <<_ACEOF
17591#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017592/* confdefs.h. */
17593_ACEOF
17594cat confdefs.h >>conftest.$ac_ext
17595cat >>conftest.$ac_ext <<_ACEOF
17596/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017597
17598#include <stdlib.h>
17599#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017600#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017601int main()
17602{
Brett Cannon18367812003-09-19 00:59:16 +000017603 /* Note that we need to ensure that not only does tzset(3)
17604 do 'something' with localtime, but it works as documented
17605 in the library reference and as expected by the test suite.
17606
17607 Red Hat 6.2 doesn't understand the southern hemisphere
17608 after New Year's Day; it thinks swaps on that day.
17609 */
17610
17611 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17612 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17613
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017614 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017615 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017616 if (localtime(&groundhogday)->tm_hour != 0)
17617 exit(1);
17618
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017619 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017620 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017621 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017622 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017623
17624 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17625 tzset();
17626 if (localtime(&groundhogday)->tm_hour != 11)
17627 exit(1);
17628 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17629 exit(1);
17630 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17631 exit(1);
17632
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017633 exit(0);
17634}
17635
17636_ACEOF
17637rm -f conftest$ac_exeext
17638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17639 (eval $ac_link) 2>&5
17640 ac_status=$?
17641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17642 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17644 (eval $ac_try) 2>&5
17645 ac_status=$?
17646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17647 (exit $ac_status); }; }; then
17648 ac_cv_working_tzset=yes
17649else
17650 echo "$as_me: program exited with status $ac_status" >&5
17651echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017652sed 's/^/| /' conftest.$ac_ext >&5
17653
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017654( exit $ac_status )
17655ac_cv_working_tzset=no
17656fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017657rm -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 +000017658fi
17659fi
17660
17661echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17662echo "${ECHO_T}$ac_cv_working_tzset" >&6
17663if test "$ac_cv_working_tzset" = yes
17664then
17665
17666cat >>confdefs.h <<\_ACEOF
17667#define HAVE_WORKING_TZSET 1
17668_ACEOF
17669
17670fi
17671
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017672# Look for subsecond timestamps in struct stat
17673echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17674echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17675if test "${ac_cv_stat_tv_nsec+set}" = set; then
17676 echo $ECHO_N "(cached) $ECHO_C" >&6
17677else
17678 cat >conftest.$ac_ext <<_ACEOF
17679#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017680/* confdefs.h. */
17681_ACEOF
17682cat confdefs.h >>conftest.$ac_ext
17683cat >>conftest.$ac_ext <<_ACEOF
17684/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017685#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017686int
17687main ()
17688{
17689
17690struct stat st;
17691st.st_mtim.tv_nsec = 1;
17692
17693 ;
17694 return 0;
17695}
17696_ACEOF
17697rm -f conftest.$ac_objext
17698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17699 (eval $ac_compile) 2>&5
17700 ac_status=$?
17701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17702 (exit $ac_status); } &&
17703 { ac_try='test -s conftest.$ac_objext'
17704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17705 (eval $ac_try) 2>&5
17706 ac_status=$?
17707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17708 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017709 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017710else
17711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017712sed 's/^/| /' conftest.$ac_ext >&5
17713
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017714ac_cv_stat_tv_nsec=no
17715fi
17716rm -f conftest.$ac_objext conftest.$ac_ext
17717fi
17718
17719echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17720echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17721if test "$ac_cv_stat_tv_nsec" = yes
17722then
17723
17724cat >>confdefs.h <<\_ACEOF
17725#define HAVE_STAT_TV_NSEC 1
17726_ACEOF
17727
17728fi
17729
Jack Jansen666b1e72001-10-31 12:11:48 +000017730# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017731echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17732echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17733if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17734 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017735else
Martin v. Löwis11437992002-04-12 09:54:03 +000017736 cat >conftest.$ac_ext <<_ACEOF
17737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017738/* confdefs.h. */
17739_ACEOF
17740cat confdefs.h >>conftest.$ac_ext
17741cat >>conftest.$ac_ext <<_ACEOF
17742/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017743#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017744int
17745main ()
17746{
Jack Jansen666b1e72001-10-31 12:11:48 +000017747
17748 int rtn;
17749 rtn = mvwdelch(0,0,0);
17750
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 ;
17752 return 0;
17753}
17754_ACEOF
17755rm -f conftest.$ac_objext
17756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17757 (eval $ac_compile) 2>&5
17758 ac_status=$?
17759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17760 (exit $ac_status); } &&
17761 { ac_try='test -s conftest.$ac_objext'
17762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17763 (eval $ac_try) 2>&5
17764 ac_status=$?
17765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17766 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017767 ac_cv_mvwdelch_is_expression=yes
17768else
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017770sed 's/^/| /' conftest.$ac_ext >&5
17771
Martin v. Löwis11437992002-04-12 09:54:03 +000017772ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017774rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017775fi
17776
Martin v. Löwis11437992002-04-12 09:54:03 +000017777echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17778echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017779
17780if test "$ac_cv_mvwdelch_is_expression" = yes
17781then
Martin v. Löwis11437992002-04-12 09:54:03 +000017782
17783cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017784#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017785_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017786
17787fi
17788
Martin v. Löwis11437992002-04-12 09:54:03 +000017789echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17790echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17791if test "${ac_cv_window_has_flags+set}" = set; then
17792 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017793else
Martin v. Löwis11437992002-04-12 09:54:03 +000017794 cat >conftest.$ac_ext <<_ACEOF
17795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017796/* confdefs.h. */
17797_ACEOF
17798cat confdefs.h >>conftest.$ac_ext
17799cat >>conftest.$ac_ext <<_ACEOF
17800/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017801#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017802int
17803main ()
17804{
Jack Jansen666b1e72001-10-31 12:11:48 +000017805
17806 WINDOW *w;
17807 w->_flags = 0;
17808
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 ;
17810 return 0;
17811}
17812_ACEOF
17813rm -f conftest.$ac_objext
17814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17815 (eval $ac_compile) 2>&5
17816 ac_status=$?
17817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17818 (exit $ac_status); } &&
17819 { ac_try='test -s conftest.$ac_objext'
17820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17821 (eval $ac_try) 2>&5
17822 ac_status=$?
17823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017825 ac_cv_window_has_flags=yes
17826else
Martin v. Löwis11437992002-04-12 09:54:03 +000017827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017828sed 's/^/| /' conftest.$ac_ext >&5
17829
Martin v. Löwis11437992002-04-12 09:54:03 +000017830ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017832rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017833fi
17834
Martin v. Löwis11437992002-04-12 09:54:03 +000017835echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17836echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017837
Jack Jansen666b1e72001-10-31 12:11:48 +000017838
17839if test "$ac_cv_window_has_flags" = yes
17840then
Martin v. Löwis11437992002-04-12 09:54:03 +000017841
17842cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017843#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017844_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017845
17846fi
17847
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017848echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17849echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17850
17851if test -e /dev/ptmx
17852then
17853 echo "$as_me:$LINENO: result: yes" >&5
17854echo "${ECHO_T}yes" >&6
17855
17856cat >>confdefs.h <<\_ACEOF
17857#define HAVE_DEV_PTMX 1
17858_ACEOF
17859
17860else
17861 echo "$as_me:$LINENO: result: no" >&5
17862echo "${ECHO_T}no" >&6
17863fi
17864
Neal Norwitz865400f2003-03-21 01:42:58 +000017865echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17866echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17867
17868if test -e /dev/ptc
17869then
17870 echo "$as_me:$LINENO: result: yes" >&5
17871echo "${ECHO_T}yes" >&6
17872
17873cat >>confdefs.h <<\_ACEOF
17874#define HAVE_DEV_PTC 1
17875_ACEOF
17876
17877else
17878 echo "$as_me:$LINENO: result: no" >&5
17879echo "${ECHO_T}no" >&6
17880fi
17881
Martin v. Löwis11437992002-04-12 09:54:03 +000017882echo "$as_me:$LINENO: checking for socklen_t" >&5
17883echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17884if test "${ac_cv_type_socklen_t+set}" = set; then
17885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017886else
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 cat >conftest.$ac_ext <<_ACEOF
17888#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017889/* confdefs.h. */
17890_ACEOF
17891cat confdefs.h >>conftest.$ac_ext
17892cat >>conftest.$ac_ext <<_ACEOF
17893/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017894
17895#ifdef HAVE_SYS_TYPES_H
17896#include <sys/types.h>
17897#endif
17898#ifdef HAVE_SYS_SOCKET_H
17899#include <sys/socket.h>
17900#endif
17901
17902
Martin v. Löwis11437992002-04-12 09:54:03 +000017903int
17904main ()
17905{
17906if ((socklen_t *) 0)
17907 return 0;
17908if (sizeof (socklen_t))
17909 return 0;
17910 ;
17911 return 0;
17912}
17913_ACEOF
17914rm -f conftest.$ac_objext
17915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17916 (eval $ac_compile) 2>&5
17917 ac_status=$?
17918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919 (exit $ac_status); } &&
17920 { ac_try='test -s conftest.$ac_objext'
17921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17922 (eval $ac_try) 2>&5
17923 ac_status=$?
17924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17925 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017926 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017927else
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017929sed 's/^/| /' conftest.$ac_ext >&5
17930
Martin v. Löwis11437992002-04-12 09:54:03 +000017931ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017933rm -f conftest.$ac_objext conftest.$ac_ext
17934fi
17935echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17936echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17937if test $ac_cv_type_socklen_t = yes; then
17938 :
17939else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017940
Martin v. Löwis01c04012002-11-11 14:58:44 +000017941cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017942#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017943_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017944
17945fi
17946
Michael W. Hudson54241132001-12-07 15:38:26 +000017947
Michael W. Hudson54241132001-12-07 15:38:26 +000017948
17949
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017950for h in `(cd $srcdir;echo Python/thread_*.h)`
17951do
17952 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17953done
17954
Michael W. Hudson54241132001-12-07 15:38:26 +000017955
Jack Jansen0b06be72002-06-21 14:48:38 +000017956SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017957echo "$as_me:$LINENO: checking for build directories" >&5
17958echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017959for dir in $SRCDIRS; do
17960 if test ! -d $dir; then
17961 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017962 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017963done
Martin v. Löwis11437992002-04-12 09:54:03 +000017964echo "$as_me:$LINENO: result: done" >&5
17965echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017966
Guido van Rossum627b2d71993-12-24 10:39:16 +000017967# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000017968 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017969
Martin v. Löwis11437992002-04-12 09:54:03 +000017970cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017971# This file is a shell script that caches the results of configure
17972# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017973# scripts and configure runs, see configure's option --config-cache.
17974# It is not useful on other systems. If it contains results you don't
17975# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017976#
Martin v. Löwis11437992002-04-12 09:54:03 +000017977# config.status only pays attention to the cache file if you give it
17978# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017979#
Skip Montanaro6dead952003-09-25 14:50:04 +000017980# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017981# loading this file, other *unset* `ac_cv_foo' will be assigned the
17982# following values.
17983
17984_ACEOF
17985
Guido van Rossumf78abae1997-01-21 22:02:36 +000017986# The following way of writing the cache mishandles newlines in values,
17987# but we know of no workaround that is simple, portable, and efficient.
17988# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017989# Ultrix sh set writes to stderr and can't be redirected directly,
17990# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017991{
17992 (set) 2>&1 |
17993 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17994 *ac_space=\ *)
17995 # `set' does not quote correctly, so add quotes (double-quote
17996 # substitution turns \\\\ into \\, and sed turns \\ into \).
17997 sed -n \
17998 "s/'/'\\\\''/g;
17999 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18000 ;;
18001 *)
18002 # `set' quotes correctly as required by POSIX, so do not add quotes.
18003 sed -n \
18004 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18005 ;;
18006 esac;
18007} |
18008 sed '
18009 t clear
18010 : clear
18011 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18012 t end
18013 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18014 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018015if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018016 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018017 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18018 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018019 else
18020 echo "not updating unwritable cache $cache_file"
18021 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018022fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018023rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018024
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018025test "x$prefix" = xNONE && prefix=$ac_default_prefix
18026# Let make expand exec_prefix.
18027test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018028
Martin v. Löwis11437992002-04-12 09:54:03 +000018029# VPATH may cause trouble with some makes, so we remove $(srcdir),
18030# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18031# trailing colons and then remove the whole line if VPATH becomes empty
18032# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018033if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018034 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18035s/:*\$(srcdir):*/:/;
18036s/:*\${srcdir}:*/:/;
18037s/:*@srcdir@:*/:/;
18038s/^\([^=]*=[ ]*\):*/\1/;
18039s/:*$//;
18040s/^[^=]*=[ ]*$//;
18041}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018042fi
18043
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018044DEFS=-DHAVE_CONFIG_H
18045
Skip Montanaro6dead952003-09-25 14:50:04 +000018046ac_libobjs=
18047ac_ltlibobjs=
18048for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18049 # 1. Remove the extension, and $U if already installed.
18050 ac_i=`echo "$ac_i" |
18051 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18052 # 2. Add them.
18053 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18054 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18055done
18056LIBOBJS=$ac_libobjs
18057
18058LTLIBOBJS=$ac_ltlibobjs
18059
18060
Martin v. Löwis11437992002-04-12 09:54:03 +000018061
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018062: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018063ac_clean_files_save=$ac_clean_files
18064ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18065{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18066echo "$as_me: creating $CONFIG_STATUS" >&6;}
18067cat >$CONFIG_STATUS <<_ACEOF
18068#! $SHELL
18069# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018070# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018071# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018072# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018073
Martin v. Löwis11437992002-04-12 09:54:03 +000018074debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018075ac_cs_recheck=false
18076ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018077SHELL=\${CONFIG_SHELL-$SHELL}
18078_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018079
Martin v. Löwis11437992002-04-12 09:54:03 +000018080cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018081## --------------------- ##
18082## M4sh Initialization. ##
18083## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018084
Martin v. Löwis11437992002-04-12 09:54:03 +000018085# Be Bourne compatible
18086if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18087 emulate sh
18088 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018089 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18090 # is contrary to our usage. Disable this feature.
18091 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018092elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18093 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018094fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018095
Martin v. Löwis11437992002-04-12 09:54:03 +000018096# Support unset when possible.
18097if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18098 as_unset=unset
18099else
18100 as_unset=false
18101fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018102
Skip Montanaro6dead952003-09-25 14:50:04 +000018103
18104# Work around bugs in pre-3.0 UWIN ksh.
18105$as_unset ENV MAIL MAILPATH
18106PS1='$ '
18107PS2='> '
18108PS4='+ '
18109
18110# NLS nuisances.
18111for as_var in \
18112 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18113 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18114 LC_TELEPHONE LC_TIME
18115do
18116 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18117 eval $as_var=C; export $as_var
18118 else
18119 $as_unset $as_var
18120 fi
18121done
18122
18123# Required to use basename.
18124if expr a : '\(a\)' >/dev/null 2>&1; then
18125 as_expr=expr
18126else
18127 as_expr=false
18128fi
18129
18130if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18131 as_basename=basename
18132else
18133 as_basename=false
18134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018135
18136
18137# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018138as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018139$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18140 X"$0" : 'X\(//\)$' \| \
18141 X"$0" : 'X\(/\)$' \| \
18142 . : '\(.\)' 2>/dev/null ||
18143echo X/"$0" |
18144 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18145 /^X\/\(\/\/\)$/{ s//\1/; q; }
18146 /^X\/\(\/\).*/{ s//\1/; q; }
18147 s/.*/./; q'`
18148
Skip Montanaro6dead952003-09-25 14:50:04 +000018149
Martin v. Löwis11437992002-04-12 09:54:03 +000018150# PATH needs CR, and LINENO needs CR and PATH.
18151# Avoid depending upon Character Ranges.
18152as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18153as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18154as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18155as_cr_digits='0123456789'
18156as_cr_alnum=$as_cr_Letters$as_cr_digits
18157
18158# The user is always right.
18159if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018160 echo "#! /bin/sh" >conf$$.sh
18161 echo "exit 0" >>conf$$.sh
18162 chmod +x conf$$.sh
18163 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018164 PATH_SEPARATOR=';'
18165 else
18166 PATH_SEPARATOR=:
18167 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018168 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018169fi
18170
18171
18172 as_lineno_1=$LINENO
18173 as_lineno_2=$LINENO
18174 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18175 test "x$as_lineno_1" != "x$as_lineno_2" &&
18176 test "x$as_lineno_3" = "x$as_lineno_2" || {
18177 # Find who we are. Look in the path if we contain no path at all
18178 # relative or not.
18179 case $0 in
18180 *[\\/]* ) as_myself=$0 ;;
18181 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18182for as_dir in $PATH
18183do
18184 IFS=$as_save_IFS
18185 test -z "$as_dir" && as_dir=.
18186 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18187done
18188
18189 ;;
18190 esac
18191 # We did not find ourselves, most probably we were run as `sh COMMAND'
18192 # in which case we are not to be found in the path.
18193 if test "x$as_myself" = x; then
18194 as_myself=$0
18195 fi
18196 if test ! -f "$as_myself"; then
18197 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18198echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18199 { (exit 1); exit 1; }; }
18200 fi
18201 case $CONFIG_SHELL in
18202 '')
18203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18204for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18205do
18206 IFS=$as_save_IFS
18207 test -z "$as_dir" && as_dir=.
18208 for as_base in sh bash ksh sh5; do
18209 case $as_dir in
18210 /*)
18211 if ("$as_dir/$as_base" -c '
18212 as_lineno_1=$LINENO
18213 as_lineno_2=$LINENO
18214 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18215 test "x$as_lineno_1" != "x$as_lineno_2" &&
18216 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018217 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18218 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 CONFIG_SHELL=$as_dir/$as_base
18220 export CONFIG_SHELL
18221 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18222 fi;;
18223 esac
18224 done
18225done
18226;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018227 esac
18228
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18230 # uniformly replaced by the line number. The first 'sed' inserts a
18231 # line-number line before each line; the second 'sed' does the real
18232 # work. The second script uses 'N' to pair each line-number line
18233 # with the numbered line, and appends trailing '-' during
18234 # substitution so that $LINENO is not a special case at line end.
18235 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18236 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18237 sed '=' <$as_myself |
18238 sed '
18239 N
18240 s,$,-,
18241 : loop
18242 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18243 t loop
18244 s,-$,,
18245 s,^['$as_cr_digits']*\n,,
18246 ' >$as_me.lineno &&
18247 chmod +x $as_me.lineno ||
18248 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18249echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18250 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018251
Martin v. Löwis11437992002-04-12 09:54:03 +000018252 # Don't try to exec as it changes $[0], causing all sort of problems
18253 # (the dirname of $[0] is not the place where we might find the
18254 # original and so on. Autoconf is especially sensible to this).
18255 . ./$as_me.lineno
18256 # Exit status is that of the last command.
18257 exit
18258}
18259
18260
18261case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18262 *c*,-n*) ECHO_N= ECHO_C='
18263' ECHO_T=' ' ;;
18264 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18265 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18266esac
18267
18268if expr a : '\(a\)' >/dev/null 2>&1; then
18269 as_expr=expr
18270else
18271 as_expr=false
18272fi
18273
18274rm -f conf$$ conf$$.exe conf$$.file
18275echo >conf$$.file
18276if ln -s conf$$.file conf$$ 2>/dev/null; then
18277 # We could just check for DJGPP; but this test a) works b) is more generic
18278 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18279 if test -f conf$$.exe; then
18280 # Don't use ln at all; we don't have any links
18281 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018282 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018283 as_ln_s='ln -s'
18284 fi
18285elif ln conf$$.file conf$$ 2>/dev/null; then
18286 as_ln_s=ln
18287else
18288 as_ln_s='cp -p'
18289fi
18290rm -f conf$$ conf$$.exe conf$$.file
18291
Skip Montanaro6dead952003-09-25 14:50:04 +000018292if mkdir -p . 2>/dev/null; then
18293 as_mkdir_p=:
18294else
18295 as_mkdir_p=false
18296fi
18297
Martin v. Löwis11437992002-04-12 09:54:03 +000018298as_executable_p="test -f"
18299
18300# Sed expression to map a string onto a valid CPP name.
18301as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18302
18303# Sed expression to map a string onto a valid variable name.
18304as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18305
18306
18307# IFS
18308# We need space, tab and new line, in precisely that order.
18309as_nl='
18310'
18311IFS=" $as_nl"
18312
18313# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018314$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018315
18316exec 6>&1
18317
18318# Open the log real soon, to keep \$[0] and so on meaningful, and to
18319# report actual input values of CONFIG_FILES etc. instead of their
18320# values after options handling. Logging --version etc. is OK.
18321exec 5>>config.log
18322{
18323 echo
18324 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18325## Running $as_me. ##
18326_ASBOX
18327} >&5
18328cat >&5 <<_CSEOF
18329
Fred Drake9bd44622003-07-30 17:39:48 +000018330This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018331generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018332
18333 CONFIG_FILES = $CONFIG_FILES
18334 CONFIG_HEADERS = $CONFIG_HEADERS
18335 CONFIG_LINKS = $CONFIG_LINKS
18336 CONFIG_COMMANDS = $CONFIG_COMMANDS
18337 $ $0 $@
18338
18339_CSEOF
18340echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18341echo >&5
18342_ACEOF
18343
18344# Files that config.status was made for.
18345if test -n "$ac_config_files"; then
18346 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18347fi
18348
18349if test -n "$ac_config_headers"; then
18350 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18351fi
18352
18353if test -n "$ac_config_links"; then
18354 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18355fi
18356
18357if test -n "$ac_config_commands"; then
18358 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18359fi
18360
18361cat >>$CONFIG_STATUS <<\_ACEOF
18362
18363ac_cs_usage="\
18364\`$as_me' instantiates files from templates according to the
18365current configuration.
18366
18367Usage: $0 [OPTIONS] [FILE]...
18368
18369 -h, --help print this help, then exit
18370 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018371 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018372 -d, --debug don't remove temporary files
18373 --recheck update $as_me by reconfiguring in the same conditions
18374 --file=FILE[:TEMPLATE]
18375 instantiate the configuration file FILE
18376 --header=FILE[:TEMPLATE]
18377 instantiate the configuration header FILE
18378
18379Configuration files:
18380$config_files
18381
18382Configuration headers:
18383$config_headers
18384
18385Report bugs to <bug-autoconf@gnu.org>."
18386_ACEOF
18387
18388cat >>$CONFIG_STATUS <<_ACEOF
18389ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018390python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018391configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18393
18394Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18395Free Software Foundation, Inc.
18396This config.status script is free software; the Free Software Foundation
18397gives unlimited permission to copy, distribute and modify it."
18398srcdir=$srcdir
18399INSTALL="$INSTALL"
18400_ACEOF
18401
18402cat >>$CONFIG_STATUS <<\_ACEOF
18403# If no file are specified by the user, then we need to provide default
18404# value. By we need to know if files were specified by the user.
18405ac_need_defaults=:
18406while test $# != 0
18407do
18408 case $1 in
18409 --*=*)
18410 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18411 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018412 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018414 -*)
18415 ac_option=$1
18416 ac_optarg=$2
18417 ac_shift=shift
18418 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 *) # This is not an option, so the user has probably given explicit
18420 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018421 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018422 ac_need_defaults=false;;
18423 esac
18424
Skip Montanaro6dead952003-09-25 14:50:04 +000018425 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018426 # Handling of the options.
18427_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018428cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018429 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18430 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018431 --version | --vers* | -V )
18432 echo "$ac_cs_version"; exit 0 ;;
18433 --he | --h)
18434 # Conflict between --help and --header
18435 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18436Try \`$0 --help' for more information." >&5
18437echo "$as_me: error: ambiguous option: $1
18438Try \`$0 --help' for more information." >&2;}
18439 { (exit 1); exit 1; }; };;
18440 --help | --hel | -h )
18441 echo "$ac_cs_usage"; exit 0 ;;
18442 --debug | --d* | -d )
18443 debug=: ;;
18444 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018445 $ac_shift
18446 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018447 ac_need_defaults=false;;
18448 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018449 $ac_shift
18450 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018452 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18453 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18454 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018455
18456 # This is an error.
18457 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18458Try \`$0 --help' for more information." >&5
18459echo "$as_me: error: unrecognized option: $1
18460Try \`$0 --help' for more information." >&2;}
18461 { (exit 1); exit 1; }; } ;;
18462
18463 *) ac_config_targets="$ac_config_targets $1" ;;
18464
18465 esac
18466 shift
18467done
18468
Skip Montanaro6dead952003-09-25 14:50:04 +000018469ac_configure_extra_args=
18470
18471if $ac_cs_silent; then
18472 exec 6>/dev/null
18473 ac_configure_extra_args="$ac_configure_extra_args --silent"
18474fi
18475
18476_ACEOF
18477cat >>$CONFIG_STATUS <<_ACEOF
18478if \$ac_cs_recheck; then
18479 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18480 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18481fi
18482
Martin v. Löwis11437992002-04-12 09:54:03 +000018483_ACEOF
18484
18485
18486
18487
18488
18489cat >>$CONFIG_STATUS <<\_ACEOF
18490for ac_config_target in $ac_config_targets
18491do
18492 case "$ac_config_target" in
18493 # Handling of arguments.
18494 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18495 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18496 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18497 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18498echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18499 { (exit 1); exit 1; }; };;
18500 esac
18501done
18502
18503# If the user did not use the arguments to specify the items to instantiate,
18504# then the envvar interface is used. Set only those that are not.
18505# We use the long form for the default assignment because of an extremely
18506# bizarre bug on SunOS 4.1.3.
18507if $ac_need_defaults; then
18508 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18509 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18510fi
18511
Skip Montanaro6dead952003-09-25 14:50:04 +000018512# Have a temporary directory for convenience. Make it in the build tree
18513# simply because there is no reason to put it here, and in addition,
18514# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018515# Create a temporary directory, and hook for its removal unless debugging.
18516$debug ||
18517{
18518 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18519 trap '{ (exit 1); exit 1; }' 1 2 13 15
18520}
18521
18522# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018523
Martin v. Löwis11437992002-04-12 09:54:03 +000018524{
Skip Montanaro6dead952003-09-25 14:50:04 +000018525 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 test -n "$tmp" && test -d "$tmp"
18527} ||
18528{
Skip Montanaro6dead952003-09-25 14:50:04 +000018529 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018530 (umask 077 && mkdir $tmp)
18531} ||
18532{
Skip Montanaro6dead952003-09-25 14:50:04 +000018533 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018534 { (exit 1); exit 1; }
18535}
18536
18537_ACEOF
18538
18539cat >>$CONFIG_STATUS <<_ACEOF
18540
18541#
18542# CONFIG_FILES section.
18543#
18544
18545# No need to generate the scripts if there are no CONFIG_FILES.
18546# This happens for instance when ./config.status config.h
18547if test -n "\$CONFIG_FILES"; then
18548 # Protect against being on the right side of a sed subst in config.status.
18549 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18550 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18551s,@SHELL@,$SHELL,;t t
18552s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18553s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18554s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18555s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18556s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18557s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18558s,@exec_prefix@,$exec_prefix,;t t
18559s,@prefix@,$prefix,;t t
18560s,@program_transform_name@,$program_transform_name,;t t
18561s,@bindir@,$bindir,;t t
18562s,@sbindir@,$sbindir,;t t
18563s,@libexecdir@,$libexecdir,;t t
18564s,@datadir@,$datadir,;t t
18565s,@sysconfdir@,$sysconfdir,;t t
18566s,@sharedstatedir@,$sharedstatedir,;t t
18567s,@localstatedir@,$localstatedir,;t t
18568s,@libdir@,$libdir,;t t
18569s,@includedir@,$includedir,;t t
18570s,@oldincludedir@,$oldincludedir,;t t
18571s,@infodir@,$infodir,;t t
18572s,@mandir@,$mandir,;t t
18573s,@build_alias@,$build_alias,;t t
18574s,@host_alias@,$host_alias,;t t
18575s,@target_alias@,$target_alias,;t t
18576s,@DEFS@,$DEFS,;t t
18577s,@ECHO_C@,$ECHO_C,;t t
18578s,@ECHO_N@,$ECHO_N,;t t
18579s,@ECHO_T@,$ECHO_T,;t t
18580s,@LIBS@,$LIBS,;t t
18581s,@VERSION@,$VERSION,;t t
18582s,@SOVERSION@,$SOVERSION,;t t
18583s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18584s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18585s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18586s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18587s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18588s,@MACHDEP@,$MACHDEP,;t t
18589s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018590s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018591s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018592s,@CXX@,$CXX,;t t
18593s,@MAINOBJ@,$MAINOBJ,;t t
18594s,@EXEEXT@,$EXEEXT,;t t
18595s,@CC@,$CC,;t t
18596s,@CFLAGS@,$CFLAGS,;t t
18597s,@LDFLAGS@,$LDFLAGS,;t t
18598s,@CPPFLAGS@,$CPPFLAGS,;t t
18599s,@ac_ct_CC@,$ac_ct_CC,;t t
18600s,@OBJEXT@,$OBJEXT,;t t
18601s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018602s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018603s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18604s,@LIBRARY@,$LIBRARY,;t t
18605s,@LDLIBRARY@,$LDLIBRARY,;t t
18606s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18607s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18608s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18609s,@INSTSONAME@,$INSTSONAME,;t t
18610s,@RUNSHARED@,$RUNSHARED,;t t
18611s,@LINKCC@,$LINKCC,;t t
18612s,@RANLIB@,$RANLIB,;t t
18613s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18614s,@AR@,$AR,;t t
18615s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18616s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18617s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18618s,@LN@,$LN,;t t
18619s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018620s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018621s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18622s,@SO@,$SO,;t t
18623s,@LDSHARED@,$LDSHARED,;t t
18624s,@BLDSHARED@,$BLDSHARED,;t t
18625s,@CCSHARED@,$CCSHARED,;t t
18626s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18627s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018628s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018629s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18630s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18631s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18632s,@LDLAST@,$LDLAST,;t t
18633s,@THREADOBJ@,$THREADOBJ,;t t
18634s,@DLINCLDIR@,$DLINCLDIR,;t t
18635s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18636s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018637s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018638s,@LIBOBJS@,$LIBOBJS,;t t
18639s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18640s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18641s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18642s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18643s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18644s,@LIBM@,$LIBM,;t t
18645s,@LIBC@,$LIBC,;t t
18646s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18647s,@THREADHEADERS@,$THREADHEADERS,;t t
18648s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018649s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018650CEOF
18651
18652_ACEOF
18653
18654 cat >>$CONFIG_STATUS <<\_ACEOF
18655 # Split the substitutions into bite-sized pieces for seds with
18656 # small command number limits, like on Digital OSF/1 and HP-UX.
18657 ac_max_sed_lines=48
18658 ac_sed_frag=1 # Number of current file.
18659 ac_beg=1 # First line for current file.
18660 ac_end=$ac_max_sed_lines # Line after last line for current file.
18661 ac_more_lines=:
18662 ac_sed_cmds=
18663 while $ac_more_lines; do
18664 if test $ac_beg -gt 1; then
18665 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18666 else
18667 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18668 fi
18669 if test ! -s $tmp/subs.frag; then
18670 ac_more_lines=false
18671 else
18672 # The purpose of the label and of the branching condition is to
18673 # speed up the sed processing (if there are no `@' at all, there
18674 # is no need to browse any of the substitutions).
18675 # These are the two extra sed commands mentioned above.
18676 (echo ':t
18677 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18678 if test -z "$ac_sed_cmds"; then
18679 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18680 else
18681 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18682 fi
18683 ac_sed_frag=`expr $ac_sed_frag + 1`
18684 ac_beg=$ac_end
18685 ac_end=`expr $ac_end + $ac_max_sed_lines`
18686 fi
18687 done
18688 if test -z "$ac_sed_cmds"; then
18689 ac_sed_cmds=cat
18690 fi
18691fi # test -n "$CONFIG_FILES"
18692
18693_ACEOF
18694cat >>$CONFIG_STATUS <<\_ACEOF
18695for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18696 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18697 case $ac_file in
18698 - | *:- | *:-:* ) # input from stdin
18699 cat >$tmp/stdin
18700 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18701 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18702 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18703 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18704 * ) ac_file_in=$ac_file.in ;;
18705 esac
18706
18707 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18708 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18709$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18710 X"$ac_file" : 'X\(//\)[^/]' \| \
18711 X"$ac_file" : 'X\(//\)$' \| \
18712 X"$ac_file" : 'X\(/\)' \| \
18713 . : '\(.\)' 2>/dev/null ||
18714echo X"$ac_file" |
18715 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18716 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18717 /^X\(\/\/\)$/{ s//\1/; q; }
18718 /^X\(\/\).*/{ s//\1/; q; }
18719 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018720 { if $as_mkdir_p; then
18721 mkdir -p "$ac_dir"
18722 else
18723 as_dir="$ac_dir"
18724 as_dirs=
18725 while test ! -d "$as_dir"; do
18726 as_dirs="$as_dir $as_dirs"
18727 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18728$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18729 X"$as_dir" : 'X\(//\)[^/]' \| \
18730 X"$as_dir" : 'X\(//\)$' \| \
18731 X"$as_dir" : 'X\(/\)' \| \
18732 . : '\(.\)' 2>/dev/null ||
18733echo X"$as_dir" |
18734 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18735 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18736 /^X\(\/\/\)$/{ s//\1/; q; }
18737 /^X\(\/\).*/{ s//\1/; q; }
18738 s/.*/./; q'`
18739 done
18740 test ! -n "$as_dirs" || mkdir $as_dirs
18741 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18742echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18743 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018744
18745 ac_builddir=.
18746
18747if test "$ac_dir" != .; then
18748 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18749 # A "../" for each directory in $ac_dir_suffix.
18750 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18751else
18752 ac_dir_suffix= ac_top_builddir=
18753fi
18754
18755case $srcdir in
18756 .) # No --srcdir option. We are building in place.
18757 ac_srcdir=.
18758 if test -z "$ac_top_builddir"; then
18759 ac_top_srcdir=.
18760 else
18761 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18762 fi ;;
18763 [\\/]* | ?:[\\/]* ) # Absolute path.
18764 ac_srcdir=$srcdir$ac_dir_suffix;
18765 ac_top_srcdir=$srcdir ;;
18766 *) # Relative path.
18767 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18768 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18769esac
18770# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18771# absolute.
18772ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018773ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018774ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18775ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18776
18777
18778 case $INSTALL in
18779 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18780 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18781 esac
18782
18783 if test x"$ac_file" != x-; then
18784 { echo "$as_me:$LINENO: creating $ac_file" >&5
18785echo "$as_me: creating $ac_file" >&6;}
18786 rm -f "$ac_file"
18787 fi
18788 # Let's still pretend it is `configure' which instantiates (i.e., don't
18789 # use $as_me), people would be surprised to read:
18790 # /* config.h. Generated by config.status. */
18791 if test x"$ac_file" = x-; then
18792 configure_input=
18793 else
18794 configure_input="$ac_file. "
18795 fi
18796 configure_input=$configure_input"Generated from `echo $ac_file_in |
18797 sed 's,.*/,,'` by configure."
18798
18799 # First look for the input files in the build tree, otherwise in the
18800 # src tree.
18801 ac_file_inputs=`IFS=:
18802 for f in $ac_file_in; do
18803 case $f in
18804 -) echo $tmp/stdin ;;
18805 [\\/$]*)
18806 # Absolute (can't be DOS-style, as IFS=:)
18807 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18808echo "$as_me: error: cannot find input file: $f" >&2;}
18809 { (exit 1); exit 1; }; }
18810 echo $f;;
18811 *) # Relative
18812 if test -f "$f"; then
18813 # Build tree
18814 echo $f
18815 elif test -f "$srcdir/$f"; then
18816 # Source tree
18817 echo $srcdir/$f
18818 else
18819 # /dev/null tree
18820 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18821echo "$as_me: error: cannot find input file: $f" >&2;}
18822 { (exit 1); exit 1; }; }
18823 fi;;
18824 esac
18825 done` || { (exit 1); exit 1; }
18826_ACEOF
18827cat >>$CONFIG_STATUS <<_ACEOF
18828 sed "$ac_vpsub
18829$extrasub
18830_ACEOF
18831cat >>$CONFIG_STATUS <<\_ACEOF
18832:t
18833/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18834s,@configure_input@,$configure_input,;t t
18835s,@srcdir@,$ac_srcdir,;t t
18836s,@abs_srcdir@,$ac_abs_srcdir,;t t
18837s,@top_srcdir@,$ac_top_srcdir,;t t
18838s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18839s,@builddir@,$ac_builddir,;t t
18840s,@abs_builddir@,$ac_abs_builddir,;t t
18841s,@top_builddir@,$ac_top_builddir,;t t
18842s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18843s,@INSTALL@,$ac_INSTALL,;t t
18844" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18845 rm -f $tmp/stdin
18846 if test x"$ac_file" != x-; then
18847 mv $tmp/out $ac_file
18848 else
18849 cat $tmp/out
18850 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018851 fi
18852
Martin v. Löwis11437992002-04-12 09:54:03 +000018853done
18854_ACEOF
18855cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018856
Martin v. Löwis11437992002-04-12 09:54:03 +000018857#
18858# CONFIG_HEADER section.
18859#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018861# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18862# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018863#
18864# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018865ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18866ac_dB='[ ].*$,\1#\2'
18867ac_dC=' '
18868ac_dD=',;t'
18869# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18870ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18871ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018872ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018873ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018874
Martin v. Löwis11437992002-04-12 09:54:03 +000018875for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018876 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018877 case $ac_file in
18878 - | *:- | *:-:* ) # input from stdin
18879 cat >$tmp/stdin
18880 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18881 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18882 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18883 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18884 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018885 esac
18886
Martin v. Löwis11437992002-04-12 09:54:03 +000018887 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18888echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018889
Martin v. Löwis11437992002-04-12 09:54:03 +000018890 # First look for the input files in the build tree, otherwise in the
18891 # src tree.
18892 ac_file_inputs=`IFS=:
18893 for f in $ac_file_in; do
18894 case $f in
18895 -) echo $tmp/stdin ;;
18896 [\\/$]*)
18897 # Absolute (can't be DOS-style, as IFS=:)
18898 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18899echo "$as_me: error: cannot find input file: $f" >&2;}
18900 { (exit 1); exit 1; }; }
18901 echo $f;;
18902 *) # Relative
18903 if test -f "$f"; then
18904 # Build tree
18905 echo $f
18906 elif test -f "$srcdir/$f"; then
18907 # Source tree
18908 echo $srcdir/$f
18909 else
18910 # /dev/null tree
18911 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18912echo "$as_me: error: cannot find input file: $f" >&2;}
18913 { (exit 1); exit 1; }; }
18914 fi;;
18915 esac
18916 done` || { (exit 1); exit 1; }
18917 # Remove the trailing spaces.
18918 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018919
Martin v. Löwis11437992002-04-12 09:54:03 +000018920_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018921
Martin v. Löwis11437992002-04-12 09:54:03 +000018922# Transform confdefs.h into two sed scripts, `conftest.defines' and
18923# `conftest.undefs', that substitutes the proper values into
18924# config.h.in to produce config.h. The first handles `#define'
18925# templates, and the second `#undef' templates.
18926# And first: Protect against being on the right side of a sed subst in
18927# config.status. Protect against being in an unquoted here document
18928# in config.status.
18929rm -f conftest.defines conftest.undefs
18930# Using a here document instead of a string reduces the quoting nightmare.
18931# Putting comments in sed scripts is not portable.
18932#
18933# `end' is used to avoid that the second main sed command (meant for
18934# 0-ary CPP macros) applies to n-ary macro definitions.
18935# See the Autoconf documentation for `clear'.
18936cat >confdef2sed.sed <<\_ACEOF
18937s/[\\&,]/\\&/g
18938s,[\\$`],\\&,g
18939t clear
18940: clear
18941s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18942t end
18943s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18944: end
18945_ACEOF
18946# If some macros were called several times there might be several times
18947# the same #defines, which is useless. Nevertheless, we may not want to
18948# sort them, since we want the *last* AC-DEFINE to be honored.
18949uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18950sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18951rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018952
18953# This sed command replaces #undef with comments. This is necessary, for
18954# example, in the case of _POSIX_SOURCE, which is predefined and required
18955# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018956cat >>conftest.undefs <<\_ACEOF
18957s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18958_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018959
Martin v. Löwis11437992002-04-12 09:54:03 +000018960# Break up conftest.defines because some shells have a limit on the size
18961# of here documents, and old seds have small limits too (100 cmds).
18962echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000018963echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018964echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18965echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018966rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018967while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018968do
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 # Write a limited-size here document to $tmp/defines.sed.
18970 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18971 # Speed up: don't consider the non `#define' lines.
18972 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18973 # Work around the forget-to-reset-the-flag bug.
18974 echo 't clr' >>$CONFIG_STATUS
18975 echo ': clr' >>$CONFIG_STATUS
18976 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018977 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018978 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18979 rm -f $tmp/in
18980 mv $tmp/out $tmp/in
18981' >>$CONFIG_STATUS
18982 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18983 rm -f conftest.defines
18984 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018985done
Martin v. Löwis11437992002-04-12 09:54:03 +000018986rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000018987echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018988echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018989
Martin v. Löwis11437992002-04-12 09:54:03 +000018990# Break up conftest.undefs because some shells have a limit on the size
18991# of here documents, and old seds have small limits too (100 cmds).
18992echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18993rm -f conftest.tail
18994while grep . conftest.undefs >/dev/null
18995do
18996 # Write a limited-size here document to $tmp/undefs.sed.
18997 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18998 # Speed up: don't consider the non `#undef'
18999 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19000 # Work around the forget-to-reset-the-flag bug.
19001 echo 't clr' >>$CONFIG_STATUS
19002 echo ': clr' >>$CONFIG_STATUS
19003 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19004 echo 'CEOF
19005 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19006 rm -f $tmp/in
19007 mv $tmp/out $tmp/in
19008' >>$CONFIG_STATUS
19009 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19010 rm -f conftest.undefs
19011 mv conftest.tail conftest.undefs
19012done
19013rm -f conftest.undefs
19014
19015cat >>$CONFIG_STATUS <<\_ACEOF
19016 # Let's still pretend it is `configure' which instantiates (i.e., don't
19017 # use $as_me), people would be surprised to read:
19018 # /* config.h. Generated by config.status. */
19019 if test x"$ac_file" = x-; then
19020 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019021 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019023 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019024 cat $tmp/in >>$tmp/config.h
19025 rm -f $tmp/in
19026 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019027 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019028 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19029echo "$as_me: $ac_file is unchanged" >&6;}
19030 else
19031 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19032$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19033 X"$ac_file" : 'X\(//\)[^/]' \| \
19034 X"$ac_file" : 'X\(//\)$' \| \
19035 X"$ac_file" : 'X\(/\)' \| \
19036 . : '\(.\)' 2>/dev/null ||
19037echo X"$ac_file" |
19038 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19039 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19040 /^X\(\/\/\)$/{ s//\1/; q; }
19041 /^X\(\/\).*/{ s//\1/; q; }
19042 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019043 { if $as_mkdir_p; then
19044 mkdir -p "$ac_dir"
19045 else
19046 as_dir="$ac_dir"
19047 as_dirs=
19048 while test ! -d "$as_dir"; do
19049 as_dirs="$as_dir $as_dirs"
19050 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19051$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19052 X"$as_dir" : 'X\(//\)[^/]' \| \
19053 X"$as_dir" : 'X\(//\)$' \| \
19054 X"$as_dir" : 'X\(/\)' \| \
19055 . : '\(.\)' 2>/dev/null ||
19056echo X"$as_dir" |
19057 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19058 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19059 /^X\(\/\/\)$/{ s//\1/; q; }
19060 /^X\(\/\).*/{ s//\1/; q; }
19061 s/.*/./; q'`
19062 done
19063 test ! -n "$as_dirs" || mkdir $as_dirs
19064 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19065echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19066 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019067
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 rm -f $ac_file
19069 mv $tmp/config.h $ac_file
19070 fi
19071 else
19072 cat $tmp/config.h
19073 rm -f $tmp/config.h
19074 fi
19075done
19076_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019077
Martin v. Löwis11437992002-04-12 09:54:03 +000019078cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019079
Martin v. Löwis11437992002-04-12 09:54:03 +000019080{ (exit 0); exit 0; }
19081_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019082chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019083ac_clean_files=$ac_clean_files_save
19084
19085
19086# configure is writing to config.log, and then calls config.status.
19087# config.status does its own redirection, appending to config.log.
19088# Unfortunately, on DOS this fails, as config.log is still kept open
19089# by configure, so config.status won't be able to write to it; its
19090# output is simply discarded. So we exec the FD to /dev/null,
19091# effectively closing config.log, so it can be properly (re)opened and
19092# appended to by config.status. When coming back to configure, we
19093# need to make the FD available again.
19094if test "$no_create" != yes; then
19095 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019096 ac_config_status_args=
19097 test "$silent" = yes &&
19098 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019099 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019100 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019101 exec 5>>config.log
19102 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19103 # would make configure fail if this is the last instruction.
19104 $ac_cs_success || { (exit 1); exit 1; }
19105fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019106
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019107
19108echo "creating Setup"
19109if test ! -f Modules/Setup
19110then
19111 cp $srcdir/Modules/Setup.dist Modules/Setup
19112fi
19113
19114echo "creating Setup.local"
19115if test ! -f Modules/Setup.local
19116then
19117 echo "# Edit this file for local setup changes" >Modules/Setup.local
19118fi
19119
19120echo "creating Makefile"
19121$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19122 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019123 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019124mv config.c Modules