blob: 6fac192ee689215c20acef1c3ac3faa54f279ba5 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Hye-Shik Chang81268602004-02-02 06:05:24 +00002# From configure.in Revision: 1.449 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaro6dead952003-09-25 14:50:04 +00004# Generated by GNU Autoconf 2.57 for python 2.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000010## --------------------- ##
11## M4sh Initialization. ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22 set -o posix
23fi
24
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27 as_unset=unset
28else
29 as_unset=false
30fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in \
41 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43 LC_TELEPHONE LC_TIME
44do
45 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
46 eval $as_var=C; export $as_var
47 else
48 $as_unset $as_var
49 fi
50done
51
52# Required to use basename.
53if expr a : '\(a\)' >/dev/null 2>&1; then
54 as_expr=expr
55else
56 as_expr=false
57fi
58
59if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60 as_basename=basename
61else
62 as_basename=false
63fi
Martin v. Löwis11437992002-04-12 09:54:03 +000064
65
66# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000067as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000068$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69 X"$0" : 'X\(//\)$' \| \
70 X"$0" : 'X\(/\)$' \| \
71 . : '\(.\)' 2>/dev/null ||
72echo X/"$0" |
73 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74 /^X\/\(\/\/\)$/{ s//\1/; q; }
75 /^X\/\(\/\).*/{ s//\1/; q; }
76 s/.*/./; q'`
77
Skip Montanaro6dead952003-09-25 14:50:04 +000078
Martin v. Löwis11437992002-04-12 09:54:03 +000079# PATH needs CR, and LINENO needs CR and PATH.
80# Avoid depending upon Character Ranges.
81as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84as_cr_digits='0123456789'
85as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87# The user is always right.
88if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000089 echo "#! /bin/sh" >conf$$.sh
90 echo "exit 0" >>conf$$.sh
91 chmod +x conf$$.sh
92 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000093 PATH_SEPARATOR=';'
94 else
95 PATH_SEPARATOR=:
96 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000097 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000098fi
99
100
101 as_lineno_1=$LINENO
102 as_lineno_2=$LINENO
103 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104 test "x$as_lineno_1" != "x$as_lineno_2" &&
105 test "x$as_lineno_3" = "x$as_lineno_2" || {
106 # Find who we are. Look in the path if we contain no path at all
107 # relative or not.
108 case $0 in
109 *[\\/]* ) as_myself=$0 ;;
110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111for as_dir in $PATH
112do
113 IFS=$as_save_IFS
114 test -z "$as_dir" && as_dir=.
115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116done
117
118 ;;
119 esac
120 # We did not find ourselves, most probably we were run as `sh COMMAND'
121 # in which case we are not to be found in the path.
122 if test "x$as_myself" = x; then
123 as_myself=$0
124 fi
125 if test ! -f "$as_myself"; then
126 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127 { (exit 1); exit 1; }; }
128 fi
129 case $CONFIG_SHELL in
130 '')
131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133do
134 IFS=$as_save_IFS
135 test -z "$as_dir" && as_dir=.
136 for as_base in sh bash ksh sh5; do
137 case $as_dir in
138 /*)
139 if ("$as_dir/$as_base" -c '
140 as_lineno_1=$LINENO
141 as_lineno_2=$LINENO
142 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143 test "x$as_lineno_1" != "x$as_lineno_2" &&
144 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000145 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000147 CONFIG_SHELL=$as_dir/$as_base
148 export CONFIG_SHELL
149 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150 fi;;
151 esac
152 done
153done
154;;
155 esac
156
157 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158 # uniformly replaced by the line number. The first 'sed' inserts a
159 # line-number line before each line; the second 'sed' does the real
160 # work. The second script uses 'N' to pair each line-number line
161 # with the numbered line, and appends trailing '-' during
162 # substitution so that $LINENO is not a special case at line end.
163 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
165 sed '=' <$as_myself |
166 sed '
167 N
168 s,$,-,
169 : loop
170 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171 t loop
172 s,-$,,
173 s,^['$as_cr_digits']*\n,,
174 ' >$as_me.lineno &&
175 chmod +x $as_me.lineno ||
176 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177 { (exit 1); exit 1; }; }
178
179 # Don't try to exec as it changes $[0], causing all sort of problems
180 # (the dirname of $[0] is not the place where we might find the
181 # original and so on. Autoconf is especially sensible to this).
182 . ./$as_me.lineno
183 # Exit status is that of the last command.
184 exit
185}
186
187
188case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189 *c*,-n*) ECHO_N= ECHO_C='
190' ECHO_T=' ' ;;
191 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
193esac
194
195if expr a : '\(a\)' >/dev/null 2>&1; then
196 as_expr=expr
197else
198 as_expr=false
199fi
200
201rm -f conf$$ conf$$.exe conf$$.file
202echo >conf$$.file
203if ln -s conf$$.file conf$$ 2>/dev/null; then
204 # We could just check for DJGPP; but this test a) works b) is more generic
205 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206 if test -f conf$$.exe; then
207 # Don't use ln at all; we don't have any links
208 as_ln_s='cp -p'
209 else
210 as_ln_s='ln -s'
211 fi
212elif ln conf$$.file conf$$ 2>/dev/null; then
213 as_ln_s=ln
214else
215 as_ln_s='cp -p'
216fi
217rm -f conf$$ conf$$.exe conf$$.file
218
Skip Montanaro6dead952003-09-25 14:50:04 +0000219if mkdir -p . 2>/dev/null; then
220 as_mkdir_p=:
221else
222 as_mkdir_p=false
223fi
224
Martin v. Löwis11437992002-04-12 09:54:03 +0000225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000241$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000254ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000255ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000268PACKAGE_NAME='python'
269PACKAGE_TARNAME='python'
Fred Drake9bd44622003-07-30 17:39:48 +0000270PACKAGE_VERSION='2.4'
271PACKAGE_STRING='python 2.4'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000272PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000273
274ac_unique_file="Include/object.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
Skip Montanaro6dead952003-09-25 14:50:04 +0000312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
313ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000314
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000316ac_init_help=
317ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# The variables have the same names as the options, with
319# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000320cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000321exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000322no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000329site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000330srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332x_includes=NONE
333x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353ac_prev=
354for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000355do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
Martin v. Löwis11437992002-04-12 09:54:03 +0000367 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000372 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
374 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000377 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000394
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403
404 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000406 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413 *) ac_optarg=yes ;;
414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000415 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
426 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429
Martin v. Löwis11437992002-04-12 09:54:03 +0000430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436
437 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000440 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000479
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 # Obsolete; use --without-fp.
482 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486 no_create=yes ;;
487
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000500
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000511 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000518 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000535 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000545 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000556 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000557
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000561 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000566 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000574
Guido van Rossum7f43da71994-08-01 12:15:30 +0000575 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000578 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000585
586 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000588 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000592 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 *) ac_optarg=yes ;;
596 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000597 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598
599 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000601 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000607
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000624 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000625
Martin v. Löwis11437992002-04-12 09:54:03 +0000626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000629 ;;
630
Martin v. Löwis11437992002-04-12 09:54:03 +0000631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000641 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000647 ;;
648
649 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000650done
651
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000656fi
657
Martin v. Löwis11437992002-04-12 09:54:03 +0000658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000660do
Martin v. Löwis11437992002-04-12 09:54:03 +0000661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000666 esac
667done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Martin v. Löwis11437992002-04-12 09:54:03 +0000669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
678 esac
679done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000680
Martin v. Löwis11437992002-04-12 09:54:03 +0000681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000687
Martin v. Löwis11437992002-04-12 09:54:03 +0000688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000723 srcdir=..
724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000725else
726 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000727fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000729 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773
Martin v. Löwis11437992002-04-12 09:54:03 +0000774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000781\`configure' configures python 2.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
831
832 cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000837 case $ac_init_help in
Fred Drake9bd44622003-07-30 17:39:48 +0000838 short | recursive ) echo "Configuration of python 2.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000839 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 cat <<\_ACEOF
841
842Optional Features:
843 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
844 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000845 --enable-framework[=INSTALLDIR]
846 Build (MacOSX|Darwin) framework
847 --enable-shared disable/enable building shared python library
848 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
849 --enable-ipv6 Enable ipv6 (with ipv4) support
850 --disable-ipv6 Disable ipv6 support
851 --enable-unicode[=ucs[24]]
852 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853
854Optional Packages:
855 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
856 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000857 --without-gcc never use gcc
858 --with-cxx=<compiler> enable C++ support
859 --with-suffix=.exe set executable suffix
860 --with-pydebug build with Py_DEBUG defined
861 --with-libs='lib1 ...' link against additional libs
862 --with-signal-module disable/enable signal module
863 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
864 --with(out)-threads[=DIRECTORY]
865 disable/enable thread support
866 --with(out)-thread[=DIRECTORY]
867 deprecated; use --with(out)-threads
868 --with-pth use GNU pth threading libraries
869 --with(out)-universal-newlines
870 disable/enable foreign newlines
871 --with(out)-doc-strings disable/enable documentation strings
872 --with(out)-pymalloc disable/enable specialized mallocs
873 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000874 --with-fpectl enable SIGFPE catching
875 --with-libm=STRING math library
876 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000877
878Some influential environment variables:
879 CC C compiler command
880 CFLAGS C compiler flags
881 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
882 nonstandard directory <lib dir>
883 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
884 headers in a nonstandard directory <include dir>
885 CPP C preprocessor
886
887Use these variables to override the choices made by `configure' or to help
888it to find libraries and programs with nonstandard names/locations.
889
890_ACEOF
891fi
892
893if test "$ac_init_help" = "recursive"; then
894 # If there are subdirs, report their specific --help.
895 ac_popdir=`pwd`
896 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
897 test -d $ac_dir || continue
898 ac_builddir=.
899
900if test "$ac_dir" != .; then
901 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
902 # A "../" for each directory in $ac_dir_suffix.
903 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
904else
905 ac_dir_suffix= ac_top_builddir=
906fi
907
908case $srcdir in
909 .) # No --srcdir option. We are building in place.
910 ac_srcdir=.
911 if test -z "$ac_top_builddir"; then
912 ac_top_srcdir=.
913 else
914 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
915 fi ;;
916 [\\/]* | ?:[\\/]* ) # Absolute path.
917 ac_srcdir=$srcdir$ac_dir_suffix;
918 ac_top_srcdir=$srcdir ;;
919 *) # Relative path.
920 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
921 ac_top_srcdir=$ac_top_builddir$srcdir ;;
922esac
923# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
924# absolute.
925ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000926ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000927ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
928ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
929
930 cd $ac_dir
931 # Check for guested configure; otherwise get Cygnus style configure.
932 if test -f $ac_srcdir/configure.gnu; then
933 echo
934 $SHELL $ac_srcdir/configure.gnu --help=recursive
935 elif test -f $ac_srcdir/configure; then
936 echo
937 $SHELL $ac_srcdir/configure --help=recursive
938 elif test -f $ac_srcdir/configure.ac ||
939 test -f $ac_srcdir/configure.in; then
940 echo
941 $ac_configure --help
942 else
943 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
944 fi
945 cd $ac_popdir
946 done
947fi
948
949test -n "$ac_init_help" && exit 0
950if $ac_init_version; then
951 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000952python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000953generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
956Free Software Foundation, Inc.
957This configure script is free software; the Free Software Foundation
958gives unlimited permission to copy, distribute and modify it.
959_ACEOF
960 exit 0
961fi
962exec 5>config.log
963cat >&5 <<_ACEOF
964This file contains any messages produced by compilers while
965running configure, to aid debugging if configure makes a mistake.
966
Fred Drake9bd44622003-07-30 17:39:48 +0000967It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000968generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000969
970 $ $0 $@
971
972_ACEOF
973{
974cat <<_ASUNAME
975## --------- ##
976## Platform. ##
977## --------- ##
978
979hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
980uname -m = `(uname -m) 2>/dev/null || echo unknown`
981uname -r = `(uname -r) 2>/dev/null || echo unknown`
982uname -s = `(uname -s) 2>/dev/null || echo unknown`
983uname -v = `(uname -v) 2>/dev/null || echo unknown`
984
985/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
986/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
987
988/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
989/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
990/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
991hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
992/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
993/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
994/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
995
996_ASUNAME
997
998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
999for as_dir in $PATH
1000do
1001 IFS=$as_save_IFS
1002 test -z "$as_dir" && as_dir=.
1003 echo "PATH: $as_dir"
1004done
1005
1006} >&5
1007
1008cat >&5 <<_ACEOF
1009
1010
1011## ----------- ##
1012## Core tests. ##
1013## ----------- ##
1014
1015_ACEOF
1016
1017
1018# Keep a trace of the command line.
1019# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001020# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001021# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001024ac_configure_args0=
1025ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001026ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001027ac_must_keep_next=false
1028for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001029do
Skip Montanaro6dead952003-09-25 14:50:04 +00001030 for ac_arg
1031 do
1032 case $ac_arg in
1033 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1034 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1035 | -silent | --silent | --silen | --sile | --sil)
1036 continue ;;
1037 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1038 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1039 esac
1040 case $ac_pass in
1041 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1042 2)
1043 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1044 if test $ac_must_keep_next = true; then
1045 ac_must_keep_next=false # Got value, back to normal.
1046 else
1047 case $ac_arg in
1048 *=* | --config-cache | -C | -disable-* | --disable-* \
1049 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1050 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1051 | -with-* | --with-* | -without-* | --without-* | --x)
1052 case "$ac_configure_args0 " in
1053 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1054 esac
1055 ;;
1056 -* ) ac_must_keep_next=true ;;
1057 esac
1058 fi
1059 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1060 # Get rid of the leading space.
1061 ac_sep=" "
1062 ;;
1063 esac
1064 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001065done
Skip Montanaro6dead952003-09-25 14:50:04 +00001066$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1067$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001068
1069# When interrupted or exit'd, cleanup temporary files, and complete
1070# config.log. We remove comments because anyway the quotes in there
1071# would cause problems or look ugly.
1072# WARNING: Be sure not to use single quotes in there, as some shells,
1073# such as our DU 5.0 friend, will then `close' the trap.
1074trap 'exit_status=$?
1075 # Save into config.log some information that might help in debugging.
1076 {
1077 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001078
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 cat <<\_ASBOX
1080## ---------------- ##
1081## Cache variables. ##
1082## ---------------- ##
1083_ASBOX
1084 echo
1085 # The following way of writing the cache mishandles newlines in values,
1086{
1087 (set) 2>&1 |
1088 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1089 *ac_space=\ *)
1090 sed -n \
1091 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1092 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1093 ;;
1094 *)
1095 sed -n \
1096 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1097 ;;
1098 esac;
1099}
1100 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001101
1102 cat <<\_ASBOX
1103## ----------------- ##
1104## Output variables. ##
1105## ----------------- ##
1106_ASBOX
1107 echo
1108 for ac_var in $ac_subst_vars
1109 do
1110 eval ac_val=$`echo $ac_var`
1111 echo "$ac_var='"'"'$ac_val'"'"'"
1112 done | sort
1113 echo
1114
1115 if test -n "$ac_subst_files"; then
1116 cat <<\_ASBOX
1117## ------------- ##
1118## Output files. ##
1119## ------------- ##
1120_ASBOX
1121 echo
1122 for ac_var in $ac_subst_files
1123 do
1124 eval ac_val=$`echo $ac_var`
1125 echo "$ac_var='"'"'$ac_val'"'"'"
1126 done | sort
1127 echo
1128 fi
1129
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 if test -s confdefs.h; then
1131 cat <<\_ASBOX
1132## ----------- ##
1133## confdefs.h. ##
1134## ----------- ##
1135_ASBOX
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 echo
1139 fi
1140 test "$ac_signal" != 0 &&
1141 echo "$as_me: caught signal $ac_signal"
1142 echo "$as_me: exit $exit_status"
1143 } >&5
1144 rm -f core core.* *.core &&
1145 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1146 exit $exit_status
1147 ' 0
1148for ac_signal in 1 2 13 15; do
1149 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1150done
1151ac_signal=0
1152
1153# confdefs.h avoids OS command line length limits that DEFS can exceed.
1154rm -rf conftest* confdefs.h
1155# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1156echo >confdefs.h
1157
1158# Predefined preprocessor variables.
1159
1160cat >>confdefs.h <<_ACEOF
1161#define PACKAGE_NAME "$PACKAGE_NAME"
1162_ACEOF
1163
1164
1165cat >>confdefs.h <<_ACEOF
1166#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1167_ACEOF
1168
1169
1170cat >>confdefs.h <<_ACEOF
1171#define PACKAGE_VERSION "$PACKAGE_VERSION"
1172_ACEOF
1173
1174
1175cat >>confdefs.h <<_ACEOF
1176#define PACKAGE_STRING "$PACKAGE_STRING"
1177_ACEOF
1178
1179
1180cat >>confdefs.h <<_ACEOF
1181#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1182_ACEOF
1183
1184
1185# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186# Prefer explicitly selected file to automatically selected ones.
1187if test -z "$CONFIG_SITE"; then
1188 if test "x$prefix" != xNONE; then
1189 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1190 else
1191 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1192 fi
1193fi
1194for ac_site_file in $CONFIG_SITE; do
1195 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1197echo "$as_me: loading site script $ac_site_file" >&6;}
1198 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 . "$ac_site_file"
1200 fi
1201done
1202
1203if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # Some versions of bash will fail to source /dev/null (special
1205 # files actually), so we avoid doing that.
1206 if test -f "$cache_file"; then
1207 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1208echo "$as_me: loading cache $cache_file" >&6;}
1209 case $cache_file in
1210 [\\/]* | ?:[\\/]* ) . $cache_file;;
1211 *) . ./$cache_file;;
1212 esac
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1216echo "$as_me: creating cache $cache_file" >&6;}
1217 >$cache_file
1218fi
1219
1220# Check that the precious variables saved in the cache have kept the same
1221# value.
1222ac_cache_corrupted=false
1223for ac_var in `(set) 2>&1 |
1224 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1225 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1226 eval ac_new_set=\$ac_env_${ac_var}_set
1227 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1228 eval ac_new_val="\$ac_env_${ac_var}_value"
1229 case $ac_old_set,$ac_new_set in
1230 set,)
1231 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1232echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1233 ac_cache_corrupted=: ;;
1234 ,set)
1235 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1236echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1237 ac_cache_corrupted=: ;;
1238 ,);;
1239 *)
1240 if test "x$ac_old_val" != "x$ac_new_val"; then
1241 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1242echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1243 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1244echo "$as_me: former value: $ac_old_val" >&2;}
1245 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1246echo "$as_me: current value: $ac_new_val" >&2;}
1247 ac_cache_corrupted=:
1248 fi;;
1249 esac
1250 # Pass precious variables to config.status.
1251 if test "$ac_new_set" = set; then
1252 case $ac_new_val in
1253 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1254 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1255 *) ac_arg=$ac_var=$ac_new_val ;;
1256 esac
1257 case " $ac_configure_args " in
1258 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1259 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1260 esac
1261 fi
1262done
1263if $ac_cache_corrupted; then
1264 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1265echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1266 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1267echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1268 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269fi
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1275ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Michael W. Hudson54241132001-12-07 15:38:26 +00001278
1279
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
Martin v. Löwis88afe662002-10-26 13:47:44 +00001294
1295
1296
1297
1298
1299
1300
1301
1302
Skip Montanaro6dead952003-09-25 14:50:04 +00001303
1304 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305
1306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
1309
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001310
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001311
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001312# We don't use PACKAGE_ variables, and they cause conflicts
1313# with other autoconf-based packages that include Python.h
1314grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1315rm confdefs.h
1316mv confdefs.h.new confdefs.h
1317
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001318
Fred Drake9bd44622003-07-30 17:39:48 +00001319VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001320
Martin v. Löwis1142de32002-03-29 16:28:31 +00001321
1322SOVERSION=1.0
1323
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001324# The later defininition of _XOPEN_SOURCE disables certain features
1325# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1326
1327cat >>confdefs.h <<\_ACEOF
1328#define _GNU_SOURCE 1
1329_ACEOF
1330
1331
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001332# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1333# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1334# them.
1335
1336cat >>confdefs.h <<\_ACEOF
1337#define _NETBSD_SOURCE 1
1338_ACEOF
1339
1340
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001341# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1342# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1343# them.
1344
1345cat >>confdefs.h <<\_ACEOF
1346#define __BSD_VISIBLE 1
1347_ACEOF
1348
1349
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001350define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001351
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001352# Arguments passed to configure.
1353
1354CONFIG_ARGS="$ac_configure_args"
1355
Jack Jansene578a632001-08-15 01:27:14 +00001356# Check whether --enable-framework or --disable-framework was given.
1357if test "${enable_framework+set}" = set; then
1358 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
Jack Jansene578a632001-08-15 01:27:14 +00001360 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001362 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001363 esac
1364 case $enableval in
1365 no)
1366 PYTHONFRAMEWORK=
1367 PYTHONFRAMEWORKDIR=no-framework
1368 PYTHONFRAMEWORKPREFIX=
1369 PYTHONFRAMEWORKINSTALLDIR=
1370 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001371 ;;
1372 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001373 PYTHONFRAMEWORK=Python
1374 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001375 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001376 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1377 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Guido van Rossum563e7081996-09-10 18:20:48 +00001380else
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Jack Jansene578a632001-08-15 01:27:14 +00001382 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001383 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORKPREFIX=
1385 PYTHONFRAMEWORKINSTALLDIR=
1386 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001387
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001389
1390
1391
1392
Jack Jansene578a632001-08-15 01:27:14 +00001393
1394##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395## AC_HELP_STRING(--with-dyld,
1396## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001397##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001398# Set name for machine-dependent library files
1399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400echo "$as_me:$LINENO: checking MACHDEP" >&5
1401echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001402if test -z "$MACHDEP"
1403then
Guido van Rossum563e7081996-09-10 18:20:48 +00001404 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001405 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1406 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001407 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001408 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_md_system=`echo $ac_sys_system |
1412 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1413 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001414 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001415 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001416
Guido van Rossum07397971997-04-29 21:49:50 +00001417 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001418 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001419 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001420 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001421 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001422 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001423 esac
1424fi
Guido van Rossum91922671997-10-09 20:24:13 +00001425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001426# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1427# disable features if it is defined, without any means to access these
1428# features as extensions. For these systems, we skip the definition of
1429# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1430# some feature, make sure there is no alternative way to access this
1431# feature. Also, when using wildcards, make sure you have verified the
1432# need for not defining _XOPEN_SOURCE on all systems matching the
1433# wildcard, and that the wildcard does not include future systems
1434# (which may remove their limitations).
1435case $ac_sys_system/$ac_sys_release in
1436 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1437 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001438 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1439 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001440 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001441 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1442 # of union __?sigval. Reported by Stuart Bishop.
1443 SunOS/5.6)
1444 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001445 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1446 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1447 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1448 define_xopen_source=no;;
1449 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001450 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001451 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001453 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1454 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1455 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1456 # This should hopefully be fixed in FreeBSD 4.9
1457 FreeBSD/4.8* | Darwin/6* )
1458 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001459 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1460 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1461 # has another value. By not (re)defining it, the defaults come in place.
1462 AIX/4)
1463 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001464esac
1465
1466if test $define_xopen_source = yes
1467then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001468
1469cat >>confdefs.h <<\_ACEOF
1470#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001471_ACEOF
1472
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001473
1474 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1475 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1476 # several APIs are not declared. Since this is also needed in some
1477 # cases for HP-UX, we define it globally.
1478
1479
1480cat >>confdefs.h <<\_ACEOF
1481#define _XOPEN_SOURCE_EXTENDED 1
1482_ACEOF
1483
1484
1485cat >>confdefs.h <<\_ACEOF
1486#define _POSIX_C_SOURCE 200112L
1487_ACEOF
1488
1489
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001490fi
1491
Guido van Rossum91922671997-10-09 20:24:13 +00001492#
1493# SGI compilers allow the specification of the both the ABI and the
1494# ISA on the command line. Depending on the values of these switches,
1495# different and often incompatable code will be generated.
1496#
1497# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1498# thus supply support for various ABI/ISA combinations. The MACHDEP
1499# variable is also adjusted.
1500#
1501
1502if test ! -z "$SGI_ABI"
1503then
1504 CC="cc $SGI_ABI"
1505 LDFLAGS="$SGI_ABI $LDFLAGS"
1506 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001508echo "$as_me:$LINENO: result: $MACHDEP" >&5
1509echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001510
Jack Jansen83f898c2002-12-30 22:23:40 +00001511# And add extra plat-mac for darwin
1512
Jack Jansen7b59b422003-03-17 15:44:10 +00001513
Jack Jansen83f898c2002-12-30 22:23:40 +00001514echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1515echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1516if test -z "$EXTRAPLATDIR"
1517then
1518 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001519 darwin)
1520 EXTRAPLATDIR="\$(PLATMACDIRS)"
1521 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1522 ;;
1523 *)
1524 EXTRAPLATDIR=""
1525 EXTRAMACHDEPPATH=""
1526 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001527 esac
1528fi
1529echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1530echo "${ECHO_T}$EXTRAPLATDIR" >&6
1531
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001533
1534# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1535# for debug/optimization stuff. BASECFLAGS is for flags that are required
1536# just to get things to compile and link. Users are free to override OPT
1537# when running configure or make. The build should not break if they do.
1538# BASECFLAGS should generally not be messed with, however.
1539
1540# XXX shouldn't some/most/all of this code be merged with the stuff later
1541# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001542echo "$as_me:$LINENO: checking for --without-gcc" >&5
1543echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001546if test "${with_gcc+set}" = set; then
1547 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
Guido van Rossum7f43da71994-08-01 12:15:30 +00001549 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001550 no) CC=cc
1551 without_gcc=yes;;
1552 yes) CC=gcc
1553 without_gcc=no;;
1554 *) CC=$withval
1555 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001556 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001557else
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001559 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001560 AIX*) CC=cc_r
1561 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001562 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001563 case $BE_HOST_CPU in
1564 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001565 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001566 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001567 BASECFLAGS="$BASECFLAGS -export pragma"
1568 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001569 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001570 ;;
1571 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001572 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001573 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001574 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 ;;
1576 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1578echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1579 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001580 ;;
1581 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001582 AR="\$(srcdir)/Modules/ar_beos"
1583 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001584 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001585 Monterey*)
1586 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001587 without_gcc=;;
1588 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001589 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001590fi;
1591echo "$as_me:$LINENO: result: $without_gcc" >&5
1592echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001593
1594
Guido van Rossum95012191999-12-16 17:50:52 +00001595
Fred Drakea1a84e72001-03-06 05:52:16 +00001596MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001597echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1598echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1599
Guido van Rossum95012191999-12-16 17:50:52 +00001600# Check whether --with-cxx or --without-cxx was given.
1601if test "${with_cxx+set}" = set; then
1602 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001603
Martin v. Löwis22352952000-12-13 17:37:02 +00001604 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001605 case $withval in
1606 no) CXX=
1607 with_cxx=no;;
1608 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001609 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001610 with_cxx=$withval;;
1611 esac
1612else
Martin v. Löwis11437992002-04-12 09:54:03 +00001613
Guido van Rossum95012191999-12-16 17:50:52 +00001614 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001615 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001616
Martin v. Löwis11437992002-04-12 09:54:03 +00001617fi;
1618echo "$as_me:$LINENO: result: $with_cxx" >&5
1619echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001620
1621if test "$with_cxx" = "yes"
1622then
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1624echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1625 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001626fi
1627
1628
1629
1630
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001632then
1633 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1634do
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001636set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001637echo "$as_me:$LINENO: checking for $ac_word" >&5
1638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639if test "${ac_cv_prog_CXX+set}" = set; then
1640 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001641else
1642 if test -n "$CXX"; then
1643 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1644else
Martin v. Löwis11437992002-04-12 09:54:03 +00001645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1646for as_dir in $PATH
1647do
1648 IFS=$as_save_IFS
1649 test -z "$as_dir" && as_dir=.
1650 for ac_exec_ext in '' $ac_executable_extensions; do
1651 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1652 ac_cv_prog_CXX="$ac_prog"
1653 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1654 break 2
1655 fi
1656done
1657done
1658
Martin v. Löwis22352952000-12-13 17:37:02 +00001659fi
1660fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001661CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001662if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 echo "$as_me:$LINENO: result: $CXX" >&5
1664echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001665else
Martin v. Löwis11437992002-04-12 09:54:03 +00001666 echo "$as_me:$LINENO: result: no" >&5
1667echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001668fi
1669
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001671done
1672test -n "$CXX" || CXX="notfound"
1673
1674 if test "$CXX" = "notfound"
1675 then
1676 CXX=
1677 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001678 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001679ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1683 cat >conftest.$ac_ext <<_ACEOF
1684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001685/* confdefs.h. */
1686_ACEOF
1687cat confdefs.h >>conftest.$ac_ext
1688cat >>conftest.$ac_ext <<_ACEOF
1689/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001690
Martin v. Löwis11437992002-04-12 09:54:03 +00001691int
1692main ()
1693{
Michael W. Hudson54241132001-12-07 15:38:26 +00001694
Martin v. Löwis11437992002-04-12 09:54:03 +00001695 ;
1696 return 0;
1697}
1698_ACEOF
1699ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001700ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001701# Try to create an executable without -o first, disregard a.out.
1702# It will help us diagnose broken compilers, and finding out an intuition
1703# of exeext.
1704echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1705echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1706ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1707if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1708 (eval $ac_link_default) 2>&5
1709 ac_status=$?
1710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1711 (exit $ac_status); }; then
1712 # Find the output, starting from the most likely. This scheme is
1713# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1714# resort.
1715
1716# Be careful to initialize this variable, since it used to be cached.
1717# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1718ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001719# b.out is created by i960 compilers.
1720for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1721do
1722 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001724 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1725 ;;
1726 conftest.$ac_ext )
1727 # This is the source file.
1728 ;;
1729 [ab].out )
1730 # We found the default executable, but exeext='' is most
1731 # certainly right.
1732 break;;
1733 *.* )
1734 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1735 # FIXME: I believe we export ac_cv_exeext for Libtool,
1736 # but it would be cool to find out if it's true. Does anybody
1737 # maintain Libtool? --akim.
1738 export ac_cv_exeext
1739 break;;
1740 * )
1741 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 esac
1743done
1744else
1745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1749See \`config.log' for more details." >&5
1750echo "$as_me: error: C++ compiler cannot create executables
1751See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001752 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001754
1755ac_exeext=$ac_cv_exeext
1756echo "$as_me:$LINENO: result: $ac_file" >&5
1757echo "${ECHO_T}$ac_file" >&6
1758
1759# Check the compiler produces executables we can run. If not, either
1760# the compiler is broken, or we cross compile.
1761echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1762echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1763# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764# If not cross compiling, check that we can run a simple program.
1765if test "$cross_compiling" != yes; then
1766 if { ac_try='./$ac_file'
1767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1768 (eval $ac_try) 2>&5
1769 ac_status=$?
1770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1771 (exit $ac_status); }; }; then
1772 cross_compiling=no
1773 else
1774 if test "$cross_compiling" = maybe; then
1775 cross_compiling=yes
1776 else
1777 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001778If you meant to cross compile, use \`--host'.
1779See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001780echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001781If you meant to cross compile, use \`--host'.
1782See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001783 { (exit 1); exit 1; }; }
1784 fi
1785 fi
1786fi
1787echo "$as_me:$LINENO: result: yes" >&5
1788echo "${ECHO_T}yes" >&6
1789
Skip Montanaro6dead952003-09-25 14:50:04 +00001790rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001791ac_clean_files=$ac_clean_files_save
1792# Check the compiler produces executables we can run. If not, either
1793# the compiler is broken, or we cross compile.
1794echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1795echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1796echo "$as_me:$LINENO: result: $cross_compiling" >&5
1797echo "${ECHO_T}$cross_compiling" >&6
1798
1799echo "$as_me:$LINENO: checking for suffix of executables" >&5
1800echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1802 (eval $ac_link) 2>&5
1803 ac_status=$?
1804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1805 (exit $ac_status); }; then
1806 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1807# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1808# work properly (i.e., refer to `conftest.exe'), while it won't with
1809# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001810for ac_file in conftest.exe conftest conftest.*; do
1811 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001812 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001813 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001814 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1815 export ac_cv_exeext
1816 break;;
1817 * ) break;;
1818 esac
1819done
1820else
Skip Montanaro6dead952003-09-25 14:50:04 +00001821 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1822See \`config.log' for more details." >&5
1823echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1824See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001825 { (exit 1); exit 1; }; }
1826fi
1827
1828rm -f conftest$ac_cv_exeext
1829echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1830echo "${ECHO_T}$ac_cv_exeext" >&6
1831
1832rm -f conftest.$ac_ext
1833EXEEXT=$ac_cv_exeext
1834ac_exeext=$EXEEXT
1835
1836 ac_ext=c
1837ac_cpp='$CPP $CPPFLAGS'
1838ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1839ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1840ac_compiler_gnu=$ac_cv_c_compiler_gnu
1841
1842
Martin v. Löwis22352952000-12-13 17:37:02 +00001843
1844 fi
1845fi
1846
Guido van Rossum8b131c51995-03-09 14:10:13 +00001847# If the user switches compilers, we can't believe the cache
1848if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1849then
Martin v. Löwis11437992002-04-12 09:54:03 +00001850 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1851(it is also a good idea to do 'make clean' before compiling)" >&5
1852echo "$as_me: error: cached CC is different -- throw away $cache_file
1853(it is also a good idea to do 'make clean' before compiling)" >&2;}
1854 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001855fi
1856
Martin v. Löwis11437992002-04-12 09:54:03 +00001857ac_ext=c
1858ac_cpp='$CPP $CPPFLAGS'
1859ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1860ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1861ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862if test -n "$ac_tool_prefix"; then
1863 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1864set dummy ${ac_tool_prefix}gcc; ac_word=$2
1865echo "$as_me:$LINENO: checking for $ac_word" >&5
1866echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1867if test "${ac_cv_prog_CC+set}" = set; then
1868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001869else
1870 if test -n "$CC"; then
1871 ac_cv_prog_CC="$CC" # Let the user override the test.
1872else
Martin v. Löwis11437992002-04-12 09:54:03 +00001873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1874for as_dir in $PATH
1875do
1876 IFS=$as_save_IFS
1877 test -z "$as_dir" && as_dir=.
1878 for ac_exec_ext in '' $ac_executable_extensions; do
1879 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1880 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1882 break 2
1883 fi
1884done
1885done
1886
Jack Jansendd19cf82001-12-06 22:36:17 +00001887fi
1888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001889CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001890if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001891 echo "$as_me:$LINENO: result: $CC" >&5
1892echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001893else
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 echo "$as_me:$LINENO: result: no" >&5
1895echo "${ECHO_T}no" >&6
1896fi
1897
1898fi
1899if test -z "$ac_cv_prog_CC"; then
1900 ac_ct_CC=$CC
1901 # Extract the first word of "gcc", so it can be a program name with args.
1902set dummy gcc; ac_word=$2
1903echo "$as_me:$LINENO: checking for $ac_word" >&5
1904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1905if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1906 echo $ECHO_N "(cached) $ECHO_C" >&6
1907else
1908 if test -n "$ac_ct_CC"; then
1909 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1910else
1911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1912for as_dir in $PATH
1913do
1914 IFS=$as_save_IFS
1915 test -z "$as_dir" && as_dir=.
1916 for ac_exec_ext in '' $ac_executable_extensions; do
1917 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1918 ac_cv_prog_ac_ct_CC="gcc"
1919 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1920 break 2
1921 fi
1922done
1923done
1924
1925fi
1926fi
1927ac_ct_CC=$ac_cv_prog_ac_ct_CC
1928if test -n "$ac_ct_CC"; then
1929 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1930echo "${ECHO_T}$ac_ct_CC" >&6
1931else
1932 echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6
1934fi
1935
1936 CC=$ac_ct_CC
1937else
1938 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001939fi
1940
Jack Jansendd19cf82001-12-06 22:36:17 +00001941if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001942 if test -n "$ac_tool_prefix"; then
1943 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1944set dummy ${ac_tool_prefix}cc; ac_word=$2
1945echo "$as_me:$LINENO: checking for $ac_word" >&5
1946echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1947if test "${ac_cv_prog_CC+set}" = set; then
1948 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001949else
1950 if test -n "$CC"; then
1951 ac_cv_prog_CC="$CC" # Let the user override the test.
1952else
Martin v. Löwis11437992002-04-12 09:54:03 +00001953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1954for as_dir in $PATH
1955do
1956 IFS=$as_save_IFS
1957 test -z "$as_dir" && as_dir=.
1958 for ac_exec_ext in '' $ac_executable_extensions; do
1959 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1960 ac_cv_prog_CC="${ac_tool_prefix}cc"
1961 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1962 break 2
1963 fi
1964done
1965done
1966
1967fi
1968fi
1969CC=$ac_cv_prog_CC
1970if test -n "$CC"; then
1971 echo "$as_me:$LINENO: result: $CC" >&5
1972echo "${ECHO_T}$CC" >&6
1973else
1974 echo "$as_me:$LINENO: result: no" >&5
1975echo "${ECHO_T}no" >&6
1976fi
1977
1978fi
1979if test -z "$ac_cv_prog_CC"; then
1980 ac_ct_CC=$CC
1981 # Extract the first word of "cc", so it can be a program name with args.
1982set dummy cc; ac_word=$2
1983echo "$as_me:$LINENO: checking for $ac_word" >&5
1984echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1985if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1986 echo $ECHO_N "(cached) $ECHO_C" >&6
1987else
1988 if test -n "$ac_ct_CC"; then
1989 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1990else
1991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1992for as_dir in $PATH
1993do
1994 IFS=$as_save_IFS
1995 test -z "$as_dir" && as_dir=.
1996 for ac_exec_ext in '' $ac_executable_extensions; do
1997 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1998 ac_cv_prog_ac_ct_CC="cc"
1999 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2000 break 2
2001 fi
2002done
2003done
2004
2005fi
2006fi
2007ac_ct_CC=$ac_cv_prog_ac_ct_CC
2008if test -n "$ac_ct_CC"; then
2009 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2010echo "${ECHO_T}$ac_ct_CC" >&6
2011else
2012 echo "$as_me:$LINENO: result: no" >&5
2013echo "${ECHO_T}no" >&6
2014fi
2015
2016 CC=$ac_ct_CC
2017else
2018 CC="$ac_cv_prog_CC"
2019fi
2020
2021fi
2022if test -z "$CC"; then
2023 # Extract the first word of "cc", so it can be a program name with args.
2024set dummy cc; ac_word=$2
2025echo "$as_me:$LINENO: checking for $ac_word" >&5
2026echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2027if test "${ac_cv_prog_CC+set}" = set; then
2028 echo $ECHO_N "(cached) $ECHO_C" >&6
2029else
2030 if test -n "$CC"; then
2031 ac_cv_prog_CC="$CC" # Let the user override the test.
2032else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002033 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2035for as_dir in $PATH
2036do
2037 IFS=$as_save_IFS
2038 test -z "$as_dir" && as_dir=.
2039 for ac_exec_ext in '' $ac_executable_extensions; do
2040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2041 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2042 ac_prog_rejected=yes
2043 continue
2044 fi
2045 ac_cv_prog_CC="cc"
2046 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2047 break 2
2048 fi
2049done
2050done
2051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002052if test $ac_prog_rejected = yes; then
2053 # We found a bogon in the path, so make sure we never use it.
2054 set dummy $ac_cv_prog_CC
2055 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002056 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002057 # We chose a different compiler from the bogus one.
2058 # However, it has the same basename, so the bogon will be chosen
2059 # first if we set CC to just the basename; use the full file name.
2060 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002061 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002062 fi
2063fi
2064fi
2065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002066CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002068 echo "$as_me:$LINENO: result: $CC" >&5
2069echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070else
Martin v. Löwis11437992002-04-12 09:54:03 +00002071 echo "$as_me:$LINENO: result: no" >&5
2072echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002073fi
2074
Martin v. Löwis11437992002-04-12 09:54:03 +00002075fi
2076if test -z "$CC"; then
2077 if test -n "$ac_tool_prefix"; then
2078 for ac_prog in cl
2079 do
2080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2082echo "$as_me:$LINENO: checking for $ac_word" >&5
2083echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2084if test "${ac_cv_prog_CC+set}" = set; then
2085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002086else
2087 if test -n "$CC"; then
2088 ac_cv_prog_CC="$CC" # Let the user override the test.
2089else
Martin v. Löwis11437992002-04-12 09:54:03 +00002090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2091for as_dir in $PATH
2092do
2093 IFS=$as_save_IFS
2094 test -z "$as_dir" && as_dir=.
2095 for ac_exec_ext in '' $ac_executable_extensions; do
2096 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2097 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2098 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2099 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002100 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002101done
2102done
2103
2104fi
2105fi
2106CC=$ac_cv_prog_CC
2107if test -n "$CC"; then
2108 echo "$as_me:$LINENO: result: $CC" >&5
2109echo "${ECHO_T}$CC" >&6
2110else
2111 echo "$as_me:$LINENO: result: no" >&5
2112echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002113fi
2114
Martin v. Löwis11437992002-04-12 09:54:03 +00002115 test -n "$CC" && break
2116 done
2117fi
2118if test -z "$CC"; then
2119 ac_ct_CC=$CC
2120 for ac_prog in cl
2121do
2122 # Extract the first word of "$ac_prog", so it can be a program name with args.
2123set dummy $ac_prog; ac_word=$2
2124echo "$as_me:$LINENO: checking for $ac_word" >&5
2125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2126if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2127 echo $ECHO_N "(cached) $ECHO_C" >&6
2128else
2129 if test -n "$ac_ct_CC"; then
2130 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2131else
2132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2133for as_dir in $PATH
2134do
2135 IFS=$as_save_IFS
2136 test -z "$as_dir" && as_dir=.
2137 for ac_exec_ext in '' $ac_executable_extensions; do
2138 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2139 ac_cv_prog_ac_ct_CC="$ac_prog"
2140 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2141 break 2
2142 fi
2143done
2144done
Jack Jansendd19cf82001-12-06 22:36:17 +00002145
Martin v. Löwis11437992002-04-12 09:54:03 +00002146fi
2147fi
2148ac_ct_CC=$ac_cv_prog_ac_ct_CC
2149if test -n "$ac_ct_CC"; then
2150 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2151echo "${ECHO_T}$ac_ct_CC" >&6
2152else
2153 echo "$as_me:$LINENO: result: no" >&5
2154echo "${ECHO_T}no" >&6
2155fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
Martin v. Löwis11437992002-04-12 09:54:03 +00002157 test -n "$ac_ct_CC" && break
2158done
Michael W. Hudson54241132001-12-07 15:38:26 +00002159
Martin v. Löwis11437992002-04-12 09:54:03 +00002160 CC=$ac_ct_CC
2161fi
2162
2163fi
2164
2165
Skip Montanaro6dead952003-09-25 14:50:04 +00002166test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2167See \`config.log' for more details." >&5
2168echo "$as_me: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002170 { (exit 1); exit 1; }; }
2171
2172# Provide some information about the compiler.
2173echo "$as_me:$LINENO:" \
2174 "checking for C compiler version" >&5
2175ac_compiler=`set X $ac_compile; echo $2`
2176{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2177 (eval $ac_compiler --version </dev/null >&5) 2>&5
2178 ac_status=$?
2179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180 (exit $ac_status); }
2181{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2182 (eval $ac_compiler -v </dev/null >&5) 2>&5
2183 ac_status=$?
2184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2185 (exit $ac_status); }
2186{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2187 (eval $ac_compiler -V </dev/null >&5) 2>&5
2188 ac_status=$?
2189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2190 (exit $ac_status); }
2191
2192cat >conftest.$ac_ext <<_ACEOF
2193#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002194/* confdefs.h. */
2195_ACEOF
2196cat confdefs.h >>conftest.$ac_ext
2197cat >>conftest.$ac_ext <<_ACEOF
2198/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002199
Martin v. Löwis11437992002-04-12 09:54:03 +00002200int
2201main ()
2202{
2203
2204 ;
2205 return 0;
2206}
2207_ACEOF
2208ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002209ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002210# Try to create an executable without -o first, disregard a.out.
2211# It will help us diagnose broken compilers, and finding out an intuition
2212# of exeext.
2213echo "$as_me:$LINENO: checking for C compiler default output" >&5
2214echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2215ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2216if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2217 (eval $ac_link_default) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); }; then
2221 # Find the output, starting from the most likely. This scheme is
2222# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2223# resort.
2224
2225# Be careful to initialize this variable, since it used to be cached.
2226# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2227ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002228# b.out is created by i960 compilers.
2229for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2230do
2231 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002233 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2234 ;;
2235 conftest.$ac_ext )
2236 # This is the source file.
2237 ;;
2238 [ab].out )
2239 # We found the default executable, but exeext='' is most
2240 # certainly right.
2241 break;;
2242 *.* )
2243 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2244 # FIXME: I believe we export ac_cv_exeext for Libtool,
2245 # but it would be cool to find out if it's true. Does anybody
2246 # maintain Libtool? --akim.
2247 export ac_cv_exeext
2248 break;;
2249 * )
2250 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002251 esac
2252done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002253else
Martin v. Löwis11437992002-04-12 09:54:03 +00002254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002255sed 's/^/| /' conftest.$ac_ext >&5
2256
2257{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2258See \`config.log' for more details." >&5
2259echo "$as_me: error: C compiler cannot create executables
2260See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002261 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002262fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002263
Martin v. Löwis11437992002-04-12 09:54:03 +00002264ac_exeext=$ac_cv_exeext
2265echo "$as_me:$LINENO: result: $ac_file" >&5
2266echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002267
Martin v. Löwis11437992002-04-12 09:54:03 +00002268# Check the compiler produces executables we can run. If not, either
2269# the compiler is broken, or we cross compile.
2270echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2271echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2272# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2273# If not cross compiling, check that we can run a simple program.
2274if test "$cross_compiling" != yes; then
2275 if { ac_try='./$ac_file'
2276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2277 (eval $ac_try) 2>&5
2278 ac_status=$?
2279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2280 (exit $ac_status); }; }; then
2281 cross_compiling=no
2282 else
2283 if test "$cross_compiling" = maybe; then
2284 cross_compiling=yes
2285 else
2286 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002287If you meant to cross compile, use \`--host'.
2288See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002289echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002290If you meant to cross compile, use \`--host'.
2291See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002292 { (exit 1); exit 1; }; }
2293 fi
2294 fi
2295fi
2296echo "$as_me:$LINENO: result: yes" >&5
2297echo "${ECHO_T}yes" >&6
2298
Skip Montanaro6dead952003-09-25 14:50:04 +00002299rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002300ac_clean_files=$ac_clean_files_save
2301# Check the compiler produces executables we can run. If not, either
2302# the compiler is broken, or we cross compile.
2303echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2304echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2305echo "$as_me:$LINENO: result: $cross_compiling" >&5
2306echo "${ECHO_T}$cross_compiling" >&6
2307
2308echo "$as_me:$LINENO: checking for suffix of executables" >&5
2309echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2311 (eval $ac_link) 2>&5
2312 ac_status=$?
2313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2314 (exit $ac_status); }; then
2315 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2316# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2317# work properly (i.e., refer to `conftest.exe'), while it won't with
2318# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002319for ac_file in conftest.exe conftest conftest.*; do
2320 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002321 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002322 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002323 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2324 export ac_cv_exeext
2325 break;;
2326 * ) break;;
2327 esac
2328done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002329else
Skip Montanaro6dead952003-09-25 14:50:04 +00002330 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2331See \`config.log' for more details." >&5
2332echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2333See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002335fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002336
Martin v. Löwis11437992002-04-12 09:54:03 +00002337rm -f conftest$ac_cv_exeext
2338echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2339echo "${ECHO_T}$ac_cv_exeext" >&6
2340
2341rm -f conftest.$ac_ext
2342EXEEXT=$ac_cv_exeext
2343ac_exeext=$EXEEXT
2344echo "$as_me:$LINENO: checking for suffix of object files" >&5
2345echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2346if test "${ac_cv_objext+set}" = set; then
2347 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002348else
Martin v. Löwis11437992002-04-12 09:54:03 +00002349 cat >conftest.$ac_ext <<_ACEOF
2350#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002351/* confdefs.h. */
2352_ACEOF
2353cat confdefs.h >>conftest.$ac_ext
2354cat >>conftest.$ac_ext <<_ACEOF
2355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
Martin v. Löwis11437992002-04-12 09:54:03 +00002357int
2358main ()
2359{
2360
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365rm -f conftest.o conftest.obj
2366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2367 (eval $ac_compile) 2>&5
2368 ac_status=$?
2369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2370 (exit $ac_status); }; then
2371 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2372 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002373 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002374 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2375 break;;
2376 esac
2377done
2378else
2379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002380sed 's/^/| /' conftest.$ac_ext >&5
2381
2382{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&5
2384echo "$as_me: error: cannot compute suffix of object files: cannot compile
2385See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002386 { (exit 1); exit 1; }; }
2387fi
2388
2389rm -f conftest.$ac_cv_objext conftest.$ac_ext
2390fi
2391echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2392echo "${ECHO_T}$ac_cv_objext" >&6
2393OBJEXT=$ac_cv_objext
2394ac_objext=$OBJEXT
2395echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2396echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2397if test "${ac_cv_c_compiler_gnu+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
2399else
2400 cat >conftest.$ac_ext <<_ACEOF
2401#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002402/* confdefs.h. */
2403_ACEOF
2404cat confdefs.h >>conftest.$ac_ext
2405cat >>conftest.$ac_ext <<_ACEOF
2406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
Martin v. Löwis11437992002-04-12 09:54:03 +00002408int
2409main ()
2410{
2411#ifndef __GNUC__
2412 choke me
2413#endif
2414
2415 ;
2416 return 0;
2417}
2418_ACEOF
2419rm -f conftest.$ac_objext
2420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2421 (eval $ac_compile) 2>&5
2422 ac_status=$?
2423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424 (exit $ac_status); } &&
2425 { ac_try='test -s conftest.$ac_objext'
2426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2427 (eval $ac_try) 2>&5
2428 ac_status=$?
2429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430 (exit $ac_status); }; }; then
2431 ac_compiler_gnu=yes
2432else
2433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002434sed 's/^/| /' conftest.$ac_ext >&5
2435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436ac_compiler_gnu=no
2437fi
2438rm -f conftest.$ac_objext conftest.$ac_ext
2439ac_cv_c_compiler_gnu=$ac_compiler_gnu
2440
2441fi
2442echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2443echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2444GCC=`test $ac_compiler_gnu = yes && echo yes`
2445ac_test_CFLAGS=${CFLAGS+set}
2446ac_save_CFLAGS=$CFLAGS
2447CFLAGS="-g"
2448echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2449echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2450if test "${ac_cv_prog_cc_g+set}" = set; then
2451 echo $ECHO_N "(cached) $ECHO_C" >&6
2452else
2453 cat >conftest.$ac_ext <<_ACEOF
2454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002455/* confdefs.h. */
2456_ACEOF
2457cat confdefs.h >>conftest.$ac_ext
2458cat >>conftest.$ac_ext <<_ACEOF
2459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
Martin v. Löwis11437992002-04-12 09:54:03 +00002461int
2462main ()
2463{
2464
2465 ;
2466 return 0;
2467}
2468_ACEOF
2469rm -f conftest.$ac_objext
2470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2471 (eval $ac_compile) 2>&5
2472 ac_status=$?
2473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2474 (exit $ac_status); } &&
2475 { ac_try='test -s conftest.$ac_objext'
2476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2477 (eval $ac_try) 2>&5
2478 ac_status=$?
2479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002481 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002482else
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002484sed 's/^/| /' conftest.$ac_ext >&5
2485
Martin v. Löwis11437992002-04-12 09:54:03 +00002486ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002488rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002490echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2491echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002492if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002494elif test $ac_cv_prog_cc_g = yes; then
2495 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 CFLAGS="-g -O2"
2497 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002498 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002499 fi
2500else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002501 if test "$GCC" = yes; then
2502 CFLAGS="-O2"
2503 else
2504 CFLAGS=
2505 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002507echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2508echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2509if test "${ac_cv_prog_cc_stdc+set}" = set; then
2510 echo $ECHO_N "(cached) $ECHO_C" >&6
2511else
2512 ac_cv_prog_cc_stdc=no
2513ac_save_CC=$CC
2514cat >conftest.$ac_ext <<_ACEOF
2515#line $LINENO "configure"
2516/* confdefs.h. */
2517_ACEOF
2518cat confdefs.h >>conftest.$ac_ext
2519cat >>conftest.$ac_ext <<_ACEOF
2520/* end confdefs.h. */
2521#include <stdarg.h>
2522#include <stdio.h>
2523#include <sys/types.h>
2524#include <sys/stat.h>
2525/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2526struct buf { int x; };
2527FILE * (*rcsopen) (struct buf *, struct stat *, int);
2528static char *e (p, i)
2529 char **p;
2530 int i;
2531{
2532 return p[i];
2533}
2534static char *f (char * (*g) (char **, int), char **p, ...)
2535{
2536 char *s;
2537 va_list v;
2538 va_start (v,p);
2539 s = g (p, va_arg (v,int));
2540 va_end (v);
2541 return s;
2542}
2543int test (int i, double x);
2544struct s1 {int (*f) (int a);};
2545struct s2 {int (*f) (double a);};
2546int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2547int argc;
2548char **argv;
2549int
2550main ()
2551{
2552return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2553 ;
2554 return 0;
2555}
2556_ACEOF
2557# Don't try gcc -ansi; that turns off useful extensions and
2558# breaks some systems' header files.
2559# AIX -qlanglvl=ansi
2560# Ultrix and OSF/1 -std1
2561# HP-UX 10.20 and later -Ae
2562# HP-UX older versions -Aa -D_HPUX_SOURCE
2563# SVR4 -Xc -D__EXTENSIONS__
2564for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2565do
2566 CC="$ac_save_CC $ac_arg"
2567 rm -f conftest.$ac_objext
2568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2569 (eval $ac_compile) 2>&5
2570 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); } &&
2573 { ac_try='test -s conftest.$ac_objext'
2574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2575 (eval $ac_try) 2>&5
2576 ac_status=$?
2577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); }; }; then
2579 ac_cv_prog_cc_stdc=$ac_arg
2580break
2581else
2582 echo "$as_me: failed program was:" >&5
2583sed 's/^/| /' conftest.$ac_ext >&5
2584
2585fi
2586rm -f conftest.$ac_objext
2587done
2588rm -f conftest.$ac_ext conftest.$ac_objext
2589CC=$ac_save_CC
2590
2591fi
2592
2593case "x$ac_cv_prog_cc_stdc" in
2594 x|xno)
2595 echo "$as_me:$LINENO: result: none needed" >&5
2596echo "${ECHO_T}none needed" >&6 ;;
2597 *)
2598 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2599echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2600 CC="$CC $ac_cv_prog_cc_stdc" ;;
2601esac
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603# Some people use a C++ compiler to compile C. Since we use `exit',
2604# in C++ we need to declare it. In case someone uses the same compiler
2605# for both compiling C and C++ we need to have the C++ compiler decide
2606# the declaration of exit, since it's the most demanding environment.
2607cat >conftest.$ac_ext <<_ACEOF
2608#ifndef __cplusplus
2609 choke me
2610#endif
2611_ACEOF
2612rm -f conftest.$ac_objext
2613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2614 (eval $ac_compile) 2>&5
2615 ac_status=$?
2616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617 (exit $ac_status); } &&
2618 { ac_try='test -s conftest.$ac_objext'
2619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2620 (eval $ac_try) 2>&5
2621 ac_status=$?
2622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623 (exit $ac_status); }; }; then
2624 for ac_declaration in \
2625 ''\
2626 '#include <stdlib.h>' \
2627 'extern "C" void std::exit (int) throw (); using std::exit;' \
2628 'extern "C" void std::exit (int); using std::exit;' \
2629 'extern "C" void exit (int) throw ();' \
2630 'extern "C" void exit (int);' \
2631 'void exit (int);'
2632do
2633 cat >conftest.$ac_ext <<_ACEOF
2634#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002635/* confdefs.h. */
2636_ACEOF
2637cat confdefs.h >>conftest.$ac_ext
2638cat >>conftest.$ac_ext <<_ACEOF
2639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002640#include <stdlib.h>
2641$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002642int
2643main ()
2644{
2645exit (42);
2646 ;
2647 return 0;
2648}
2649_ACEOF
2650rm -f conftest.$ac_objext
2651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2652 (eval $ac_compile) 2>&5
2653 ac_status=$?
2654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655 (exit $ac_status); } &&
2656 { ac_try='test -s conftest.$ac_objext'
2657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658 (eval $ac_try) 2>&5
2659 ac_status=$?
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); }; }; then
2662 :
2663else
2664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002665sed 's/^/| /' conftest.$ac_ext >&5
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667continue
2668fi
2669rm -f conftest.$ac_objext conftest.$ac_ext
2670 cat >conftest.$ac_ext <<_ACEOF
2671#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002672/* confdefs.h. */
2673_ACEOF
2674cat confdefs.h >>conftest.$ac_ext
2675cat >>conftest.$ac_ext <<_ACEOF
2676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002677$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002678int
2679main ()
2680{
2681exit (42);
2682 ;
2683 return 0;
2684}
2685_ACEOF
2686rm -f conftest.$ac_objext
2687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2688 (eval $ac_compile) 2>&5
2689 ac_status=$?
2690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691 (exit $ac_status); } &&
2692 { ac_try='test -s conftest.$ac_objext'
2693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694 (eval $ac_try) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); }; }; then
2698 break
2699else
2700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002701sed 's/^/| /' conftest.$ac_ext >&5
2702
Martin v. Löwis11437992002-04-12 09:54:03 +00002703fi
2704rm -f conftest.$ac_objext conftest.$ac_ext
2705done
2706rm -f conftest*
2707if test -n "$ac_declaration"; then
2708 echo '#ifdef __cplusplus' >>confdefs.h
2709 echo $ac_declaration >>confdefs.h
2710 echo '#endif' >>confdefs.h
2711fi
2712
2713else
2714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002715sed 's/^/| /' conftest.$ac_ext >&5
2716
Martin v. Löwis11437992002-04-12 09:54:03 +00002717fi
2718rm -f conftest.$ac_objext conftest.$ac_ext
2719ac_ext=c
2720ac_cpp='$CPP $CPPFLAGS'
2721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2723ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002725
2726# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002727
2728ac_ext=c
2729ac_cpp='$CPP $CPPFLAGS'
2730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732ac_compiler_gnu=$ac_cv_c_compiler_gnu
2733echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2734echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002735# On Suns, sometimes $CPP names a directory.
2736if test -n "$CPP" && test -d "$CPP"; then
2737 CPP=
2738fi
2739if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 if test "${ac_cv_prog_CPP+set}" = set; then
2741 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002742else
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 # Double quotes because CPP needs to be expanded
2744 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2745 do
2746 ac_preproc_ok=false
2747for ac_c_preproc_warn_flag in '' yes
2748do
2749 # Use a header file that comes with gcc, so configuring glibc
2750 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2752 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002753 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 # not just through cpp. "Syntax error" is here to catch this case.
2755 cat >conftest.$ac_ext <<_ACEOF
2756#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002757/* confdefs.h. */
2758_ACEOF
2759cat confdefs.h >>conftest.$ac_ext
2760cat >>conftest.$ac_ext <<_ACEOF
2761/* end confdefs.h. */
2762#ifdef __STDC__
2763# include <limits.h>
2764#else
2765# include <assert.h>
2766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 Syntax error
2768_ACEOF
2769if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2770 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2771 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002772 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 rm -f conftest.er1
2774 cat conftest.err >&5
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } >/dev/null; then
2777 if test -s conftest.err; then
2778 ac_cpp_err=$ac_c_preproc_warn_flag
2779 else
2780 ac_cpp_err=
2781 fi
2782else
2783 ac_cpp_err=yes
2784fi
2785if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002786 :
2787else
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002789sed 's/^/| /' conftest.$ac_ext >&5
2790
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 # Broken: fails on valid input.
2792continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002794rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002795
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 # OK, works on sane cases. Now check whether non-existent headers
2797 # can be detected and how.
2798 cat >conftest.$ac_ext <<_ACEOF
2799#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002800/* confdefs.h. */
2801_ACEOF
2802cat confdefs.h >>conftest.$ac_ext
2803cat >>conftest.$ac_ext <<_ACEOF
2804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002805#include <ac_nonexistent.h>
2806_ACEOF
2807if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2808 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2809 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002810 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 rm -f conftest.er1
2812 cat conftest.err >&5
2813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814 (exit $ac_status); } >/dev/null; then
2815 if test -s conftest.err; then
2816 ac_cpp_err=$ac_c_preproc_warn_flag
2817 else
2818 ac_cpp_err=
2819 fi
2820else
2821 ac_cpp_err=yes
2822fi
2823if test -z "$ac_cpp_err"; then
2824 # Broken: success on invalid input.
2825continue
2826else
2827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002828sed 's/^/| /' conftest.$ac_ext >&5
2829
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 # Passes both tests.
2831ac_preproc_ok=:
2832break
2833fi
2834rm -f conftest.err conftest.$ac_ext
2835
2836done
2837# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2838rm -f conftest.err conftest.$ac_ext
2839if $ac_preproc_ok; then
2840 break
2841fi
2842
2843 done
2844 ac_cv_prog_CPP=$CPP
2845
2846fi
2847 CPP=$ac_cv_prog_CPP
2848else
2849 ac_cv_prog_CPP=$CPP
2850fi
2851echo "$as_me:$LINENO: result: $CPP" >&5
2852echo "${ECHO_T}$CPP" >&6
2853ac_preproc_ok=false
2854for ac_c_preproc_warn_flag in '' yes
2855do
2856 # Use a header file that comes with gcc, so configuring glibc
2857 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002858 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2859 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 # On the NeXT, cc -E runs the code through the compiler's parser,
2861 # not just through cpp. "Syntax error" is here to catch this case.
2862 cat >conftest.$ac_ext <<_ACEOF
2863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002864/* confdefs.h. */
2865_ACEOF
2866cat confdefs.h >>conftest.$ac_ext
2867cat >>conftest.$ac_ext <<_ACEOF
2868/* end confdefs.h. */
2869#ifdef __STDC__
2870# include <limits.h>
2871#else
2872# include <assert.h>
2873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 Syntax error
2875_ACEOF
2876if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2877 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2878 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002879 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 rm -f conftest.er1
2881 cat conftest.err >&5
2882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883 (exit $ac_status); } >/dev/null; then
2884 if test -s conftest.err; then
2885 ac_cpp_err=$ac_c_preproc_warn_flag
2886 else
2887 ac_cpp_err=
2888 fi
2889else
2890 ac_cpp_err=yes
2891fi
2892if test -z "$ac_cpp_err"; then
2893 :
2894else
2895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002896sed 's/^/| /' conftest.$ac_ext >&5
2897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898 # Broken: fails on valid input.
2899continue
2900fi
2901rm -f conftest.err conftest.$ac_ext
2902
2903 # OK, works on sane cases. Now check whether non-existent headers
2904 # can be detected and how.
2905 cat >conftest.$ac_ext <<_ACEOF
2906#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002907/* confdefs.h. */
2908_ACEOF
2909cat confdefs.h >>conftest.$ac_ext
2910cat >>conftest.$ac_ext <<_ACEOF
2911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002912#include <ac_nonexistent.h>
2913_ACEOF
2914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2916 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002917 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 rm -f conftest.er1
2919 cat conftest.err >&5
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } >/dev/null; then
2922 if test -s conftest.err; then
2923 ac_cpp_err=$ac_c_preproc_warn_flag
2924 else
2925 ac_cpp_err=
2926 fi
2927else
2928 ac_cpp_err=yes
2929fi
2930if test -z "$ac_cpp_err"; then
2931 # Broken: success on invalid input.
2932continue
2933else
2934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002935sed 's/^/| /' conftest.$ac_ext >&5
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 # Passes both tests.
2938ac_preproc_ok=:
2939break
2940fi
2941rm -f conftest.err conftest.$ac_ext
2942
2943done
2944# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2945rm -f conftest.err conftest.$ac_ext
2946if $ac_preproc_ok; then
2947 :
2948else
Skip Montanaro6dead952003-09-25 14:50:04 +00002949 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2950See \`config.log' for more details." >&5
2951echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2952See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 { (exit 1); exit 1; }; }
2954fi
2955
2956ac_ext=c
2957ac_cpp='$CPP $CPPFLAGS'
2958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2960ac_compiler_gnu=$ac_cv_c_compiler_gnu
2961
2962
Skip Montanaro6dead952003-09-25 14:50:04 +00002963echo "$as_me:$LINENO: checking for egrep" >&5
2964echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2965if test "${ac_cv_prog_egrep+set}" = set; then
2966 echo $ECHO_N "(cached) $ECHO_C" >&6
2967else
2968 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2969 then ac_cv_prog_egrep='grep -E'
2970 else ac_cv_prog_egrep='egrep'
2971 fi
2972fi
2973echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2974echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2975 EGREP=$ac_cv_prog_egrep
2976
2977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
2979echo "$as_me:$LINENO: checking for AIX" >&5
2980echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2981cat >conftest.$ac_ext <<_ACEOF
2982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002983/* confdefs.h. */
2984_ACEOF
2985cat confdefs.h >>conftest.$ac_ext
2986cat >>conftest.$ac_ext <<_ACEOF
2987/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988#ifdef _AIX
2989 yes
2990#endif
2991
Martin v. Löwis11437992002-04-12 09:54:03 +00002992_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002994 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002995 echo "$as_me:$LINENO: result: yes" >&5
2996echo "${ECHO_T}yes" >&6
2997cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002999_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000
3001else
Martin v. Löwis11437992002-04-12 09:54:03 +00003002 echo "$as_me:$LINENO: result: no" >&5
3003echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003004fi
3005rm -f conftest*
3006
Michael W. Hudson54241132001-12-07 15:38:26 +00003007
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003008
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003009# Check for unsupported systems
3010case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003011Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003012 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3013 echo See README for details.
3014 exit 1;;
3015esac
3016
Michael W. Hudson54241132001-12-07 15:38:26 +00003017
Martin v. Löwis11437992002-04-12 09:54:03 +00003018echo "$as_me:$LINENO: checking for --with-suffix" >&5
3019echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003020
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003021# Check whether --with-suffix or --without-suffix was given.
3022if test "${with_suffix+set}" = set; then
3023 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003024
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003025 case $withval in
3026 no) EXEEXT=;;
3027 yes) EXEEXT=.exe;;
3028 *) EXEEXT=$withval;;
3029 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003030fi;
3031echo "$as_me:$LINENO: result: $EXEEXT" >&5
3032echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003033
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003034# Test whether we're running on a non-case-sensitive system, in which
3035# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003036
Martin v. Löwis11437992002-04-12 09:54:03 +00003037echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3038echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003039if test ! -d CaseSensitiveTestDir; then
3040mkdir CaseSensitiveTestDir
3041fi
3042
3043if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003044then
Martin v. Löwis11437992002-04-12 09:54:03 +00003045 echo "$as_me:$LINENO: result: yes" >&5
3046echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003047 BUILDEXEEXT=.exe
3048else
Martin v. Löwis11437992002-04-12 09:54:03 +00003049 echo "$as_me:$LINENO: result: no" >&5
3050echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003051 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003052fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003053rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003054
Guido van Rossumdd997f71998-10-07 19:58:26 +00003055case $MACHDEP in
3056bsdos*)
3057 case $CC in
3058 gcc) CC="$CC -D_HAVE_BSDI";;
3059 esac;;
3060esac
3061
Guido van Rossum24b1e751997-08-21 02:29:16 +00003062case $ac_sys_system in
3063hp*|HP*)
3064 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003065 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003066 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003067Monterey*)
3068 case $CC in
3069 cc) CC="$CC -Wl,-Bexport";;
3070 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003071SunOS*)
3072 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
3074cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003075#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003076_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003077
3078 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003079esac
3080
Michael W. Hudson54241132001-12-07 15:38:26 +00003081
3082
Martin v. Löwis11437992002-04-12 09:54:03 +00003083echo "$as_me:$LINENO: checking LIBRARY" >&5
3084echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003085if test -z "$LIBRARY"
3086then
3087 LIBRARY='libpython$(VERSION).a'
3088fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003089echo "$as_me:$LINENO: result: $LIBRARY" >&5
3090echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003091
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003092# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003093# name of the library into which to insert object files). BLDLIBRARY is also
3094# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3095# is blank as the main program is not linked directly against LDLIBRARY.
3096# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3097# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3098# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3099# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003100#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003101# RUNSHARED is used to run shared python without installed libraries
3102#
3103# INSTSONAME is the name of the shared library that will be use to install
3104# on the system - some systems like version suffix, others don't
3105
3106
Michael W. Hudson54241132001-12-07 15:38:26 +00003107
3108
3109
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003110
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003111LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003112BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003113INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003114DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003115LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003116RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003117
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003118# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003119# If CXX is set, and if it is needed to link a main function that was
3120# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3121# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003122# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003123# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003124
Martin v. Löwis11437992002-04-12 09:54:03 +00003125echo "$as_me:$LINENO: checking LINKCC" >&5
3126echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003127if test -z "$LINKCC"
3128then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003129 if test -z "$CXX"; then
3130 LINKCC="\$(PURIFY) \$(CC)"
3131 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003132 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003133 $CXX -c conftest.$ac_ext 2>&5
3134 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3135 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3136 then
3137 LINKCC="\$(PURIFY) \$(CC)"
3138 else
3139 LINKCC="\$(PURIFY) \$(CXX)"
3140 fi
3141 rm -fr conftest*
3142 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003143 case $ac_sys_system in
3144 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003145 exp_extra="\"\""
3146 if test $ac_sys_release -ge 5 -o \
3147 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3148 exp_extra="."
3149 fi
3150 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003151 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003152 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003153 esac
3154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003155echo "$as_me:$LINENO: result: $LINKCC" >&5
3156echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003157
Martin v. Löwis11437992002-04-12 09:54:03 +00003158echo "$as_me:$LINENO: checking for --enable-shared" >&5
3159echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003160# Check whether --enable-shared or --disable-shared was given.
3161if test "${enable_shared+set}" = set; then
3162 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003163
Martin v. Löwis11437992002-04-12 09:54:03 +00003164fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003165
3166if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003167then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003168 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003169 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003170 enable_shared="yes";;
3171 *)
3172 enable_shared="no";;
3173 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003175echo "$as_me:$LINENO: result: $enable_shared" >&5
3176echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003177
3178
Martin v. Löwis11437992002-04-12 09:54:03 +00003179echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3180echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003181
Guido van Rossumb8552162001-09-05 14:58:11 +00003182# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3183# library that we build, but we do not want to link against it (we
3184# will find it with a -framework option). For this reason there is an
3185# extra variable BLDLIBRARY against which Python and the extension
3186# modules are linked, BLDLIBRARY. This is normally the same as
3187# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003188if test "$enable_framework"
3189then
3190 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003191 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003192 BLDLIBRARY=''
3193else
3194 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003195fi
Jack Jansene578a632001-08-15 01:27:14 +00003196
Martin v. Löwis1142de32002-03-29 16:28:31 +00003197# Other platforms follow
3198if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003199
3200cat >>confdefs.h <<\_ACEOF
3201#define Py_ENABLE_SHARED 1
3202_ACEOF
3203
Martin v. Löwis1142de32002-03-29 16:28:31 +00003204 case $ac_sys_system in
3205 BeOS*)
3206 LDLIBRARY='libpython$(VERSION).so'
3207 ;;
3208 CYGWIN*)
3209 LDLIBRARY='libpython$(VERSION).dll.a'
3210 DLLLIBRARY='libpython$(VERSION).dll'
3211 ;;
3212 SunOS*)
3213 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003214 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003215 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003216 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003217 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003218 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219 LDLIBRARY='libpython$(VERSION).so'
3220 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003221 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003222 INSTSONAME="$LDLIBRARY".$SOVERSION
3223 ;;
3224 hp*|HP*)
3225 LDLIBRARY='libpython$(VERSION).sl'
3226 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003227 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228 ;;
3229 OSF*)
3230 LDLIBRARY='libpython$(VERSION).so'
3231 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003232 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003233 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003234 atheos*)
3235 LDLIBRARY='libpython$(VERSION).so'
3236 BLDLIBRARY='-L. -lpython$(VERSION)'
3237 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3238 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003239 esac
Jason Tishler30765592003-09-04 11:04:06 +00003240else # shared is disabled
3241 case $ac_sys_system in
3242 CYGWIN*)
3243 BLDLIBRARY='$(LIBRARY)'
3244 LDLIBRARY='libpython$(VERSION).dll.a'
3245 ;;
3246 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003247fi
3248
Martin v. Löwis11437992002-04-12 09:54:03 +00003249echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3250echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003251
Martin v. Löwis11437992002-04-12 09:54:03 +00003252if test -n "$ac_tool_prefix"; then
3253 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3254set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3255echo "$as_me:$LINENO: checking for $ac_word" >&5
3256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3257if test "${ac_cv_prog_RANLIB+set}" = set; then
3258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259else
3260 if test -n "$RANLIB"; then
3261 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3262else
Martin v. Löwis11437992002-04-12 09:54:03 +00003263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3264for as_dir in $PATH
3265do
3266 IFS=$as_save_IFS
3267 test -z "$as_dir" && as_dir=.
3268 for ac_exec_ext in '' $ac_executable_extensions; do
3269 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3270 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3271 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3272 break 2
3273 fi
3274done
3275done
3276
Guido van Rossum627b2d71993-12-24 10:39:16 +00003277fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003279RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003281 echo "$as_me:$LINENO: result: $RANLIB" >&5
3282echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283else
Martin v. Löwis11437992002-04-12 09:54:03 +00003284 echo "$as_me:$LINENO: result: no" >&5
3285echo "${ECHO_T}no" >&6
3286fi
3287
3288fi
3289if test -z "$ac_cv_prog_RANLIB"; then
3290 ac_ct_RANLIB=$RANLIB
3291 # Extract the first word of "ranlib", so it can be a program name with args.
3292set dummy ranlib; ac_word=$2
3293echo "$as_me:$LINENO: checking for $ac_word" >&5
3294echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3295if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3296 echo $ECHO_N "(cached) $ECHO_C" >&6
3297else
3298 if test -n "$ac_ct_RANLIB"; then
3299 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3300else
3301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3302for as_dir in $PATH
3303do
3304 IFS=$as_save_IFS
3305 test -z "$as_dir" && as_dir=.
3306 for ac_exec_ext in '' $ac_executable_extensions; do
3307 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3308 ac_cv_prog_ac_ct_RANLIB="ranlib"
3309 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3310 break 2
3311 fi
3312done
3313done
3314
3315 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3316fi
3317fi
3318ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3319if test -n "$ac_ct_RANLIB"; then
3320 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3321echo "${ECHO_T}$ac_ct_RANLIB" >&6
3322else
3323 echo "$as_me:$LINENO: result: no" >&5
3324echo "${ECHO_T}no" >&6
3325fi
3326
3327 RANLIB=$ac_ct_RANLIB
3328else
3329 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003331
3332
Guido van Rossum7f43da71994-08-01 12:15:30 +00003333for ac_prog in ar aal
3334do
Martin v. Löwis11437992002-04-12 09:54:03 +00003335 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003337echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3339if test "${ac_cv_prog_AR+set}" = set; then
3340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341else
3342 if test -n "$AR"; then
3343 ac_cv_prog_AR="$AR" # Let the user override the test.
3344else
Martin v. Löwis11437992002-04-12 09:54:03 +00003345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in $PATH
3347do
3348 IFS=$as_save_IFS
3349 test -z "$as_dir" && as_dir=.
3350 for ac_exec_ext in '' $ac_executable_extensions; do
3351 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3352 ac_cv_prog_AR="$ac_prog"
3353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3354 break 2
3355 fi
3356done
3357done
3358
Guido van Rossum7f43da71994-08-01 12:15:30 +00003359fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003361AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003362if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003363 echo "$as_me:$LINENO: result: $AR" >&5
3364echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365else
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 echo "$as_me:$LINENO: result: no" >&5
3367echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003368fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003371done
3372test -n "$AR" || AR="ar"
3373
Michael W. Hudson54241132001-12-07 15:38:26 +00003374
Neil Schemenauera42c8272001-03-31 00:01:55 +00003375case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003376bsdos*|hp*|HP*)
3377 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003378 if test -z "$INSTALL"
3379 then
3380 INSTALL="${srcdir}/install-sh -c"
3381 fi
3382esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383ac_aux_dir=
3384for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3385 if test -f $ac_dir/install-sh; then
3386 ac_aux_dir=$ac_dir
3387 ac_install_sh="$ac_aux_dir/install-sh -c"
3388 break
3389 elif test -f $ac_dir/install.sh; then
3390 ac_aux_dir=$ac_dir
3391 ac_install_sh="$ac_aux_dir/install.sh -c"
3392 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 elif test -f $ac_dir/shtool; then
3394 ac_aux_dir=$ac_dir
3395 ac_install_sh="$ac_aux_dir/shtool install -c"
3396 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003397 fi
3398done
3399if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3401echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3402 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003403fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003404ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3405ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3406ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003407
3408# Find a good install program. We prefer a C program (faster),
3409# so one script is as good as another. But avoid the broken or
3410# incompatible versions:
3411# SysV /etc/install, /usr/sbin/install
3412# SunOS /usr/etc/install
3413# IRIX /sbin/install
3414# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003415# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3417# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3418# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3419# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003420echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3421echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003422if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003423if test "${ac_cv_path_install+set}" = set; then
3424 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003425else
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3427for as_dir in $PATH
3428do
3429 IFS=$as_save_IFS
3430 test -z "$as_dir" && as_dir=.
3431 # Account for people who put trailing slashes in PATH elements.
3432case $as_dir/ in
3433 ./ | .// | /cC/* | \
3434 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3435 /usr/ucb/* ) ;;
3436 *)
3437 # OSF1 and SCO ODT 3.0 have their own names for install.
3438 # Don't use installbsd from OSF since it installs stuff as root
3439 # by default.
3440 for ac_prog in ginstall scoinst install; do
3441 for ac_exec_ext in '' $ac_executable_extensions; do
3442 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3443 if test $ac_prog = install &&
3444 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3445 # AIX install. It has an incompatible calling convention.
3446 :
3447 elif test $ac_prog = install &&
3448 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3449 # program-specific install script used by HP pwplus--don't use.
3450 :
3451 else
3452 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3453 break 3
3454 fi
3455 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003456 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 done
3458 ;;
3459esac
3460done
3461
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003462
3463fi
3464 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003466 else
3467 # As a last resort, use the slow shell script. We don't cache a
3468 # path for INSTALL within a source directory, because that will
3469 # break other packages using the cache if that directory is
3470 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003472 fi
3473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003474echo "$as_me:$LINENO: result: $INSTALL" >&5
3475echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003476
3477# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3478# It thinks the first close brace ends the variable substitution.
3479test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3480
Martin v. Löwis11437992002-04-12 09:54:03 +00003481test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003482
3483test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3484
Michael W. Hudson54241132001-12-07 15:38:26 +00003485
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003486# Not every filesystem supports hard links
3487
3488if test -z "$LN" ; then
3489 case $ac_sys_system in
3490 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003491 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003492 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003493 *) LN=ln;;
3494 esac
3495fi
3496
Fred Drake109d9862001-07-11 06:27:56 +00003497# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003498echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3499echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3500
Fred Drake109d9862001-07-11 06:27:56 +00003501# Check whether --with-pydebug or --without-pydebug was given.
3502if test "${with_pydebug+set}" = set; then
3503 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003504
Fred Drake109d9862001-07-11 06:27:56 +00003505if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003506then
3507
3508cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003509#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003510_ACEOF
3511
3512 echo "$as_me:$LINENO: result: yes" >&5
3513echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003514 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else echo "$as_me:$LINENO: result: no" >&5
3516echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003517fi
3518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 echo "$as_me:$LINENO: result: no" >&5
3520echo "${ECHO_T}no" >&6
3521fi;
Fred Drake109d9862001-07-11 06:27:56 +00003522
Skip Montanarodecc6a42003-01-01 20:07:49 +00003523# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3524# merged with this chunk of code?
3525
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003526# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003527# ------------------------
3528# (The following bit of code is complicated enough - please keep things
3529# indented properly. Just pretend you're editing Python code. ;-)
3530
3531# There are two parallel sets of case statements below, one that checks to
3532# see if OPT was set and one that does BASECFLAGS setting based upon
3533# compiler and platform. BASECFLAGS tweaks need to be made even if the
3534# user set OPT.
3535
3536# tweak OPT based on compiler and platform, only if the user didn't set
3537# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003539if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003540then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003541 case $GCC in
3542 yes)
3543 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003544 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003545 if test "$Py_DEBUG" = 'true' ; then
3546 # Optimization messes up debuggers, so turn it off for
3547 # debug builds.
3548 OPT="-g -Wall -Wstrict-prototypes"
3549 else
3550 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003551 fi
3552 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003553 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003554 OPT="-O3 -Wall -Wstrict-prototypes"
3555 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003556 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003557 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003558 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3559 ;;
3560 esac
Fred Drake109d9862001-07-11 06:27:56 +00003561 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003563 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003564 OPT="-O"
3565 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003566 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003567
3568 # The current (beta) Monterey compiler dies with optimizations
3569 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003570 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003571 Monterey*)
3572 OPT=""
3573 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003574 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003576fi
3577
Skip Montanarodecc6a42003-01-01 20:07:49 +00003578
3579# tweak BASECFLAGS based on compiler and platform
3580case $GCC in
3581yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003582 # Python violates C99 rules, by casting between incompatible
3583 # pointer types. GCC may generate bad code as a result of that,
3584 # so use -fno-strict-aliasing if supported.
3585 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3586echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3587 ac_save_cc="$CC"
3588 CC="$CC -fno-strict-aliasing"
3589 if test "$cross_compiling" = yes; then
3590 ac_cv_no_strict_aliasing_ok=no
3591else
3592 cat >conftest.$ac_ext <<_ACEOF
3593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003594/* confdefs.h. */
3595_ACEOF
3596cat confdefs.h >>conftest.$ac_ext
3597cat >>conftest.$ac_ext <<_ACEOF
3598/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003599int main() { return 0; }
3600_ACEOF
3601rm -f conftest$ac_exeext
3602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3603 (eval $ac_link) 2>&5
3604 ac_status=$?
3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3608 (eval $ac_try) 2>&5
3609 ac_status=$?
3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3611 (exit $ac_status); }; }; then
3612 ac_cv_no_strict_aliasing_ok=yes
3613else
3614 echo "$as_me: program exited with status $ac_status" >&5
3615echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003616sed 's/^/| /' conftest.$ac_ext >&5
3617
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003618( exit $ac_status )
3619ac_cv_no_strict_aliasing_ok=no
3620fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003621rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003622fi
3623 CC="$ac_save_cc"
3624 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3625echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3626 if test $ac_cv_no_strict_aliasing_ok = yes
3627 then
3628 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3629 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003630 case $ac_sys_system in
3631 SCO_SV*)
3632 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3633 ;;
3634 # is there any other compiler on Darwin besides gcc?
3635 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003636 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003637 ;;
3638 esac
3639 ;;
3640
3641*)
3642 case $ac_sys_system in
3643 OpenUNIX*|UnixWare*)
3644 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3645 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003646 OSF*)
3647 BASECFLAGS="$BASECFLAGS -ieee -std"
3648 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003649 SCO_SV*)
3650 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3651 ;;
3652 esac
3653 ;;
3654esac
3655
Fred Drakee1ceaa02001-12-04 20:55:47 +00003656if test "$Py_DEBUG" = 'true'; then
3657 :
3658else
3659 OPT="-DNDEBUG $OPT"
3660fi
3661
Guido van Rossum563e7081996-09-10 18:20:48 +00003662if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003663then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003664 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003665fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003666
Martin v. Löwis11437992002-04-12 09:54:03 +00003667echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3668echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3669if test "${ac_cv_opt_olimit_ok+set}" = set; then
3670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003671else
3672 ac_save_cc="$CC"
3673CC="$CC -OPT:Olimit=0"
3674if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003675 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003676else
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 cat >conftest.$ac_ext <<_ACEOF
3678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003679/* confdefs.h. */
3680_ACEOF
3681cat confdefs.h >>conftest.$ac_ext
3682cat >>conftest.$ac_ext <<_ACEOF
3683/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003684int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003685_ACEOF
3686rm -f conftest$ac_exeext
3687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3688 (eval $ac_link) 2>&5
3689 ac_status=$?
3690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3693 (eval $ac_try) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003697 ac_cv_opt_olimit_ok=yes
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 echo "$as_me: program exited with status $ac_status" >&5
3700echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003701sed 's/^/| /' conftest.$ac_ext >&5
3702
Martin v. Löwis11437992002-04-12 09:54:03 +00003703( exit $ac_status )
3704ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003705fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003706rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003707fi
Guido van Rossum91922671997-10-09 20:24:13 +00003708CC="$ac_save_cc"
3709fi
3710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3712echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003713if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003714 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003715 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3716 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3717 # environment?
3718 Darwin*)
3719 ;;
3720 *)
3721 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3722 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003723 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003724else
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3726echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3727 if test "${ac_cv_olimit_ok+set}" = set; then
3728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003729else
3730 ac_save_cc="$CC"
3731 CC="$CC -Olimit 1500"
3732 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003733 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003734else
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 cat >conftest.$ac_ext <<_ACEOF
3736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003742int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743_ACEOF
3744rm -f conftest$ac_exeext
3745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3746 (eval $ac_link) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003755 ac_cv_olimit_ok=yes
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me: program exited with status $ac_status" >&5
3758echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003759sed 's/^/| /' conftest.$ac_ext >&5
3760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761( exit $ac_status )
3762ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003763fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003764rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003765fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003766 CC="$ac_save_cc"
3767fi
3768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3770echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003771 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003772 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003773 fi
3774fi
3775
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003776# On some compilers, pthreads are available without further options
3777# (e.g. MacOS X). On some of these systems, the compiler will not
3778# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3779# So we have to see first whether pthreads are available without
3780# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003781echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3782echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3783if test "${ac_cv_pthread_is_default+set}" = set; then
3784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003786 if test "$cross_compiling" = yes; then
3787 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003788else
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 cat >conftest.$ac_ext <<_ACEOF
3790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003791/* confdefs.h. */
3792_ACEOF
3793cat confdefs.h >>conftest.$ac_ext
3794cat >>conftest.$ac_ext <<_ACEOF
3795/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003796
Martin v. Löwis130fb172001-07-19 11:00:41 +00003797#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003798
3799void* routine(void* p){return NULL;}
3800
3801int main(){
3802 pthread_t p;
3803 if(pthread_create(&p,NULL,routine,NULL)!=0)
3804 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003805 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003806 return 0;
3807}
3808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809_ACEOF
3810rm -f conftest$ac_exeext
3811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3812 (eval $ac_link) 2>&5
3813 ac_status=$?
3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3817 (eval $ac_try) 2>&5
3818 ac_status=$?
3819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003821
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003822 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003823 ac_cv_kthread=no
3824 ac_cv_pthread=no
3825
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 echo "$as_me: program exited with status $ac_status" >&5
3828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003829sed 's/^/| /' conftest.$ac_ext >&5
3830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831( exit $ac_status )
3832ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003833fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003834rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003835fi
3836
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003837fi
3838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3840echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003841
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003844then
3845 ac_cv_kpthread=no
3846else
3847# -Kpthread, if available, provides the right #defines
3848# and linker options to make pthread_create available
3849# Some compilers won't report that they do not support -Kpthread,
3850# so we need to run a program to see whether it really made the
3851# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003852echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3853echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3854if test "${ac_cv_kpthread+set}" = set; then
3855 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003856else
3857 ac_save_cc="$CC"
3858CC="$CC -Kpthread"
3859if test "$cross_compiling" = yes; then
3860 ac_cv_kpthread=no
3861else
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 cat >conftest.$ac_ext <<_ACEOF
3863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003864/* confdefs.h. */
3865_ACEOF
3866cat confdefs.h >>conftest.$ac_ext
3867cat >>conftest.$ac_ext <<_ACEOF
3868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003869
3870#include <pthread.h>
3871
3872void* routine(void* p){return NULL;}
3873
3874int main(){
3875 pthread_t p;
3876 if(pthread_create(&p,NULL,routine,NULL)!=0)
3877 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003878 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003879 return 0;
3880}
3881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882_ACEOF
3883rm -f conftest$ac_exeext
3884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3885 (eval $ac_link) 2>&5
3886 ac_status=$?
3887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3890 (eval $ac_try) 2>&5
3891 ac_status=$?
3892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3893 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003894 ac_cv_kpthread=yes
3895else
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 echo "$as_me: program exited with status $ac_status" >&5
3897echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003898sed 's/^/| /' conftest.$ac_ext >&5
3899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900( exit $ac_status )
3901ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003902fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003903rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003904fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003905CC="$ac_save_cc"
3906fi
3907
Martin v. Löwis11437992002-04-12 09:54:03 +00003908echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3909echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003910fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003911
Skip Montanarod8d39a02003-07-10 20:44:10 +00003912if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003913then
3914# -Kthread, if available, provides the right #defines
3915# and linker options to make pthread_create available
3916# Some compilers won't report that they do not support -Kthread,
3917# so we need to run a program to see whether it really made the
3918# function available.
3919echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3920echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3921if test "${ac_cv_kthread+set}" = set; then
3922 echo $ECHO_N "(cached) $ECHO_C" >&6
3923else
3924 ac_save_cc="$CC"
3925CC="$CC -Kthread"
3926if test "$cross_compiling" = yes; then
3927 ac_cv_kthread=no
3928else
3929 cat >conftest.$ac_ext <<_ACEOF
3930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003936
3937#include <pthread.h>
3938
3939void* routine(void* p){return NULL;}
3940
3941int main(){
3942 pthread_t p;
3943 if(pthread_create(&p,NULL,routine,NULL)!=0)
3944 return 1;
3945 (void)pthread_detach(p);
3946 return 0;
3947}
3948
3949_ACEOF
3950rm -f conftest$ac_exeext
3951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3952 (eval $ac_link) 2>&5
3953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3957 (eval $ac_try) 2>&5
3958 ac_status=$?
3959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3960 (exit $ac_status); }; }; then
3961 ac_cv_kthread=yes
3962else
3963 echo "$as_me: program exited with status $ac_status" >&5
3964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003965sed 's/^/| /' conftest.$ac_ext >&5
3966
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003967( exit $ac_status )
3968ac_cv_kthread=no
3969fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003970rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003971fi
3972CC="$ac_save_cc"
3973fi
3974
3975echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3976echo "${ECHO_T}$ac_cv_kthread" >&6
3977fi
3978
Skip Montanarod8d39a02003-07-10 20:44:10 +00003979if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003980then
3981# -pthread, if available, provides the right #defines
3982# and linker options to make pthread_create available
3983# Some compilers won't report that they do not support -pthread,
3984# so we need to run a program to see whether it really made the
3985# function available.
3986echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3987echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3988if test "${ac_cv_thread+set}" = set; then
3989 echo $ECHO_N "(cached) $ECHO_C" >&6
3990else
3991 ac_save_cc="$CC"
3992CC="$CC -pthread"
3993if test "$cross_compiling" = yes; then
3994 ac_cv_pthread=no
3995else
3996 cat >conftest.$ac_ext <<_ACEOF
3997#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* confdefs.h. */
3999_ACEOF
4000cat confdefs.h >>conftest.$ac_ext
4001cat >>conftest.$ac_ext <<_ACEOF
4002/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004003
4004#include <pthread.h>
4005
4006void* routine(void* p){return NULL;}
4007
4008int main(){
4009 pthread_t p;
4010 if(pthread_create(&p,NULL,routine,NULL)!=0)
4011 return 1;
4012 (void)pthread_detach(p);
4013 return 0;
4014}
4015
4016_ACEOF
4017rm -f conftest$ac_exeext
4018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4019 (eval $ac_link) 2>&5
4020 ac_status=$?
4021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4024 (eval $ac_try) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); }; }; then
4028 ac_cv_pthread=yes
4029else
4030 echo "$as_me: program exited with status $ac_status" >&5
4031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004032sed 's/^/| /' conftest.$ac_ext >&5
4033
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004034( exit $ac_status )
4035ac_cv_pthread=no
4036fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004037rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004038fi
4039CC="$ac_save_cc"
4040fi
4041
4042echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4043echo "${ECHO_T}$ac_cv_pthread" >&6
4044fi
4045
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004046# If we have set a CC compiler flag for thread support then
4047# check if it works for CXX, too.
4048ac_cv_cxx_thread=no
4049if test ! -z "$CXX"
4050then
4051echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4052echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4053ac_save_cxx="$CXX"
4054
4055if test "$ac_cv_kpthread" = "yes"
4056then
4057 CXX="$CXX -Kpthread"
4058 ac_cv_cxx_thread=yes
4059elif test "$ac_cv_kthread" = "yes"
4060then
4061 CXX="$CXX -Kthread"
4062 ac_cv_cxx_thread=yes
4063elif test "$ac_cv_pthread" = "yes"
4064then
4065 CXX="$CXX -pthread"
4066 ac_cv_cxx_thread=yes
4067fi
4068
4069if test $ac_cv_cxx_thread = yes
4070then
4071 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4072 $CXX -c conftest.$ac_ext 2>&5
4073 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4074 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4075 then
4076 ac_cv_cxx_thread=yes
4077 else
4078 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004079 fi
4080 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004081fi
4082fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004083CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004084echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4085echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4086
Michael W. Hudson54241132001-12-07 15:38:26 +00004087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004088# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004089echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4090echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4091if test "${ac_cv_header_stdc+set}" = set; then
4092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004093else
Martin v. Löwis11437992002-04-12 09:54:03 +00004094 cat >conftest.$ac_ext <<_ACEOF
4095#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004096/* confdefs.h. */
4097_ACEOF
4098cat confdefs.h >>conftest.$ac_ext
4099cat >>conftest.$ac_ext <<_ACEOF
4100/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004101#include <stdlib.h>
4102#include <stdarg.h>
4103#include <string.h>
4104#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004105
Skip Montanaro6dead952003-09-25 14:50:04 +00004106int
4107main ()
4108{
4109
4110 ;
4111 return 0;
4112}
Martin v. Löwis11437992002-04-12 09:54:03 +00004113_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004114rm -f conftest.$ac_objext
4115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4116 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004117 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004119 (exit $ac_status); } &&
4120 { ac_try='test -s conftest.$ac_objext'
4121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4122 (eval $ac_try) 2>&5
4123 ac_status=$?
4124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4125 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004126 ac_cv_header_stdc=yes
4127else
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004129sed 's/^/| /' conftest.$ac_ext >&5
4130
4131ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004133rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134
4135if test $ac_cv_header_stdc = yes; then
4136 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 cat >conftest.$ac_ext <<_ACEOF
4138#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004139/* confdefs.h. */
4140_ACEOF
4141cat confdefs.h >>conftest.$ac_ext
4142cat >>conftest.$ac_ext <<_ACEOF
4143/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004145
4146_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004148 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149 :
4150else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151 ac_cv_header_stdc=no
4152fi
4153rm -f conftest*
4154
4155fi
4156
4157if test $ac_cv_header_stdc = yes; then
4158 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004161/* confdefs.h. */
4162_ACEOF
4163cat confdefs.h >>conftest.$ac_ext
4164cat >>conftest.$ac_ext <<_ACEOF
4165/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
4168_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004170 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 :
4172else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173 ac_cv_header_stdc=no
4174fi
4175rm -f conftest*
4176
4177fi
4178
4179if test $ac_cv_header_stdc = yes; then
4180 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004182 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 cat >conftest.$ac_ext <<_ACEOF
4185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* confdefs.h. */
4187_ACEOF
4188cat confdefs.h >>conftest.$ac_ext
4189cat >>conftest.$ac_ext <<_ACEOF
4190/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004191#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004192#if ((' ' & 0x0FF) == 0x020)
4193# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4194# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4195#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004196# define ISLOWER(c) \
4197 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 || ('j' <= (c) && (c) <= 'r') \
4199 || ('s' <= (c) && (c) <= 'z'))
4200# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4201#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4204int
4205main ()
4206{
4207 int i;
4208 for (i = 0; i < 256; i++)
4209 if (XOR (islower (i), ISLOWER (i))
4210 || toupper (i) != TOUPPER (i))
4211 exit(2);
4212 exit (0);
4213}
4214_ACEOF
4215rm -f conftest$ac_exeext
4216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4217 (eval $ac_link) 2>&5
4218 ac_status=$?
4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4222 (eval $ac_try) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226 :
4227else
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 echo "$as_me: program exited with status $ac_status" >&5
4229echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004230sed 's/^/| /' conftest.$ac_ext >&5
4231
Martin v. Löwis11437992002-04-12 09:54:03 +00004232( exit $ac_status )
4233ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004234fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004235rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004236fi
4237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004238fi
4239echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4240echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004241if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004242
4243cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
4247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248
Skip Montanarob9820a32004-01-17 00:16:12 +00004249# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4260 inttypes.h stdint.h unistd.h
4261do
4262as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4263echo "$as_me:$LINENO: checking for $ac_header" >&5
4264echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4265if eval "test \"\${$as_ac_Header+set}\" = set"; then
4266 echo $ECHO_N "(cached) $ECHO_C" >&6
4267else
4268 cat >conftest.$ac_ext <<_ACEOF
4269#line $LINENO "configure"
4270/* confdefs.h. */
4271_ACEOF
4272cat confdefs.h >>conftest.$ac_ext
4273cat >>conftest.$ac_ext <<_ACEOF
4274/* end confdefs.h. */
4275$ac_includes_default
4276
4277#include <$ac_header>
4278_ACEOF
4279rm -f conftest.$ac_objext
4280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4281 (eval $ac_compile) 2>&5
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest.$ac_objext'
4286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4287 (eval $ac_try) 2>&5
4288 ac_status=$?
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290 (exit $ac_status); }; }; then
4291 eval "$as_ac_Header=yes"
4292else
4293 echo "$as_me: failed program was:" >&5
4294sed 's/^/| /' conftest.$ac_ext >&5
4295
4296eval "$as_ac_Header=no"
4297fi
4298rm -f conftest.$ac_objext conftest.$ac_ext
4299fi
4300echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4301echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4302if test `eval echo '${'$as_ac_Header'}'` = yes; then
4303 cat >>confdefs.h <<_ACEOF
4304#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4305_ACEOF
4306
4307fi
4308
4309done
4310
4311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004349
Barry Warsawfe33b792003-01-07 22:42:49 +00004350
Neal Norwitz82251032003-05-23 14:35:24 +00004351
Martin v. Löwis12af0482004-01-31 12:34:17 +00004352
Hye-Shik Chang81268602004-02-02 06:05:24 +00004353
Martin v. Löwis11437992002-04-12 09:54:03 +00004354for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004355libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004356signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4357unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004358sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004359sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00004360sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004361sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4362bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363do
Martin v. Löwis11437992002-04-12 09:54:03 +00004364as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4365if eval "test \"\${$as_ac_Header+set}\" = set"; then
4366 echo "$as_me:$LINENO: checking for $ac_header" >&5
4367echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4368if eval "test \"\${$as_ac_Header+set}\" = set"; then
4369 echo $ECHO_N "(cached) $ECHO_C" >&6
4370fi
4371echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4372echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 # Is the header compilable?
4375echo "$as_me:$LINENO: checking $ac_header usability" >&5
4376echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4377cat >conftest.$ac_ext <<_ACEOF
4378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004379/* confdefs.h. */
4380_ACEOF
4381cat confdefs.h >>conftest.$ac_ext
4382cat >>conftest.$ac_ext <<_ACEOF
4383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004384$ac_includes_default
4385#include <$ac_header>
4386_ACEOF
4387rm -f conftest.$ac_objext
4388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4389 (eval $ac_compile) 2>&5
4390 ac_status=$?
4391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4392 (exit $ac_status); } &&
4393 { ac_try='test -s conftest.$ac_objext'
4394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4395 (eval $ac_try) 2>&5
4396 ac_status=$?
4397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4398 (exit $ac_status); }; }; then
4399 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004400else
Martin v. Löwis11437992002-04-12 09:54:03 +00004401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004402sed 's/^/| /' conftest.$ac_ext >&5
4403
Martin v. Löwis11437992002-04-12 09:54:03 +00004404ac_header_compiler=no
4405fi
4406rm -f conftest.$ac_objext conftest.$ac_ext
4407echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4408echo "${ECHO_T}$ac_header_compiler" >&6
4409
4410# Is the header present?
4411echo "$as_me:$LINENO: checking $ac_header presence" >&5
4412echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4413cat >conftest.$ac_ext <<_ACEOF
4414#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004420#include <$ac_header>
4421_ACEOF
4422if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4423 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004426 rm -f conftest.er1
4427 cat conftest.err >&5
4428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429 (exit $ac_status); } >/dev/null; then
4430 if test -s conftest.err; then
4431 ac_cpp_err=$ac_c_preproc_warn_flag
4432 else
4433 ac_cpp_err=
4434 fi
4435else
4436 ac_cpp_err=yes
4437fi
4438if test -z "$ac_cpp_err"; then
4439 ac_header_preproc=yes
4440else
4441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004442sed 's/^/| /' conftest.$ac_ext >&5
4443
Martin v. Löwis11437992002-04-12 09:54:03 +00004444 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004445fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004446rm -f conftest.err conftest.$ac_ext
4447echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4448echo "${ECHO_T}$ac_header_preproc" >&6
4449
4450# So? What about this header?
4451case $ac_header_compiler:$ac_header_preproc in
4452 yes:no )
4453 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4454echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4455 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004456echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4457 (
4458 cat <<\_ASBOX
4459## ------------------------------------ ##
4460## Report this to bug-autoconf@gnu.org. ##
4461## ------------------------------------ ##
4462_ASBOX
4463 ) |
4464 sed "s/^/$as_me: WARNING: /" >&2
4465 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004466 no:yes )
4467 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4468echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4469 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4470echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4471 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004472echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4473 (
4474 cat <<\_ASBOX
4475## ------------------------------------ ##
4476## Report this to bug-autoconf@gnu.org. ##
4477## ------------------------------------ ##
4478_ASBOX
4479 ) |
4480 sed "s/^/$as_me: WARNING: /" >&2
4481 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004482esac
4483echo "$as_me:$LINENO: checking for $ac_header" >&5
4484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4485if eval "test \"\${$as_ac_Header+set}\" = set"; then
4486 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004487else
Martin v. Löwis11437992002-04-12 09:54:03 +00004488 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004490echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4491echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4492
4493fi
4494if test `eval echo '${'$as_ac_Header'}'` = yes; then
4495 cat >>confdefs.h <<_ACEOF
4496#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4497_ACEOF
4498
4499fi
4500
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501done
4502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503
4504
4505
4506
4507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004509for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4510 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4511echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4512echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4513if eval "test \"\${$as_ac_Header+set}\" = set"; then
4514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004515else
Martin v. Löwis11437992002-04-12 09:54:03 +00004516 cat >conftest.$ac_ext <<_ACEOF
4517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004518/* confdefs.h. */
4519_ACEOF
4520cat confdefs.h >>conftest.$ac_ext
4521cat >>conftest.$ac_ext <<_ACEOF
4522/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523#include <sys/types.h>
4524#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004525
Martin v. Löwis11437992002-04-12 09:54:03 +00004526int
4527main ()
4528{
4529if ((DIR *) 0)
4530return 0;
4531 ;
4532 return 0;
4533}
4534_ACEOF
4535rm -f conftest.$ac_objext
4536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4537 (eval $ac_compile) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); } &&
4541 { ac_try='test -s conftest.$ac_objext'
4542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; }; then
4547 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004548else
Martin v. Löwis11437992002-04-12 09:54:03 +00004549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004550sed 's/^/| /' conftest.$ac_ext >&5
4551
Martin v. Löwis11437992002-04-12 09:54:03 +00004552eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004554rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4557echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4558if test `eval echo '${'$as_ac_Header'}'` = yes; then
4559 cat >>confdefs.h <<_ACEOF
4560#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4561_ACEOF
4562
4563ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566done
4567# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4568if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004569 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4570echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4571if test "${ac_cv_search_opendir+set}" = set; then
4572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004573else
Martin v. Löwis11437992002-04-12 09:54:03 +00004574 ac_func_search_save_LIBS=$LIBS
4575ac_cv_search_opendir=no
4576cat >conftest.$ac_ext <<_ACEOF
4577#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004578/* confdefs.h. */
4579_ACEOF
4580cat confdefs.h >>conftest.$ac_ext
4581cat >>conftest.$ac_ext <<_ACEOF
4582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004583
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004584/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004585#ifdef __cplusplus
4586extern "C"
4587#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004588/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004589 builtin and then its argument prototype would still apply. */
4590char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004591int
4592main ()
4593{
4594opendir ();
4595 ;
4596 return 0;
4597}
4598_ACEOF
4599rm -f conftest.$ac_objext conftest$ac_exeext
4600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4601 (eval $ac_link) 2>&5
4602 ac_status=$?
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604 (exit $ac_status); } &&
4605 { ac_try='test -s conftest$ac_exeext'
4606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607 (eval $ac_try) 2>&5
4608 ac_status=$?
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610 (exit $ac_status); }; }; then
4611 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004612else
Martin v. Löwis11437992002-04-12 09:54:03 +00004613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004614sed 's/^/| /' conftest.$ac_ext >&5
4615
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4618if test "$ac_cv_search_opendir" = no; then
4619 for ac_lib in dir; do
4620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4621 cat >conftest.$ac_ext <<_ACEOF
4622#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004623/* confdefs.h. */
4624_ACEOF
4625cat confdefs.h >>conftest.$ac_ext
4626cat >>conftest.$ac_ext <<_ACEOF
4627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004628
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004629/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004630#ifdef __cplusplus
4631extern "C"
4632#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004633/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004634 builtin and then its argument prototype would still apply. */
4635char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004636int
4637main ()
4638{
4639opendir ();
4640 ;
4641 return 0;
4642}
4643_ACEOF
4644rm -f conftest.$ac_objext conftest$ac_exeext
4645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4646 (eval $ac_link) 2>&5
4647 ac_status=$?
4648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4649 (exit $ac_status); } &&
4650 { ac_try='test -s conftest$ac_exeext'
4651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4652 (eval $ac_try) 2>&5
4653 ac_status=$?
4654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4655 (exit $ac_status); }; }; then
4656 ac_cv_search_opendir="-l$ac_lib"
4657break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658else
Martin v. Löwis11437992002-04-12 09:54:03 +00004659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004660sed 's/^/| /' conftest.$ac_ext >&5
4661
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004663rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4664 done
4665fi
4666LIBS=$ac_func_search_save_LIBS
4667fi
4668echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4669echo "${ECHO_T}$ac_cv_search_opendir" >&6
4670if test "$ac_cv_search_opendir" != no; then
4671 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004672
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004674
Michael W. Hudson54241132001-12-07 15:38:26 +00004675else
Martin v. Löwis11437992002-04-12 09:54:03 +00004676 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4677echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4678if test "${ac_cv_search_opendir+set}" = set; then
4679 echo $ECHO_N "(cached) $ECHO_C" >&6
4680else
4681 ac_func_search_save_LIBS=$LIBS
4682ac_cv_search_opendir=no
4683cat >conftest.$ac_ext <<_ACEOF
4684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004685/* confdefs.h. */
4686_ACEOF
4687cat confdefs.h >>conftest.$ac_ext
4688cat >>conftest.$ac_ext <<_ACEOF
4689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004690
4691/* Override any gcc2 internal prototype to avoid an error. */
4692#ifdef __cplusplus
4693extern "C"
4694#endif
4695/* We use char because int might match the return type of a gcc2
4696 builtin and then its argument prototype would still apply. */
4697char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004698int
4699main ()
4700{
4701opendir ();
4702 ;
4703 return 0;
4704}
4705_ACEOF
4706rm -f conftest.$ac_objext conftest$ac_exeext
4707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4708 (eval $ac_link) 2>&5
4709 ac_status=$?
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } &&
4712 { ac_try='test -s conftest$ac_exeext'
4713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4714 (eval $ac_try) 2>&5
4715 ac_status=$?
4716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4717 (exit $ac_status); }; }; then
4718 ac_cv_search_opendir="none required"
4719else
4720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004721sed 's/^/| /' conftest.$ac_ext >&5
4722
Martin v. Löwis11437992002-04-12 09:54:03 +00004723fi
4724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4725if test "$ac_cv_search_opendir" = no; then
4726 for ac_lib in x; do
4727 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4728 cat >conftest.$ac_ext <<_ACEOF
4729#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004730/* confdefs.h. */
4731_ACEOF
4732cat confdefs.h >>conftest.$ac_ext
4733cat >>conftest.$ac_ext <<_ACEOF
4734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004735
4736/* Override any gcc2 internal prototype to avoid an error. */
4737#ifdef __cplusplus
4738extern "C"
4739#endif
4740/* We use char because int might match the return type of a gcc2
4741 builtin and then its argument prototype would still apply. */
4742char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004743int
4744main ()
4745{
4746opendir ();
4747 ;
4748 return 0;
4749}
4750_ACEOF
4751rm -f conftest.$ac_objext conftest$ac_exeext
4752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4753 (eval $ac_link) 2>&5
4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); } &&
4757 { ac_try='test -s conftest$ac_exeext'
4758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 ac_cv_search_opendir="-l$ac_lib"
4764break
4765else
4766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004767sed 's/^/| /' conftest.$ac_ext >&5
4768
Martin v. Löwis11437992002-04-12 09:54:03 +00004769fi
4770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4771 done
4772fi
4773LIBS=$ac_func_search_save_LIBS
4774fi
4775echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4776echo "${ECHO_T}$ac_cv_search_opendir" >&6
4777if test "$ac_cv_search_opendir" != no; then
4778 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780fi
4781
4782fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004783
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004784echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4785echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4786if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4787 echo $ECHO_N "(cached) $ECHO_C" >&6
4788else
4789 cat >conftest.$ac_ext <<_ACEOF
4790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004791/* confdefs.h. */
4792_ACEOF
4793cat confdefs.h >>conftest.$ac_ext
4794cat >>conftest.$ac_ext <<_ACEOF
4795/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004796#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004797int
4798main ()
4799{
4800return makedev(0, 0);
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805rm -f conftest.$ac_objext conftest$ac_exeext
4806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4807 (eval $ac_link) 2>&5
4808 ac_status=$?
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } &&
4811 { ac_try='test -s conftest$ac_exeext'
4812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; }; then
4817 ac_cv_header_sys_types_h_makedev=yes
4818else
4819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004820sed 's/^/| /' conftest.$ac_ext >&5
4821
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004822ac_cv_header_sys_types_h_makedev=no
4823fi
4824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4825
4826fi
4827echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4828echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4829
4830if test $ac_cv_header_sys_types_h_makedev = no; then
4831if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4832 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4833echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4834if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4835 echo $ECHO_N "(cached) $ECHO_C" >&6
4836fi
4837echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4838echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4839else
4840 # Is the header compilable?
4841echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4842echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4843cat >conftest.$ac_ext <<_ACEOF
4844#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004845/* confdefs.h. */
4846_ACEOF
4847cat confdefs.h >>conftest.$ac_ext
4848cat >>conftest.$ac_ext <<_ACEOF
4849/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004850$ac_includes_default
4851#include <sys/mkdev.h>
4852_ACEOF
4853rm -f conftest.$ac_objext
4854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4855 (eval $ac_compile) 2>&5
4856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); } &&
4859 { ac_try='test -s conftest.$ac_objext'
4860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4861 (eval $ac_try) 2>&5
4862 ac_status=$?
4863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864 (exit $ac_status); }; }; then
4865 ac_header_compiler=yes
4866else
4867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004868sed 's/^/| /' conftest.$ac_ext >&5
4869
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004870ac_header_compiler=no
4871fi
4872rm -f conftest.$ac_objext conftest.$ac_ext
4873echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4874echo "${ECHO_T}$ac_header_compiler" >&6
4875
4876# Is the header present?
4877echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4878echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4879cat >conftest.$ac_ext <<_ACEOF
4880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004881/* confdefs.h. */
4882_ACEOF
4883cat confdefs.h >>conftest.$ac_ext
4884cat >>conftest.$ac_ext <<_ACEOF
4885/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004886#include <sys/mkdev.h>
4887_ACEOF
4888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4890 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004891 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004892 rm -f conftest.er1
4893 cat conftest.err >&5
4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895 (exit $ac_status); } >/dev/null; then
4896 if test -s conftest.err; then
4897 ac_cpp_err=$ac_c_preproc_warn_flag
4898 else
4899 ac_cpp_err=
4900 fi
4901else
4902 ac_cpp_err=yes
4903fi
4904if test -z "$ac_cpp_err"; then
4905 ac_header_preproc=yes
4906else
4907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004908sed 's/^/| /' conftest.$ac_ext >&5
4909
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004910 ac_header_preproc=no
4911fi
4912rm -f conftest.err conftest.$ac_ext
4913echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4914echo "${ECHO_T}$ac_header_preproc" >&6
4915
4916# So? What about this header?
4917case $ac_header_compiler:$ac_header_preproc in
4918 yes:no )
4919 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4920echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4921 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004922echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4923 (
4924 cat <<\_ASBOX
4925## ------------------------------------ ##
4926## Report this to bug-autoconf@gnu.org. ##
4927## ------------------------------------ ##
4928_ASBOX
4929 ) |
4930 sed "s/^/$as_me: WARNING: /" >&2
4931 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004932 no:yes )
4933 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4934echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4935 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4936echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4937 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004938echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4939 (
4940 cat <<\_ASBOX
4941## ------------------------------------ ##
4942## Report this to bug-autoconf@gnu.org. ##
4943## ------------------------------------ ##
4944_ASBOX
4945 ) |
4946 sed "s/^/$as_me: WARNING: /" >&2
4947 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004948esac
4949echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4950echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4951if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4952 echo $ECHO_N "(cached) $ECHO_C" >&6
4953else
4954 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4955fi
4956echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4957echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4958
4959fi
4960if test $ac_cv_header_sys_mkdev_h = yes; then
4961
4962cat >>confdefs.h <<\_ACEOF
4963#define MAJOR_IN_MKDEV 1
4964_ACEOF
4965
4966fi
4967
4968
4969
4970 if test $ac_cv_header_sys_mkdev_h = no; then
4971 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4972 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4973echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4974if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4975 echo $ECHO_N "(cached) $ECHO_C" >&6
4976fi
4977echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4978echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4979else
4980 # Is the header compilable?
4981echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4982echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4983cat >conftest.$ac_ext <<_ACEOF
4984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004985/* confdefs.h. */
4986_ACEOF
4987cat confdefs.h >>conftest.$ac_ext
4988cat >>conftest.$ac_ext <<_ACEOF
4989/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004990$ac_includes_default
4991#include <sys/sysmacros.h>
4992_ACEOF
4993rm -f conftest.$ac_objext
4994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4995 (eval $ac_compile) 2>&5
4996 ac_status=$?
4997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998 (exit $ac_status); } &&
4999 { ac_try='test -s conftest.$ac_objext'
5000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5001 (eval $ac_try) 2>&5
5002 ac_status=$?
5003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); }; }; then
5005 ac_header_compiler=yes
5006else
5007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005008sed 's/^/| /' conftest.$ac_ext >&5
5009
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005010ac_header_compiler=no
5011fi
5012rm -f conftest.$ac_objext conftest.$ac_ext
5013echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5014echo "${ECHO_T}$ac_header_compiler" >&6
5015
5016# Is the header present?
5017echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5018echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5019cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005021/* confdefs.h. */
5022_ACEOF
5023cat confdefs.h >>conftest.$ac_ext
5024cat >>conftest.$ac_ext <<_ACEOF
5025/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005026#include <sys/sysmacros.h>
5027_ACEOF
5028if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5029 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5030 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005031 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005032 rm -f conftest.er1
5033 cat conftest.err >&5
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } >/dev/null; then
5036 if test -s conftest.err; then
5037 ac_cpp_err=$ac_c_preproc_warn_flag
5038 else
5039 ac_cpp_err=
5040 fi
5041else
5042 ac_cpp_err=yes
5043fi
5044if test -z "$ac_cpp_err"; then
5045 ac_header_preproc=yes
5046else
5047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005048sed 's/^/| /' conftest.$ac_ext >&5
5049
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005050 ac_header_preproc=no
5051fi
5052rm -f conftest.err conftest.$ac_ext
5053echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5054echo "${ECHO_T}$ac_header_preproc" >&6
5055
5056# So? What about this header?
5057case $ac_header_compiler:$ac_header_preproc in
5058 yes:no )
5059 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5060echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5061 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005062echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5063 (
5064 cat <<\_ASBOX
5065## ------------------------------------ ##
5066## Report this to bug-autoconf@gnu.org. ##
5067## ------------------------------------ ##
5068_ASBOX
5069 ) |
5070 sed "s/^/$as_me: WARNING: /" >&2
5071 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005072 no:yes )
5073 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5074echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5075 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5076echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5077 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005078echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5079 (
5080 cat <<\_ASBOX
5081## ------------------------------------ ##
5082## Report this to bug-autoconf@gnu.org. ##
5083## ------------------------------------ ##
5084_ASBOX
5085 ) |
5086 sed "s/^/$as_me: WARNING: /" >&2
5087 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005088esac
5089echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5090echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5091if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5092 echo $ECHO_N "(cached) $ECHO_C" >&6
5093else
5094 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5095fi
5096echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5097echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5098
5099fi
5100if test $ac_cv_header_sys_sysmacros_h = yes; then
5101
5102cat >>confdefs.h <<\_ACEOF
5103#define MAJOR_IN_SYSMACROS 1
5104_ACEOF
5105
5106fi
5107
5108
5109 fi
5110fi
5111
Michael W. Hudson54241132001-12-07 15:38:26 +00005112
Guido van Rossum627b2d71993-12-24 10:39:16 +00005113# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005114was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005115echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5116echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5117cat >conftest.$ac_ext <<_ACEOF
5118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005119/* confdefs.h. */
5120_ACEOF
5121cat confdefs.h >>conftest.$ac_ext
5122cat >>conftest.$ac_ext <<_ACEOF
5123/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005125
5126_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005128 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005129 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130else
Martin v. Löwis11437992002-04-12 09:54:03 +00005131
5132
5133cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005135_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005136
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005137
Guido van Rossum627b2d71993-12-24 10:39:16 +00005138fi
5139rm -f conftest*
5140
Martin v. Löwis11437992002-04-12 09:54:03 +00005141echo "$as_me:$LINENO: result: $was_it_defined" >&5
5142echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005143
Neal Norwitz11690112002-07-30 01:08:28 +00005144# Check whether using makedev requires defining _OSF_SOURCE
5145echo "$as_me:$LINENO: checking for makedev" >&5
5146echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5147cat >conftest.$ac_ext <<_ACEOF
5148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005149/* confdefs.h. */
5150_ACEOF
5151cat confdefs.h >>conftest.$ac_ext
5152cat >>conftest.$ac_ext <<_ACEOF
5153/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005154#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005155int
5156main ()
5157{
5158 makedev(0, 0)
5159 ;
5160 return 0;
5161}
5162_ACEOF
5163rm -f conftest.$ac_objext conftest$ac_exeext
5164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5165 (eval $ac_link) 2>&5
5166 ac_status=$?
5167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5168 (exit $ac_status); } &&
5169 { ac_try='test -s conftest$ac_exeext'
5170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5171 (eval $ac_try) 2>&5
5172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); }; }; then
5175 ac_cv_has_makedev=yes
5176else
5177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005178sed 's/^/| /' conftest.$ac_ext >&5
5179
Neal Norwitz11690112002-07-30 01:08:28 +00005180ac_cv_has_makedev=no
5181fi
5182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5183if test "$ac_cv_has_makedev" = "no"; then
5184 # we didn't link, try if _OSF_SOURCE will allow us to link
5185 cat >conftest.$ac_ext <<_ACEOF
5186#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005187/* confdefs.h. */
5188_ACEOF
5189cat confdefs.h >>conftest.$ac_ext
5190cat >>conftest.$ac_ext <<_ACEOF
5191/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005192
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005193#define _OSF_SOURCE 1
5194#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005195
Neal Norwitz11690112002-07-30 01:08:28 +00005196int
5197main ()
5198{
5199 makedev(0, 0)
5200 ;
5201 return 0;
5202}
5203_ACEOF
5204rm -f conftest.$ac_objext conftest$ac_exeext
5205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5206 (eval $ac_link) 2>&5
5207 ac_status=$?
5208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5209 (exit $ac_status); } &&
5210 { ac_try='test -s conftest$ac_exeext'
5211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5212 (eval $ac_try) 2>&5
5213 ac_status=$?
5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215 (exit $ac_status); }; }; then
5216 ac_cv_has_makedev=yes
5217else
5218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005219sed 's/^/| /' conftest.$ac_ext >&5
5220
Neal Norwitz11690112002-07-30 01:08:28 +00005221ac_cv_has_makedev=no
5222fi
5223rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5224 if test "$ac_cv_has_makedev" = "yes"; then
5225
5226cat >>confdefs.h <<\_ACEOF
5227#define _OSF_SOURCE 1
5228_ACEOF
5229
5230 fi
5231fi
5232echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5233echo "${ECHO_T}$ac_cv_has_makedev" >&6
5234if test "$ac_cv_has_makedev" = "yes"; then
5235
5236cat >>confdefs.h <<\_ACEOF
5237#define HAVE_MAKEDEV 1
5238_ACEOF
5239
5240fi
5241
Martin v. Löwis399a6892002-10-04 10:22:02 +00005242# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5243# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5244# defined, but the compiler does not support pragma redefine_extname,
5245# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5246# structures (such as rlimit64) without declaring them. As a
5247# work-around, disable LFS on such configurations
5248
5249use_lfs=yes
5250echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5251echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5252cat >conftest.$ac_ext <<_ACEOF
5253#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005254/* confdefs.h. */
5255_ACEOF
5256cat confdefs.h >>conftest.$ac_ext
5257cat >>conftest.$ac_ext <<_ACEOF
5258/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005259
5260#define _LARGEFILE_SOURCE 1
5261#define _FILE_OFFSET_BITS 64
5262#include <sys/resource.h>
5263
Martin v. Löwis399a6892002-10-04 10:22:02 +00005264int
5265main ()
5266{
5267struct rlimit foo;
5268 ;
5269 return 0;
5270}
5271_ACEOF
5272rm -f conftest.$ac_objext
5273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5274 (eval $ac_compile) 2>&5
5275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); } &&
5278 { ac_try='test -s conftest.$ac_objext'
5279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5280 (eval $ac_try) 2>&5
5281 ac_status=$?
5282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5283 (exit $ac_status); }; }; then
5284 sol_lfs_bug=no
5285else
5286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005287sed 's/^/| /' conftest.$ac_ext >&5
5288
Martin v. Löwis399a6892002-10-04 10:22:02 +00005289sol_lfs_bug=yes
5290fi
5291rm -f conftest.$ac_objext conftest.$ac_ext
5292echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5293echo "${ECHO_T}$sol_lfs_bug" >&6
5294if test "$sol_lfs_bug" = "yes"; then
5295 use_lfs=no
5296fi
5297
5298if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005299# Two defines needed to enable largefile support on various platforms
5300# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005301
Martin v. Löwis11437992002-04-12 09:54:03 +00005302cat >>confdefs.h <<\_ACEOF
5303#define _LARGEFILE_SOURCE 1
5304_ACEOF
5305
5306
5307cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005308#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005309_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005310
Martin v. Löwis399a6892002-10-04 10:22:02 +00005311fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005312
Guido van Rossum84e7b241996-08-19 21:59:00 +00005313# Add some code to confdefs.h so that the test for off_t works on SCO
5314cat >> confdefs.h <<\EOF
5315#if defined(SCO_DS)
5316#undef _OFF_T
5317#endif
5318EOF
5319
Guido van Rossumef2255b2000-03-10 22:30:29 +00005320# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005321echo "$as_me:$LINENO: checking for mode_t" >&5
5322echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5323if test "${ac_cv_type_mode_t+set}" = set; then
5324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005325else
Martin v. Löwis11437992002-04-12 09:54:03 +00005326 cat >conftest.$ac_ext <<_ACEOF
5327#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005333$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005334int
5335main ()
5336{
5337if ((mode_t *) 0)
5338 return 0;
5339if (sizeof (mode_t))
5340 return 0;
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345rm -f conftest.$ac_objext
5346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5347 (eval $ac_compile) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); } &&
5351 { ac_try='test -s conftest.$ac_objext'
5352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5353 (eval $ac_try) 2>&5
5354 ac_status=$?
5355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005357 ac_cv_type_mode_t=yes
5358else
Martin v. Löwis11437992002-04-12 09:54:03 +00005359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005360sed 's/^/| /' conftest.$ac_ext >&5
5361
Martin v. Löwis11437992002-04-12 09:54:03 +00005362ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005366echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5367echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5368if test $ac_cv_type_mode_t = yes; then
5369 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370else
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372cat >>confdefs.h <<_ACEOF
5373#define mode_t int
5374_ACEOF
5375
5376fi
5377
5378echo "$as_me:$LINENO: checking for off_t" >&5
5379echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5380if test "${ac_cv_type_off_t+set}" = set; then
5381 echo $ECHO_N "(cached) $ECHO_C" >&6
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005385/* confdefs.h. */
5386_ACEOF
5387cat confdefs.h >>conftest.$ac_ext
5388cat >>conftest.$ac_ext <<_ACEOF
5389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005390$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005391int
5392main ()
5393{
5394if ((off_t *) 0)
5395 return 0;
5396if (sizeof (off_t))
5397 return 0;
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest.$ac_objext
5403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5404 (eval $ac_compile) 2>&5
5405 ac_status=$?
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); } &&
5408 { ac_try='test -s conftest.$ac_objext'
5409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5410 (eval $ac_try) 2>&5
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005414 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005415else
Martin v. Löwis11437992002-04-12 09:54:03 +00005416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005417sed 's/^/| /' conftest.$ac_ext >&5
5418
Martin v. Löwis11437992002-04-12 09:54:03 +00005419ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005421rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005423echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5424echo "${ECHO_T}$ac_cv_type_off_t" >&6
5425if test $ac_cv_type_off_t = yes; then
5426 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005427else
Martin v. Löwis11437992002-04-12 09:54:03 +00005428
5429cat >>confdefs.h <<_ACEOF
5430#define off_t long
5431_ACEOF
5432
5433fi
5434
5435echo "$as_me:$LINENO: checking for pid_t" >&5
5436echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5437if test "${ac_cv_type_pid_t+set}" = set; then
5438 echo $ECHO_N "(cached) $ECHO_C" >&6
5439else
5440 cat >conftest.$ac_ext <<_ACEOF
5441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005447$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005448int
5449main ()
5450{
5451if ((pid_t *) 0)
5452 return 0;
5453if (sizeof (pid_t))
5454 return 0;
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459rm -f conftest.$ac_objext
5460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5461 (eval $ac_compile) 2>&5
5462 ac_status=$?
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
5465 { ac_try='test -s conftest.$ac_objext'
5466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467 (eval $ac_try) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005471 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472else
Martin v. Löwis11437992002-04-12 09:54:03 +00005473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005474sed 's/^/| /' conftest.$ac_ext >&5
5475
Martin v. Löwis11437992002-04-12 09:54:03 +00005476ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005478rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005480echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5481echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5482if test $ac_cv_type_pid_t = yes; then
5483 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484else
Martin v. Löwis11437992002-04-12 09:54:03 +00005485
5486cat >>confdefs.h <<_ACEOF
5487#define pid_t int
5488_ACEOF
5489
5490fi
5491
5492echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5493echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5494if test "${ac_cv_type_signal+set}" = set; then
5495 echo $ECHO_N "(cached) $ECHO_C" >&6
5496else
5497 cat >conftest.$ac_ext <<_ACEOF
5498#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005499/* confdefs.h. */
5500_ACEOF
5501cat confdefs.h >>conftest.$ac_ext
5502cat >>conftest.$ac_ext <<_ACEOF
5503/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005504#include <sys/types.h>
5505#include <signal.h>
5506#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005507# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005508#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005509#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005510extern "C" void (*signal (int, void (*)(int)))(int);
5511#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005512void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005513#endif
5514
Martin v. Löwis11437992002-04-12 09:54:03 +00005515int
5516main ()
5517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005518int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005519 ;
5520 return 0;
5521}
5522_ACEOF
5523rm -f conftest.$ac_objext
5524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5525 (eval $ac_compile) 2>&5
5526 ac_status=$?
5527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5528 (exit $ac_status); } &&
5529 { ac_try='test -s conftest.$ac_objext'
5530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5531 (eval $ac_try) 2>&5
5532 ac_status=$?
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005536else
Martin v. Löwis11437992002-04-12 09:54:03 +00005537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005538sed 's/^/| /' conftest.$ac_ext >&5
5539
Martin v. Löwis11437992002-04-12 09:54:03 +00005540ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005542rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005544echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5545echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005546
Martin v. Löwis11437992002-04-12 09:54:03 +00005547cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005550
Michael W. Hudson54241132001-12-07 15:38:26 +00005551
Martin v. Löwis11437992002-04-12 09:54:03 +00005552echo "$as_me:$LINENO: checking for size_t" >&5
5553echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5554if test "${ac_cv_type_size_t+set}" = set; then
5555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005556else
Martin v. Löwis11437992002-04-12 09:54:03 +00005557 cat >conftest.$ac_ext <<_ACEOF
5558#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005559/* confdefs.h. */
5560_ACEOF
5561cat confdefs.h >>conftest.$ac_ext
5562cat >>conftest.$ac_ext <<_ACEOF
5563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005564$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005565int
5566main ()
5567{
5568if ((size_t *) 0)
5569 return 0;
5570if (sizeof (size_t))
5571 return 0;
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext
5577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5578 (eval $ac_compile) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); } &&
5582 { ac_try='test -s conftest.$ac_objext'
5583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584 (eval $ac_try) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005588 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005589else
Martin v. Löwis11437992002-04-12 09:54:03 +00005590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005591sed 's/^/| /' conftest.$ac_ext >&5
5592
Martin v. Löwis11437992002-04-12 09:54:03 +00005593ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005595rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005597echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5598echo "${ECHO_T}$ac_cv_type_size_t" >&6
5599if test $ac_cv_type_size_t = yes; then
5600 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005601else
Martin v. Löwis11437992002-04-12 09:54:03 +00005602
5603cat >>confdefs.h <<_ACEOF
5604#define size_t unsigned
5605_ACEOF
5606
5607fi
5608
5609echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5610echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5611if test "${ac_cv_type_uid_t+set}" = set; then
5612 echo $ECHO_N "(cached) $ECHO_C" >&6
5613else
5614 cat >conftest.$ac_ext <<_ACEOF
5615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005616/* confdefs.h. */
5617_ACEOF
5618cat confdefs.h >>conftest.$ac_ext
5619cat >>conftest.$ac_ext <<_ACEOF
5620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005621#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005622
5623_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005625 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005626 ac_cv_type_uid_t=yes
5627else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628 ac_cv_type_uid_t=no
5629fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005630rm -f conftest*
5631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005633echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5634echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005635if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636
Martin v. Löwis11437992002-04-12 09:54:03 +00005637cat >>confdefs.h <<\_ACEOF
5638#define uid_t int
5639_ACEOF
5640
5641
5642cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005643#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005645
5646fi
5647
Jack Jansendd19cf82001-12-06 22:36:17 +00005648
Michael W. Hudson54241132001-12-07 15:38:26 +00005649# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005650# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005651echo "$as_me:$LINENO: checking for int" >&5
5652echo $ECHO_N "checking for int... $ECHO_C" >&6
5653if test "${ac_cv_type_int+set}" = set; then
5654 echo $ECHO_N "(cached) $ECHO_C" >&6
5655else
5656 cat >conftest.$ac_ext <<_ACEOF
5657#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005658/* confdefs.h. */
5659_ACEOF
5660cat confdefs.h >>conftest.$ac_ext
5661cat >>conftest.$ac_ext <<_ACEOF
5662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005663$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005664int
5665main ()
5666{
5667if ((int *) 0)
5668 return 0;
5669if (sizeof (int))
5670 return 0;
5671 ;
5672 return 0;
5673}
5674_ACEOF
5675rm -f conftest.$ac_objext
5676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5677 (eval $ac_compile) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); } &&
5681 { ac_try='test -s conftest.$ac_objext'
5682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5683 (eval $ac_try) 2>&5
5684 ac_status=$?
5685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5687 ac_cv_type_int=yes
5688else
5689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005690sed 's/^/| /' conftest.$ac_ext >&5
5691
Martin v. Löwis11437992002-04-12 09:54:03 +00005692ac_cv_type_int=no
5693fi
5694rm -f conftest.$ac_objext conftest.$ac_ext
5695fi
5696echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5697echo "${ECHO_T}$ac_cv_type_int" >&6
5698
5699echo "$as_me:$LINENO: checking size of int" >&5
5700echo $ECHO_N "checking size of int... $ECHO_C" >&6
5701if test "${ac_cv_sizeof_int+set}" = set; then
5702 echo $ECHO_N "(cached) $ECHO_C" >&6
5703else
5704 if test "$ac_cv_type_int" = yes; then
5705 # The cast to unsigned long works around a bug in the HP C Compiler
5706 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5707 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5708 # This bug is HP SR number 8606223364.
5709 if test "$cross_compiling" = yes; then
5710 # Depending upon the size, compute the lo and hi bounds.
5711cat >conftest.$ac_ext <<_ACEOF
5712#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005719int
5720main ()
5721{
5722static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5723test_array [0] = 0
5724
5725 ;
5726 return 0;
5727}
5728_ACEOF
5729rm -f conftest.$ac_objext
5730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5731 (eval $ac_compile) 2>&5
5732 ac_status=$?
5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734 (exit $ac_status); } &&
5735 { ac_try='test -s conftest.$ac_objext'
5736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5737 (eval $ac_try) 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); }; }; then
5741 ac_lo=0 ac_mid=0
5742 while :; do
5743 cat >conftest.$ac_ext <<_ACEOF
5744#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005745/* confdefs.h. */
5746_ACEOF
5747cat confdefs.h >>conftest.$ac_ext
5748cat >>conftest.$ac_ext <<_ACEOF
5749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005750$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005751int
5752main ()
5753{
5754static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5755test_array [0] = 0
5756
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5763 (eval $ac_compile) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
5767 { ac_try='test -s conftest.$ac_objext'
5768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5769 (eval $ac_try) 2>&5
5770 ac_status=$?
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772 (exit $ac_status); }; }; then
5773 ac_hi=$ac_mid; break
5774else
5775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005776sed 's/^/| /' conftest.$ac_ext >&5
5777
Martin v. Löwis11437992002-04-12 09:54:03 +00005778ac_lo=`expr $ac_mid + 1`
5779 if test $ac_lo -le $ac_mid; then
5780 ac_lo= ac_hi=
5781 break
5782 fi
5783 ac_mid=`expr 2 '*' $ac_mid + 1`
5784fi
5785rm -f conftest.$ac_objext conftest.$ac_ext
5786 done
5787else
5788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005789sed 's/^/| /' conftest.$ac_ext >&5
5790
Martin v. Löwis11437992002-04-12 09:54:03 +00005791cat >conftest.$ac_ext <<_ACEOF
5792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005793/* confdefs.h. */
5794_ACEOF
5795cat confdefs.h >>conftest.$ac_ext
5796cat >>conftest.$ac_ext <<_ACEOF
5797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005799int
5800main ()
5801{
5802static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5803test_array [0] = 0
5804
5805 ;
5806 return 0;
5807}
5808_ACEOF
5809rm -f conftest.$ac_objext
5810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5811 (eval $ac_compile) 2>&5
5812 ac_status=$?
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); } &&
5815 { ac_try='test -s conftest.$ac_objext'
5816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5817 (eval $ac_try) 2>&5
5818 ac_status=$?
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); }; }; then
5821 ac_hi=-1 ac_mid=-1
5822 while :; do
5823 cat >conftest.$ac_ext <<_ACEOF
5824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005825/* confdefs.h. */
5826_ACEOF
5827cat confdefs.h >>conftest.$ac_ext
5828cat >>conftest.$ac_ext <<_ACEOF
5829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005831int
5832main ()
5833{
5834static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5835test_array [0] = 0
5836
5837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext
5842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5843 (eval $ac_compile) 2>&5
5844 ac_status=$?
5845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846 (exit $ac_status); } &&
5847 { ac_try='test -s conftest.$ac_objext'
5848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849 (eval $ac_try) 2>&5
5850 ac_status=$?
5851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852 (exit $ac_status); }; }; then
5853 ac_lo=$ac_mid; break
5854else
5855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005856sed 's/^/| /' conftest.$ac_ext >&5
5857
Martin v. Löwis11437992002-04-12 09:54:03 +00005858ac_hi=`expr '(' $ac_mid ')' - 1`
5859 if test $ac_mid -le $ac_hi; then
5860 ac_lo= ac_hi=
5861 break
5862 fi
5863 ac_mid=`expr 2 '*' $ac_mid`
5864fi
5865rm -f conftest.$ac_objext conftest.$ac_ext
5866 done
5867else
5868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005869sed 's/^/| /' conftest.$ac_ext >&5
5870
Martin v. Löwis11437992002-04-12 09:54:03 +00005871ac_lo= ac_hi=
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874fi
5875rm -f conftest.$ac_objext conftest.$ac_ext
5876# Binary search between lo and hi bounds.
5877while test "x$ac_lo" != "x$ac_hi"; do
5878 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5879 cat >conftest.$ac_ext <<_ACEOF
5880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005886$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
5890static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5891test_array [0] = 0
5892
5893 ;
5894 return 0;
5895}
5896_ACEOF
5897rm -f conftest.$ac_objext
5898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5899 (eval $ac_compile) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); } &&
5903 { ac_try='test -s conftest.$ac_objext'
5904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905 (eval $ac_try) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); }; }; then
5909 ac_hi=$ac_mid
5910else
5911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005912sed 's/^/| /' conftest.$ac_ext >&5
5913
Martin v. Löwis11437992002-04-12 09:54:03 +00005914ac_lo=`expr '(' $ac_mid ')' + 1`
5915fi
5916rm -f conftest.$ac_objext conftest.$ac_ext
5917done
5918case $ac_lo in
5919?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005920'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5921See \`config.log' for more details." >&5
5922echo "$as_me: error: cannot compute sizeof (int), 77
5923See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 { (exit 1); exit 1; }; } ;;
5925esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005926else
5927 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005928 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5929See \`config.log' for more details." >&5
5930echo "$as_me: error: cannot run test program while cross compiling
5931See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005933else
Martin v. Löwis11437992002-04-12 09:54:03 +00005934 cat >conftest.$ac_ext <<_ACEOF
5935#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005936/* confdefs.h. */
5937_ACEOF
5938cat confdefs.h >>conftest.$ac_ext
5939cat >>conftest.$ac_ext <<_ACEOF
5940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005941$ac_includes_default
5942long longval () { return (long) (sizeof (int)); }
5943unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005945#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005946int
5947main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005948{
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
5950 FILE *f = fopen ("conftest.val", "w");
5951 if (! f)
5952 exit (1);
5953 if (((long) (sizeof (int))) < 0)
5954 {
5955 long i = longval ();
5956 if (i != ((long) (sizeof (int))))
5957 exit (1);
5958 fprintf (f, "%ld\n", i);
5959 }
5960 else
5961 {
5962 unsigned long i = ulongval ();
5963 if (i != ((long) (sizeof (int))))
5964 exit (1);
5965 fprintf (f, "%lu\n", i);
5966 }
5967 exit (ferror (f) || fclose (f) != 0);
5968
5969 ;
5970 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005971}
Martin v. Löwis11437992002-04-12 09:54:03 +00005972_ACEOF
5973rm -f conftest$ac_exeext
5974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5975 (eval $ac_link) 2>&5
5976 ac_status=$?
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5980 (eval $ac_try) 2>&5
5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); }; }; then
5984 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005985else
Martin v. Löwis11437992002-04-12 09:54:03 +00005986 echo "$as_me: program exited with status $ac_status" >&5
5987echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005988sed 's/^/| /' conftest.$ac_ext >&5
5989
Martin v. Löwis11437992002-04-12 09:54:03 +00005990( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005991{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5992See \`config.log' for more details." >&5
5993echo "$as_me: error: cannot compute sizeof (int), 77
5994See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 { (exit 1); exit 1; }; }
5996fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005997rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005998fi
5999fi
6000rm -f conftest.val
6001else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006002 ac_cv_sizeof_int=0
6003fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006005echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6006echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6007cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006008#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006009_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006010
6011
Martin v. Löwis11437992002-04-12 09:54:03 +00006012echo "$as_me:$LINENO: checking for long" >&5
6013echo $ECHO_N "checking for long... $ECHO_C" >&6
6014if test "${ac_cv_type_long+set}" = set; then
6015 echo $ECHO_N "(cached) $ECHO_C" >&6
6016else
6017 cat >conftest.$ac_ext <<_ACEOF
6018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006024$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006025int
6026main ()
6027{
6028if ((long *) 0)
6029 return 0;
6030if (sizeof (long))
6031 return 0;
6032 ;
6033 return 0;
6034}
6035_ACEOF
6036rm -f conftest.$ac_objext
6037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6038 (eval $ac_compile) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); } &&
6042 { ac_try='test -s conftest.$ac_objext'
6043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6044 (eval $ac_try) 2>&5
6045 ac_status=$?
6046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6047 (exit $ac_status); }; }; then
6048 ac_cv_type_long=yes
6049else
6050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006051sed 's/^/| /' conftest.$ac_ext >&5
6052
Martin v. Löwis11437992002-04-12 09:54:03 +00006053ac_cv_type_long=no
6054fi
6055rm -f conftest.$ac_objext conftest.$ac_ext
6056fi
6057echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6058echo "${ECHO_T}$ac_cv_type_long" >&6
6059
6060echo "$as_me:$LINENO: checking size of long" >&5
6061echo $ECHO_N "checking size of long... $ECHO_C" >&6
6062if test "${ac_cv_sizeof_long+set}" = set; then
6063 echo $ECHO_N "(cached) $ECHO_C" >&6
6064else
6065 if test "$ac_cv_type_long" = yes; then
6066 # The cast to unsigned long works around a bug in the HP C Compiler
6067 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6068 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6069 # This bug is HP SR number 8606223364.
6070 if test "$cross_compiling" = yes; then
6071 # Depending upon the size, compute the lo and hi bounds.
6072cat >conftest.$ac_ext <<_ACEOF
6073#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006074/* confdefs.h. */
6075_ACEOF
6076cat confdefs.h >>conftest.$ac_ext
6077cat >>conftest.$ac_ext <<_ACEOF
6078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006079$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006080int
6081main ()
6082{
6083static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6084test_array [0] = 0
6085
6086 ;
6087 return 0;
6088}
6089_ACEOF
6090rm -f conftest.$ac_objext
6091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6092 (eval $ac_compile) 2>&5
6093 ac_status=$?
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); } &&
6096 { ac_try='test -s conftest.$ac_objext'
6097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6098 (eval $ac_try) 2>&5
6099 ac_status=$?
6100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6101 (exit $ac_status); }; }; then
6102 ac_lo=0 ac_mid=0
6103 while :; do
6104 cat >conftest.$ac_ext <<_ACEOF
6105#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006106/* confdefs.h. */
6107_ACEOF
6108cat confdefs.h >>conftest.$ac_ext
6109cat >>conftest.$ac_ext <<_ACEOF
6110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006111$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006112int
6113main ()
6114{
6115static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6116test_array [0] = 0
6117
6118 ;
6119 return 0;
6120}
6121_ACEOF
6122rm -f conftest.$ac_objext
6123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6124 (eval $ac_compile) 2>&5
6125 ac_status=$?
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); } &&
6128 { ac_try='test -s conftest.$ac_objext'
6129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6130 (eval $ac_try) 2>&5
6131 ac_status=$?
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); }; }; then
6134 ac_hi=$ac_mid; break
6135else
6136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006137sed 's/^/| /' conftest.$ac_ext >&5
6138
Martin v. Löwis11437992002-04-12 09:54:03 +00006139ac_lo=`expr $ac_mid + 1`
6140 if test $ac_lo -le $ac_mid; then
6141 ac_lo= ac_hi=
6142 break
6143 fi
6144 ac_mid=`expr 2 '*' $ac_mid + 1`
6145fi
6146rm -f conftest.$ac_objext conftest.$ac_ext
6147 done
6148else
6149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006150sed 's/^/| /' conftest.$ac_ext >&5
6151
Martin v. Löwis11437992002-04-12 09:54:03 +00006152cat >conftest.$ac_ext <<_ACEOF
6153#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006154/* confdefs.h. */
6155_ACEOF
6156cat confdefs.h >>conftest.$ac_ext
6157cat >>conftest.$ac_ext <<_ACEOF
6158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006159$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006160int
6161main ()
6162{
6163static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6164test_array [0] = 0
6165
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest.$ac_objext
6171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6172 (eval $ac_compile) 2>&5
6173 ac_status=$?
6174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175 (exit $ac_status); } &&
6176 { ac_try='test -s conftest.$ac_objext'
6177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178 (eval $ac_try) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); }; }; then
6182 ac_hi=-1 ac_mid=-1
6183 while :; do
6184 cat >conftest.$ac_ext <<_ACEOF
6185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006191$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006192int
6193main ()
6194{
6195static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6196test_array [0] = 0
6197
6198 ;
6199 return 0;
6200}
6201_ACEOF
6202rm -f conftest.$ac_objext
6203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6204 (eval $ac_compile) 2>&5
6205 ac_status=$?
6206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6207 (exit $ac_status); } &&
6208 { ac_try='test -s conftest.$ac_objext'
6209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6210 (eval $ac_try) 2>&5
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); }; }; then
6214 ac_lo=$ac_mid; break
6215else
6216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006217sed 's/^/| /' conftest.$ac_ext >&5
6218
Martin v. Löwis11437992002-04-12 09:54:03 +00006219ac_hi=`expr '(' $ac_mid ')' - 1`
6220 if test $ac_mid -le $ac_hi; then
6221 ac_lo= ac_hi=
6222 break
6223 fi
6224 ac_mid=`expr 2 '*' $ac_mid`
6225fi
6226rm -f conftest.$ac_objext conftest.$ac_ext
6227 done
6228else
6229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006230sed 's/^/| /' conftest.$ac_ext >&5
6231
Martin v. Löwis11437992002-04-12 09:54:03 +00006232ac_lo= ac_hi=
6233fi
6234rm -f conftest.$ac_objext conftest.$ac_ext
6235fi
6236rm -f conftest.$ac_objext conftest.$ac_ext
6237# Binary search between lo and hi bounds.
6238while test "x$ac_lo" != "x$ac_hi"; do
6239 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6240 cat >conftest.$ac_ext <<_ACEOF
6241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_hi=$ac_mid
6271else
6272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006273sed 's/^/| /' conftest.$ac_ext >&5
6274
Martin v. Löwis11437992002-04-12 09:54:03 +00006275ac_lo=`expr '(' $ac_mid ')' + 1`
6276fi
6277rm -f conftest.$ac_objext conftest.$ac_ext
6278done
6279case $ac_lo in
6280?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006281'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6282See \`config.log' for more details." >&5
6283echo "$as_me: error: cannot compute sizeof (long), 77
6284See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006285 { (exit 1); exit 1; }; } ;;
6286esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006287else
6288 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006289 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6290See \`config.log' for more details." >&5
6291echo "$as_me: error: cannot run test program while cross compiling
6292See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006293 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006294else
Martin v. Löwis11437992002-04-12 09:54:03 +00006295 cat >conftest.$ac_ext <<_ACEOF
6296#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006297/* confdefs.h. */
6298_ACEOF
6299cat confdefs.h >>conftest.$ac_ext
6300cat >>conftest.$ac_ext <<_ACEOF
6301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006302$ac_includes_default
6303long longval () { return (long) (sizeof (long)); }
6304unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006305#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006306#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006307int
6308main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006309{
Martin v. Löwis11437992002-04-12 09:54:03 +00006310
6311 FILE *f = fopen ("conftest.val", "w");
6312 if (! f)
6313 exit (1);
6314 if (((long) (sizeof (long))) < 0)
6315 {
6316 long i = longval ();
6317 if (i != ((long) (sizeof (long))))
6318 exit (1);
6319 fprintf (f, "%ld\n", i);
6320 }
6321 else
6322 {
6323 unsigned long i = ulongval ();
6324 if (i != ((long) (sizeof (long))))
6325 exit (1);
6326 fprintf (f, "%lu\n", i);
6327 }
6328 exit (ferror (f) || fclose (f) != 0);
6329
6330 ;
6331 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006332}
Martin v. Löwis11437992002-04-12 09:54:03 +00006333_ACEOF
6334rm -f conftest$ac_exeext
6335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6336 (eval $ac_link) 2>&5
6337 ac_status=$?
6338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6341 (eval $ac_try) 2>&5
6342 ac_status=$?
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); }; }; then
6345 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006346else
Martin v. Löwis11437992002-04-12 09:54:03 +00006347 echo "$as_me: program exited with status $ac_status" >&5
6348echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006349sed 's/^/| /' conftest.$ac_ext >&5
6350
Martin v. Löwis11437992002-04-12 09:54:03 +00006351( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006352{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6353See \`config.log' for more details." >&5
6354echo "$as_me: error: cannot compute sizeof (long), 77
6355See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006356 { (exit 1); exit 1; }; }
6357fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006358rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006359fi
6360fi
6361rm -f conftest.val
6362else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006363 ac_cv_sizeof_long=0
6364fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006366echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6367echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6368cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006369#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006370_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006371
6372
Martin v. Löwis11437992002-04-12 09:54:03 +00006373echo "$as_me:$LINENO: checking for void *" >&5
6374echo $ECHO_N "checking for void *... $ECHO_C" >&6
6375if test "${ac_cv_type_void_p+set}" = set; then
6376 echo $ECHO_N "(cached) $ECHO_C" >&6
6377else
6378 cat >conftest.$ac_ext <<_ACEOF
6379#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006380/* confdefs.h. */
6381_ACEOF
6382cat confdefs.h >>conftest.$ac_ext
6383cat >>conftest.$ac_ext <<_ACEOF
6384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006386int
6387main ()
6388{
6389if ((void * *) 0)
6390 return 0;
6391if (sizeof (void *))
6392 return 0;
6393 ;
6394 return 0;
6395}
6396_ACEOF
6397rm -f conftest.$ac_objext
6398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6399 (eval $ac_compile) 2>&5
6400 ac_status=$?
6401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6402 (exit $ac_status); } &&
6403 { ac_try='test -s conftest.$ac_objext'
6404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6405 (eval $ac_try) 2>&5
6406 ac_status=$?
6407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408 (exit $ac_status); }; }; then
6409 ac_cv_type_void_p=yes
6410else
6411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006412sed 's/^/| /' conftest.$ac_ext >&5
6413
Martin v. Löwis11437992002-04-12 09:54:03 +00006414ac_cv_type_void_p=no
6415fi
6416rm -f conftest.$ac_objext conftest.$ac_ext
6417fi
6418echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6419echo "${ECHO_T}$ac_cv_type_void_p" >&6
6420
6421echo "$as_me:$LINENO: checking size of void *" >&5
6422echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6423if test "${ac_cv_sizeof_void_p+set}" = set; then
6424 echo $ECHO_N "(cached) $ECHO_C" >&6
6425else
6426 if test "$ac_cv_type_void_p" = yes; then
6427 # The cast to unsigned long works around a bug in the HP C Compiler
6428 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6429 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6430 # This bug is HP SR number 8606223364.
6431 if test "$cross_compiling" = yes; then
6432 # Depending upon the size, compute the lo and hi bounds.
6433cat >conftest.$ac_ext <<_ACEOF
6434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006435/* confdefs.h. */
6436_ACEOF
6437cat confdefs.h >>conftest.$ac_ext
6438cat >>conftest.$ac_ext <<_ACEOF
6439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006440$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006441int
6442main ()
6443{
6444static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6445test_array [0] = 0
6446
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext
6452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6453 (eval $ac_compile) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); } &&
6457 { ac_try='test -s conftest.$ac_objext'
6458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6459 (eval $ac_try) 2>&5
6460 ac_status=$?
6461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); }; }; then
6463 ac_lo=0 ac_mid=0
6464 while :; do
6465 cat >conftest.$ac_ext <<_ACEOF
6466#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006467/* confdefs.h. */
6468_ACEOF
6469cat confdefs.h >>conftest.$ac_ext
6470cat >>conftest.$ac_ext <<_ACEOF
6471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006472$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006473int
6474main ()
6475{
6476static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6477test_array [0] = 0
6478
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext
6484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6485 (eval $ac_compile) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); } &&
6489 { ac_try='test -s conftest.$ac_objext'
6490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6491 (eval $ac_try) 2>&5
6492 ac_status=$?
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); }; }; then
6495 ac_hi=$ac_mid; break
6496else
6497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006498sed 's/^/| /' conftest.$ac_ext >&5
6499
Martin v. Löwis11437992002-04-12 09:54:03 +00006500ac_lo=`expr $ac_mid + 1`
6501 if test $ac_lo -le $ac_mid; then
6502 ac_lo= ac_hi=
6503 break
6504 fi
6505 ac_mid=`expr 2 '*' $ac_mid + 1`
6506fi
6507rm -f conftest.$ac_objext conftest.$ac_ext
6508 done
6509else
6510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006511sed 's/^/| /' conftest.$ac_ext >&5
6512
Martin v. Löwis11437992002-04-12 09:54:03 +00006513cat >conftest.$ac_ext <<_ACEOF
6514#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006521int
6522main ()
6523{
6524static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6525test_array [0] = 0
6526
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext
6532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6533 (eval $ac_compile) 2>&5
6534 ac_status=$?
6535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); } &&
6537 { ac_try='test -s conftest.$ac_objext'
6538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6539 (eval $ac_try) 2>&5
6540 ac_status=$?
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); }; }; then
6543 ac_hi=-1 ac_mid=-1
6544 while :; do
6545 cat >conftest.$ac_ext <<_ACEOF
6546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006547/* confdefs.h. */
6548_ACEOF
6549cat confdefs.h >>conftest.$ac_ext
6550cat >>conftest.$ac_ext <<_ACEOF
6551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006553int
6554main ()
6555{
6556static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6557test_array [0] = 0
6558
6559 ;
6560 return 0;
6561}
6562_ACEOF
6563rm -f conftest.$ac_objext
6564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6565 (eval $ac_compile) 2>&5
6566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); } &&
6569 { ac_try='test -s conftest.$ac_objext'
6570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6571 (eval $ac_try) 2>&5
6572 ac_status=$?
6573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574 (exit $ac_status); }; }; then
6575 ac_lo=$ac_mid; break
6576else
6577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006578sed 's/^/| /' conftest.$ac_ext >&5
6579
Martin v. Löwis11437992002-04-12 09:54:03 +00006580ac_hi=`expr '(' $ac_mid ')' - 1`
6581 if test $ac_mid -le $ac_hi; then
6582 ac_lo= ac_hi=
6583 break
6584 fi
6585 ac_mid=`expr 2 '*' $ac_mid`
6586fi
6587rm -f conftest.$ac_objext conftest.$ac_ext
6588 done
6589else
6590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006591sed 's/^/| /' conftest.$ac_ext >&5
6592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593ac_lo= ac_hi=
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596fi
6597rm -f conftest.$ac_objext conftest.$ac_ext
6598# Binary search between lo and hi bounds.
6599while test "x$ac_lo" != "x$ac_hi"; do
6600 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6601 cat >conftest.$ac_ext <<_ACEOF
6602#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006608$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006609int
6610main ()
6611{
6612static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6613test_array [0] = 0
6614
6615 ;
6616 return 0;
6617}
6618_ACEOF
6619rm -f conftest.$ac_objext
6620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6621 (eval $ac_compile) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); } &&
6625 { ac_try='test -s conftest.$ac_objext'
6626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627 (eval $ac_try) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); }; }; then
6631 ac_hi=$ac_mid
6632else
6633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006634sed 's/^/| /' conftest.$ac_ext >&5
6635
Martin v. Löwis11437992002-04-12 09:54:03 +00006636ac_lo=`expr '(' $ac_mid ')' + 1`
6637fi
6638rm -f conftest.$ac_objext conftest.$ac_ext
6639done
6640case $ac_lo in
6641?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006642'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6643See \`config.log' for more details." >&5
6644echo "$as_me: error: cannot compute sizeof (void *), 77
6645See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006646 { (exit 1); exit 1; }; } ;;
6647esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006648else
6649 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006650 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6651See \`config.log' for more details." >&5
6652echo "$as_me: error: cannot run test program while cross compiling
6653See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006655else
Martin v. Löwis11437992002-04-12 09:54:03 +00006656 cat >conftest.$ac_ext <<_ACEOF
6657#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006658/* confdefs.h. */
6659_ACEOF
6660cat confdefs.h >>conftest.$ac_ext
6661cat >>conftest.$ac_ext <<_ACEOF
6662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006663$ac_includes_default
6664long longval () { return (long) (sizeof (void *)); }
6665unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006666#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006667#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006668int
6669main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006670{
Martin v. Löwis11437992002-04-12 09:54:03 +00006671
6672 FILE *f = fopen ("conftest.val", "w");
6673 if (! f)
6674 exit (1);
6675 if (((long) (sizeof (void *))) < 0)
6676 {
6677 long i = longval ();
6678 if (i != ((long) (sizeof (void *))))
6679 exit (1);
6680 fprintf (f, "%ld\n", i);
6681 }
6682 else
6683 {
6684 unsigned long i = ulongval ();
6685 if (i != ((long) (sizeof (void *))))
6686 exit (1);
6687 fprintf (f, "%lu\n", i);
6688 }
6689 exit (ferror (f) || fclose (f) != 0);
6690
6691 ;
6692 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006693}
Martin v. Löwis11437992002-04-12 09:54:03 +00006694_ACEOF
6695rm -f conftest$ac_exeext
6696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6697 (eval $ac_link) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6702 (eval $ac_try) 2>&5
6703 ac_status=$?
6704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705 (exit $ac_status); }; }; then
6706 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006707else
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 echo "$as_me: program exited with status $ac_status" >&5
6709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006710sed 's/^/| /' conftest.$ac_ext >&5
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006713{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6714See \`config.log' for more details." >&5
6715echo "$as_me: error: cannot compute sizeof (void *), 77
6716See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 { (exit 1); exit 1; }; }
6718fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006719rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006720fi
6721fi
6722rm -f conftest.val
6723else
Guido van Rossumad678af1998-10-02 14:42:15 +00006724 ac_cv_sizeof_void_p=0
6725fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006727echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6729cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006730#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006732
6733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734echo "$as_me:$LINENO: checking for short" >&5
6735echo $ECHO_N "checking for short... $ECHO_C" >&6
6736if test "${ac_cv_type_short+set}" = set; then
6737 echo $ECHO_N "(cached) $ECHO_C" >&6
6738else
6739 cat >conftest.$ac_ext <<_ACEOF
6740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006741/* confdefs.h. */
6742_ACEOF
6743cat confdefs.h >>conftest.$ac_ext
6744cat >>conftest.$ac_ext <<_ACEOF
6745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006746$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006747int
6748main ()
6749{
6750if ((short *) 0)
6751 return 0;
6752if (sizeof (short))
6753 return 0;
6754 ;
6755 return 0;
6756}
6757_ACEOF
6758rm -f conftest.$ac_objext
6759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6760 (eval $ac_compile) 2>&5
6761 ac_status=$?
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); } &&
6764 { ac_try='test -s conftest.$ac_objext'
6765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6766 (eval $ac_try) 2>&5
6767 ac_status=$?
6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6769 (exit $ac_status); }; }; then
6770 ac_cv_type_short=yes
6771else
6772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006773sed 's/^/| /' conftest.$ac_ext >&5
6774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775ac_cv_type_short=no
6776fi
6777rm -f conftest.$ac_objext conftest.$ac_ext
6778fi
6779echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6780echo "${ECHO_T}$ac_cv_type_short" >&6
6781
6782echo "$as_me:$LINENO: checking size of short" >&5
6783echo $ECHO_N "checking size of short... $ECHO_C" >&6
6784if test "${ac_cv_sizeof_short+set}" = set; then
6785 echo $ECHO_N "(cached) $ECHO_C" >&6
6786else
6787 if test "$ac_cv_type_short" = yes; then
6788 # The cast to unsigned long works around a bug in the HP C Compiler
6789 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6790 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6791 # This bug is HP SR number 8606223364.
6792 if test "$cross_compiling" = yes; then
6793 # Depending upon the size, compute the lo and hi bounds.
6794cat >conftest.$ac_ext <<_ACEOF
6795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006801$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006802int
6803main ()
6804{
6805static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6806test_array [0] = 0
6807
6808 ;
6809 return 0;
6810}
6811_ACEOF
6812rm -f conftest.$ac_objext
6813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6814 (eval $ac_compile) 2>&5
6815 ac_status=$?
6816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817 (exit $ac_status); } &&
6818 { ac_try='test -s conftest.$ac_objext'
6819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6820 (eval $ac_try) 2>&5
6821 ac_status=$?
6822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6823 (exit $ac_status); }; }; then
6824 ac_lo=0 ac_mid=0
6825 while :; do
6826 cat >conftest.$ac_ext <<_ACEOF
6827#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006828/* confdefs.h. */
6829_ACEOF
6830cat confdefs.h >>conftest.$ac_ext
6831cat >>conftest.$ac_ext <<_ACEOF
6832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006833$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006834int
6835main ()
6836{
6837static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6838test_array [0] = 0
6839
6840 ;
6841 return 0;
6842}
6843_ACEOF
6844rm -f conftest.$ac_objext
6845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6846 (eval $ac_compile) 2>&5
6847 ac_status=$?
6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849 (exit $ac_status); } &&
6850 { ac_try='test -s conftest.$ac_objext'
6851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6852 (eval $ac_try) 2>&5
6853 ac_status=$?
6854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855 (exit $ac_status); }; }; then
6856 ac_hi=$ac_mid; break
6857else
6858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006859sed 's/^/| /' conftest.$ac_ext >&5
6860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861ac_lo=`expr $ac_mid + 1`
6862 if test $ac_lo -le $ac_mid; then
6863 ac_lo= ac_hi=
6864 break
6865 fi
6866 ac_mid=`expr 2 '*' $ac_mid + 1`
6867fi
6868rm -f conftest.$ac_objext conftest.$ac_ext
6869 done
6870else
6871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006872sed 's/^/| /' conftest.$ac_ext >&5
6873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874cat >conftest.$ac_ext <<_ACEOF
6875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006876/* confdefs.h. */
6877_ACEOF
6878cat confdefs.h >>conftest.$ac_ext
6879cat >>conftest.$ac_ext <<_ACEOF
6880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006881$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006882int
6883main ()
6884{
6885static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6886test_array [0] = 0
6887
6888 ;
6889 return 0;
6890}
6891_ACEOF
6892rm -f conftest.$ac_objext
6893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6894 (eval $ac_compile) 2>&5
6895 ac_status=$?
6896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6897 (exit $ac_status); } &&
6898 { ac_try='test -s conftest.$ac_objext'
6899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6900 (eval $ac_try) 2>&5
6901 ac_status=$?
6902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6903 (exit $ac_status); }; }; then
6904 ac_hi=-1 ac_mid=-1
6905 while :; do
6906 cat >conftest.$ac_ext <<_ACEOF
6907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006908/* confdefs.h. */
6909_ACEOF
6910cat confdefs.h >>conftest.$ac_ext
6911cat >>conftest.$ac_ext <<_ACEOF
6912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006914int
6915main ()
6916{
6917static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6918test_array [0] = 0
6919
6920 ;
6921 return 0;
6922}
6923_ACEOF
6924rm -f conftest.$ac_objext
6925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6926 (eval $ac_compile) 2>&5
6927 ac_status=$?
6928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6929 (exit $ac_status); } &&
6930 { ac_try='test -s conftest.$ac_objext'
6931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6932 (eval $ac_try) 2>&5
6933 ac_status=$?
6934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6935 (exit $ac_status); }; }; then
6936 ac_lo=$ac_mid; break
6937else
6938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006939sed 's/^/| /' conftest.$ac_ext >&5
6940
Martin v. Löwis11437992002-04-12 09:54:03 +00006941ac_hi=`expr '(' $ac_mid ')' - 1`
6942 if test $ac_mid -le $ac_hi; then
6943 ac_lo= ac_hi=
6944 break
6945 fi
6946 ac_mid=`expr 2 '*' $ac_mid`
6947fi
6948rm -f conftest.$ac_objext conftest.$ac_ext
6949 done
6950else
6951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006952sed 's/^/| /' conftest.$ac_ext >&5
6953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954ac_lo= ac_hi=
6955fi
6956rm -f conftest.$ac_objext conftest.$ac_ext
6957fi
6958rm -f conftest.$ac_objext conftest.$ac_ext
6959# Binary search between lo and hi bounds.
6960while test "x$ac_lo" != "x$ac_hi"; do
6961 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6962 cat >conftest.$ac_ext <<_ACEOF
6963#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006964/* confdefs.h. */
6965_ACEOF
6966cat confdefs.h >>conftest.$ac_ext
6967cat >>conftest.$ac_ext <<_ACEOF
6968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006969$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006970int
6971main ()
6972{
6973static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6974test_array [0] = 0
6975
6976 ;
6977 return 0;
6978}
6979_ACEOF
6980rm -f conftest.$ac_objext
6981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6982 (eval $ac_compile) 2>&5
6983 ac_status=$?
6984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985 (exit $ac_status); } &&
6986 { ac_try='test -s conftest.$ac_objext'
6987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6988 (eval $ac_try) 2>&5
6989 ac_status=$?
6990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991 (exit $ac_status); }; }; then
6992 ac_hi=$ac_mid
6993else
6994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006995sed 's/^/| /' conftest.$ac_ext >&5
6996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997ac_lo=`expr '(' $ac_mid ')' + 1`
6998fi
6999rm -f conftest.$ac_objext conftest.$ac_ext
7000done
7001case $ac_lo in
7002?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007003'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7004See \`config.log' for more details." >&5
7005echo "$as_me: error: cannot compute sizeof (short), 77
7006See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 { (exit 1); exit 1; }; } ;;
7008esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007009else
7010 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7012See \`config.log' for more details." >&5
7013echo "$as_me: error: cannot run test program while cross compiling
7014See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007016else
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 cat >conftest.$ac_ext <<_ACEOF
7018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007024$ac_includes_default
7025long longval () { return (long) (sizeof (short)); }
7026unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007027#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007028#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007029int
7030main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007031{
Martin v. Löwis11437992002-04-12 09:54:03 +00007032
7033 FILE *f = fopen ("conftest.val", "w");
7034 if (! f)
7035 exit (1);
7036 if (((long) (sizeof (short))) < 0)
7037 {
7038 long i = longval ();
7039 if (i != ((long) (sizeof (short))))
7040 exit (1);
7041 fprintf (f, "%ld\n", i);
7042 }
7043 else
7044 {
7045 unsigned long i = ulongval ();
7046 if (i != ((long) (sizeof (short))))
7047 exit (1);
7048 fprintf (f, "%lu\n", i);
7049 }
7050 exit (ferror (f) || fclose (f) != 0);
7051
7052 ;
7053 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007054}
Martin v. Löwis11437992002-04-12 09:54:03 +00007055_ACEOF
7056rm -f conftest$ac_exeext
7057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7058 (eval $ac_link) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7063 (eval $ac_try) 2>&5
7064 ac_status=$?
7065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7066 (exit $ac_status); }; }; then
7067 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007068else
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 echo "$as_me: program exited with status $ac_status" >&5
7070echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007071sed 's/^/| /' conftest.$ac_ext >&5
7072
Martin v. Löwis11437992002-04-12 09:54:03 +00007073( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007074{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7075See \`config.log' for more details." >&5
7076echo "$as_me: error: cannot compute sizeof (short), 77
7077See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 { (exit 1); exit 1; }; }
7079fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007080rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007081fi
7082fi
7083rm -f conftest.val
7084else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085 ac_cv_sizeof_short=0
7086fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007088echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7089echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7090cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007091#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007092_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093
7094
Martin v. Löwis11437992002-04-12 09:54:03 +00007095echo "$as_me:$LINENO: checking for float" >&5
7096echo $ECHO_N "checking for float... $ECHO_C" >&6
7097if test "${ac_cv_type_float+set}" = set; then
7098 echo $ECHO_N "(cached) $ECHO_C" >&6
7099else
7100 cat >conftest.$ac_ext <<_ACEOF
7101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007102/* confdefs.h. */
7103_ACEOF
7104cat confdefs.h >>conftest.$ac_ext
7105cat >>conftest.$ac_ext <<_ACEOF
7106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007107$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007108int
7109main ()
7110{
7111if ((float *) 0)
7112 return 0;
7113if (sizeof (float))
7114 return 0;
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119rm -f conftest.$ac_objext
7120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7121 (eval $ac_compile) 2>&5
7122 ac_status=$?
7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124 (exit $ac_status); } &&
7125 { ac_try='test -s conftest.$ac_objext'
7126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127 (eval $ac_try) 2>&5
7128 ac_status=$?
7129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130 (exit $ac_status); }; }; then
7131 ac_cv_type_float=yes
7132else
7133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
Martin v. Löwis11437992002-04-12 09:54:03 +00007136ac_cv_type_float=no
7137fi
7138rm -f conftest.$ac_objext conftest.$ac_ext
7139fi
7140echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7141echo "${ECHO_T}$ac_cv_type_float" >&6
7142
7143echo "$as_me:$LINENO: checking size of float" >&5
7144echo $ECHO_N "checking size of float... $ECHO_C" >&6
7145if test "${ac_cv_sizeof_float+set}" = set; then
7146 echo $ECHO_N "(cached) $ECHO_C" >&6
7147else
7148 if test "$ac_cv_type_float" = yes; then
7149 # The cast to unsigned long works around a bug in the HP C Compiler
7150 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7151 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7152 # This bug is HP SR number 8606223364.
7153 if test "$cross_compiling" = yes; then
7154 # Depending upon the size, compute the lo and hi bounds.
7155cat >conftest.$ac_ext <<_ACEOF
7156#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007157/* confdefs.h. */
7158_ACEOF
7159cat confdefs.h >>conftest.$ac_ext
7160cat >>conftest.$ac_ext <<_ACEOF
7161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007162$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007163int
7164main ()
7165{
7166static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7167test_array [0] = 0
7168
7169 ;
7170 return 0;
7171}
7172_ACEOF
7173rm -f conftest.$ac_objext
7174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7175 (eval $ac_compile) 2>&5
7176 ac_status=$?
7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178 (exit $ac_status); } &&
7179 { ac_try='test -s conftest.$ac_objext'
7180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7181 (eval $ac_try) 2>&5
7182 ac_status=$?
7183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184 (exit $ac_status); }; }; then
7185 ac_lo=0 ac_mid=0
7186 while :; do
7187 cat >conftest.$ac_ext <<_ACEOF
7188#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007189/* confdefs.h. */
7190_ACEOF
7191cat confdefs.h >>conftest.$ac_ext
7192cat >>conftest.$ac_ext <<_ACEOF
7193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007194$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007195int
7196main ()
7197{
7198static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7199test_array [0] = 0
7200
7201 ;
7202 return 0;
7203}
7204_ACEOF
7205rm -f conftest.$ac_objext
7206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7207 (eval $ac_compile) 2>&5
7208 ac_status=$?
7209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210 (exit $ac_status); } &&
7211 { ac_try='test -s conftest.$ac_objext'
7212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213 (eval $ac_try) 2>&5
7214 ac_status=$?
7215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216 (exit $ac_status); }; }; then
7217 ac_hi=$ac_mid; break
7218else
7219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007220sed 's/^/| /' conftest.$ac_ext >&5
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222ac_lo=`expr $ac_mid + 1`
7223 if test $ac_lo -le $ac_mid; then
7224 ac_lo= ac_hi=
7225 break
7226 fi
7227 ac_mid=`expr 2 '*' $ac_mid + 1`
7228fi
7229rm -f conftest.$ac_objext conftest.$ac_ext
7230 done
7231else
7232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007233sed 's/^/| /' conftest.$ac_ext >&5
7234
Martin v. Löwis11437992002-04-12 09:54:03 +00007235cat >conftest.$ac_ext <<_ACEOF
7236#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007237/* confdefs.h. */
7238_ACEOF
7239cat confdefs.h >>conftest.$ac_ext
7240cat >>conftest.$ac_ext <<_ACEOF
7241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007242$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007243int
7244main ()
7245{
7246static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7247test_array [0] = 0
7248
7249 ;
7250 return 0;
7251}
7252_ACEOF
7253rm -f conftest.$ac_objext
7254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7255 (eval $ac_compile) 2>&5
7256 ac_status=$?
7257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); } &&
7259 { ac_try='test -s conftest.$ac_objext'
7260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7261 (eval $ac_try) 2>&5
7262 ac_status=$?
7263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264 (exit $ac_status); }; }; then
7265 ac_hi=-1 ac_mid=-1
7266 while :; do
7267 cat >conftest.$ac_ext <<_ACEOF
7268#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007269/* confdefs.h. */
7270_ACEOF
7271cat confdefs.h >>conftest.$ac_ext
7272cat >>conftest.$ac_ext <<_ACEOF
7273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007274$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007275int
7276main ()
7277{
7278static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7279test_array [0] = 0
7280
7281 ;
7282 return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext
7286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7287 (eval $ac_compile) 2>&5
7288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } &&
7291 { ac_try='test -s conftest.$ac_objext'
7292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7293 (eval $ac_try) 2>&5
7294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_lo=$ac_mid; break
7298else
7299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007300sed 's/^/| /' conftest.$ac_ext >&5
7301
Martin v. Löwis11437992002-04-12 09:54:03 +00007302ac_hi=`expr '(' $ac_mid ')' - 1`
7303 if test $ac_mid -le $ac_hi; then
7304 ac_lo= ac_hi=
7305 break
7306 fi
7307 ac_mid=`expr 2 '*' $ac_mid`
7308fi
7309rm -f conftest.$ac_objext conftest.$ac_ext
7310 done
7311else
7312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007313sed 's/^/| /' conftest.$ac_ext >&5
7314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315ac_lo= ac_hi=
7316fi
7317rm -f conftest.$ac_objext conftest.$ac_ext
7318fi
7319rm -f conftest.$ac_objext conftest.$ac_ext
7320# Binary search between lo and hi bounds.
7321while test "x$ac_lo" != "x$ac_hi"; do
7322 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7323 cat >conftest.$ac_ext <<_ACEOF
7324#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007325/* confdefs.h. */
7326_ACEOF
7327cat confdefs.h >>conftest.$ac_ext
7328cat >>conftest.$ac_ext <<_ACEOF
7329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007330$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007331int
7332main ()
7333{
7334static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7335test_array [0] = 0
7336
7337 ;
7338 return 0;
7339}
7340_ACEOF
7341rm -f conftest.$ac_objext
7342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7343 (eval $ac_compile) 2>&5
7344 ac_status=$?
7345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7346 (exit $ac_status); } &&
7347 { ac_try='test -s conftest.$ac_objext'
7348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7349 (eval $ac_try) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); }; }; then
7353 ac_hi=$ac_mid
7354else
7355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007356sed 's/^/| /' conftest.$ac_ext >&5
7357
Martin v. Löwis11437992002-04-12 09:54:03 +00007358ac_lo=`expr '(' $ac_mid ')' + 1`
7359fi
7360rm -f conftest.$ac_objext conftest.$ac_ext
7361done
7362case $ac_lo in
7363?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007364'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7365See \`config.log' for more details." >&5
7366echo "$as_me: error: cannot compute sizeof (float), 77
7367See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 { (exit 1); exit 1; }; } ;;
7369esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007370else
7371 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007372 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7373See \`config.log' for more details." >&5
7374echo "$as_me: error: cannot run test program while cross compiling
7375See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007377else
Martin v. Löwis11437992002-04-12 09:54:03 +00007378 cat >conftest.$ac_ext <<_ACEOF
7379#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007380/* confdefs.h. */
7381_ACEOF
7382cat confdefs.h >>conftest.$ac_ext
7383cat >>conftest.$ac_ext <<_ACEOF
7384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007385$ac_includes_default
7386long longval () { return (long) (sizeof (float)); }
7387unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007388#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007389#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007390int
7391main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007392{
Martin v. Löwis11437992002-04-12 09:54:03 +00007393
7394 FILE *f = fopen ("conftest.val", "w");
7395 if (! f)
7396 exit (1);
7397 if (((long) (sizeof (float))) < 0)
7398 {
7399 long i = longval ();
7400 if (i != ((long) (sizeof (float))))
7401 exit (1);
7402 fprintf (f, "%ld\n", i);
7403 }
7404 else
7405 {
7406 unsigned long i = ulongval ();
7407 if (i != ((long) (sizeof (float))))
7408 exit (1);
7409 fprintf (f, "%lu\n", i);
7410 }
7411 exit (ferror (f) || fclose (f) != 0);
7412
7413 ;
7414 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007415}
Martin v. Löwis11437992002-04-12 09:54:03 +00007416_ACEOF
7417rm -f conftest$ac_exeext
7418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7419 (eval $ac_link) 2>&5
7420 ac_status=$?
7421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7424 (eval $ac_try) 2>&5
7425 ac_status=$?
7426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7427 (exit $ac_status); }; }; then
7428 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007429else
Martin v. Löwis11437992002-04-12 09:54:03 +00007430 echo "$as_me: program exited with status $ac_status" >&5
7431echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
Martin v. Löwis11437992002-04-12 09:54:03 +00007434( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007435{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7436See \`config.log' for more details." >&5
7437echo "$as_me: error: cannot compute sizeof (float), 77
7438See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 { (exit 1); exit 1; }; }
7440fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007441rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007442fi
7443fi
7444rm -f conftest.val
7445else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446 ac_cv_sizeof_float=0
7447fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007448fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007449echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7450echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7451cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007452#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007453_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007454
7455
Martin v. Löwis11437992002-04-12 09:54:03 +00007456echo "$as_me:$LINENO: checking for double" >&5
7457echo $ECHO_N "checking for double... $ECHO_C" >&6
7458if test "${ac_cv_type_double+set}" = set; then
7459 echo $ECHO_N "(cached) $ECHO_C" >&6
7460else
7461 cat >conftest.$ac_ext <<_ACEOF
7462#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007463/* confdefs.h. */
7464_ACEOF
7465cat confdefs.h >>conftest.$ac_ext
7466cat >>conftest.$ac_ext <<_ACEOF
7467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007468$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007469int
7470main ()
7471{
7472if ((double *) 0)
7473 return 0;
7474if (sizeof (double))
7475 return 0;
7476 ;
7477 return 0;
7478}
7479_ACEOF
7480rm -f conftest.$ac_objext
7481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7482 (eval $ac_compile) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); } &&
7486 { ac_try='test -s conftest.$ac_objext'
7487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7488 (eval $ac_try) 2>&5
7489 ac_status=$?
7490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7491 (exit $ac_status); }; }; then
7492 ac_cv_type_double=yes
7493else
7494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007495sed 's/^/| /' conftest.$ac_ext >&5
7496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497ac_cv_type_double=no
7498fi
7499rm -f conftest.$ac_objext conftest.$ac_ext
7500fi
7501echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7502echo "${ECHO_T}$ac_cv_type_double" >&6
7503
7504echo "$as_me:$LINENO: checking size of double" >&5
7505echo $ECHO_N "checking size of double... $ECHO_C" >&6
7506if test "${ac_cv_sizeof_double+set}" = set; then
7507 echo $ECHO_N "(cached) $ECHO_C" >&6
7508else
7509 if test "$ac_cv_type_double" = yes; then
7510 # The cast to unsigned long works around a bug in the HP C Compiler
7511 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7512 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7513 # This bug is HP SR number 8606223364.
7514 if test "$cross_compiling" = yes; then
7515 # Depending upon the size, compute the lo and hi bounds.
7516cat >conftest.$ac_ext <<_ACEOF
7517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* confdefs.h. */
7519_ACEOF
7520cat confdefs.h >>conftest.$ac_ext
7521cat >>conftest.$ac_ext <<_ACEOF
7522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007523$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
7527static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
7535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7536 (eval $ac_compile) 2>&5
7537 ac_status=$?
7538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539 (exit $ac_status); } &&
7540 { ac_try='test -s conftest.$ac_objext'
7541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7542 (eval $ac_try) 2>&5
7543 ac_status=$?
7544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545 (exit $ac_status); }; }; then
7546 ac_lo=0 ac_mid=0
7547 while :; do
7548 cat >conftest.$ac_ext <<_ACEOF
7549#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007550/* confdefs.h. */
7551_ACEOF
7552cat confdefs.h >>conftest.$ac_ext
7553cat >>conftest.$ac_ext <<_ACEOF
7554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007555$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007556int
7557main ()
7558{
7559static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7560test_array [0] = 0
7561
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
7567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7568 (eval $ac_compile) 2>&5
7569 ac_status=$?
7570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7571 (exit $ac_status); } &&
7572 { ac_try='test -s conftest.$ac_objext'
7573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7574 (eval $ac_try) 2>&5
7575 ac_status=$?
7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577 (exit $ac_status); }; }; then
7578 ac_hi=$ac_mid; break
7579else
7580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007581sed 's/^/| /' conftest.$ac_ext >&5
7582
Martin v. Löwis11437992002-04-12 09:54:03 +00007583ac_lo=`expr $ac_mid + 1`
7584 if test $ac_lo -le $ac_mid; then
7585 ac_lo= ac_hi=
7586 break
7587 fi
7588 ac_mid=`expr 2 '*' $ac_mid + 1`
7589fi
7590rm -f conftest.$ac_objext conftest.$ac_ext
7591 done
7592else
7593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007594sed 's/^/| /' conftest.$ac_ext >&5
7595
Martin v. Löwis11437992002-04-12 09:54:03 +00007596cat >conftest.$ac_ext <<_ACEOF
7597#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007598/* confdefs.h. */
7599_ACEOF
7600cat confdefs.h >>conftest.$ac_ext
7601cat >>conftest.$ac_ext <<_ACEOF
7602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007603$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007604int
7605main ()
7606{
7607static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7608test_array [0] = 0
7609
7610 ;
7611 return 0;
7612}
7613_ACEOF
7614rm -f conftest.$ac_objext
7615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7616 (eval $ac_compile) 2>&5
7617 ac_status=$?
7618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7619 (exit $ac_status); } &&
7620 { ac_try='test -s conftest.$ac_objext'
7621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7622 (eval $ac_try) 2>&5
7623 ac_status=$?
7624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625 (exit $ac_status); }; }; then
7626 ac_hi=-1 ac_mid=-1
7627 while :; do
7628 cat >conftest.$ac_ext <<_ACEOF
7629#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007636int
7637main ()
7638{
7639static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7640test_array [0] = 0
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext
7647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7648 (eval $ac_compile) 2>&5
7649 ac_status=$?
7650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651 (exit $ac_status); } &&
7652 { ac_try='test -s conftest.$ac_objext'
7653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7654 (eval $ac_try) 2>&5
7655 ac_status=$?
7656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7657 (exit $ac_status); }; }; then
7658 ac_lo=$ac_mid; break
7659else
7660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007661sed 's/^/| /' conftest.$ac_ext >&5
7662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663ac_hi=`expr '(' $ac_mid ')' - 1`
7664 if test $ac_mid -le $ac_hi; then
7665 ac_lo= ac_hi=
7666 break
7667 fi
7668 ac_mid=`expr 2 '*' $ac_mid`
7669fi
7670rm -f conftest.$ac_objext conftest.$ac_ext
7671 done
7672else
7673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007674sed 's/^/| /' conftest.$ac_ext >&5
7675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676ac_lo= ac_hi=
7677fi
7678rm -f conftest.$ac_objext conftest.$ac_ext
7679fi
7680rm -f conftest.$ac_objext conftest.$ac_ext
7681# Binary search between lo and hi bounds.
7682while test "x$ac_lo" != "x$ac_hi"; do
7683 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7684 cat >conftest.$ac_ext <<_ACEOF
7685#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007692int
7693main ()
7694{
7695static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
7703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7704 (eval $ac_compile) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); } &&
7708 { ac_try='test -s conftest.$ac_objext'
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; }; then
7714 ac_hi=$ac_mid
7715else
7716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007717sed 's/^/| /' conftest.$ac_ext >&5
7718
Martin v. Löwis11437992002-04-12 09:54:03 +00007719ac_lo=`expr '(' $ac_mid ')' + 1`
7720fi
7721rm -f conftest.$ac_objext conftest.$ac_ext
7722done
7723case $ac_lo in
7724?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007725'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7726See \`config.log' for more details." >&5
7727echo "$as_me: error: cannot compute sizeof (double), 77
7728See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 { (exit 1); exit 1; }; } ;;
7730esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007731else
7732 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007733 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7734See \`config.log' for more details." >&5
7735echo "$as_me: error: cannot run test program while cross compiling
7736See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007738else
Martin v. Löwis11437992002-04-12 09:54:03 +00007739 cat >conftest.$ac_ext <<_ACEOF
7740#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746$ac_includes_default
7747long longval () { return (long) (sizeof (double)); }
7748unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007749#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007750#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007751int
7752main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007753{
Martin v. Löwis11437992002-04-12 09:54:03 +00007754
7755 FILE *f = fopen ("conftest.val", "w");
7756 if (! f)
7757 exit (1);
7758 if (((long) (sizeof (double))) < 0)
7759 {
7760 long i = longval ();
7761 if (i != ((long) (sizeof (double))))
7762 exit (1);
7763 fprintf (f, "%ld\n", i);
7764 }
7765 else
7766 {
7767 unsigned long i = ulongval ();
7768 if (i != ((long) (sizeof (double))))
7769 exit (1);
7770 fprintf (f, "%lu\n", i);
7771 }
7772 exit (ferror (f) || fclose (f) != 0);
7773
7774 ;
7775 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007776}
Martin v. Löwis11437992002-04-12 09:54:03 +00007777_ACEOF
7778rm -f conftest$ac_exeext
7779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7780 (eval $ac_link) 2>&5
7781 ac_status=$?
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7785 (eval $ac_try) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); }; }; then
7789 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007790else
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 echo "$as_me: program exited with status $ac_status" >&5
7792echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007793sed 's/^/| /' conftest.$ac_ext >&5
7794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007796{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7797See \`config.log' for more details." >&5
7798echo "$as_me: error: cannot compute sizeof (double), 77
7799See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 { (exit 1); exit 1; }; }
7801fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007802rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
7804fi
7805rm -f conftest.val
7806else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807 ac_cv_sizeof_double=0
7808fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007810echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7811echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7812cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007814_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007815
7816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817echo "$as_me:$LINENO: checking for fpos_t" >&5
7818echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7819if test "${ac_cv_type_fpos_t+set}" = set; then
7820 echo $ECHO_N "(cached) $ECHO_C" >&6
7821else
7822 cat >conftest.$ac_ext <<_ACEOF
7823#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* confdefs.h. */
7825_ACEOF
7826cat confdefs.h >>conftest.$ac_ext
7827cat >>conftest.$ac_ext <<_ACEOF
7828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007829$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007830int
7831main ()
7832{
7833if ((fpos_t *) 0)
7834 return 0;
7835if (sizeof (fpos_t))
7836 return 0;
7837 ;
7838 return 0;
7839}
7840_ACEOF
7841rm -f conftest.$ac_objext
7842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7843 (eval $ac_compile) 2>&5
7844 ac_status=$?
7845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7846 (exit $ac_status); } &&
7847 { ac_try='test -s conftest.$ac_objext'
7848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7849 (eval $ac_try) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 ac_cv_type_fpos_t=yes
7854else
7855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007856sed 's/^/| /' conftest.$ac_ext >&5
7857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858ac_cv_type_fpos_t=no
7859fi
7860rm -f conftest.$ac_objext conftest.$ac_ext
7861fi
7862echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7863echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7864
7865echo "$as_me:$LINENO: checking size of fpos_t" >&5
7866echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7867if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7868 echo $ECHO_N "(cached) $ECHO_C" >&6
7869else
7870 if test "$ac_cv_type_fpos_t" = yes; then
7871 # The cast to unsigned long works around a bug in the HP C Compiler
7872 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7873 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7874 # This bug is HP SR number 8606223364.
7875 if test "$cross_compiling" = yes; then
7876 # Depending upon the size, compute the lo and hi bounds.
7877cat >conftest.$ac_ext <<_ACEOF
7878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* confdefs.h. */
7880_ACEOF
7881cat confdefs.h >>conftest.$ac_ext
7882cat >>conftest.$ac_ext <<_ACEOF
7883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007884$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
7888static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7889test_array [0] = 0
7890
7891 ;
7892 return 0;
7893}
7894_ACEOF
7895rm -f conftest.$ac_objext
7896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7897 (eval $ac_compile) 2>&5
7898 ac_status=$?
7899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7900 (exit $ac_status); } &&
7901 { ac_try='test -s conftest.$ac_objext'
7902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7903 (eval $ac_try) 2>&5
7904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
7907 ac_lo=0 ac_mid=0
7908 while :; do
7909 cat >conftest.$ac_ext <<_ACEOF
7910#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007911/* confdefs.h. */
7912_ACEOF
7913cat confdefs.h >>conftest.$ac_ext
7914cat >>conftest.$ac_ext <<_ACEOF
7915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
7920static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7921test_array [0] = 0
7922
7923 ;
7924 return 0;
7925}
7926_ACEOF
7927rm -f conftest.$ac_objext
7928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7929 (eval $ac_compile) 2>&5
7930 ac_status=$?
7931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932 (exit $ac_status); } &&
7933 { ac_try='test -s conftest.$ac_objext'
7934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935 (eval $ac_try) 2>&5
7936 ac_status=$?
7937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938 (exit $ac_status); }; }; then
7939 ac_hi=$ac_mid; break
7940else
7941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007942sed 's/^/| /' conftest.$ac_ext >&5
7943
Martin v. Löwis11437992002-04-12 09:54:03 +00007944ac_lo=`expr $ac_mid + 1`
7945 if test $ac_lo -le $ac_mid; then
7946 ac_lo= ac_hi=
7947 break
7948 fi
7949 ac_mid=`expr 2 '*' $ac_mid + 1`
7950fi
7951rm -f conftest.$ac_objext conftest.$ac_ext
7952 done
7953else
7954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007955sed 's/^/| /' conftest.$ac_ext >&5
7956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957cat >conftest.$ac_ext <<_ACEOF
7958#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
7967{
7968static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7969test_array [0] = 0
7970
7971 ;
7972 return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext
7976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7977 (eval $ac_compile) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); } &&
7981 { ac_try='test -s conftest.$ac_objext'
7982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7983 (eval $ac_try) 2>&5
7984 ac_status=$?
7985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986 (exit $ac_status); }; }; then
7987 ac_hi=-1 ac_mid=-1
7988 while :; do
7989 cat >conftest.$ac_ext <<_ACEOF
7990#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
8000static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8001test_array [0] = 0
8002
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
8008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8009 (eval $ac_compile) 2>&5
8010 ac_status=$?
8011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8012 (exit $ac_status); } &&
8013 { ac_try='test -s conftest.$ac_objext'
8014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8015 (eval $ac_try) 2>&5
8016 ac_status=$?
8017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8018 (exit $ac_status); }; }; then
8019 ac_lo=$ac_mid; break
8020else
8021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008022sed 's/^/| /' conftest.$ac_ext >&5
8023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024ac_hi=`expr '(' $ac_mid ')' - 1`
8025 if test $ac_mid -le $ac_hi; then
8026 ac_lo= ac_hi=
8027 break
8028 fi
8029 ac_mid=`expr 2 '*' $ac_mid`
8030fi
8031rm -f conftest.$ac_objext conftest.$ac_ext
8032 done
8033else
8034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008035sed 's/^/| /' conftest.$ac_ext >&5
8036
Martin v. Löwis11437992002-04-12 09:54:03 +00008037ac_lo= ac_hi=
8038fi
8039rm -f conftest.$ac_objext conftest.$ac_ext
8040fi
8041rm -f conftest.$ac_objext conftest.$ac_ext
8042# Binary search between lo and hi bounds.
8043while test "x$ac_lo" != "x$ac_hi"; do
8044 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8045 cat >conftest.$ac_ext <<_ACEOF
8046#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008047/* confdefs.h. */
8048_ACEOF
8049cat confdefs.h >>conftest.$ac_ext
8050cat >>conftest.$ac_ext <<_ACEOF
8051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008052$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008053int
8054main ()
8055{
8056static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8057test_array [0] = 0
8058
8059 ;
8060 return 0;
8061}
8062_ACEOF
8063rm -f conftest.$ac_objext
8064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8065 (eval $ac_compile) 2>&5
8066 ac_status=$?
8067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); } &&
8069 { ac_try='test -s conftest.$ac_objext'
8070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8071 (eval $ac_try) 2>&5
8072 ac_status=$?
8073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8074 (exit $ac_status); }; }; then
8075 ac_hi=$ac_mid
8076else
8077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008078sed 's/^/| /' conftest.$ac_ext >&5
8079
Martin v. Löwis11437992002-04-12 09:54:03 +00008080ac_lo=`expr '(' $ac_mid ')' + 1`
8081fi
8082rm -f conftest.$ac_objext conftest.$ac_ext
8083done
8084case $ac_lo in
8085?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008086'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8087See \`config.log' for more details." >&5
8088echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8089See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 { (exit 1); exit 1; }; } ;;
8091esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008092else
8093 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008094 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8095See \`config.log' for more details." >&5
8096echo "$as_me: error: cannot run test program while cross compiling
8097See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008099else
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 cat >conftest.$ac_ext <<_ACEOF
8101#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* confdefs.h. */
8103_ACEOF
8104cat confdefs.h >>conftest.$ac_ext
8105cat >>conftest.$ac_ext <<_ACEOF
8106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107$ac_includes_default
8108long longval () { return (long) (sizeof (fpos_t)); }
8109unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008110#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008111#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008112int
8113main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008114{
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
8116 FILE *f = fopen ("conftest.val", "w");
8117 if (! f)
8118 exit (1);
8119 if (((long) (sizeof (fpos_t))) < 0)
8120 {
8121 long i = longval ();
8122 if (i != ((long) (sizeof (fpos_t))))
8123 exit (1);
8124 fprintf (f, "%ld\n", i);
8125 }
8126 else
8127 {
8128 unsigned long i = ulongval ();
8129 if (i != ((long) (sizeof (fpos_t))))
8130 exit (1);
8131 fprintf (f, "%lu\n", i);
8132 }
8133 exit (ferror (f) || fclose (f) != 0);
8134
8135 ;
8136 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008137}
Martin v. Löwis11437992002-04-12 09:54:03 +00008138_ACEOF
8139rm -f conftest$ac_exeext
8140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8141 (eval $ac_link) 2>&5
8142 ac_status=$?
8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146 (eval $ac_try) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); }; }; then
8150 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008151else
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 echo "$as_me: program exited with status $ac_status" >&5
8153echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008154sed 's/^/| /' conftest.$ac_ext >&5
8155
Martin v. Löwis11437992002-04-12 09:54:03 +00008156( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008157{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8158See \`config.log' for more details." >&5
8159echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8160See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 { (exit 1); exit 1; }; }
8162fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008163rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008164fi
8165fi
8166rm -f conftest.val
8167else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168 ac_cv_sizeof_fpos_t=0
8169fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008171echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8172echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8173cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008175_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008176
Michael W. Hudson54241132001-12-07 15:38:26 +00008177
8178
Martin v. Löwis11437992002-04-12 09:54:03 +00008179echo "$as_me:$LINENO: checking for long long support" >&5
8180echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008182cat >conftest.$ac_ext <<_ACEOF
8183#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008184/* confdefs.h. */
8185_ACEOF
8186cat confdefs.h >>conftest.$ac_ext
8187cat >>conftest.$ac_ext <<_ACEOF
8188/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008189
Martin v. Löwis11437992002-04-12 09:54:03 +00008190int
8191main ()
8192{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008193long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 ;
8195 return 0;
8196}
8197_ACEOF
8198rm -f conftest.$ac_objext
8199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8200 (eval $ac_compile) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); } &&
8204 { ac_try='test -s conftest.$ac_objext'
8205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8206 (eval $ac_try) 2>&5
8207 ac_status=$?
8208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8209 (exit $ac_status); }; }; then
8210
8211
8212cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008213#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008214_ACEOF
8215
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008216 have_long_long=yes
8217
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008218else
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008220sed 's/^/| /' conftest.$ac_ext >&5
8221
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008223rm -f conftest.$ac_objext conftest.$ac_ext
8224echo "$as_me:$LINENO: result: $have_long_long" >&5
8225echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008226if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008227echo "$as_me:$LINENO: checking for long long" >&5
8228echo $ECHO_N "checking for long long... $ECHO_C" >&6
8229if test "${ac_cv_type_long_long+set}" = set; then
8230 echo $ECHO_N "(cached) $ECHO_C" >&6
8231else
8232 cat >conftest.$ac_ext <<_ACEOF
8233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* confdefs.h. */
8235_ACEOF
8236cat confdefs.h >>conftest.$ac_ext
8237cat >>conftest.$ac_ext <<_ACEOF
8238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008240int
8241main ()
8242{
8243if ((long long *) 0)
8244 return 0;
8245if (sizeof (long long))
8246 return 0;
8247 ;
8248 return 0;
8249}
8250_ACEOF
8251rm -f conftest.$ac_objext
8252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8253 (eval $ac_compile) 2>&5
8254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); } &&
8257 { ac_try='test -s conftest.$ac_objext'
8258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8259 (eval $ac_try) 2>&5
8260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263 ac_cv_type_long_long=yes
8264else
8265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008266sed 's/^/| /' conftest.$ac_ext >&5
8267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268ac_cv_type_long_long=no
8269fi
8270rm -f conftest.$ac_objext conftest.$ac_ext
8271fi
8272echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8273echo "${ECHO_T}$ac_cv_type_long_long" >&6
8274
8275echo "$as_me:$LINENO: checking size of long long" >&5
8276echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8277if test "${ac_cv_sizeof_long_long+set}" = set; then
8278 echo $ECHO_N "(cached) $ECHO_C" >&6
8279else
8280 if test "$ac_cv_type_long_long" = yes; then
8281 # The cast to unsigned long works around a bug in the HP C Compiler
8282 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8283 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8284 # This bug is HP SR number 8606223364.
8285 if test "$cross_compiling" = yes; then
8286 # Depending upon the size, compute the lo and hi bounds.
8287cat >conftest.$ac_ext <<_ACEOF
8288#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008289/* confdefs.h. */
8290_ACEOF
8291cat confdefs.h >>conftest.$ac_ext
8292cat >>conftest.$ac_ext <<_ACEOF
8293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008294$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008295int
8296main ()
8297{
8298static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8299test_array [0] = 0
8300
8301 ;
8302 return 0;
8303}
8304_ACEOF
8305rm -f conftest.$ac_objext
8306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8307 (eval $ac_compile) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); } &&
8311 { ac_try='test -s conftest.$ac_objext'
8312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); }; }; then
8317 ac_lo=0 ac_mid=0
8318 while :; do
8319 cat >conftest.$ac_ext <<_ACEOF
8320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008321/* confdefs.h. */
8322_ACEOF
8323cat confdefs.h >>conftest.$ac_ext
8324cat >>conftest.$ac_ext <<_ACEOF
8325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008326$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008327int
8328main ()
8329{
8330static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8331test_array [0] = 0
8332
8333 ;
8334 return 0;
8335}
8336_ACEOF
8337rm -f conftest.$ac_objext
8338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8339 (eval $ac_compile) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } &&
8343 { ac_try='test -s conftest.$ac_objext'
8344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8345 (eval $ac_try) 2>&5
8346 ac_status=$?
8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348 (exit $ac_status); }; }; then
8349 ac_hi=$ac_mid; break
8350else
8351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008352sed 's/^/| /' conftest.$ac_ext >&5
8353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354ac_lo=`expr $ac_mid + 1`
8355 if test $ac_lo -le $ac_mid; then
8356 ac_lo= ac_hi=
8357 break
8358 fi
8359 ac_mid=`expr 2 '*' $ac_mid + 1`
8360fi
8361rm -f conftest.$ac_objext conftest.$ac_ext
8362 done
8363else
8364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008365sed 's/^/| /' conftest.$ac_ext >&5
8366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367cat >conftest.$ac_ext <<_ACEOF
8368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008369/* confdefs.h. */
8370_ACEOF
8371cat confdefs.h >>conftest.$ac_ext
8372cat >>conftest.$ac_ext <<_ACEOF
8373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008374$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008375int
8376main ()
8377{
8378static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8379test_array [0] = 0
8380
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385rm -f conftest.$ac_objext
8386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8387 (eval $ac_compile) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); } &&
8391 { ac_try='test -s conftest.$ac_objext'
8392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); }; }; then
8397 ac_hi=-1 ac_mid=-1
8398 while :; do
8399 cat >conftest.$ac_ext <<_ACEOF
8400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008401/* confdefs.h. */
8402_ACEOF
8403cat confdefs.h >>conftest.$ac_ext
8404cat >>conftest.$ac_ext <<_ACEOF
8405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008406$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008407int
8408main ()
8409{
8410static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8411test_array [0] = 0
8412
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
8418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8419 (eval $ac_compile) 2>&5
8420 ac_status=$?
8421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8422 (exit $ac_status); } &&
8423 { ac_try='test -s conftest.$ac_objext'
8424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8425 (eval $ac_try) 2>&5
8426 ac_status=$?
8427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8428 (exit $ac_status); }; }; then
8429 ac_lo=$ac_mid; break
8430else
8431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008432sed 's/^/| /' conftest.$ac_ext >&5
8433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434ac_hi=`expr '(' $ac_mid ')' - 1`
8435 if test $ac_mid -le $ac_hi; then
8436 ac_lo= ac_hi=
8437 break
8438 fi
8439 ac_mid=`expr 2 '*' $ac_mid`
8440fi
8441rm -f conftest.$ac_objext conftest.$ac_ext
8442 done
8443else
8444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008445sed 's/^/| /' conftest.$ac_ext >&5
8446
Martin v. Löwis11437992002-04-12 09:54:03 +00008447ac_lo= ac_hi=
8448fi
8449rm -f conftest.$ac_objext conftest.$ac_ext
8450fi
8451rm -f conftest.$ac_objext conftest.$ac_ext
8452# Binary search between lo and hi bounds.
8453while test "x$ac_lo" != "x$ac_hi"; do
8454 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8455 cat >conftest.$ac_ext <<_ACEOF
8456#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
8466static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8467test_array [0] = 0
8468
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
8474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8475 (eval $ac_compile) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); } &&
8479 { ac_try='test -s conftest.$ac_objext'
8480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8481 (eval $ac_try) 2>&5
8482 ac_status=$?
8483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484 (exit $ac_status); }; }; then
8485 ac_hi=$ac_mid
8486else
8487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008488sed 's/^/| /' conftest.$ac_ext >&5
8489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490ac_lo=`expr '(' $ac_mid ')' + 1`
8491fi
8492rm -f conftest.$ac_objext conftest.$ac_ext
8493done
8494case $ac_lo in
8495?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008496'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8497See \`config.log' for more details." >&5
8498echo "$as_me: error: cannot compute sizeof (long long), 77
8499See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 { (exit 1); exit 1; }; } ;;
8501esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008502else
8503 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008504 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8505See \`config.log' for more details." >&5
8506echo "$as_me: error: cannot run test program while cross compiling
8507See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008509else
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 cat >conftest.$ac_ext <<_ACEOF
8511#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* confdefs.h. */
8513_ACEOF
8514cat confdefs.h >>conftest.$ac_ext
8515cat >>conftest.$ac_ext <<_ACEOF
8516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517$ac_includes_default
8518long longval () { return (long) (sizeof (long long)); }
8519unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008520#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008521#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008522int
8523main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008524{
Martin v. Löwis11437992002-04-12 09:54:03 +00008525
8526 FILE *f = fopen ("conftest.val", "w");
8527 if (! f)
8528 exit (1);
8529 if (((long) (sizeof (long long))) < 0)
8530 {
8531 long i = longval ();
8532 if (i != ((long) (sizeof (long long))))
8533 exit (1);
8534 fprintf (f, "%ld\n", i);
8535 }
8536 else
8537 {
8538 unsigned long i = ulongval ();
8539 if (i != ((long) (sizeof (long long))))
8540 exit (1);
8541 fprintf (f, "%lu\n", i);
8542 }
8543 exit (ferror (f) || fclose (f) != 0);
8544
8545 ;
8546 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008547}
Martin v. Löwis11437992002-04-12 09:54:03 +00008548_ACEOF
8549rm -f conftest$ac_exeext
8550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8551 (eval $ac_link) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8556 (eval $ac_try) 2>&5
8557 ac_status=$?
8558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8559 (exit $ac_status); }; }; then
8560 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008561else
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 echo "$as_me: program exited with status $ac_status" >&5
8563echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008564sed 's/^/| /' conftest.$ac_ext >&5
8565
Martin v. Löwis11437992002-04-12 09:54:03 +00008566( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008567{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8568See \`config.log' for more details." >&5
8569echo "$as_me: error: cannot compute sizeof (long long), 77
8570See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 { (exit 1); exit 1; }; }
8572fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008573rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
8575fi
8576rm -f conftest.val
8577else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578 ac_cv_sizeof_long_long=0
8579fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008581echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8582echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8583cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008584#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008585_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586
Michael W. Hudson54241132001-12-07 15:38:26 +00008587
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008588fi
8589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8591echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008592have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008593cat >conftest.$ac_ext <<_ACEOF
8594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
8603{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008604uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
8610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8611 (eval $ac_compile) 2>&5
8612 ac_status=$?
8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614 (exit $ac_status); } &&
8615 { ac_try='test -s conftest.$ac_objext'
8616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8617 (eval $ac_try) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); }; }; then
8621
8622
8623cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008624#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008625_ACEOF
8626
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008627 have_uintptr_t=yes
8628
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008631sed 's/^/| /' conftest.$ac_ext >&5
8632
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008633fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008634rm -f conftest.$ac_objext conftest.$ac_ext
8635echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8636echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008637if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008638echo "$as_me:$LINENO: checking for uintptr_t" >&5
8639echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8640if test "${ac_cv_type_uintptr_t+set}" = set; then
8641 echo $ECHO_N "(cached) $ECHO_C" >&6
8642else
8643 cat >conftest.$ac_ext <<_ACEOF
8644#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008645/* confdefs.h. */
8646_ACEOF
8647cat confdefs.h >>conftest.$ac_ext
8648cat >>conftest.$ac_ext <<_ACEOF
8649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008650$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008651int
8652main ()
8653{
8654if ((uintptr_t *) 0)
8655 return 0;
8656if (sizeof (uintptr_t))
8657 return 0;
8658 ;
8659 return 0;
8660}
8661_ACEOF
8662rm -f conftest.$ac_objext
8663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8664 (eval $ac_compile) 2>&5
8665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); } &&
8668 { ac_try='test -s conftest.$ac_objext'
8669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8670 (eval $ac_try) 2>&5
8671 ac_status=$?
8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); }; }; then
8674 ac_cv_type_uintptr_t=yes
8675else
8676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008677sed 's/^/| /' conftest.$ac_ext >&5
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679ac_cv_type_uintptr_t=no
8680fi
8681rm -f conftest.$ac_objext conftest.$ac_ext
8682fi
8683echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8684echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8685
8686echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8687echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8688if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8689 echo $ECHO_N "(cached) $ECHO_C" >&6
8690else
8691 if test "$ac_cv_type_uintptr_t" = yes; then
8692 # The cast to unsigned long works around a bug in the HP C Compiler
8693 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8694 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8695 # This bug is HP SR number 8606223364.
8696 if test "$cross_compiling" = yes; then
8697 # Depending upon the size, compute the lo and hi bounds.
8698cat >conftest.$ac_ext <<_ACEOF
8699#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008700/* confdefs.h. */
8701_ACEOF
8702cat confdefs.h >>conftest.$ac_ext
8703cat >>conftest.$ac_ext <<_ACEOF
8704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008705$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
8709static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8710test_array [0] = 0
8711
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
8717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8718 (eval $ac_compile) 2>&5
8719 ac_status=$?
8720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8721 (exit $ac_status); } &&
8722 { ac_try='test -s conftest.$ac_objext'
8723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8724 (eval $ac_try) 2>&5
8725 ac_status=$?
8726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727 (exit $ac_status); }; }; then
8728 ac_lo=0 ac_mid=0
8729 while :; do
8730 cat >conftest.$ac_ext <<_ACEOF
8731#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
8741static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8742test_array [0] = 0
8743
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext
8749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8750 (eval $ac_compile) 2>&5
8751 ac_status=$?
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); } &&
8754 { ac_try='test -s conftest.$ac_objext'
8755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8756 (eval $ac_try) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); }; }; then
8760 ac_hi=$ac_mid; break
8761else
8762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008763sed 's/^/| /' conftest.$ac_ext >&5
8764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765ac_lo=`expr $ac_mid + 1`
8766 if test $ac_lo -le $ac_mid; then
8767 ac_lo= ac_hi=
8768 break
8769 fi
8770 ac_mid=`expr 2 '*' $ac_mid + 1`
8771fi
8772rm -f conftest.$ac_objext conftest.$ac_ext
8773 done
8774else
8775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008776sed 's/^/| /' conftest.$ac_ext >&5
8777
Martin v. Löwis11437992002-04-12 09:54:03 +00008778cat >conftest.$ac_ext <<_ACEOF
8779#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* confdefs.h. */
8781_ACEOF
8782cat confdefs.h >>conftest.$ac_ext
8783cat >>conftest.$ac_ext <<_ACEOF
8784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008786int
8787main ()
8788{
8789static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8790test_array [0] = 0
8791
8792 ;
8793 return 0;
8794}
8795_ACEOF
8796rm -f conftest.$ac_objext
8797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8798 (eval $ac_compile) 2>&5
8799 ac_status=$?
8800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801 (exit $ac_status); } &&
8802 { ac_try='test -s conftest.$ac_objext'
8803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8804 (eval $ac_try) 2>&5
8805 ac_status=$?
8806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8807 (exit $ac_status); }; }; then
8808 ac_hi=-1 ac_mid=-1
8809 while :; do
8810 cat >conftest.$ac_ext <<_ACEOF
8811#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* confdefs.h. */
8813_ACEOF
8814cat confdefs.h >>conftest.$ac_ext
8815cat >>conftest.$ac_ext <<_ACEOF
8816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008818int
8819main ()
8820{
8821static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8822test_array [0] = 0
8823
8824 ;
8825 return 0;
8826}
8827_ACEOF
8828rm -f conftest.$ac_objext
8829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8830 (eval $ac_compile) 2>&5
8831 ac_status=$?
8832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); } &&
8834 { ac_try='test -s conftest.$ac_objext'
8835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; }; then
8840 ac_lo=$ac_mid; break
8841else
8842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008843sed 's/^/| /' conftest.$ac_ext >&5
8844
Martin v. Löwis11437992002-04-12 09:54:03 +00008845ac_hi=`expr '(' $ac_mid ')' - 1`
8846 if test $ac_mid -le $ac_hi; then
8847 ac_lo= ac_hi=
8848 break
8849 fi
8850 ac_mid=`expr 2 '*' $ac_mid`
8851fi
8852rm -f conftest.$ac_objext conftest.$ac_ext
8853 done
8854else
8855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008856sed 's/^/| /' conftest.$ac_ext >&5
8857
Martin v. Löwis11437992002-04-12 09:54:03 +00008858ac_lo= ac_hi=
8859fi
8860rm -f conftest.$ac_objext conftest.$ac_ext
8861fi
8862rm -f conftest.$ac_objext conftest.$ac_ext
8863# Binary search between lo and hi bounds.
8864while test "x$ac_lo" != "x$ac_hi"; do
8865 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8866 cat >conftest.$ac_ext <<_ACEOF
8867#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* confdefs.h. */
8869_ACEOF
8870cat confdefs.h >>conftest.$ac_ext
8871cat >>conftest.$ac_ext <<_ACEOF
8872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008873$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
8876{
8877static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8878test_array [0] = 0
8879
8880 ;
8881 return 0;
8882}
8883_ACEOF
8884rm -f conftest.$ac_objext
8885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8886 (eval $ac_compile) 2>&5
8887 ac_status=$?
8888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8889 (exit $ac_status); } &&
8890 { ac_try='test -s conftest.$ac_objext'
8891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8892 (eval $ac_try) 2>&5
8893 ac_status=$?
8894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8895 (exit $ac_status); }; }; then
8896 ac_hi=$ac_mid
8897else
8898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008899sed 's/^/| /' conftest.$ac_ext >&5
8900
Martin v. Löwis11437992002-04-12 09:54:03 +00008901ac_lo=`expr '(' $ac_mid ')' + 1`
8902fi
8903rm -f conftest.$ac_objext conftest.$ac_ext
8904done
8905case $ac_lo in
8906?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008907'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8908See \`config.log' for more details." >&5
8909echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8910See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 { (exit 1); exit 1; }; } ;;
8912esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008913else
8914 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008915 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8916See \`config.log' for more details." >&5
8917echo "$as_me: error: cannot run test program while cross compiling
8918See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008920else
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 cat >conftest.$ac_ext <<_ACEOF
8922#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* confdefs.h. */
8924_ACEOF
8925cat confdefs.h >>conftest.$ac_ext
8926cat >>conftest.$ac_ext <<_ACEOF
8927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928$ac_includes_default
8929long longval () { return (long) (sizeof (uintptr_t)); }
8930unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008931#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008935{
Martin v. Löwis11437992002-04-12 09:54:03 +00008936
8937 FILE *f = fopen ("conftest.val", "w");
8938 if (! f)
8939 exit (1);
8940 if (((long) (sizeof (uintptr_t))) < 0)
8941 {
8942 long i = longval ();
8943 if (i != ((long) (sizeof (uintptr_t))))
8944 exit (1);
8945 fprintf (f, "%ld\n", i);
8946 }
8947 else
8948 {
8949 unsigned long i = ulongval ();
8950 if (i != ((long) (sizeof (uintptr_t))))
8951 exit (1);
8952 fprintf (f, "%lu\n", i);
8953 }
8954 exit (ferror (f) || fclose (f) != 0);
8955
8956 ;
8957 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008958}
Martin v. Löwis11437992002-04-12 09:54:03 +00008959_ACEOF
8960rm -f conftest$ac_exeext
8961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8962 (eval $ac_link) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8967 (eval $ac_try) 2>&5
8968 ac_status=$?
8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970 (exit $ac_status); }; }; then
8971 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008972else
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 echo "$as_me: program exited with status $ac_status" >&5
8974echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008975sed 's/^/| /' conftest.$ac_ext >&5
8976
Martin v. Löwis11437992002-04-12 09:54:03 +00008977( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008978{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8979See \`config.log' for more details." >&5
8980echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8981See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 { (exit 1); exit 1; }; }
8983fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008984rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008985fi
8986fi
8987rm -f conftest.val
8988else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989 ac_cv_sizeof_uintptr_t=0
8990fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008992echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8993echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8994cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008995#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008996_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008997
Michael W. Hudson54241132001-12-07 15:38:26 +00008998
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008999fi
9000
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009002echo "$as_me:$LINENO: checking size of off_t" >&5
9003echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9004if test "${ac_cv_sizeof_off_t+set}" = set; then
9005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006else
9007 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009008 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009else
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 cat >conftest.$ac_ext <<_ACEOF
9011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* confdefs.h. */
9013_ACEOF
9014cat confdefs.h >>conftest.$ac_ext
9015cat >>conftest.$ac_ext <<_ACEOF
9016/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009017#include <stdio.h>
9018#include <sys/types.h>
9019main()
9020{
9021 FILE *f=fopen("conftestval", "w");
9022 if (!f) exit(1);
9023 fprintf(f, "%d\n", sizeof(off_t));
9024 exit(0);
9025}
Martin v. Löwis11437992002-04-12 09:54:03 +00009026_ACEOF
9027rm -f conftest$ac_exeext
9028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9029 (eval $ac_link) 2>&5
9030 ac_status=$?
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9034 (eval $ac_try) 2>&5
9035 ac_status=$?
9036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9037 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009038 ac_cv_sizeof_off_t=`cat conftestval`
9039else
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 echo "$as_me: program exited with status $ac_status" >&5
9041echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009042sed 's/^/| /' conftest.$ac_ext >&5
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044( exit $ac_status )
9045ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009046fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009047rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009048fi
9049
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009050fi
9051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9053echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9054
9055cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009056#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009057_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058
Michael W. Hudson54241132001-12-07 15:38:26 +00009059
Martin v. Löwis11437992002-04-12 09:54:03 +00009060echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9061echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009062if test "$have_long_long" = yes -a \
9063 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9064 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<\_ACEOF
9067#define HAVE_LARGEFILE_SUPPORT 1
9068_ACEOF
9069
9070 echo "$as_me:$LINENO: result: yes" >&5
9071echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072else
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 echo "$as_me:$LINENO: result: no" >&5
9074echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009075fi
9076
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009077# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009078echo "$as_me:$LINENO: checking size of time_t" >&5
9079echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9080if test "${ac_cv_sizeof_time_t+set}" = set; then
9081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009082else
9083 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009084 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009085else
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 cat >conftest.$ac_ext <<_ACEOF
9087#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009088/* confdefs.h. */
9089_ACEOF
9090cat confdefs.h >>conftest.$ac_ext
9091cat >>conftest.$ac_ext <<_ACEOF
9092/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009093#include <stdio.h>
9094#include <time.h>
9095main()
9096{
9097 FILE *f=fopen("conftestval", "w");
9098 if (!f) exit(1);
9099 fprintf(f, "%d\n", sizeof(time_t));
9100 exit(0);
9101}
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
9103rm -f conftest$ac_exeext
9104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9105 (eval $ac_link) 2>&5
9106 ac_status=$?
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9110 (eval $ac_try) 2>&5
9111 ac_status=$?
9112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9113 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009114 ac_cv_sizeof_time_t=`cat conftestval`
9115else
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 echo "$as_me: program exited with status $ac_status" >&5
9117echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009118sed 's/^/| /' conftest.$ac_ext >&5
9119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120( exit $ac_status )
9121ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009122fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009123rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009124fi
9125
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009126fi
9127
Martin v. Löwis11437992002-04-12 09:54:03 +00009128echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9129echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9130
9131cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009132#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009133_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009134
Michael W. Hudson54241132001-12-07 15:38:26 +00009135
9136
Trent Mick635f6fb2000-08-23 21:33:05 +00009137# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009138ac_save_cc="$CC"
9139if test "$ac_cv_kpthread" = "yes"
9140then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009141elif test "$ac_cv_kthread" = "yes"
9142then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009143elif test "$ac_cv_pthread" = "yes"
9144then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009146echo "$as_me:$LINENO: checking for pthread_t" >&5
9147echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009148have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009149cat >conftest.$ac_ext <<_ACEOF
9150#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009151/* confdefs.h. */
9152_ACEOF
9153cat confdefs.h >>conftest.$ac_ext
9154cat >>conftest.$ac_ext <<_ACEOF
9155/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009156#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Guido van Rossum12580492000-09-24 16:47:19 +00009160pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext
9166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9167 (eval $ac_compile) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } &&
9171 { ac_try='test -s conftest.$ac_objext'
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009177 have_pthread_t=yes
9178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009180sed 's/^/| /' conftest.$ac_ext >&5
9181
Trent Mick635f6fb2000-08-23 21:33:05 +00009182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009183rm -f conftest.$ac_objext conftest.$ac_ext
9184echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9185echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009186if test "$have_pthread_t" = yes ; then
9187 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9189echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9190 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9191 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009192else
9193 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009194 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 cat >conftest.$ac_ext <<_ACEOF
9197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009198/* confdefs.h. */
9199_ACEOF
9200cat confdefs.h >>conftest.$ac_ext
9201cat >>conftest.$ac_ext <<_ACEOF
9202/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009203#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009204#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009205 main()
9206 {
9207 FILE *f=fopen("conftestval", "w");
9208 if (!f) exit(1);
9209 fprintf(f, "%d\n", sizeof(pthread_t));
9210 exit(0);
9211 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009212_ACEOF
9213rm -f conftest$ac_exeext
9214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9215 (eval $ac_link) 2>&5
9216 ac_status=$?
9217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009224 ac_cv_sizeof_pthread_t=`cat conftestval`
9225else
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 echo "$as_me: program exited with status $ac_status" >&5
9227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009228sed 's/^/| /' conftest.$ac_ext >&5
9229
Martin v. Löwis11437992002-04-12 09:54:03 +00009230( exit $ac_status )
9231ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009232fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009233rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009234fi
9235
Trent Mick635f6fb2000-08-23 21:33:05 +00009236fi
9237
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9239echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9240
9241cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009242#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009243_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009244
9245fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009246CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009247
Martin v. Löwis11437992002-04-12 09:54:03 +00009248echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9249echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009250# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9251if test "${enable_toolbox_glue+set}" = set; then
9252 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009253
Martin v. Löwis11437992002-04-12 09:54:03 +00009254fi;
Jack Jansene578a632001-08-15 01:27:14 +00009255
9256if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009257then
Jack Jansene578a632001-08-15 01:27:14 +00009258 case $ac_sys_system/$ac_sys_release in
9259 Darwin/*)
9260 enable_toolbox_glue="yes";;
9261 *)
9262 enable_toolbox_glue="no";;
9263 esac
9264fi
9265case "$enable_toolbox_glue" in
9266yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009267 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009268 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009269 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
9271cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009272#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009274
9275 ;;
9276*)
9277 extra_frameworks=""
9278 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009279 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009280 ;;
9281esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009282echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9283echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009284
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285
9286case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009287 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009288 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009289 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009292 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009293 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009294 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009296 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297esac
9298
Martin v. Löwis11437992002-04-12 09:54:03 +00009299echo "$as_me:$LINENO: checking for --enable-framework" >&5
9300echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009301if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009303 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009305 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306
Martin v. Löwis11437992002-04-12 09:54:03 +00009307cat >>confdefs.h <<\_ACEOF
9308#define WITH_NEXT_FRAMEWORK 1
9309_ACEOF
9310
9311 echo "$as_me:$LINENO: result: yes" >&5
9312echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009313else
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 echo "$as_me:$LINENO: result: no" >&5
9315echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009316fi
9317
Martin v. Löwis11437992002-04-12 09:54:03 +00009318echo "$as_me:$LINENO: checking for dyld" >&5
9319echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009320case $ac_sys_system/$ac_sys_release in
9321 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322
Martin v. Löwis11437992002-04-12 09:54:03 +00009323cat >>confdefs.h <<\_ACEOF
9324#define WITH_DYLD 1
9325_ACEOF
9326
9327 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9328echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009329 ;;
9330 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 echo "$as_me:$LINENO: result: no" >&5
9332echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009333 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009334esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009335
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337
Michael W. Hudson54241132001-12-07 15:38:26 +00009338
9339
9340
9341
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009343# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009344echo "$as_me:$LINENO: checking SO" >&5
9345echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009346if test -z "$SO"
9347then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009348 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009349 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009350 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009351 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009352 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009353else
9354 # this might also be a termcap variable, see #610332
9355 echo
9356 echo '====================================================================='
9357 echo '+ +'
9358 echo '+ WARNING: You have set SO in your environment. +'
9359 echo '+ Do you really mean to change the extension for shared libraries? +'
9360 echo '+ Continuing in 10 seconds to let you to ponder. +'
9361 echo '+ +'
9362 echo '====================================================================='
9363 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009365echo "$as_me:$LINENO: result: $SO" >&5
9366echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009367# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009368# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369# (Shared libraries in this instance are shared modules to be loaded into
9370# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009371echo "$as_me:$LINENO: checking LDSHARED" >&5
9372echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373if test -z "$LDSHARED"
9374then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009376 AIX*)
9377 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009378 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009379 ;;
9380 BeOS*)
9381 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009382 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009383 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009384 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009385 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009387 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009388 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009389 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009390 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009391 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009392 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009393 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009394 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9395 if test "$enable_framework" ; then
9396 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009397 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9398 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009399 else
9400 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009401 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009402 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009403 Darwin/*)
9404 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9405 if test "$enable_framework" ; then
9406 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009407 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9408 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009409 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009410 # No framework, use the Python app as bundle-loader
9411 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009412 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009413 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009414 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009415 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009416 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009417 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009418 then
9419 LDSHARED="cc -shared ${LDFLAGS}"
9420 else
9421 LDSHARED="ld -Bshareable ${LDFLAGS}"
9422 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009423 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009424 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009425 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009426 then LDSHARED='$(CC) -shared'
9427 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009428 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009429 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009430 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009431 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009433 *) LDSHARED="ld";;
9434 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009435fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009436echo "$as_me:$LINENO: result: $LDSHARED" >&5
9437echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009438BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009439# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009440# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009441echo "$as_me:$LINENO: checking CCSHARED" >&5
9442echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009443if test -z "$CCSHARED"
9444then
Guido van Rossum07397971997-04-29 21:49:50 +00009445 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009446 SunOS*) if test "$GCC" = yes;
9447 then CCSHARED="-fPIC";
9448 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009449 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009450 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009451 else CCSHARED="+z";
9452 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009453 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009454 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009455 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009456 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009457 if test "$GCC" = "yes"
9458 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009459 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009460 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009461 SCO_SV*)
9462 if test "$GCC" = "yes"
9463 then CCSHARED="-fPIC"
9464 else CCSHARED="-Kpic -belf"
9465 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009466 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009467 IRIX*/6*) case $CC in
9468 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009469 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009470 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009471 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009472 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009474echo "$as_me:$LINENO: result: $CCSHARED" >&5
9475echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009477# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009478echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9479echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480if test -z "$LINKFORSHARED"
9481then
Guido van Rossum07397971997-04-29 21:49:50 +00009482 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009483 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009484 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009485 LINKFORSHARED="-Wl,-E -Wl,+s";;
9486# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009487 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009488 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009489 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009491 # -u __dummy makes the linker aware of the objc runtime
9492 # in System.framework; otherwise, __objcInit (referenced in
9493 # crt1.o) gets erroneously defined as common, which breaks dynamic
9494 # loading of any modules which reference it in System.framework.
9495 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9496 # not used by the core itself but which needs to be in the core so
9497 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009498 # -prebind is no longer used, because it actually seems to give a
9499 # slowdown in stead of a speedup, maybe due to the large number of
9500 # dynamic loads Python does.
9501 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009502 if test "$enable_framework"
9503 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009504 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009505 fi
9506 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009507 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009508 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009509 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009511 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9512 then
9513 LINKFORSHARED="-Wl,--export-dynamic"
9514 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009515 SunOS/5*) case $CC in
9516 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009517 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009518 then
9519 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009520 fi;;
9521 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009522 CYGWIN*)
9523 if test $enable_shared = "no"
9524 then
9525 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9526 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009527 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009528fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009529echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9530echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009531
Michael W. Hudson54241132001-12-07 15:38:26 +00009532
Martin v. Löwis11437992002-04-12 09:54:03 +00009533echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9534echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009535if test ! "$LIBRARY" = "$LDLIBRARY"
9536then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009537 case $ac_sys_system in
9538 CYGWIN*)
9539 # Cygwin needs CCSHARED when building extension DLLs
9540 # but not when building the interpreter DLL.
9541 CFLAGSFORSHARED='';;
9542 *)
9543 CFLAGSFORSHARED='$(CCSHARED)'
9544 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009546echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9547echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009548
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009549# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9550# library (with --enable-shared).
9551# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009552# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9553# if it is not required, since it creates a dependency of the shared library
9554# to LIBS. This, in turn, means that applications linking the shared libpython
9555# don't need to link LIBS explicitly. The default should be only changed
9556# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009557
9558echo "$as_me:$LINENO: checking SHLIBS" >&5
9559echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9560case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009562 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009563esac
9564echo "$as_me:$LINENO: result: $SHLIBS" >&5
9565echo "${ECHO_T}$SHLIBS" >&6
9566
9567
Guido van Rossum627b2d71993-12-24 10:39:16 +00009568# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009569
9570echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9571echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9572if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009574else
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009576LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009577cat >conftest.$ac_ext <<_ACEOF
9578#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* confdefs.h. */
9580_ACEOF
9581cat confdefs.h >>conftest.$ac_ext
9582cat >>conftest.$ac_ext <<_ACEOF
9583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009585/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009586#ifdef __cplusplus
9587extern "C"
9588#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009589/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 builtin and then its argument prototype would still apply. */
9591char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009592int
9593main ()
9594{
9595dlopen ();
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext conftest$ac_exeext
9601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9602 (eval $ac_link) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); } &&
9606 { ac_try='test -s conftest$ac_exeext'
9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; }; then
9612 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009615sed 's/^/| /' conftest.$ac_ext >&5
9616
Martin v. Löwis11437992002-04-12 09:54:03 +00009617ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009619rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009621fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009622echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9623echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9624if test $ac_cv_lib_dl_dlopen = yes; then
9625 cat >>confdefs.h <<_ACEOF
9626#define HAVE_LIBDL 1
9627_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009628
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009629 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009631fi
9632 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009633
9634echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9635echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9636if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009638else
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009640LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009641cat >conftest.$ac_ext <<_ACEOF
9642#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* confdefs.h. */
9644_ACEOF
9645cat confdefs.h >>conftest.$ac_ext
9646cat >>conftest.$ac_ext <<_ACEOF
9647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009649/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009650#ifdef __cplusplus
9651extern "C"
9652#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009653/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 builtin and then its argument prototype would still apply. */
9655char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009656int
9657main ()
9658{
9659shl_load ();
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664rm -f conftest.$ac_objext conftest$ac_exeext
9665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9666 (eval $ac_link) 2>&5
9667 ac_status=$?
9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669 (exit $ac_status); } &&
9670 { ac_try='test -s conftest$ac_exeext'
9671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9672 (eval $ac_try) 2>&5
9673 ac_status=$?
9674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9675 (exit $ac_status); }; }; then
9676 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009677else
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009679sed 's/^/| /' conftest.$ac_ext >&5
9680
Martin v. Löwis11437992002-04-12 09:54:03 +00009681ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009685fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009686echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9687echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9688if test $ac_cv_lib_dld_shl_load = yes; then
9689 cat >>confdefs.h <<_ACEOF
9690#define HAVE_LIBDLD 1
9691_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009693 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009694
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009695fi
9696 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009697
9698# only check for sem_ini if thread support is requested
9699if test "$with_threads" = "yes" -o -z "$with_threads"; then
9700 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009701echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9702if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009704else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009705 ac_func_search_save_LIBS=$LIBS
9706ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009707cat >conftest.$ac_ext <<_ACEOF
9708#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* confdefs.h. */
9710_ACEOF
9711cat confdefs.h >>conftest.$ac_ext
9712cat >>conftest.$ac_ext <<_ACEOF
9713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009715/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716#ifdef __cplusplus
9717extern "C"
9718#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009719/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 builtin and then its argument prototype would still apply. */
9721char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
9725sem_init ();
9726 ;
9727 return 0;
9728}
9729_ACEOF
9730rm -f conftest.$ac_objext conftest$ac_exeext
9731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9732 (eval $ac_link) 2>&5
9733 ac_status=$?
9734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735 (exit $ac_status); } &&
9736 { ac_try='test -s conftest$ac_exeext'
9737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9738 (eval $ac_try) 2>&5
9739 ac_status=$?
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009742 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009743else
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009745sed 's/^/| /' conftest.$ac_ext >&5
9746
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009747fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009749if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009750 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009751 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9752 cat >conftest.$ac_ext <<_ACEOF
9753#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009759
9760/* Override any gcc2 internal prototype to avoid an error. */
9761#ifdef __cplusplus
9762extern "C"
9763#endif
9764/* We use char because int might match the return type of a gcc2
9765 builtin and then its argument prototype would still apply. */
9766char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009767int
9768main ()
9769{
9770sem_init ();
9771 ;
9772 return 0;
9773}
Martin v. Löwis11437992002-04-12 09:54:03 +00009774_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009775rm -f conftest.$ac_objext conftest$ac_exeext
9776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9777 (eval $ac_link) 2>&5
9778 ac_status=$?
9779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9780 (exit $ac_status); } &&
9781 { ac_try='test -s conftest$ac_exeext'
9782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9783 (eval $ac_try) 2>&5
9784 ac_status=$?
9785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9786 (exit $ac_status); }; }; then
9787 ac_cv_search_sem_init="-l$ac_lib"
9788break
9789else
9790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009791sed 's/^/| /' conftest.$ac_ext >&5
9792
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009793fi
9794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9795 done
9796fi
9797LIBS=$ac_func_search_save_LIBS
9798fi
9799echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9800echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9801if test "$ac_cv_search_sem_init" != no; then
9802 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009803
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009804fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009805 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009806 # posix4 on Solaris 2.6
9807 # pthread (first!) on Linux
9808fi
9809
Martin v. Löwis19d17342003-06-14 21:03:05 +00009810# check if we need libintl for locale functions
9811echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9812echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9813if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9814 echo $ECHO_N "(cached) $ECHO_C" >&6
9815else
9816 ac_check_lib_save_LIBS=$LIBS
9817LIBS="-lintl $LIBS"
9818cat >conftest.$ac_ext <<_ACEOF
9819#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009820/* confdefs.h. */
9821_ACEOF
9822cat confdefs.h >>conftest.$ac_ext
9823cat >>conftest.$ac_ext <<_ACEOF
9824/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009825
9826/* Override any gcc2 internal prototype to avoid an error. */
9827#ifdef __cplusplus
9828extern "C"
9829#endif
9830/* We use char because int might match the return type of a gcc2
9831 builtin and then its argument prototype would still apply. */
9832char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009833int
9834main ()
9835{
9836textdomain ();
9837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext conftest$ac_exeext
9842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9843 (eval $ac_link) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); } &&
9847 { ac_try='test -s conftest$ac_exeext'
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
9853 ac_cv_lib_intl_textdomain=yes
9854else
9855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwis19d17342003-06-14 21:03:05 +00009858ac_cv_lib_intl_textdomain=no
9859fi
9860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9861LIBS=$ac_check_lib_save_LIBS
9862fi
9863echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9864echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9865if test $ac_cv_lib_intl_textdomain = yes; then
9866
9867cat >>confdefs.h <<\_ACEOF
9868#define WITH_LIBINTL 1
9869_ACEOF
9870
9871fi
9872
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009873
9874# checks for system dependent C++ extensions support
9875case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9877echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9878 cat >conftest.$ac_ext <<_ACEOF
9879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* confdefs.h. */
9881_ACEOF
9882cat confdefs.h >>conftest.$ac_ext
9883cat >>conftest.$ac_ext <<_ACEOF
9884/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009885#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009889loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
9894rm -f conftest.$ac_objext conftest$ac_exeext
9895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9896 (eval $ac_link) 2>&5
9897 ac_status=$?
9898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899 (exit $ac_status); } &&
9900 { ac_try='test -s conftest$ac_exeext'
9901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9902 (eval $ac_try) 2>&5
9903 ac_status=$?
9904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9905 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009906
Martin v. Löwis11437992002-04-12 09:54:03 +00009907cat >>confdefs.h <<\_ACEOF
9908#define AIX_GENUINE_CPLUSPLUS 1
9909_ACEOF
9910
9911 echo "$as_me:$LINENO: result: yes" >&5
9912echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009913else
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009915sed 's/^/| /' conftest.$ac_ext >&5
9916
Martin v. Löwis11437992002-04-12 09:54:03 +00009917echo "$as_me:$LINENO: result: no" >&5
9918echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009919fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009921 *) ;;
9922esac
9923
Guido van Rossum70c7f481998-03-26 18:44:10 +00009924# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009925# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +00009926echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9927echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9928if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009930else
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009932LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009933cat >conftest.$ac_ext <<_ACEOF
9934#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009935/* confdefs.h. */
9936_ACEOF
9937cat confdefs.h >>conftest.$ac_ext
9938cat >>conftest.$ac_ext <<_ACEOF
9939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009941/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009942#ifdef __cplusplus
9943extern "C"
9944#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009945/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 builtin and then its argument prototype would still apply. */
9947char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009948int
9949main ()
9950{
9951t_open ();
9952 ;
9953 return 0;
9954}
9955_ACEOF
9956rm -f conftest.$ac_objext conftest$ac_exeext
9957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9958 (eval $ac_link) 2>&5
9959 ac_status=$?
9960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9961 (exit $ac_status); } &&
9962 { ac_try='test -s conftest$ac_exeext'
9963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9964 (eval $ac_try) 2>&5
9965 ac_status=$?
9966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9967 (exit $ac_status); }; }; then
9968 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009969else
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009971sed 's/^/| /' conftest.$ac_ext >&5
9972
Martin v. Löwis11437992002-04-12 09:54:03 +00009973ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009974fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009975rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9976LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009978echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9979echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9980if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009981 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009982fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009983 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009984echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9985echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9986if test "${ac_cv_lib_socket_socket+set}" = set; then
9987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009988else
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009990LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009991cat >conftest.$ac_ext <<_ACEOF
9992#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* confdefs.h. */
9994_ACEOF
9995cat confdefs.h >>conftest.$ac_ext
9996cat >>conftest.$ac_ext <<_ACEOF
9997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009999/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010000#ifdef __cplusplus
10001extern "C"
10002#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010003/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 builtin and then its argument prototype would still apply. */
10005char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010006int
10007main ()
10008{
10009socket ();
10010 ;
10011 return 0;
10012}
10013_ACEOF
10014rm -f conftest.$ac_objext conftest$ac_exeext
10015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10016 (eval $ac_link) 2>&5
10017 ac_status=$?
10018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019 (exit $ac_status); } &&
10020 { ac_try='test -s conftest$ac_exeext'
10021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10022 (eval $ac_try) 2>&5
10023 ac_status=$?
10024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025 (exit $ac_status); }; }; then
10026 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010027else
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010029sed 's/^/| /' conftest.$ac_ext >&5
10030
Martin v. Löwis11437992002-04-12 09:54:03 +000010031ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10034LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010036echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10037echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10038if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010039 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010040fi
10041 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010042
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010043case "$ac_sys_system" in
10044BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010045echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10046echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10047if test "${ac_cv_lib_net_socket+set}" = set; then
10048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010049else
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010051LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010052cat >conftest.$ac_ext <<_ACEOF
10053#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010054/* confdefs.h. */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010059
Guido van Rossumad678af1998-10-02 14:42:15 +000010060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010061#ifdef __cplusplus
10062extern "C"
10063#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 builtin and then its argument prototype would still apply. */
10066char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010067int
10068main ()
10069{
10070socket ();
10071 ;
10072 return 0;
10073}
10074_ACEOF
10075rm -f conftest.$ac_objext conftest$ac_exeext
10076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10077 (eval $ac_link) 2>&5
10078 ac_status=$?
10079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10080 (exit $ac_status); } &&
10081 { ac_try='test -s conftest$ac_exeext'
10082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10083 (eval $ac_try) 2>&5
10084 ac_status=$?
10085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); }; }; then
10087 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010088else
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010090sed 's/^/| /' conftest.$ac_ext >&5
10091
Martin v. Löwis11437992002-04-12 09:54:03 +000010092ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10095LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010097echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10098echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10099if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010100 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010101fi
10102 # BeOS
10103;;
10104esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010105
Martin v. Löwis11437992002-04-12 09:54:03 +000010106echo "$as_me:$LINENO: checking for --with-libs" >&5
10107echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10108
Guido van Rossuma68acba1996-07-31 17:36:39 +000010109# Check whether --with-libs or --without-libs was given.
10110if test "${with_libs+set}" = set; then
10111 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010112
10113echo "$as_me:$LINENO: result: $withval" >&5
10114echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010115LIBS="$withval $LIBS"
10116
10117else
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 echo "$as_me:$LINENO: result: no" >&5
10119echo "${ECHO_T}no" >&6
10120fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010121
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010122# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010123
10124
Martin v. Löwis11437992002-04-12 09:54:03 +000010125echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10126echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10127
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010128# Check whether --with-signal-module or --without-signal-module was given.
10129if test "${with_signal_module+set}" = set; then
10130 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010131
Martin v. Löwis11437992002-04-12 09:54:03 +000010132fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010133
10134if test -z "$with_signal_module"
10135then with_signal_module="yes"
10136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010137echo "$as_me:$LINENO: result: $with_signal_module" >&5
10138echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010139
10140if test "${with_signal_module}" = "yes"; then
10141 USE_SIGNAL_MODULE=""
10142 SIGNAL_OBJS=""
10143else
10144 USE_SIGNAL_MODULE="#"
10145 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10146fi
10147
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010148# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010149
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010150USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10153echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10154
Guido van Rossumec2f0731997-01-22 20:54:01 +000010155
10156# Check whether --with-dec-threads or --without-dec-threads was given.
10157if test "${with_dec_threads+set}" = set; then
10158 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010159
10160echo "$as_me:$LINENO: result: $withval" >&5
10161echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010162LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010163if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010164 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010165fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010166else
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 echo "$as_me:$LINENO: result: no" >&5
10168echo "${ECHO_T}no" >&6
10169fi;
10170
10171# Templates for things AC_DEFINEd more than once.
10172# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010173
10174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
10176
10177
10178
10179
10180echo "$as_me:$LINENO: checking for --with-threads" >&5
10181echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10182
Guido van Rossumec2f0731997-01-22 20:54:01 +000010183# Check whether --with-threads or --without-threads was given.
10184if test "${with_threads+set}" = set; then
10185 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010186
Martin v. Löwis11437992002-04-12 09:54:03 +000010187fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010188
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010189# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010190
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010191# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010192if test "${with_thread+set}" = set; then
10193 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010194 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010195fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010196
10197if test -z "$with_threads"
10198then with_threads="yes"
10199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010200echo "$as_me:$LINENO: result: $with_threads" >&5
10201echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010202
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010203
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010204if test "$with_threads" = "no"
10205then
10206 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010207elif test "$ac_cv_pthread_is_default" = yes
10208then
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010210#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010211_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010212
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010213 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010215#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010216_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010217
10218 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010220elif test "$ac_cv_kpthread" = "yes"
10221then
10222 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010223 if test "$ac_cv_cxx_thread" = "yes"; then
10224 CXX="$CXX -Kpthread"
10225 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010227#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010228_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010229
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010230 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010231 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010232elif test "$ac_cv_kthread" = "yes"
10233then
10234 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010235 if test "$ac_cv_cxx_thread" = "yes"; then
10236 CXX="$CXX -Kthread"
10237 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010238 cat >>confdefs.h <<\_ACEOF
10239#define WITH_THREAD 1
10240_ACEOF
10241
10242 posix_threads=yes
10243 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010244elif test "$ac_cv_pthread" = "yes"
10245then
10246 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010247 if test "$ac_cv_cxx_thread" = "yes"; then
10248 CXX="$CXX -pthread"
10249 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010250 cat >>confdefs.h <<\_ACEOF
10251#define WITH_THREAD 1
10252_ACEOF
10253
10254 posix_threads=yes
10255 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010256else
10257 if test ! -z "$with_threads" -a -d "$with_threads"
10258 then LDFLAGS="$LDFLAGS -L$with_threads"
10259 fi
10260 if test ! -z "$withval" -a -d "$withval"
10261 then LDFLAGS="$LDFLAGS -L$withval"
10262 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010263
10264 # According to the POSIX spec, a pthreads implementation must
10265 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10267echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10268 cat >conftest.$ac_ext <<_ACEOF
10269#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* confdefs.h. */
10271_ACEOF
10272cat confdefs.h >>conftest.$ac_ext
10273cat >>conftest.$ac_ext <<_ACEOF
10274/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010275
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010276#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010277#ifdef _POSIX_THREADS
10278yes
10279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010280
10281_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010283 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284 unistd_defines_pthreads=yes
10285else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010286 unistd_defines_pthreads=no
10287fi
10288rm -f conftest*
10289
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10291echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010294#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010295_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010296
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 if test "${ac_cv_header_cthreads_h+set}" = set; then
10298 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10299echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10300if test "${ac_cv_header_cthreads_h+set}" = set; then
10301 echo $ECHO_N "(cached) $ECHO_C" >&6
10302fi
10303echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10304echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 # Is the header compilable?
10307echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10308echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10309cat >conftest.$ac_ext <<_ACEOF
10310#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* confdefs.h. */
10312_ACEOF
10313cat confdefs.h >>conftest.$ac_ext
10314cat >>conftest.$ac_ext <<_ACEOF
10315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010316$ac_includes_default
10317#include <cthreads.h>
10318_ACEOF
10319rm -f conftest.$ac_objext
10320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10321 (eval $ac_compile) 2>&5
10322 ac_status=$?
10323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10324 (exit $ac_status); } &&
10325 { ac_try='test -s conftest.$ac_objext'
10326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10327 (eval $ac_try) 2>&5
10328 ac_status=$?
10329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10330 (exit $ac_status); }; }; then
10331 ac_header_compiler=yes
10332else
10333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010334sed 's/^/| /' conftest.$ac_ext >&5
10335
Martin v. Löwis11437992002-04-12 09:54:03 +000010336ac_header_compiler=no
10337fi
10338rm -f conftest.$ac_objext conftest.$ac_ext
10339echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10340echo "${ECHO_T}$ac_header_compiler" >&6
10341
10342# Is the header present?
10343echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10344echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10345cat >conftest.$ac_ext <<_ACEOF
10346#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010347/* confdefs.h. */
10348_ACEOF
10349cat confdefs.h >>conftest.$ac_ext
10350cat >>conftest.$ac_ext <<_ACEOF
10351/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010352#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010353_ACEOF
10354if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10355 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10356 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010357 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 rm -f conftest.er1
10359 cat conftest.err >&5
10360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10361 (exit $ac_status); } >/dev/null; then
10362 if test -s conftest.err; then
10363 ac_cpp_err=$ac_c_preproc_warn_flag
10364 else
10365 ac_cpp_err=
10366 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010367else
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ac_cpp_err=yes
10369fi
10370if test -z "$ac_cpp_err"; then
10371 ac_header_preproc=yes
10372else
10373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010374sed 's/^/| /' conftest.$ac_ext >&5
10375
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010378rm -f conftest.err conftest.$ac_ext
10379echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10380echo "${ECHO_T}$ac_header_preproc" >&6
10381
10382# So? What about this header?
10383case $ac_header_compiler:$ac_header_preproc in
10384 yes:no )
10385 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10386echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10387 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010388echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10389 (
10390 cat <<\_ASBOX
10391## ------------------------------------ ##
10392## Report this to bug-autoconf@gnu.org. ##
10393## ------------------------------------ ##
10394_ASBOX
10395 ) |
10396 sed "s/^/$as_me: WARNING: /" >&2
10397 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 no:yes )
10399 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10400echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10401 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10402echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10403 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010404echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10405 (
10406 cat <<\_ASBOX
10407## ------------------------------------ ##
10408## Report this to bug-autoconf@gnu.org. ##
10409## ------------------------------------ ##
10410_ASBOX
10411 ) |
10412 sed "s/^/$as_me: WARNING: /" >&2
10413 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010414esac
10415echo "$as_me:$LINENO: checking for cthreads.h" >&5
10416echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10417if test "${ac_cv_header_cthreads_h+set}" = set; then
10418 echo $ECHO_N "(cached) $ECHO_C" >&6
10419else
10420 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010422echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10423echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10424
10425fi
10426if test $ac_cv_header_cthreads_h = yes; then
10427 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010429_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010430
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010432#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010433_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010434
Martin v. Löwis11437992002-04-12 09:54:03 +000010435
10436cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010437#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010438_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010439
10440 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010441 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010442else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010443
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10445 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10446echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10447if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10448 echo $ECHO_N "(cached) $ECHO_C" >&6
10449fi
10450echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10451echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010452else
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 # Is the header compilable?
10454echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10455echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10456cat >conftest.$ac_ext <<_ACEOF
10457#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* confdefs.h. */
10459_ACEOF
10460cat confdefs.h >>conftest.$ac_ext
10461cat >>conftest.$ac_ext <<_ACEOF
10462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010463$ac_includes_default
10464#include <mach/cthreads.h>
10465_ACEOF
10466rm -f conftest.$ac_objext
10467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10468 (eval $ac_compile) 2>&5
10469 ac_status=$?
10470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10471 (exit $ac_status); } &&
10472 { ac_try='test -s conftest.$ac_objext'
10473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10474 (eval $ac_try) 2>&5
10475 ac_status=$?
10476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10477 (exit $ac_status); }; }; then
10478 ac_header_compiler=yes
10479else
10480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010481sed 's/^/| /' conftest.$ac_ext >&5
10482
Martin v. Löwis11437992002-04-12 09:54:03 +000010483ac_header_compiler=no
10484fi
10485rm -f conftest.$ac_objext conftest.$ac_ext
10486echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10487echo "${ECHO_T}$ac_header_compiler" >&6
10488
10489# Is the header present?
10490echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10491echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10492cat >conftest.$ac_ext <<_ACEOF
10493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* confdefs.h. */
10495_ACEOF
10496cat confdefs.h >>conftest.$ac_ext
10497cat >>conftest.$ac_ext <<_ACEOF
10498/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010499#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010500_ACEOF
10501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10503 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010504 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 rm -f conftest.er1
10506 cat conftest.err >&5
10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10508 (exit $ac_status); } >/dev/null; then
10509 if test -s conftest.err; then
10510 ac_cpp_err=$ac_c_preproc_warn_flag
10511 else
10512 ac_cpp_err=
10513 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010514else
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ac_cpp_err=yes
10516fi
10517if test -z "$ac_cpp_err"; then
10518 ac_header_preproc=yes
10519else
10520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010521sed 's/^/| /' conftest.$ac_ext >&5
10522
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010525rm -f conftest.err conftest.$ac_ext
10526echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10527echo "${ECHO_T}$ac_header_preproc" >&6
10528
10529# So? What about this header?
10530case $ac_header_compiler:$ac_header_preproc in
10531 yes:no )
10532 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10533echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10534 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010535echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10536 (
10537 cat <<\_ASBOX
10538## ------------------------------------ ##
10539## Report this to bug-autoconf@gnu.org. ##
10540## ------------------------------------ ##
10541_ASBOX
10542 ) |
10543 sed "s/^/$as_me: WARNING: /" >&2
10544 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 no:yes )
10546 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10547echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10548 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10549echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10550 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010551echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10552 (
10553 cat <<\_ASBOX
10554## ------------------------------------ ##
10555## Report this to bug-autoconf@gnu.org. ##
10556## ------------------------------------ ##
10557_ASBOX
10558 ) |
10559 sed "s/^/$as_me: WARNING: /" >&2
10560 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010561esac
10562echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10563echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10564if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10565 echo $ECHO_N "(cached) $ECHO_C" >&6
10566else
10567 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010569echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10570echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10571
10572fi
10573if test $ac_cv_header_mach_cthreads_h = yes; then
10574 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010575#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010576_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010577
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010579#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010580_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582
10583cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010584#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010585_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010586
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010587 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010588else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010589
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 echo "$as_me:$LINENO: checking for --with-pth" >&5
10591echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10592
10593# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010594if test "${with_pth+set}" = set; then
10595 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010596 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010597echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010598 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010599#define WITH_THREAD 1
10600_ACEOF
10601
10602
10603cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010604#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010606
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010607 LIBS="-lpth $LIBS"
10608 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010609else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010610 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010611echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010612
10613 # Just looking for pthread_create in libpthread is not enough:
10614 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10615 # So we really have to include pthread.h, and then link.
10616 _libs=$LIBS
10617 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10619echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10620 cat >conftest.$ac_ext <<_ACEOF
10621#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010622/* confdefs.h. */
10623_ACEOF
10624cat confdefs.h >>conftest.$ac_ext
10625cat >>conftest.$ac_ext <<_ACEOF
10626/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010627#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010628
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010629void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010630int
10631main ()
10632{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010633
10634pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 ;
10636 return 0;
10637}
10638_ACEOF
10639rm -f conftest.$ac_objext conftest$ac_exeext
10640if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10641 (eval $ac_link) 2>&5
10642 ac_status=$?
10643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10644 (exit $ac_status); } &&
10645 { ac_try='test -s conftest$ac_exeext'
10646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10647 (eval $ac_try) 2>&5
10648 ac_status=$?
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); }; }; then
10651
10652 echo "$as_me:$LINENO: result: yes" >&5
10653echo "${ECHO_T}yes" >&6
10654 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010655#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010656_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010657
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010658 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010659 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010660else
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010662sed 's/^/| /' conftest.$ac_ext >&5
10663
Martin v. Löwis11437992002-04-12 09:54:03 +000010664
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010665 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10667echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10668if test "${ac_cv_func_pthread_detach+set}" = set; then
10669 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010670else
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 cat >conftest.$ac_ext <<_ACEOF
10672#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010673/* confdefs.h. */
10674_ACEOF
10675cat confdefs.h >>conftest.$ac_ext
10676cat >>conftest.$ac_ext <<_ACEOF
10677/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010678/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010679 which can conflict with char pthread_detach (); below.
10680 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010681 <limits.h> exists even on freestanding compilers. Under hpux,
10682 including <limits.h> includes <sys/time.h> and causes problems
10683 checking for functions defined therein. */
10684#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010685# include <limits.h>
10686#else
10687# include <assert.h>
10688#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010689/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010690#ifdef __cplusplus
10691extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010692{
Martin v. Löwis11437992002-04-12 09:54:03 +000010693#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 builtin and then its argument prototype would still apply. */
10696char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010697/* The GNU C library defines this for functions which it implements
10698 to always fail with ENOSYS. Some functions are actually named
10699 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010700#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010701choke me
10702#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010703char (*f) () = pthread_detach;
10704#endif
10705#ifdef __cplusplus
10706}
Guido van Rossumad678af1998-10-02 14:42:15 +000010707#endif
10708
Skip Montanaro6dead952003-09-25 14:50:04 +000010709int
10710main ()
10711{
10712return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
10717rm -f conftest.$ac_objext conftest$ac_exeext
10718if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10719 (eval $ac_link) 2>&5
10720 ac_status=$?
10721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722 (exit $ac_status); } &&
10723 { ac_try='test -s conftest$ac_exeext'
10724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10725 (eval $ac_try) 2>&5
10726 ac_status=$?
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); }; }; then
10729 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010732sed 's/^/| /' conftest.$ac_ext >&5
10733
Martin v. Löwis11437992002-04-12 09:54:03 +000010734ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010736rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010738echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10739echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10740if test $ac_cv_func_pthread_detach = yes; then
10741 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010742#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010743_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010744
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010745 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010746 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010747else
Guido van Rossumad678af1998-10-02 14:42:15 +000010748
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010749 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10750 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10751echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10752if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10753 echo $ECHO_N "(cached) $ECHO_C" >&6
10754fi
10755echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10756echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10757else
10758 # Is the header compilable?
10759echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10760echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10761cat >conftest.$ac_ext <<_ACEOF
10762#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* confdefs.h. */
10764_ACEOF
10765cat confdefs.h >>conftest.$ac_ext
10766cat >>conftest.$ac_ext <<_ACEOF
10767/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010768$ac_includes_default
10769#include <atheos/threads.h>
10770_ACEOF
10771rm -f conftest.$ac_objext
10772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10773 (eval $ac_compile) 2>&5
10774 ac_status=$?
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); } &&
10777 { ac_try='test -s conftest.$ac_objext'
10778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10779 (eval $ac_try) 2>&5
10780 ac_status=$?
10781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782 (exit $ac_status); }; }; then
10783 ac_header_compiler=yes
10784else
10785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010786sed 's/^/| /' conftest.$ac_ext >&5
10787
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010788ac_header_compiler=no
10789fi
10790rm -f conftest.$ac_objext conftest.$ac_ext
10791echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10792echo "${ECHO_T}$ac_header_compiler" >&6
10793
10794# Is the header present?
10795echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10796echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10797cat >conftest.$ac_ext <<_ACEOF
10798#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* confdefs.h. */
10800_ACEOF
10801cat confdefs.h >>conftest.$ac_ext
10802cat >>conftest.$ac_ext <<_ACEOF
10803/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010804#include <atheos/threads.h>
10805_ACEOF
10806if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10807 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10808 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010809 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010810 rm -f conftest.er1
10811 cat conftest.err >&5
10812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10813 (exit $ac_status); } >/dev/null; then
10814 if test -s conftest.err; then
10815 ac_cpp_err=$ac_c_preproc_warn_flag
10816 else
10817 ac_cpp_err=
10818 fi
10819else
10820 ac_cpp_err=yes
10821fi
10822if test -z "$ac_cpp_err"; then
10823 ac_header_preproc=yes
10824else
10825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010826sed 's/^/| /' conftest.$ac_ext >&5
10827
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010828 ac_header_preproc=no
10829fi
10830rm -f conftest.err conftest.$ac_ext
10831echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10832echo "${ECHO_T}$ac_header_preproc" >&6
10833
10834# So? What about this header?
10835case $ac_header_compiler:$ac_header_preproc in
10836 yes:no )
10837 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10838echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10839 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010840echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10841 (
10842 cat <<\_ASBOX
10843## ------------------------------------ ##
10844## Report this to bug-autoconf@gnu.org. ##
10845## ------------------------------------ ##
10846_ASBOX
10847 ) |
10848 sed "s/^/$as_me: WARNING: /" >&2
10849 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010850 no:yes )
10851 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10852echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10853 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10854echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10855 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010856echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10857 (
10858 cat <<\_ASBOX
10859## ------------------------------------ ##
10860## Report this to bug-autoconf@gnu.org. ##
10861## ------------------------------------ ##
10862_ASBOX
10863 ) |
10864 sed "s/^/$as_me: WARNING: /" >&2
10865 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010866esac
10867echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10868echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10869if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10871else
10872 ac_cv_header_atheos_threads_h=$ac_header_preproc
10873fi
10874echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10875echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10876
10877fi
10878if test $ac_cv_header_atheos_threads_h = yes; then
10879 cat >>confdefs.h <<\_ACEOF
10880#define WITH_THREAD 1
10881_ACEOF
10882
10883
10884cat >>confdefs.h <<\_ACEOF
10885#define ATHEOS_THREADS 1
10886_ACEOF
10887
10888 THREADOBJ="Python/thread.o"
10889else
10890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10892 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10893echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10894if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10895 echo $ECHO_N "(cached) $ECHO_C" >&6
10896fi
10897echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10898echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010899else
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 # Is the header compilable?
10901echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10902echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10903cat >conftest.$ac_ext <<_ACEOF
10904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* confdefs.h. */
10906_ACEOF
10907cat confdefs.h >>conftest.$ac_ext
10908cat >>conftest.$ac_ext <<_ACEOF
10909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010910$ac_includes_default
10911#include <kernel/OS.h>
10912_ACEOF
10913rm -f conftest.$ac_objext
10914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10915 (eval $ac_compile) 2>&5
10916 ac_status=$?
10917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918 (exit $ac_status); } &&
10919 { ac_try='test -s conftest.$ac_objext'
10920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10921 (eval $ac_try) 2>&5
10922 ac_status=$?
10923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); }; }; then
10925 ac_header_compiler=yes
10926else
10927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010928sed 's/^/| /' conftest.$ac_ext >&5
10929
Martin v. Löwis11437992002-04-12 09:54:03 +000010930ac_header_compiler=no
10931fi
10932rm -f conftest.$ac_objext conftest.$ac_ext
10933echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10934echo "${ECHO_T}$ac_header_compiler" >&6
10935
10936# Is the header present?
10937echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10938echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10939cat >conftest.$ac_ext <<_ACEOF
10940#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* confdefs.h. */
10942_ACEOF
10943cat confdefs.h >>conftest.$ac_ext
10944cat >>conftest.$ac_ext <<_ACEOF
10945/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010946#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010947_ACEOF
10948if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10949 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10950 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010951 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 rm -f conftest.er1
10953 cat conftest.err >&5
10954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955 (exit $ac_status); } >/dev/null; then
10956 if test -s conftest.err; then
10957 ac_cpp_err=$ac_c_preproc_warn_flag
10958 else
10959 ac_cpp_err=
10960 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010961else
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_cpp_err=yes
10963fi
10964if test -z "$ac_cpp_err"; then
10965 ac_header_preproc=yes
10966else
10967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010968sed 's/^/| /' conftest.$ac_ext >&5
10969
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010972rm -f conftest.err conftest.$ac_ext
10973echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10974echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976# So? What about this header?
10977case $ac_header_compiler:$ac_header_preproc in
10978 yes:no )
10979 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10980echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10981 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010982echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10983 (
10984 cat <<\_ASBOX
10985## ------------------------------------ ##
10986## Report this to bug-autoconf@gnu.org. ##
10987## ------------------------------------ ##
10988_ASBOX
10989 ) |
10990 sed "s/^/$as_me: WARNING: /" >&2
10991 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 no:yes )
10993 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10994echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10995 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10996echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10997 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010998echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10999 (
11000 cat <<\_ASBOX
11001## ------------------------------------ ##
11002## Report this to bug-autoconf@gnu.org. ##
11003## ------------------------------------ ##
11004_ASBOX
11005 ) |
11006 sed "s/^/$as_me: WARNING: /" >&2
11007 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011008esac
11009echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11010echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11011if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11012 echo $ECHO_N "(cached) $ECHO_C" >&6
11013else
11014 ac_cv_header_kernel_OS_h=$ac_header_preproc
11015fi
11016echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11017echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11018
11019fi
11020if test $ac_cv_header_kernel_OS_h = yes; then
11021 cat >>confdefs.h <<\_ACEOF
11022#define WITH_THREAD 1
11023_ACEOF
11024
11025
11026cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011030 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011031else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011032
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11034echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11035if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037else
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011039LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011040cat >conftest.$ac_ext <<_ACEOF
11041#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* confdefs.h. */
11043_ACEOF
11044cat confdefs.h >>conftest.$ac_ext
11045cat >>conftest.$ac_ext <<_ACEOF
11046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011047
Greg Steinadf63d62000-07-05 10:38:09 +000011048/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011049#ifdef __cplusplus
11050extern "C"
11051#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011052/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 builtin and then its argument prototype would still apply. */
11054char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011055int
11056main ()
11057{
11058pthread_create ();
11059 ;
11060 return 0;
11061}
11062_ACEOF
11063rm -f conftest.$ac_objext conftest$ac_exeext
11064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11065 (eval $ac_link) 2>&5
11066 ac_status=$?
11067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11068 (exit $ac_status); } &&
11069 { ac_try='test -s conftest$ac_exeext'
11070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11071 (eval $ac_try) 2>&5
11072 ac_status=$?
11073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074 (exit $ac_status); }; }; then
11075 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011076else
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011078sed 's/^/| /' conftest.$ac_ext >&5
11079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11083LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011085echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11086echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11087if test $ac_cv_lib_pthreads_pthread_create = yes; then
11088 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011089#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011091
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011092 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011093 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011094 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011095else
Greg Steinadf63d62000-07-05 10:38:09 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11098echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11099if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11100 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011101else
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011103LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011104cat >conftest.$ac_ext <<_ACEOF
11105#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* confdefs.h. */
11107_ACEOF
11108cat confdefs.h >>conftest.$ac_ext
11109cat >>conftest.$ac_ext <<_ACEOF
11110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Guido van Rossum49545951997-12-02 19:28:29 +000011112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011113#ifdef __cplusplus
11114extern "C"
11115#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011116/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 builtin and then its argument prototype would still apply. */
11118char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011119int
11120main ()
11121{
11122pthread_create ();
11123 ;
11124 return 0;
11125}
11126_ACEOF
11127rm -f conftest.$ac_objext conftest$ac_exeext
11128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11129 (eval $ac_link) 2>&5
11130 ac_status=$?
11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132 (exit $ac_status); } &&
11133 { ac_try='test -s conftest$ac_exeext'
11134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11135 (eval $ac_try) 2>&5
11136 ac_status=$?
11137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138 (exit $ac_status); }; }; then
11139 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011140else
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011142sed 's/^/| /' conftest.$ac_ext >&5
11143
Martin v. Löwis11437992002-04-12 09:54:03 +000011144ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011146rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11147LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011149echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11150echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11151if test $ac_cv_lib_c_r_pthread_create = yes; then
11152 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011153#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011154_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011155
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011156 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011157 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011158 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011159else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11162echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11163if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011165else
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011167LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011168cat >conftest.$ac_ext <<_ACEOF
11169#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011176/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011177#ifdef __cplusplus
11178extern "C"
11179#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011180/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 builtin and then its argument prototype would still apply. */
11182char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011183int
11184main ()
11185{
11186__pthread_create_system ();
11187 ;
11188 return 0;
11189}
11190_ACEOF
11191rm -f conftest.$ac_objext conftest$ac_exeext
11192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11193 (eval $ac_link) 2>&5
11194 ac_status=$?
11195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11196 (exit $ac_status); } &&
11197 { ac_try='test -s conftest$ac_exeext'
11198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11199 (eval $ac_try) 2>&5
11200 ac_status=$?
11201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11202 (exit $ac_status); }; }; then
11203 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011204else
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011206sed 's/^/| /' conftest.$ac_ext >&5
11207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011209fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11211LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011213echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11214echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11215if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11216 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011217#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011218_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011219
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011220 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011221 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011222 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011223else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011224
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11226echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11227if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011229else
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011231LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011232cat >conftest.$ac_ext <<_ACEOF
11233#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* confdefs.h. */
11235_ACEOF
11236cat confdefs.h >>conftest.$ac_ext
11237cat >>conftest.$ac_ext <<_ACEOF
11238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Guido van Rossumb93a8621998-05-07 13:27:32 +000011240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011241#ifdef __cplusplus
11242extern "C"
11243#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011244/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 builtin and then its argument prototype would still apply. */
11246char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
11250pthread_create ();
11251 ;
11252 return 0;
11253}
11254_ACEOF
11255rm -f conftest.$ac_objext conftest$ac_exeext
11256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11257 (eval $ac_link) 2>&5
11258 ac_status=$?
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260 (exit $ac_status); } &&
11261 { ac_try='test -s conftest$ac_exeext'
11262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11263 (eval $ac_try) 2>&5
11264 ac_status=$?
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); }; }; then
11267 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011268else
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011270sed 's/^/| /' conftest.$ac_ext >&5
11271
Martin v. Löwis11437992002-04-12 09:54:03 +000011272ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011274rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11275LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011277echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11278echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11279if test $ac_cv_lib_cma_pthread_create = yes; then
11280 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011281#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011282_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011283
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011284 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011285 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011286 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011287else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011288
Martin v. Löwis130fb172001-07-19 11:00:41 +000011289 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011290fi
11291
Guido van Rossum627b2d71993-12-24 10:39:16 +000011292
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011293fi
11294
Guido van Rossum0be3e491997-05-22 20:33:33 +000011295fi
11296
Guido van Rossum49545951997-12-02 19:28:29 +000011297fi
11298
Guido van Rossumb93a8621998-05-07 13:27:32 +000011299fi
11300
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011301
Michael W. Hudson54241132001-12-07 15:38:26 +000011302fi
11303
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011304
11305fi
11306
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011308rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11309fi;
11310fi
11311
11312
11313fi
11314
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011315
Michael W. Hudson54241132001-12-07 15:38:26 +000011316
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11318echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11319if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321else
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011323LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011324cat >conftest.$ac_ext <<_ACEOF
11325#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011326/* confdefs.h. */
11327_ACEOF
11328cat confdefs.h >>conftest.$ac_ext
11329cat >>conftest.$ac_ext <<_ACEOF
11330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011332/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011333#ifdef __cplusplus
11334extern "C"
11335#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011336/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 builtin and then its argument prototype would still apply. */
11338char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
11342usconfig ();
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347rm -f conftest.$ac_objext conftest$ac_exeext
11348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11349 (eval $ac_link) 2>&5
11350 ac_status=$?
11351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352 (exit $ac_status); } &&
11353 { ac_try='test -s conftest$ac_exeext'
11354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11355 (eval $ac_try) 2>&5
11356 ac_status=$?
11357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11358 (exit $ac_status); }; }; then
11359 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360else
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
Martin v. Löwis11437992002-04-12 09:54:03 +000011364ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011369echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11370echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11371if test $ac_cv_lib_mpc_usconfig = yes; then
11372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011374_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375
Martin v. Löwis130fb172001-07-19 11:00:41 +000011376 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011377 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011378 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011379fi
11380
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011381
Neal Norwitza978ab02002-11-02 16:58:05 +000011382 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11384echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11385if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011387else
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011389LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011390cat >conftest.$ac_ext <<_ACEOF
11391#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* confdefs.h. */
11393_ACEOF
11394cat confdefs.h >>conftest.$ac_ext
11395cat >>conftest.$ac_ext <<_ACEOF
11396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011397
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011399#ifdef __cplusplus
11400extern "C"
11401#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011402/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 builtin and then its argument prototype would still apply. */
11404char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011405int
11406main ()
11407{
11408thr_create ();
11409 ;
11410 return 0;
11411}
11412_ACEOF
11413rm -f conftest.$ac_objext conftest$ac_exeext
11414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11415 (eval $ac_link) 2>&5
11416 ac_status=$?
11417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); } &&
11419 { ac_try='test -s conftest$ac_exeext'
11420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11421 (eval $ac_try) 2>&5
11422 ac_status=$?
11423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424 (exit $ac_status); }; }; then
11425 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011426else
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011428sed 's/^/| /' conftest.$ac_ext >&5
11429
Martin v. Löwis11437992002-04-12 09:54:03 +000011430ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011435echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11436echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11437if test $ac_cv_lib_thread_thr_create = yes; then
11438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011442 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011443 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011444 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445fi
11446
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011447 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011448
Martin v. Löwis130fb172001-07-19 11:00:41 +000011449 if test "$USE_THREAD_MODULE" != "#"
11450 then
11451 # If the above checks didn't disable threads, (at least) OSF1
11452 # needs this '-threads' argument during linking.
11453 case $ac_sys_system in
11454 OSF1) LDLAST=-threads;;
11455 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011456 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011457fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011458
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011459if test "$posix_threads" = "yes"; then
11460 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011461
11462cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011463#define _POSIX_THREADS 1
11464_ACEOF
11465
11466 fi
11467
11468 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11469 case $ac_sys_system/$ac_sys_release in
11470 SunOS/5.6)
11471cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011472#define HAVE_PTHREAD_DESTRUCTOR 1
11473_ACEOF
11474
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011475 ;;
11476 SunOS/5.8)
11477cat >>confdefs.h <<\_ACEOF
11478#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11479_ACEOF
11480
11481 ;;
11482 esac
11483
11484 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11485echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11486 if test "${ac_cv_pthread_system_supported+set}" = set; then
11487 echo $ECHO_N "(cached) $ECHO_C" >&6
11488else
11489 if test "$cross_compiling" = yes; then
11490 ac_cv_pthread_system_supported=no
11491else
11492 cat >conftest.$ac_ext <<_ACEOF
11493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* confdefs.h. */
11495_ACEOF
11496cat confdefs.h >>conftest.$ac_ext
11497cat >>conftest.$ac_ext <<_ACEOF
11498/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011499#include <pthread.h>
11500 void *foo(void *parm) {
11501 return NULL;
11502 }
11503 main() {
11504 pthread_attr_t attr;
11505 pthread_t id;
11506 if (pthread_attr_init(&attr)) exit(-1);
11507 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11508 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11509 exit(0);
11510 }
11511_ACEOF
11512rm -f conftest$ac_exeext
11513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11514 (eval $ac_link) 2>&5
11515 ac_status=$?
11516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11519 (eval $ac_try) 2>&5
11520 ac_status=$?
11521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11522 (exit $ac_status); }; }; then
11523 ac_cv_pthread_system_supported=yes
11524else
11525 echo "$as_me: program exited with status $ac_status" >&5
11526echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011527sed 's/^/| /' conftest.$ac_ext >&5
11528
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011529( exit $ac_status )
11530ac_cv_pthread_system_supported=no
11531fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011532rm -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 +000011533fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011534
Guido van Rossum627b2d71993-12-24 10:39:16 +000011535fi
11536
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011537 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11538echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11539 if test "$ac_cv_pthread_system_supported" = "yes"; then
11540
11541cat >>confdefs.h <<\_ACEOF
11542#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11543_ACEOF
11544
11545 fi
11546
11547for ac_func in pthread_sigmask
11548do
11549as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11550echo "$as_me:$LINENO: checking for $ac_func" >&5
11551echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11552if eval "test \"\${$as_ac_var+set}\" = set"; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
11554else
11555 cat >conftest.$ac_ext <<_ACEOF
11556#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* confdefs.h. */
11558_ACEOF
11559cat confdefs.h >>conftest.$ac_ext
11560cat >>conftest.$ac_ext <<_ACEOF
11561/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011562/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011563 which can conflict with char $ac_func (); below.
11564 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011565 <limits.h> exists even on freestanding compilers. Under hpux,
11566 including <limits.h> includes <sys/time.h> and causes problems
11567 checking for functions defined therein. */
11568#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011569# include <limits.h>
11570#else
11571# include <assert.h>
11572#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011573/* Override any gcc2 internal prototype to avoid an error. */
11574#ifdef __cplusplus
11575extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011576{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011577#endif
11578/* We use char because int might match the return type of a gcc2
11579 builtin and then its argument prototype would still apply. */
11580char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011581/* The GNU C library defines this for functions which it implements
11582 to always fail with ENOSYS. Some functions are actually named
11583 something starting with __ and the normal name is an alias. */
11584#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11585choke me
11586#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011587char (*f) () = $ac_func;
11588#endif
11589#ifdef __cplusplus
11590}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011591#endif
11592
Skip Montanaro6dead952003-09-25 14:50:04 +000011593int
11594main ()
11595{
11596return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011597 ;
11598 return 0;
11599}
11600_ACEOF
11601rm -f conftest.$ac_objext conftest$ac_exeext
11602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11603 (eval $ac_link) 2>&5
11604 ac_status=$?
11605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606 (exit $ac_status); } &&
11607 { ac_try='test -s conftest$ac_exeext'
11608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11609 (eval $ac_try) 2>&5
11610 ac_status=$?
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); }; }; then
11613 eval "$as_ac_var=yes"
11614else
11615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011616sed 's/^/| /' conftest.$ac_ext >&5
11617
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011618eval "$as_ac_var=no"
11619fi
11620rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11621fi
11622echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11623echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11624if test `eval echo '${'$as_ac_var'}'` = yes; then
11625 cat >>confdefs.h <<_ACEOF
11626#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11627_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011628 case $ac_sys_system in
11629 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011630
Jason Tishlerfac083d2003-07-22 15:20:49 +000011631cat >>confdefs.h <<\_ACEOF
11632#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11633_ACEOF
11634
11635 ;;
11636 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011637fi
11638done
11639
11640fi
11641
11642
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011643# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
11645
11646echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11647echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011648# Check whether --enable-ipv6 or --disable-ipv6 was given.
11649if test "${enable_ipv6+set}" = set; then
11650 enableval="$enable_ipv6"
11651 case "$enableval" in
11652 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 echo "$as_me:$LINENO: result: no" >&5
11654echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011655 ipv6=no
11656 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 *) echo "$as_me:$LINENO: result: yes" >&5
11658echo "${ECHO_T}yes" >&6
11659 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011661_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011662
11663 ipv6=yes
11664 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011666else
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011668 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 echo "$as_me:$LINENO: result: no" >&5
11670echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011671 ipv6=no
11672
11673else
Martin v. Löwis11437992002-04-12 09:54:03 +000011674 cat >conftest.$ac_ext <<_ACEOF
11675#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* confdefs.h. */
11677_ACEOF
11678cat confdefs.h >>conftest.$ac_ext
11679cat >>conftest.$ac_ext <<_ACEOF
11680/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011681 /* AF_INET6 available check */
11682#include <sys/types.h>
11683#include <sys/socket.h>
11684main()
11685{
11686 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11687 exit(1);
11688 else
11689 exit(0);
11690}
11691
Martin v. Löwis11437992002-04-12 09:54:03 +000011692_ACEOF
11693rm -f conftest$ac_exeext
11694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11695 (eval $ac_link) 2>&5
11696 ac_status=$?
11697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11700 (eval $ac_try) 2>&5
11701 ac_status=$?
11702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11703 (exit $ac_status); }; }; then
11704 echo "$as_me:$LINENO: result: yes" >&5
11705echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011706 ipv6=yes
11707else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me: program exited with status $ac_status" >&5
11709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011710sed 's/^/| /' conftest.$ac_ext >&5
11711
Martin v. Löwis11437992002-04-12 09:54:03 +000011712( exit $ac_status )
11713echo "$as_me:$LINENO: result: no" >&5
11714echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011715 ipv6=no
11716fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011717rm -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 +000011718fi
11719
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011720if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11722echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11723 cat >conftest.$ac_ext <<_ACEOF
11724#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011730#include <sys/types.h>
11731#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011732int
11733main ()
11734{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011735struct sockaddr_in6 x;
11736x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11743 (eval $ac_compile) 2>&5
11744 ac_status=$?
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); } &&
11747 { ac_try='test -s conftest.$ac_objext'
11748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11749 (eval $ac_try) 2>&5
11750 ac_status=$?
11751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752 (exit $ac_status); }; }; then
11753 echo "$as_me:$LINENO: result: yes" >&5
11754echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011755 ipv6=yes
11756else
Martin v. Löwis11437992002-04-12 09:54:03 +000011757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011758sed 's/^/| /' conftest.$ac_ext >&5
11759
Martin v. Löwis11437992002-04-12 09:54:03 +000011760echo "$as_me:$LINENO: result: no" >&5
11761echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011762 ipv6=no
11763fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011764rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011765fi
11766
11767if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011769#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011770_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011771
11772fi
11773
Martin v. Löwis11437992002-04-12 09:54:03 +000011774fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011775
11776ipv6type=unknown
11777ipv6lib=none
11778ipv6trylibc=no
11779
11780if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11782echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011783 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11784 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011785 case $i in
11786 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 cat >conftest.$ac_ext <<_ACEOF
11788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011789/* confdefs.h. */
11790_ACEOF
11791cat confdefs.h >>conftest.$ac_ext
11792cat >>conftest.$ac_ext <<_ACEOF
11793/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795#include <netinet/in.h>
11796#ifdef IPV6_INRIA_VERSION
11797yes
11798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011801 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011802 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011803fi
11804rm -f conftest*
11805
11806 ;;
11807 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 cat >conftest.$ac_ext <<_ACEOF
11809#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011816#include <netinet/in.h>
11817#ifdef __KAME__
11818yes
11819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011822 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011823 ipv6type=$i;
11824 ipv6lib=inet6
11825 ipv6libdir=/usr/local/v6/lib
11826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011827fi
11828rm -f conftest*
11829
11830 ;;
11831 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 cat >conftest.$ac_ext <<_ACEOF
11833#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011834/* confdefs.h. */
11835_ACEOF
11836cat confdefs.h >>conftest.$ac_ext
11837cat >>conftest.$ac_ext <<_ACEOF
11838/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011839
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011840#include <features.h>
11841#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11842yes
11843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011844_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011846 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847 ipv6type=$i;
11848 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011849fi
11850rm -f conftest*
11851
11852 ;;
11853 linux-inet6)
11854 if test -d /usr/inet6; then
11855 ipv6type=$i
11856 ipv6lib=inet6
11857 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011858 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011859 fi
11860 ;;
11861 solaris)
11862 if test -f /etc/netconfig; then
11863 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11864 ipv6type=$i
11865 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011866 fi
11867 fi
11868 ;;
11869 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 cat >conftest.$ac_ext <<_ACEOF
11871#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011872/* confdefs.h. */
11873_ACEOF
11874cat confdefs.h >>conftest.$ac_ext
11875cat >>conftest.$ac_ext <<_ACEOF
11876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011878#include <sys/param.h>
11879#ifdef _TOSHIBA_INET6
11880yes
11881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011884 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011885 ipv6type=$i;
11886 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011887 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011888fi
11889rm -f conftest*
11890
11891 ;;
11892 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 cat >conftest.$ac_ext <<_ACEOF
11894#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* confdefs.h. */
11896_ACEOF
11897cat confdefs.h >>conftest.$ac_ext
11898cat >>conftest.$ac_ext <<_ACEOF
11899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011901#include </usr/local/v6/include/sys/v6config.h>
11902#ifdef __V6D__
11903yes
11904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011908 ipv6type=$i;
11909 ipv6lib=v6;
11910 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011911 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011912fi
11913rm -f conftest*
11914
11915 ;;
11916 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 cat >conftest.$ac_ext <<_ACEOF
11918#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011919/* confdefs.h. */
11920_ACEOF
11921cat confdefs.h >>conftest.$ac_ext
11922cat >>conftest.$ac_ext <<_ACEOF
11923/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011925#include <sys/param.h>
11926#ifdef _ZETA_MINAMI_INET6
11927yes
11928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011931 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011932 ipv6type=$i;
11933 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011934 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011935fi
11936rm -f conftest*
11937
11938 ;;
11939 esac
11940 if test "$ipv6type" != "unknown"; then
11941 break
11942 fi
11943 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 echo "$as_me:$LINENO: result: $ipv6type" >&5
11945echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011946fi
11947
11948if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11949 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11950 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11951 echo "using lib$ipv6lib"
11952 else
11953 if test $ipv6trylibc = "yes"; then
11954 echo "using libc"
11955 else
11956 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11957 echo "You need to fetch lib$ipv6lib.a from appropriate"
11958 echo 'ipv6 kit and compile beforehand.'
11959 exit 1
11960 fi
11961 fi
11962fi
11963
Jack Jansen7b8c7542002-04-14 20:12:41 +000011964# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011965echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11966echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011967
11968# Check whether --with-universal-newlines or --without-universal-newlines was given.
11969if test "${with_universal_newlines+set}" = set; then
11970 withval="$with_universal_newlines"
11971
11972fi;
11973
11974if test -z "$with_universal_newlines"
11975then with_universal_newlines="yes"
11976fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011977if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011978then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011979 echo --without-universal-newlines is unsupported, see README
11980 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011981else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011982
11983cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011984#define WITH_UNIVERSAL_NEWLINES 1
11985_ACEOF
11986
11987fi
11988echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11989echo "${ECHO_T}$with_universal_newlines" >&6
11990
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011991# Check for --with-doc-strings
11992echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11993echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11994
11995# Check whether --with-doc-strings or --without-doc-strings was given.
11996if test "${with_doc_strings+set}" = set; then
11997 withval="$with_doc_strings"
11998
11999fi;
12000
12001if test -z "$with_doc_strings"
12002then with_doc_strings="yes"
12003fi
12004if test "$with_doc_strings" != "no"
12005then
12006
12007cat >>confdefs.h <<\_ACEOF
12008#define WITH_DOC_STRINGS 1
12009_ACEOF
12010
12011fi
12012echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12013echo "${ECHO_T}$with_doc_strings" >&6
12014
Neil Schemenauera35c6882001-02-27 04:45:05 +000012015# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012016echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12017echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12018
Neil Schemenauera35c6882001-02-27 04:45:05 +000012019# Check whether --with-pymalloc or --without-pymalloc was given.
12020if test "${with_pymalloc+set}" = set; then
12021 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012022
Martin v. Löwis11437992002-04-12 09:54:03 +000012023fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012024
Neil Schemenauer16c22972002-03-22 15:34:49 +000012025if test -z "$with_pymalloc"
12026then with_pymalloc="yes"
12027fi
12028if test "$with_pymalloc" != "no"
12029then
Martin v. Löwis11437992002-04-12 09:54:03 +000012030
12031cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012032#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012033_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012034
12035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012036echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12037echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012038
Barry Warsawef82cd72000-06-30 16:21:01 +000012039# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012040echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12041echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12042
Barry Warsawef82cd72000-06-30 16:21:01 +000012043# Check whether --with-wctype-functions or --without-wctype-functions was given.
12044if test "${with_wctype_functions+set}" = set; then
12045 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
Barry Warsawef82cd72000-06-30 16:21:01 +000012047if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012048then
12049
12050cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012051#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012052_ACEOF
12053
12054 echo "$as_me:$LINENO: result: yes" >&5
12055echo "${ECHO_T}yes" >&6
12056else echo "$as_me:$LINENO: result: no" >&5
12057echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012058fi
12059else
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 echo "$as_me:$LINENO: result: no" >&5
12061echo "${ECHO_T}no" >&6
12062fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012064# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065
Guido van Rossum98935bf2001-09-05 19:13:16 +000012066DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012067
Guido van Rossume97ee181999-12-20 21:27:22 +000012068# the dlopen() function means we might want to use dynload_shlib.o. some
12069# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012070
Thomas Wouters3a584202000-08-05 23:28:51 +000012071for ac_func in dlopen
12072do
Martin v. Löwis11437992002-04-12 09:54:03 +000012073as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12074echo "$as_me:$LINENO: checking for $ac_func" >&5
12075echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12076if eval "test \"\${$as_ac_var+set}\" = set"; then
12077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012078else
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 cat >conftest.$ac_ext <<_ACEOF
12080#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012086/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012087 which can conflict with char $ac_func (); below.
12088 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012089 <limits.h> exists even on freestanding compilers. Under hpux,
12090 including <limits.h> includes <sys/time.h> and causes problems
12091 checking for functions defined therein. */
12092#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012093# include <limits.h>
12094#else
12095# include <assert.h>
12096#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012097/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012098#ifdef __cplusplus
12099extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012100{
Martin v. Löwis11437992002-04-12 09:54:03 +000012101#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012102/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 builtin and then its argument prototype would still apply. */
12104char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012105/* The GNU C library defines this for functions which it implements
12106 to always fail with ENOSYS. Some functions are actually named
12107 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012109choke me
12110#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012111char (*f) () = $ac_func;
12112#endif
12113#ifdef __cplusplus
12114}
Guido van Rossume97ee181999-12-20 21:27:22 +000012115#endif
12116
Skip Montanaro6dead952003-09-25 14:50:04 +000012117int
12118main ()
12119{
12120return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 ;
12122 return 0;
12123}
12124_ACEOF
12125rm -f conftest.$ac_objext conftest$ac_exeext
12126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12127 (eval $ac_link) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); } &&
12131 { ac_try='test -s conftest$ac_exeext'
12132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12133 (eval $ac_try) 2>&5
12134 ac_status=$?
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136 (exit $ac_status); }; }; then
12137 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012138else
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwis11437992002-04-12 09:54:03 +000012142eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012146echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12147echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12148if test `eval echo '${'$as_ac_var'}'` = yes; then
12149 cat >>confdefs.h <<_ACEOF
12150#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12151_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012152
Guido van Rossume97ee181999-12-20 21:27:22 +000012153fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012154done
Guido van Rossume97ee181999-12-20 21:27:22 +000012155
Michael W. Hudson54241132001-12-07 15:38:26 +000012156
Guido van Rossume97ee181999-12-20 21:27:22 +000012157# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12158# loading of modules.
12159
Martin v. Löwis11437992002-04-12 09:54:03 +000012160echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12161echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012162if test -z "$DYNLOADFILE"
12163then
12164 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012165 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12166 if test "$ac_cv_func_dlopen" = yes
12167 then DYNLOADFILE="dynload_shlib.o"
12168 else DYNLOADFILE="dynload_aix.o"
12169 fi
12170 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012171 BeOS*) DYNLOADFILE="dynload_beos.o";;
12172 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012173 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012174 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012175 *)
12176 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12177 # out any dynamic loading
12178 if test "$ac_cv_func_dlopen" = yes
12179 then DYNLOADFILE="dynload_shlib.o"
12180 else DYNLOADFILE="dynload_stub.o"
12181 fi
12182 ;;
12183 esac
12184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012185echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12186echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012187if test "$DYNLOADFILE" != "dynload_stub.o"
12188then
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
12190cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012191#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012192_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012193
12194fi
12195
Neil Schemenauer4e425612001-06-19 15:44:15 +000012196# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12197
Michael W. Hudson54241132001-12-07 15:38:26 +000012198
Martin v. Löwis11437992002-04-12 09:54:03 +000012199echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12200echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012201if test -z "$MACHDEP_OBJS"
12202then
Jack Jansene578a632001-08-15 01:27:14 +000012203 MACHDEP_OBJS=$extra_machdep_objs
12204else
12205 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012206fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012207echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12208echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012209
Guido van Rossum627b2d71993-12-24 10:39:16 +000012210# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
Martin v. Löwisd5843682002-11-21 20:41:28 +000012282for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012283 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012284 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012285 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012286 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012287 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012288 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012289 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012290 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012291 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012292 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012293 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294do
Martin v. Löwis11437992002-04-12 09:54:03 +000012295as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12296echo "$as_me:$LINENO: checking for $ac_func" >&5
12297echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12298if eval "test \"\${$as_ac_var+set}\" = set"; then
12299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300else
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 cat >conftest.$ac_ext <<_ACEOF
12302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012303/* confdefs.h. */
12304_ACEOF
12305cat confdefs.h >>conftest.$ac_ext
12306cat >>conftest.$ac_ext <<_ACEOF
12307/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012308/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012309 which can conflict with char $ac_func (); below.
12310 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012311 <limits.h> exists even on freestanding compilers. Under hpux,
12312 including <limits.h> includes <sys/time.h> and causes problems
12313 checking for functions defined therein. */
12314#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012315# include <limits.h>
12316#else
12317# include <assert.h>
12318#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012319/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012320#ifdef __cplusplus
12321extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012322{
Martin v. Löwis11437992002-04-12 09:54:03 +000012323#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012324/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 builtin and then its argument prototype would still apply. */
12326char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012327/* The GNU C library defines this for functions which it implements
12328 to always fail with ENOSYS. Some functions are actually named
12329 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012331choke me
12332#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012333char (*f) () = $ac_func;
12334#endif
12335#ifdef __cplusplus
12336}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012337#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338
Skip Montanaro6dead952003-09-25 14:50:04 +000012339int
12340main ()
12341{
12342return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 ;
12344 return 0;
12345}
12346_ACEOF
12347rm -f conftest.$ac_objext conftest$ac_exeext
12348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12349 (eval $ac_link) 2>&5
12350 ac_status=$?
12351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12352 (exit $ac_status); } &&
12353 { ac_try='test -s conftest$ac_exeext'
12354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12355 (eval $ac_try) 2>&5
12356 ac_status=$?
12357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12358 (exit $ac_status); }; }; then
12359 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012360else
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012362sed 's/^/| /' conftest.$ac_ext >&5
12363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012368echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12369echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12370if test `eval echo '${'$as_ac_var'}'` = yes; then
12371 cat >>confdefs.h <<_ACEOF
12372#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12373_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012374
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012375fi
12376done
12377
Michael W. Hudson54241132001-12-07 15:38:26 +000012378
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012379# For some functions, having a definition is not sufficient, since
12380# we want to take their address.
12381echo "$as_me:$LINENO: checking for chroot" >&5
12382echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12383cat >conftest.$ac_ext <<_ACEOF
12384#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* confdefs.h. */
12386_ACEOF
12387cat confdefs.h >>conftest.$ac_ext
12388cat >>conftest.$ac_ext <<_ACEOF
12389/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012390#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012391int
12392main ()
12393{
12394void *x=chroot
12395 ;
12396 return 0;
12397}
12398_ACEOF
12399rm -f conftest.$ac_objext
12400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12401 (eval $ac_compile) 2>&5
12402 ac_status=$?
12403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12404 (exit $ac_status); } &&
12405 { ac_try='test -s conftest.$ac_objext'
12406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12407 (eval $ac_try) 2>&5
12408 ac_status=$?
12409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12410 (exit $ac_status); }; }; then
12411
12412cat >>confdefs.h <<\_ACEOF
12413#define HAVE_CHROOT 1
12414_ACEOF
12415
12416 echo "$as_me:$LINENO: result: yes" >&5
12417echo "${ECHO_T}yes" >&6
12418else
12419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012420sed 's/^/| /' conftest.$ac_ext >&5
12421
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012422echo "$as_me:$LINENO: result: no" >&5
12423echo "${ECHO_T}no" >&6
12424
12425fi
12426rm -f conftest.$ac_objext conftest.$ac_ext
12427echo "$as_me:$LINENO: checking for link" >&5
12428echo $ECHO_N "checking for link... $ECHO_C" >&6
12429cat >conftest.$ac_ext <<_ACEOF
12430#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* confdefs.h. */
12432_ACEOF
12433cat confdefs.h >>conftest.$ac_ext
12434cat >>conftest.$ac_ext <<_ACEOF
12435/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012436#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012437int
12438main ()
12439{
12440void *x=link
12441 ;
12442 return 0;
12443}
12444_ACEOF
12445rm -f conftest.$ac_objext
12446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12447 (eval $ac_compile) 2>&5
12448 ac_status=$?
12449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12450 (exit $ac_status); } &&
12451 { ac_try='test -s conftest.$ac_objext'
12452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12453 (eval $ac_try) 2>&5
12454 ac_status=$?
12455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456 (exit $ac_status); }; }; then
12457
12458cat >>confdefs.h <<\_ACEOF
12459#define HAVE_LINK 1
12460_ACEOF
12461
12462 echo "$as_me:$LINENO: result: yes" >&5
12463echo "${ECHO_T}yes" >&6
12464else
12465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012466sed 's/^/| /' conftest.$ac_ext >&5
12467
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012468echo "$as_me:$LINENO: result: no" >&5
12469echo "${ECHO_T}no" >&6
12470
12471fi
12472rm -f conftest.$ac_objext conftest.$ac_ext
12473echo "$as_me:$LINENO: checking for symlink" >&5
12474echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12475cat >conftest.$ac_ext <<_ACEOF
12476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* confdefs.h. */
12478_ACEOF
12479cat confdefs.h >>conftest.$ac_ext
12480cat >>conftest.$ac_ext <<_ACEOF
12481/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012482#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012483int
12484main ()
12485{
12486void *x=symlink
12487 ;
12488 return 0;
12489}
12490_ACEOF
12491rm -f conftest.$ac_objext
12492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12493 (eval $ac_compile) 2>&5
12494 ac_status=$?
12495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496 (exit $ac_status); } &&
12497 { ac_try='test -s conftest.$ac_objext'
12498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12499 (eval $ac_try) 2>&5
12500 ac_status=$?
12501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12502 (exit $ac_status); }; }; then
12503
12504cat >>confdefs.h <<\_ACEOF
12505#define HAVE_SYMLINK 1
12506_ACEOF
12507
12508 echo "$as_me:$LINENO: result: yes" >&5
12509echo "${ECHO_T}yes" >&6
12510else
12511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012512sed 's/^/| /' conftest.$ac_ext >&5
12513
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012514echo "$as_me:$LINENO: result: no" >&5
12515echo "${ECHO_T}no" >&6
12516
12517fi
12518rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012519echo "$as_me:$LINENO: checking for fchdir" >&5
12520echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12521cat >conftest.$ac_ext <<_ACEOF
12522#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012523/* confdefs.h. */
12524_ACEOF
12525cat confdefs.h >>conftest.$ac_ext
12526cat >>conftest.$ac_ext <<_ACEOF
12527/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012528#include <unistd.h>
12529int
12530main ()
12531{
12532void *x=fchdir
12533 ;
12534 return 0;
12535}
12536_ACEOF
12537rm -f conftest.$ac_objext
12538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12539 (eval $ac_compile) 2>&5
12540 ac_status=$?
12541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12542 (exit $ac_status); } &&
12543 { ac_try='test -s conftest.$ac_objext'
12544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12545 (eval $ac_try) 2>&5
12546 ac_status=$?
12547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12548 (exit $ac_status); }; }; then
12549
12550cat >>confdefs.h <<\_ACEOF
12551#define HAVE_FCHDIR 1
12552_ACEOF
12553
12554 echo "$as_me:$LINENO: result: yes" >&5
12555echo "${ECHO_T}yes" >&6
12556else
12557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012558sed 's/^/| /' conftest.$ac_ext >&5
12559
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012560echo "$as_me:$LINENO: result: no" >&5
12561echo "${ECHO_T}no" >&6
12562
12563fi
12564rm -f conftest.$ac_objext conftest.$ac_ext
12565echo "$as_me:$LINENO: checking for fsync" >&5
12566echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12567cat >conftest.$ac_ext <<_ACEOF
12568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012569/* confdefs.h. */
12570_ACEOF
12571cat confdefs.h >>conftest.$ac_ext
12572cat >>conftest.$ac_ext <<_ACEOF
12573/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012574#include <unistd.h>
12575int
12576main ()
12577{
12578void *x=fsync
12579 ;
12580 return 0;
12581}
12582_ACEOF
12583rm -f conftest.$ac_objext
12584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12585 (eval $ac_compile) 2>&5
12586 ac_status=$?
12587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12588 (exit $ac_status); } &&
12589 { ac_try='test -s conftest.$ac_objext'
12590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12591 (eval $ac_try) 2>&5
12592 ac_status=$?
12593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594 (exit $ac_status); }; }; then
12595
12596cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012597#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012598_ACEOF
12599
12600 echo "$as_me:$LINENO: result: yes" >&5
12601echo "${ECHO_T}yes" >&6
12602else
12603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012604sed 's/^/| /' conftest.$ac_ext >&5
12605
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012606echo "$as_me:$LINENO: result: no" >&5
12607echo "${ECHO_T}no" >&6
12608
12609fi
12610rm -f conftest.$ac_objext conftest.$ac_ext
12611echo "$as_me:$LINENO: checking for fdatasync" >&5
12612echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12613cat >conftest.$ac_ext <<_ACEOF
12614#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012615/* confdefs.h. */
12616_ACEOF
12617cat confdefs.h >>conftest.$ac_ext
12618cat >>conftest.$ac_ext <<_ACEOF
12619/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012620#include <unistd.h>
12621int
12622main ()
12623{
12624void *x=fdatasync
12625 ;
12626 return 0;
12627}
12628_ACEOF
12629rm -f conftest.$ac_objext
12630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12631 (eval $ac_compile) 2>&5
12632 ac_status=$?
12633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12634 (exit $ac_status); } &&
12635 { ac_try='test -s conftest.$ac_objext'
12636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12637 (eval $ac_try) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); }; }; then
12641
12642cat >>confdefs.h <<\_ACEOF
12643#define HAVE_FDATASYNC 1
12644_ACEOF
12645
12646 echo "$as_me:$LINENO: result: yes" >&5
12647echo "${ECHO_T}yes" >&6
12648else
12649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012650sed 's/^/| /' conftest.$ac_ext >&5
12651
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012652echo "$as_me:$LINENO: result: no" >&5
12653echo "${ECHO_T}no" >&6
12654
12655fi
12656rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012657
Martin v. Löwisd5843682002-11-21 20:41:28 +000012658# On some systems (eg. FreeBSD 5), we would find a definition of the
12659# functions ctermid_r, setgroups in the library, but no prototype
12660# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12661# address to avoid compiler warnings and potential miscompilations
12662# because of the missing prototypes.
12663
12664echo "$as_me:$LINENO: checking for ctermid_r" >&5
12665echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12666cat >conftest.$ac_ext <<_ACEOF
12667#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* confdefs.h. */
12669_ACEOF
12670cat confdefs.h >>conftest.$ac_ext
12671cat >>conftest.$ac_ext <<_ACEOF
12672/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012673
12674#include "confdefs.h"
12675#include <stdio.h>
12676
Martin v. Löwisd5843682002-11-21 20:41:28 +000012677int
12678main ()
12679{
12680void* p = ctermid_r
12681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext
12686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12687 (eval $ac_compile) 2>&5
12688 ac_status=$?
12689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690 (exit $ac_status); } &&
12691 { ac_try='test -s conftest.$ac_objext'
12692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12693 (eval $ac_try) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); }; }; then
12697
12698cat >>confdefs.h <<\_ACEOF
12699#define HAVE_CTERMID_R 1
12700_ACEOF
12701
12702 echo "$as_me:$LINENO: result: yes" >&5
12703echo "${ECHO_T}yes" >&6
12704else
12705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012706sed 's/^/| /' conftest.$ac_ext >&5
12707
Martin v. Löwisd5843682002-11-21 20:41:28 +000012708echo "$as_me:$LINENO: result: no" >&5
12709echo "${ECHO_T}no" >&6
12710
12711fi
12712rm -f conftest.$ac_objext conftest.$ac_ext
12713
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012714echo "$as_me:$LINENO: checking for flock" >&5
12715echo $ECHO_N "checking for flock... $ECHO_C" >&6
12716cat >conftest.$ac_ext <<_ACEOF
12717#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* confdefs.h. */
12719_ACEOF
12720cat confdefs.h >>conftest.$ac_ext
12721cat >>conftest.$ac_ext <<_ACEOF
12722/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012723
12724#include "confdefs.h"
12725#include <sys/file.h>
12726
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012727int
12728main ()
12729{
12730void* p = flock
12731 ;
12732 return 0;
12733}
12734_ACEOF
12735rm -f conftest.$ac_objext
12736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12737 (eval $ac_compile) 2>&5
12738 ac_status=$?
12739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12740 (exit $ac_status); } &&
12741 { ac_try='test -s conftest.$ac_objext'
12742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12743 (eval $ac_try) 2>&5
12744 ac_status=$?
12745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12746 (exit $ac_status); }; }; then
12747
12748cat >>confdefs.h <<\_ACEOF
12749#define HAVE_FLOCK 1
12750_ACEOF
12751
12752 echo "$as_me:$LINENO: result: yes" >&5
12753echo "${ECHO_T}yes" >&6
12754else
12755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012756sed 's/^/| /' conftest.$ac_ext >&5
12757
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012758echo "$as_me:$LINENO: result: no" >&5
12759echo "${ECHO_T}no" >&6
12760
12761fi
12762rm -f conftest.$ac_objext conftest.$ac_ext
12763
12764echo "$as_me:$LINENO: checking for getpagesize" >&5
12765echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12766cat >conftest.$ac_ext <<_ACEOF
12767#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012768/* confdefs.h. */
12769_ACEOF
12770cat confdefs.h >>conftest.$ac_ext
12771cat >>conftest.$ac_ext <<_ACEOF
12772/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012773
12774#include "confdefs.h"
12775#include <unistd.h>
12776
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012777int
12778main ()
12779{
12780void* p = getpagesize
12781 ;
12782 return 0;
12783}
12784_ACEOF
12785rm -f conftest.$ac_objext
12786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12787 (eval $ac_compile) 2>&5
12788 ac_status=$?
12789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790 (exit $ac_status); } &&
12791 { ac_try='test -s conftest.$ac_objext'
12792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12793 (eval $ac_try) 2>&5
12794 ac_status=$?
12795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12796 (exit $ac_status); }; }; then
12797
12798cat >>confdefs.h <<\_ACEOF
12799#define HAVE_GETPAGESIZE 1
12800_ACEOF
12801
12802 echo "$as_me:$LINENO: result: yes" >&5
12803echo "${ECHO_T}yes" >&6
12804else
12805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012806sed 's/^/| /' conftest.$ac_ext >&5
12807
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012808echo "$as_me:$LINENO: result: no" >&5
12809echo "${ECHO_T}no" >&6
12810
12811fi
12812rm -f conftest.$ac_objext conftest.$ac_ext
12813
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012814for ac_prog in true
12815do
12816 # Extract the first word of "$ac_prog", so it can be a program name with args.
12817set dummy $ac_prog; ac_word=$2
12818echo "$as_me:$LINENO: checking for $ac_word" >&5
12819echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12820if test "${ac_cv_prog_TRUE+set}" = set; then
12821 echo $ECHO_N "(cached) $ECHO_C" >&6
12822else
12823 if test -n "$TRUE"; then
12824 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12825else
12826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12827for as_dir in $PATH
12828do
12829 IFS=$as_save_IFS
12830 test -z "$as_dir" && as_dir=.
12831 for ac_exec_ext in '' $ac_executable_extensions; do
12832 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12833 ac_cv_prog_TRUE="$ac_prog"
12834 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12835 break 2
12836 fi
12837done
12838done
12839
12840fi
12841fi
12842TRUE=$ac_cv_prog_TRUE
12843if test -n "$TRUE"; then
12844 echo "$as_me:$LINENO: result: $TRUE" >&5
12845echo "${ECHO_T}$TRUE" >&6
12846else
12847 echo "$as_me:$LINENO: result: no" >&5
12848echo "${ECHO_T}no" >&6
12849fi
12850
12851 test -n "$TRUE" && break
12852done
12853test -n "$TRUE" || TRUE="/bin/true"
12854
12855
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012856echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12857echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12858if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12859 echo $ECHO_N "(cached) $ECHO_C" >&6
12860else
12861 ac_check_lib_save_LIBS=$LIBS
12862LIBS="-lc $LIBS"
12863cat >conftest.$ac_ext <<_ACEOF
12864#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012865/* confdefs.h. */
12866_ACEOF
12867cat confdefs.h >>conftest.$ac_ext
12868cat >>conftest.$ac_ext <<_ACEOF
12869/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012870
12871/* Override any gcc2 internal prototype to avoid an error. */
12872#ifdef __cplusplus
12873extern "C"
12874#endif
12875/* We use char because int might match the return type of a gcc2
12876 builtin and then its argument prototype would still apply. */
12877char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012878int
12879main ()
12880{
12881inet_aton ();
12882 ;
12883 return 0;
12884}
12885_ACEOF
12886rm -f conftest.$ac_objext conftest$ac_exeext
12887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12888 (eval $ac_link) 2>&5
12889 ac_status=$?
12890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12891 (exit $ac_status); } &&
12892 { ac_try='test -s conftest$ac_exeext'
12893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12894 (eval $ac_try) 2>&5
12895 ac_status=$?
12896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897 (exit $ac_status); }; }; then
12898 ac_cv_lib_c_inet_aton=yes
12899else
12900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012901sed 's/^/| /' conftest.$ac_ext >&5
12902
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012903ac_cv_lib_c_inet_aton=no
12904fi
12905rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12906LIBS=$ac_check_lib_save_LIBS
12907fi
12908echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12909echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12910if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012911 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012912else
12913
12914echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12915echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12916if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12917 echo $ECHO_N "(cached) $ECHO_C" >&6
12918else
12919 ac_check_lib_save_LIBS=$LIBS
12920LIBS="-lresolv $LIBS"
12921cat >conftest.$ac_ext <<_ACEOF
12922#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012923/* confdefs.h. */
12924_ACEOF
12925cat confdefs.h >>conftest.$ac_ext
12926cat >>conftest.$ac_ext <<_ACEOF
12927/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012928
12929/* Override any gcc2 internal prototype to avoid an error. */
12930#ifdef __cplusplus
12931extern "C"
12932#endif
12933/* We use char because int might match the return type of a gcc2
12934 builtin and then its argument prototype would still apply. */
12935char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012936int
12937main ()
12938{
12939inet_aton ();
12940 ;
12941 return 0;
12942}
12943_ACEOF
12944rm -f conftest.$ac_objext conftest$ac_exeext
12945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12946 (eval $ac_link) 2>&5
12947 ac_status=$?
12948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12949 (exit $ac_status); } &&
12950 { ac_try='test -s conftest$ac_exeext'
12951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12952 (eval $ac_try) 2>&5
12953 ac_status=$?
12954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12955 (exit $ac_status); }; }; then
12956 ac_cv_lib_resolv_inet_aton=yes
12957else
12958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012959sed 's/^/| /' conftest.$ac_ext >&5
12960
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012961ac_cv_lib_resolv_inet_aton=no
12962fi
12963rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12964LIBS=$ac_check_lib_save_LIBS
12965fi
12966echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12967echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12968if test $ac_cv_lib_resolv_inet_aton = yes; then
12969 cat >>confdefs.h <<_ACEOF
12970#define HAVE_LIBRESOLV 1
12971_ACEOF
12972
12973 LIBS="-lresolv $LIBS"
12974
12975fi
12976
12977
12978fi
12979
12980
Martin v. Löwise9416172003-05-03 10:12:45 +000012981echo "$as_me:$LINENO: checking for hstrerror" >&5
12982echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12983cat >conftest.$ac_ext <<_ACEOF
12984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012985/* confdefs.h. */
12986_ACEOF
12987cat confdefs.h >>conftest.$ac_ext
12988cat >>conftest.$ac_ext <<_ACEOF
12989/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012990
12991#include "confdefs.h"
12992#include <netdb.h>
12993
Martin v. Löwise9416172003-05-03 10:12:45 +000012994int
12995main ()
12996{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012997void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012998 ;
12999 return 0;
13000}
13001_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013002rm -f conftest.$ac_objext conftest$ac_exeext
13003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13004 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013005 ac_status=$?
13006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13007 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013008 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13010 (eval $ac_try) 2>&5
13011 ac_status=$?
13012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13013 (exit $ac_status); }; }; then
13014
13015cat >>confdefs.h <<\_ACEOF
13016#define HAVE_HSTRERROR 1
13017_ACEOF
13018
13019 echo "$as_me:$LINENO: result: yes" >&5
13020echo "${ECHO_T}yes" >&6
13021else
13022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013023sed 's/^/| /' conftest.$ac_ext >&5
13024
Martin v. Löwise9416172003-05-03 10:12:45 +000013025echo "$as_me:$LINENO: result: no" >&5
13026echo "${ECHO_T}no" >&6
13027
13028fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013029rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013030
13031echo "$as_me:$LINENO: checking for inet_aton" >&5
13032echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13033cat >conftest.$ac_ext <<_ACEOF
13034#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013035/* confdefs.h. */
13036_ACEOF
13037cat confdefs.h >>conftest.$ac_ext
13038cat >>conftest.$ac_ext <<_ACEOF
13039/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013040
13041#include "confdefs.h"
13042#include <sys/socket.h>
13043#include <netinet/in.h>
13044#include <arpa/inet.h>
13045
Martin v. Löwise9416172003-05-03 10:12:45 +000013046int
13047main ()
13048{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013049void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013050 ;
13051 return 0;
13052}
13053_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013054rm -f conftest.$ac_objext conftest$ac_exeext
13055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13056 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013057 ac_status=$?
13058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13059 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013060 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13062 (eval $ac_try) 2>&5
13063 ac_status=$?
13064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13065 (exit $ac_status); }; }; then
13066
13067cat >>confdefs.h <<\_ACEOF
13068#define HAVE_INET_ATON 1
13069_ACEOF
13070
13071 echo "$as_me:$LINENO: result: yes" >&5
13072echo "${ECHO_T}yes" >&6
13073else
13074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013075sed 's/^/| /' conftest.$ac_ext >&5
13076
Martin v. Löwise9416172003-05-03 10:12:45 +000013077echo "$as_me:$LINENO: result: no" >&5
13078echo "${ECHO_T}no" >&6
13079
13080fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013081rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013082
13083echo "$as_me:$LINENO: checking for inet_pton" >&5
13084echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13085cat >conftest.$ac_ext <<_ACEOF
13086#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* confdefs.h. */
13088_ACEOF
13089cat confdefs.h >>conftest.$ac_ext
13090cat >>conftest.$ac_ext <<_ACEOF
13091/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013092
13093#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013094#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013095#include <sys/socket.h>
13096#include <netinet/in.h>
13097#include <arpa/inet.h>
13098
Martin v. Löwise9416172003-05-03 10:12:45 +000013099int
13100main ()
13101{
13102void* p = inet_pton
13103 ;
13104 return 0;
13105}
13106_ACEOF
13107rm -f conftest.$ac_objext
13108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13109 (eval $ac_compile) 2>&5
13110 ac_status=$?
13111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112 (exit $ac_status); } &&
13113 { ac_try='test -s conftest.$ac_objext'
13114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13115 (eval $ac_try) 2>&5
13116 ac_status=$?
13117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118 (exit $ac_status); }; }; then
13119
13120cat >>confdefs.h <<\_ACEOF
13121#define HAVE_INET_PTON 1
13122_ACEOF
13123
13124 echo "$as_me:$LINENO: result: yes" >&5
13125echo "${ECHO_T}yes" >&6
13126else
13127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013128sed 's/^/| /' conftest.$ac_ext >&5
13129
Martin v. Löwise9416172003-05-03 10:12:45 +000013130echo "$as_me:$LINENO: result: no" >&5
13131echo "${ECHO_T}no" >&6
13132
13133fi
13134rm -f conftest.$ac_objext conftest.$ac_ext
13135
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013136# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013137echo "$as_me:$LINENO: checking for setgroups" >&5
13138echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13139cat >conftest.$ac_ext <<_ACEOF
13140#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013141/* confdefs.h. */
13142_ACEOF
13143cat confdefs.h >>conftest.$ac_ext
13144cat >>conftest.$ac_ext <<_ACEOF
13145/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013146
13147#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013148#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013149#ifdef HAVE_GRP_H
13150#include <grp.h>
13151#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013152
Martin v. Löwisd5843682002-11-21 20:41:28 +000013153int
13154main ()
13155{
13156void* p = setgroups
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161rm -f conftest.$ac_objext
13162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13163 (eval $ac_compile) 2>&5
13164 ac_status=$?
13165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13166 (exit $ac_status); } &&
13167 { ac_try='test -s conftest.$ac_objext'
13168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13169 (eval $ac_try) 2>&5
13170 ac_status=$?
13171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13172 (exit $ac_status); }; }; then
13173
13174cat >>confdefs.h <<\_ACEOF
13175#define HAVE_SETGROUPS 1
13176_ACEOF
13177
13178 echo "$as_me:$LINENO: result: yes" >&5
13179echo "${ECHO_T}yes" >&6
13180else
13181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013182sed 's/^/| /' conftest.$ac_ext >&5
13183
Martin v. Löwisd5843682002-11-21 20:41:28 +000013184echo "$as_me:$LINENO: result: no" >&5
13185echo "${ECHO_T}no" >&6
13186
13187fi
13188rm -f conftest.$ac_objext conftest.$ac_ext
13189
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013190# check for openpty and forkpty
13191
Martin v. Löwis11437992002-04-12 09:54:03 +000013192
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013193for ac_func in openpty
13194do
Martin v. Löwis11437992002-04-12 09:54:03 +000013195as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13196echo "$as_me:$LINENO: checking for $ac_func" >&5
13197echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13198if eval "test \"\${$as_ac_var+set}\" = set"; then
13199 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013200else
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 cat >conftest.$ac_ext <<_ACEOF
13202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013203/* confdefs.h. */
13204_ACEOF
13205cat confdefs.h >>conftest.$ac_ext
13206cat >>conftest.$ac_ext <<_ACEOF
13207/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013208/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013209 which can conflict with char $ac_func (); below.
13210 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013211 <limits.h> exists even on freestanding compilers. Under hpux,
13212 including <limits.h> includes <sys/time.h> and causes problems
13213 checking for functions defined therein. */
13214#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013215# include <limits.h>
13216#else
13217# include <assert.h>
13218#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013219/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013220#ifdef __cplusplus
13221extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013222{
Martin v. Löwis11437992002-04-12 09:54:03 +000013223#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013224/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 builtin and then its argument prototype would still apply. */
13226char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013227/* The GNU C library defines this for functions which it implements
13228 to always fail with ENOSYS. Some functions are actually named
13229 something starting with __ and the normal name is an alias. */
13230#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13231choke me
13232#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013233char (*f) () = $ac_func;
13234#endif
13235#ifdef __cplusplus
13236}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013237#endif
13238
Skip Montanaro6dead952003-09-25 14:50:04 +000013239int
13240main ()
13241{
13242return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 ;
13244 return 0;
13245}
13246_ACEOF
13247rm -f conftest.$ac_objext conftest$ac_exeext
13248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13249 (eval $ac_link) 2>&5
13250 ac_status=$?
13251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13252 (exit $ac_status); } &&
13253 { ac_try='test -s conftest$ac_exeext'
13254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13255 (eval $ac_try) 2>&5
13256 ac_status=$?
13257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13258 (exit $ac_status); }; }; then
13259 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013260else
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013262sed 's/^/| /' conftest.$ac_ext >&5
13263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013268echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13269echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13270if test `eval echo '${'$as_ac_var'}'` = yes; then
13271 cat >>confdefs.h <<_ACEOF
13272#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13273_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013275else
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13277echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13278if test "${ac_cv_lib_util_openpty+set}" = set; then
13279 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013280else
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013282LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013283cat >conftest.$ac_ext <<_ACEOF
13284#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* confdefs.h. */
13286_ACEOF
13287cat confdefs.h >>conftest.$ac_ext
13288cat >>conftest.$ac_ext <<_ACEOF
13289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Fred Drake8cef4cf2000-06-28 16:40:38 +000013291/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013292#ifdef __cplusplus
13293extern "C"
13294#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013295/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013296 builtin and then its argument prototype would still apply. */
13297char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
13301openpty ();
13302 ;
13303 return 0;
13304}
13305_ACEOF
13306rm -f conftest.$ac_objext conftest$ac_exeext
13307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13308 (eval $ac_link) 2>&5
13309 ac_status=$?
13310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 (exit $ac_status); } &&
13312 { ac_try='test -s conftest$ac_exeext'
13313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13314 (eval $ac_try) 2>&5
13315 ac_status=$?
13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 (exit $ac_status); }; }; then
13318 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013319else
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013321sed 's/^/| /' conftest.$ac_ext >&5
13322
Martin v. Löwis11437992002-04-12 09:54:03 +000013323ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013325rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13326LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013328echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13329echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13330if test $ac_cv_lib_util_openpty = yes; then
13331 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013332#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013333_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013334 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013335fi
13336
13337fi
13338done
13339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
Fred Drake8cef4cf2000-06-28 16:40:38 +000013341for ac_func in forkpty
13342do
Martin v. Löwis11437992002-04-12 09:54:03 +000013343as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13344echo "$as_me:$LINENO: checking for $ac_func" >&5
13345echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13346if eval "test \"\${$as_ac_var+set}\" = set"; then
13347 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013348else
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 cat >conftest.$ac_ext <<_ACEOF
13350#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013351/* confdefs.h. */
13352_ACEOF
13353cat confdefs.h >>conftest.$ac_ext
13354cat >>conftest.$ac_ext <<_ACEOF
13355/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013356/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013357 which can conflict with char $ac_func (); below.
13358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013359 <limits.h> exists even on freestanding compilers. Under hpux,
13360 including <limits.h> includes <sys/time.h> and causes problems
13361 checking for functions defined therein. */
13362#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013363# include <limits.h>
13364#else
13365# include <assert.h>
13366#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013367/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013368#ifdef __cplusplus
13369extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013370{
Martin v. Löwis11437992002-04-12 09:54:03 +000013371#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013372/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 builtin and then its argument prototype would still apply. */
13374char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013375/* The GNU C library defines this for functions which it implements
13376 to always fail with ENOSYS. Some functions are actually named
13377 something starting with __ and the normal name is an alias. */
13378#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13379choke me
13380#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013381char (*f) () = $ac_func;
13382#endif
13383#ifdef __cplusplus
13384}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013385#endif
13386
Skip Montanaro6dead952003-09-25 14:50:04 +000013387int
13388main ()
13389{
13390return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
13393}
13394_ACEOF
13395rm -f conftest.$ac_objext conftest$ac_exeext
13396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13397 (eval $ac_link) 2>&5
13398 ac_status=$?
13399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13400 (exit $ac_status); } &&
13401 { ac_try='test -s conftest$ac_exeext'
13402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13403 (eval $ac_try) 2>&5
13404 ac_status=$?
13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13406 (exit $ac_status); }; }; then
13407 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013408else
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013410sed 's/^/| /' conftest.$ac_ext >&5
13411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013416echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13417echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13418if test `eval echo '${'$as_ac_var'}'` = yes; then
13419 cat >>confdefs.h <<_ACEOF
13420#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13421_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013422
Fred Drake8cef4cf2000-06-28 16:40:38 +000013423else
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13425echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13426if test "${ac_cv_lib_util_forkpty+set}" = set; then
13427 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013428else
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013430LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013431cat >conftest.$ac_ext <<_ACEOF
13432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013433/* confdefs.h. */
13434_ACEOF
13435cat confdefs.h >>conftest.$ac_ext
13436cat >>conftest.$ac_ext <<_ACEOF
13437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
Fred Drake8cef4cf2000-06-28 16:40:38 +000013439/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013440#ifdef __cplusplus
13441extern "C"
13442#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013443/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 builtin and then its argument prototype would still apply. */
13445char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013446int
13447main ()
13448{
13449forkpty ();
13450 ;
13451 return 0;
13452}
13453_ACEOF
13454rm -f conftest.$ac_objext conftest$ac_exeext
13455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13456 (eval $ac_link) 2>&5
13457 ac_status=$?
13458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13459 (exit $ac_status); } &&
13460 { ac_try='test -s conftest$ac_exeext'
13461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13462 (eval $ac_try) 2>&5
13463 ac_status=$?
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); }; }; then
13466 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013467else
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013469sed 's/^/| /' conftest.$ac_ext >&5
13470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13474LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013476echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13477echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13478if test $ac_cv_lib_util_forkpty = yes; then
13479 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013480#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013481_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013482 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013483fi
13484
13485fi
13486done
13487
Jack Jansendd19cf82001-12-06 22:36:17 +000013488
Michael W. Hudson54241132001-12-07 15:38:26 +000013489# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
13491
13492
13493
13494
13495
Fred Drake8cef4cf2000-06-28 16:40:38 +000013496for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13497do
Martin v. Löwis11437992002-04-12 09:54:03 +000013498as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13499echo "$as_me:$LINENO: checking for $ac_func" >&5
13500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13501if eval "test \"\${$as_ac_var+set}\" = set"; then
13502 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013503else
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 cat >conftest.$ac_ext <<_ACEOF
13505#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013506/* confdefs.h. */
13507_ACEOF
13508cat confdefs.h >>conftest.$ac_ext
13509cat >>conftest.$ac_ext <<_ACEOF
13510/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013511/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013512 which can conflict with char $ac_func (); below.
13513 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013514 <limits.h> exists even on freestanding compilers. Under hpux,
13515 including <limits.h> includes <sys/time.h> and causes problems
13516 checking for functions defined therein. */
13517#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013518# include <limits.h>
13519#else
13520# include <assert.h>
13521#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013522/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013523#ifdef __cplusplus
13524extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013525{
Martin v. Löwis11437992002-04-12 09:54:03 +000013526#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013527/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 builtin and then its argument prototype would still apply. */
13529char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013530/* The GNU C library defines this for functions which it implements
13531 to always fail with ENOSYS. Some functions are actually named
13532 something starting with __ and the normal name is an alias. */
13533#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13534choke me
13535#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013536char (*f) () = $ac_func;
13537#endif
13538#ifdef __cplusplus
13539}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013540#endif
13541
Skip Montanaro6dead952003-09-25 14:50:04 +000013542int
13543main ()
13544{
13545return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext conftest$ac_exeext
13551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13552 (eval $ac_link) 2>&5
13553 ac_status=$?
13554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555 (exit $ac_status); } &&
13556 { ac_try='test -s conftest$ac_exeext'
13557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558 (eval $ac_try) 2>&5
13559 ac_status=$?
13560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561 (exit $ac_status); }; }; then
13562 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563else
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013565sed 's/^/| /' conftest.$ac_ext >&5
13566
Martin v. Löwis11437992002-04-12 09:54:03 +000013567eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013569rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013570fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013571echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13572echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13573if test `eval echo '${'$as_ac_var'}'` = yes; then
13574 cat >>confdefs.h <<_ACEOF
13575#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13576_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013577
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013579done
13580
Michael W. Hudson54241132001-12-07 15:38:26 +000013581
Martin v. Löwis11437992002-04-12 09:54:03 +000013582
13583
13584
13585
13586
Martin v. Löwis1142de32002-03-29 16:28:31 +000013587for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013588do
Martin v. Löwis11437992002-04-12 09:54:03 +000013589as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13590echo "$as_me:$LINENO: checking for $ac_func" >&5
13591echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13592if eval "test \"\${$as_ac_var+set}\" = set"; then
13593 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013594else
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 cat >conftest.$ac_ext <<_ACEOF
13596#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013597/* confdefs.h. */
13598_ACEOF
13599cat confdefs.h >>conftest.$ac_ext
13600cat >>conftest.$ac_ext <<_ACEOF
13601/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013602/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013603 which can conflict with char $ac_func (); below.
13604 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013605 <limits.h> exists even on freestanding compilers. Under hpux,
13606 including <limits.h> includes <sys/time.h> and causes problems
13607 checking for functions defined therein. */
13608#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013609# include <limits.h>
13610#else
13611# include <assert.h>
13612#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013613/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013614#ifdef __cplusplus
13615extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013616{
Martin v. Löwis11437992002-04-12 09:54:03 +000013617#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013618/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 builtin and then its argument prototype would still apply. */
13620char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013621/* The GNU C library defines this for functions which it implements
13622 to always fail with ENOSYS. Some functions are actually named
13623 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013624#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013625choke me
13626#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013627char (*f) () = $ac_func;
13628#endif
13629#ifdef __cplusplus
13630}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013631#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013632
Skip Montanaro6dead952003-09-25 14:50:04 +000013633int
13634main ()
13635{
13636return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 ;
13638 return 0;
13639}
13640_ACEOF
13641rm -f conftest.$ac_objext conftest$ac_exeext
13642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13643 (eval $ac_link) 2>&5
13644 ac_status=$?
13645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646 (exit $ac_status); } &&
13647 { ac_try='test -s conftest$ac_exeext'
13648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13649 (eval $ac_try) 2>&5
13650 ac_status=$?
13651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652 (exit $ac_status); }; }; then
13653 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013654else
Martin v. Löwis11437992002-04-12 09:54:03 +000013655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013656sed 's/^/| /' conftest.$ac_ext >&5
13657
Martin v. Löwis11437992002-04-12 09:54:03 +000013658eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013662echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13663echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13664if test `eval echo '${'$as_ac_var'}'` = yes; then
13665 cat >>confdefs.h <<_ACEOF
13666#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13667_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013668
Martin v. Löwis1142de32002-03-29 16:28:31 +000013669else
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013671fi
13672done
13673
13674
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Martin v. Löwis1142de32002-03-29 16:28:31 +000013676for ac_func in getpgrp
13677do
Martin v. Löwis11437992002-04-12 09:54:03 +000013678as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13679echo "$as_me:$LINENO: checking for $ac_func" >&5
13680echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13681if eval "test \"\${$as_ac_var+set}\" = set"; then
13682 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013683else
Martin v. Löwis11437992002-04-12 09:54:03 +000013684 cat >conftest.$ac_ext <<_ACEOF
13685#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013686/* confdefs.h. */
13687_ACEOF
13688cat confdefs.h >>conftest.$ac_ext
13689cat >>conftest.$ac_ext <<_ACEOF
13690/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013691/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013692 which can conflict with char $ac_func (); below.
13693 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013694 <limits.h> exists even on freestanding compilers. Under hpux,
13695 including <limits.h> includes <sys/time.h> and causes problems
13696 checking for functions defined therein. */
13697#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013698# include <limits.h>
13699#else
13700# include <assert.h>
13701#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013702/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013703#ifdef __cplusplus
13704extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013705{
Martin v. Löwis11437992002-04-12 09:54:03 +000013706#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013707/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013708 builtin and then its argument prototype would still apply. */
13709char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013710/* The GNU C library defines this for functions which it implements
13711 to always fail with ENOSYS. Some functions are actually named
13712 something starting with __ and the normal name is an alias. */
13713#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13714choke me
13715#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013716char (*f) () = $ac_func;
13717#endif
13718#ifdef __cplusplus
13719}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013720#endif
13721
Skip Montanaro6dead952003-09-25 14:50:04 +000013722int
13723main ()
13724{
13725return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 ;
13727 return 0;
13728}
13729_ACEOF
13730rm -f conftest.$ac_objext conftest$ac_exeext
13731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13732 (eval $ac_link) 2>&5
13733 ac_status=$?
13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735 (exit $ac_status); } &&
13736 { ac_try='test -s conftest$ac_exeext'
13737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13738 (eval $ac_try) 2>&5
13739 ac_status=$?
13740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741 (exit $ac_status); }; }; then
13742 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013743else
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013745sed 's/^/| /' conftest.$ac_ext >&5
13746
Martin v. Löwis11437992002-04-12 09:54:03 +000013747eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013749rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013751echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13752echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13753if test `eval echo '${'$as_ac_var'}'` = yes; then
13754 cat >>confdefs.h <<_ACEOF
13755#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13756_ACEOF
13757 cat >conftest.$ac_ext <<_ACEOF
13758#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013759/* confdefs.h. */
13760_ACEOF
13761cat confdefs.h >>conftest.$ac_ext
13762cat >>conftest.$ac_ext <<_ACEOF
13763/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013765int
13766main ()
13767{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 ;
13770 return 0;
13771}
13772_ACEOF
13773rm -f conftest.$ac_objext
13774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13775 (eval $ac_compile) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); } &&
13779 { ac_try='test -s conftest.$ac_objext'
13780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); }; }; then
13785
13786cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
Guido van Rossumf78abae1997-01-21 22:02:36 +000013791else
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013793sed 's/^/| /' conftest.$ac_ext >&5
13794
Guido van Rossum627b2d71993-12-24 10:39:16 +000013795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013796rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013797
Guido van Rossum627b2d71993-12-24 10:39:16 +000013798fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013799done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013800
Jack Jansen150753c2003-03-29 22:07:47 +000013801
13802for ac_func in setpgrp
13803do
13804as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13805echo "$as_me:$LINENO: checking for $ac_func" >&5
13806echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13807if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809else
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 cat >conftest.$ac_ext <<_ACEOF
13811#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013812/* confdefs.h. */
13813_ACEOF
13814cat confdefs.h >>conftest.$ac_ext
13815cat >>conftest.$ac_ext <<_ACEOF
13816/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013817/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013818 which can conflict with char $ac_func (); below.
13819 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013820 <limits.h> exists even on freestanding compilers. Under hpux,
13821 including <limits.h> includes <sys/time.h> and causes problems
13822 checking for functions defined therein. */
13823#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013824# include <limits.h>
13825#else
13826# include <assert.h>
13827#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013828/* Override any gcc2 internal prototype to avoid an error. */
13829#ifdef __cplusplus
13830extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013831{
Martin v. Löwis11437992002-04-12 09:54:03 +000013832#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013833/* We use char because int might match the return type of a gcc2
13834 builtin and then its argument prototype would still apply. */
13835char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013836/* The GNU C library defines this for functions which it implements
13837 to always fail with ENOSYS. Some functions are actually named
13838 something starting with __ and the normal name is an alias. */
13839#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13840choke me
13841#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013842char (*f) () = $ac_func;
13843#endif
13844#ifdef __cplusplus
13845}
Jack Jansen150753c2003-03-29 22:07:47 +000013846#endif
13847
Skip Montanaro6dead952003-09-25 14:50:04 +000013848int
13849main ()
13850{
13851return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 ;
13853 return 0;
13854}
13855_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013856rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013857if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13858 (eval $ac_link) 2>&5
13859 ac_status=$?
13860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013861 (exit $ac_status); } &&
13862 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13864 (eval $ac_try) 2>&5
13865 ac_status=$?
13866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13867 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013868 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013869else
Jack Jansen150753c2003-03-29 22:07:47 +000013870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013871sed 's/^/| /' conftest.$ac_ext >&5
13872
Jack Jansen150753c2003-03-29 22:07:47 +000013873eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013874fi
Jack Jansen150753c2003-03-29 22:07:47 +000013875rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013876fi
Jack Jansen150753c2003-03-29 22:07:47 +000013877echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13878echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13879if test `eval echo '${'$as_ac_var'}'` = yes; then
13880 cat >>confdefs.h <<_ACEOF
13881#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13882_ACEOF
13883 cat >conftest.$ac_ext <<_ACEOF
13884#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013885/* confdefs.h. */
13886_ACEOF
13887cat confdefs.h >>conftest.$ac_ext
13888cat >>conftest.$ac_ext <<_ACEOF
13889/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013890#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013891int
13892main ()
13893{
13894setpgrp(0,0);
13895 ;
13896 return 0;
13897}
13898_ACEOF
13899rm -f conftest.$ac_objext
13900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13901 (eval $ac_compile) 2>&5
13902 ac_status=$?
13903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13904 (exit $ac_status); } &&
13905 { ac_try='test -s conftest.$ac_objext'
13906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13907 (eval $ac_try) 2>&5
13908 ac_status=$?
13909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13910 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
13912cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013913#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013914_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013915
Jack Jansen150753c2003-03-29 22:07:47 +000013916
13917else
13918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013919sed 's/^/| /' conftest.$ac_ext >&5
13920
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013921fi
Jack Jansen150753c2003-03-29 22:07:47 +000013922rm -f conftest.$ac_objext conftest.$ac_ext
13923
13924fi
13925done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927
Thomas Wouters3a584202000-08-05 23:28:51 +000013928for ac_func in gettimeofday
13929do
Martin v. Löwis11437992002-04-12 09:54:03 +000013930as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13931echo "$as_me:$LINENO: checking for $ac_func" >&5
13932echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13933if eval "test \"\${$as_ac_var+set}\" = set"; then
13934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013935else
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 cat >conftest.$ac_ext <<_ACEOF
13937#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013938/* confdefs.h. */
13939_ACEOF
13940cat confdefs.h >>conftest.$ac_ext
13941cat >>conftest.$ac_ext <<_ACEOF
13942/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013943/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013944 which can conflict with char $ac_func (); below.
13945 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013946 <limits.h> exists even on freestanding compilers. Under hpux,
13947 including <limits.h> includes <sys/time.h> and causes problems
13948 checking for functions defined therein. */
13949#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013950# include <limits.h>
13951#else
13952# include <assert.h>
13953#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013954/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013955#ifdef __cplusplus
13956extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013957{
Martin v. Löwis11437992002-04-12 09:54:03 +000013958#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013959/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 builtin and then its argument prototype would still apply. */
13961char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013962/* The GNU C library defines this for functions which it implements
13963 to always fail with ENOSYS. Some functions are actually named
13964 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013965#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013966choke me
13967#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013968char (*f) () = $ac_func;
13969#endif
13970#ifdef __cplusplus
13971}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972#endif
13973
Skip Montanaro6dead952003-09-25 14:50:04 +000013974int
13975main ()
13976{
13977return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 ;
13979 return 0;
13980}
13981_ACEOF
13982rm -f conftest.$ac_objext conftest$ac_exeext
13983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13984 (eval $ac_link) 2>&5
13985 ac_status=$?
13986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13987 (exit $ac_status); } &&
13988 { ac_try='test -s conftest$ac_exeext'
13989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13990 (eval $ac_try) 2>&5
13991 ac_status=$?
13992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13993 (exit $ac_status); }; }; then
13994 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013995else
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013997sed 's/^/| /' conftest.$ac_ext >&5
13998
Martin v. Löwis11437992002-04-12 09:54:03 +000013999eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014001rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014003echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14004echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14005if test `eval echo '${'$as_ac_var'}'` = yes; then
14006 cat >>confdefs.h <<_ACEOF
14007#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14008_ACEOF
14009 cat >conftest.$ac_ext <<_ACEOF
14010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014011/* confdefs.h. */
14012_ACEOF
14013cat confdefs.h >>conftest.$ac_ext
14014cat >>conftest.$ac_ext <<_ACEOF
14015/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014016#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014017int
14018main ()
14019{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014020gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 ;
14022 return 0;
14023}
14024_ACEOF
14025rm -f conftest.$ac_objext
14026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14027 (eval $ac_compile) 2>&5
14028 ac_status=$?
14029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14030 (exit $ac_status); } &&
14031 { ac_try='test -s conftest.$ac_objext'
14032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14033 (eval $ac_try) 2>&5
14034 ac_status=$?
14035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14036 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014037 :
14038else
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014040sed 's/^/| /' conftest.$ac_ext >&5
14041
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
14043cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014044#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014045_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014046
Martin v. Löwis11437992002-04-12 09:54:03 +000014047
Guido van Rossum627b2d71993-12-24 10:39:16 +000014048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014049rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014050
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014051fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014052done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014053
Michael W. Hudson54241132001-12-07 15:38:26 +000014054
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014055echo "$as_me:$LINENO: checking for major" >&5
14056echo $ECHO_N "checking for major... $ECHO_C" >&6
14057cat >conftest.$ac_ext <<_ACEOF
14058#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014059/* confdefs.h. */
14060_ACEOF
14061cat confdefs.h >>conftest.$ac_ext
14062cat >>conftest.$ac_ext <<_ACEOF
14063/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014064
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014065#if defined(MAJOR_IN_MKDEV)
14066#include <sys/mkdev.h>
14067#elif defined(MAJOR_IN_SYSMACROS)
14068#include <sys/sysmacros.h>
14069#else
14070#include <sys/types.h>
14071#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014072
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014073int
14074main ()
14075{
14076
14077 makedev(major(0),minor(0));
14078
14079 ;
14080 return 0;
14081}
14082_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014083rm -f conftest.$ac_objext conftest$ac_exeext
14084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14085 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014086 ac_status=$?
14087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14088 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014089 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14091 (eval $ac_try) 2>&5
14092 ac_status=$?
14093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094 (exit $ac_status); }; }; then
14095
14096
14097cat >>confdefs.h <<\_ACEOF
14098#define HAVE_DEVICE_MACROS 1
14099_ACEOF
14100
14101 echo "$as_me:$LINENO: result: yes" >&5
14102echo "${ECHO_T}yes" >&6
14103
14104else
14105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014106sed 's/^/| /' conftest.$ac_ext >&5
14107
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014108
14109 echo "$as_me:$LINENO: result: no" >&5
14110echo "${ECHO_T}no" >&6
14111
14112fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014113rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014114
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014115# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014116# for [no]getaddrinfo in netdb.h.
14117echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14118echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14119cat >conftest.$ac_ext <<_ACEOF
14120#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014121/* confdefs.h. */
14122_ACEOF
14123cat confdefs.h >>conftest.$ac_ext
14124cat >>conftest.$ac_ext <<_ACEOF
14125/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014126
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014127#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014128#include <sys/socket.h>
14129#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014130#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014131
Martin v. Löwis11437992002-04-12 09:54:03 +000014132int
14133main ()
14134{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014135
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014136getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014137
Martin v. Löwis11437992002-04-12 09:54:03 +000014138 ;
14139 return 0;
14140}
14141_ACEOF
14142rm -f conftest.$ac_objext conftest$ac_exeext
14143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14144 (eval $ac_link) 2>&5
14145 ac_status=$?
14146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14147 (exit $ac_status); } &&
14148 { ac_try='test -s conftest$ac_exeext'
14149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14150 (eval $ac_try) 2>&5
14151 ac_status=$?
14152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14153 (exit $ac_status); }; }; then
14154
14155echo "$as_me:$LINENO: result: yes" >&5
14156echo "${ECHO_T}yes" >&6
14157echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14158echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014159if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 echo "$as_me:$LINENO: result: buggy" >&5
14161echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014162buggygetaddrinfo=yes
14163else
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 cat >conftest.$ac_ext <<_ACEOF
14165#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014166/* confdefs.h. */
14167_ACEOF
14168cat confdefs.h >>conftest.$ac_ext
14169cat >>conftest.$ac_ext <<_ACEOF
14170/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014171
14172#include <sys/types.h>
14173#include <netdb.h>
14174#include <string.h>
14175#include <sys/socket.h>
14176#include <netinet/in.h>
14177
14178main()
14179{
14180 int passive, gaierr, inet4 = 0, inet6 = 0;
14181 struct addrinfo hints, *ai, *aitop;
14182 char straddr[INET6_ADDRSTRLEN], strport[16];
14183
14184 for (passive = 0; passive <= 1; passive++) {
14185 memset(&hints, 0, sizeof(hints));
14186 hints.ai_family = AF_UNSPEC;
14187 hints.ai_flags = passive ? AI_PASSIVE : 0;
14188 hints.ai_socktype = SOCK_STREAM;
14189 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14190 (void)gai_strerror(gaierr);
14191 goto bad;
14192 }
14193 for (ai = aitop; ai; ai = ai->ai_next) {
14194 if (ai->ai_addr == NULL ||
14195 ai->ai_addrlen == 0 ||
14196 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14197 straddr, sizeof(straddr), strport, sizeof(strport),
14198 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14199 goto bad;
14200 }
14201 switch (ai->ai_family) {
14202 case AF_INET:
14203 if (strcmp(strport, "54321") != 0) {
14204 goto bad;
14205 }
14206 if (passive) {
14207 if (strcmp(straddr, "0.0.0.0") != 0) {
14208 goto bad;
14209 }
14210 } else {
14211 if (strcmp(straddr, "127.0.0.1") != 0) {
14212 goto bad;
14213 }
14214 }
14215 inet4++;
14216 break;
14217 case AF_INET6:
14218 if (strcmp(strport, "54321") != 0) {
14219 goto bad;
14220 }
14221 if (passive) {
14222 if (strcmp(straddr, "::") != 0) {
14223 goto bad;
14224 }
14225 } else {
14226 if (strcmp(straddr, "::1") != 0) {
14227 goto bad;
14228 }
14229 }
14230 inet6++;
14231 break;
14232 case AF_UNSPEC:
14233 goto bad;
14234 break;
14235 default:
14236 /* another family support? */
14237 break;
14238 }
14239 }
14240 }
14241
14242 if (!(inet4 == 0 || inet4 == 2))
14243 goto bad;
14244 if (!(inet6 == 0 || inet6 == 2))
14245 goto bad;
14246
14247 if (aitop)
14248 freeaddrinfo(aitop);
14249 exit(0);
14250
14251 bad:
14252 if (aitop)
14253 freeaddrinfo(aitop);
14254 exit(1);
14255}
14256
Martin v. Löwis11437992002-04-12 09:54:03 +000014257_ACEOF
14258rm -f conftest$ac_exeext
14259if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14260 (eval $ac_link) 2>&5
14261 ac_status=$?
14262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14265 (eval $ac_try) 2>&5
14266 ac_status=$?
14267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14268 (exit $ac_status); }; }; then
14269 echo "$as_me:$LINENO: result: good" >&5
14270echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014271buggygetaddrinfo=no
14272else
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 echo "$as_me: program exited with status $ac_status" >&5
14274echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014275sed 's/^/| /' conftest.$ac_ext >&5
14276
Martin v. Löwis11437992002-04-12 09:54:03 +000014277( exit $ac_status )
14278echo "$as_me:$LINENO: result: buggy" >&5
14279echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014280buggygetaddrinfo=yes
14281fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014282rm -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 +000014283fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014284else
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014286sed 's/^/| /' conftest.$ac_ext >&5
14287
Martin v. Löwis11437992002-04-12 09:54:03 +000014288
14289echo "$as_me:$LINENO: result: no" >&5
14290echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014291buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014292
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014294rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014295
14296if test "$buggygetaddrinfo" = "yes"; then
14297 if test "$ipv6" = "yes"; then
14298 echo 'Fatal: You must get working getaddrinfo() function.'
14299 echo ' or you can specify "--disable-ipv6"'.
14300 exit 1
14301 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014302else
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
14304cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014305#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014306_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014307
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014309
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014310for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014311do
Martin v. Löwis11437992002-04-12 09:54:03 +000014312as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14313echo "$as_me:$LINENO: checking for $ac_func" >&5
14314echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14315if eval "test \"\${$as_ac_var+set}\" = set"; then
14316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014317else
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 cat >conftest.$ac_ext <<_ACEOF
14319#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014320/* confdefs.h. */
14321_ACEOF
14322cat confdefs.h >>conftest.$ac_ext
14323cat >>conftest.$ac_ext <<_ACEOF
14324/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014325/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014326 which can conflict with char $ac_func (); below.
14327 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014328 <limits.h> exists even on freestanding compilers. Under hpux,
14329 including <limits.h> includes <sys/time.h> and causes problems
14330 checking for functions defined therein. */
14331#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014332# include <limits.h>
14333#else
14334# include <assert.h>
14335#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014336/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014337#ifdef __cplusplus
14338extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014339{
Martin v. Löwis11437992002-04-12 09:54:03 +000014340#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014341/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 builtin and then its argument prototype would still apply. */
14343char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014344/* The GNU C library defines this for functions which it implements
14345 to always fail with ENOSYS. Some functions are actually named
14346 something starting with __ and the normal name is an alias. */
14347#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14348choke me
14349#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014350char (*f) () = $ac_func;
14351#endif
14352#ifdef __cplusplus
14353}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014354#endif
14355
Skip Montanaro6dead952003-09-25 14:50:04 +000014356int
14357main ()
14358{
14359return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 ;
14361 return 0;
14362}
14363_ACEOF
14364rm -f conftest.$ac_objext conftest$ac_exeext
14365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14366 (eval $ac_link) 2>&5
14367 ac_status=$?
14368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14369 (exit $ac_status); } &&
14370 { ac_try='test -s conftest$ac_exeext'
14371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14372 (eval $ac_try) 2>&5
14373 ac_status=$?
14374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375 (exit $ac_status); }; }; then
14376 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014377else
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014379sed 's/^/| /' conftest.$ac_ext >&5
14380
Martin v. Löwis11437992002-04-12 09:54:03 +000014381eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014383rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014385echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14386echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14387if test `eval echo '${'$as_ac_var'}'` = yes; then
14388 cat >>confdefs.h <<_ACEOF
14389#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14390_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014391
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014392fi
14393done
14394
Michael W. Hudson54241132001-12-07 15:38:26 +000014395
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014396# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014397echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14398echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14399if test "${ac_cv_header_time+set}" = set; then
14400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 cat >conftest.$ac_ext <<_ACEOF
14403#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014404/* confdefs.h. */
14405_ACEOF
14406cat confdefs.h >>conftest.$ac_ext
14407cat >>conftest.$ac_ext <<_ACEOF
14408/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014409#include <sys/types.h>
14410#include <sys/time.h>
14411#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413int
14414main ()
14415{
14416if ((struct tm *) 0)
14417return 0;
14418 ;
14419 return 0;
14420}
14421_ACEOF
14422rm -f conftest.$ac_objext
14423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14424 (eval $ac_compile) 2>&5
14425 ac_status=$?
14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427 (exit $ac_status); } &&
14428 { ac_try='test -s conftest.$ac_objext'
14429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14430 (eval $ac_try) 2>&5
14431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014434 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014435else
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014437sed 's/^/| /' conftest.$ac_ext >&5
14438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014441rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014443echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14444echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014445if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
14447cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014448#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014449_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014450
14451fi
14452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14454echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14455if test "${ac_cv_struct_tm+set}" = set; then
14456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014457else
Martin v. Löwis11437992002-04-12 09:54:03 +000014458 cat >conftest.$ac_ext <<_ACEOF
14459#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014460/* confdefs.h. */
14461_ACEOF
14462cat confdefs.h >>conftest.$ac_ext
14463cat >>conftest.$ac_ext <<_ACEOF
14464/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014465#include <sys/types.h>
14466#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014467
Martin v. Löwis11437992002-04-12 09:54:03 +000014468int
14469main ()
14470{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014471struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ;
14473 return 0;
14474}
14475_ACEOF
14476rm -f conftest.$ac_objext
14477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14478 (eval $ac_compile) 2>&5
14479 ac_status=$?
14480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14481 (exit $ac_status); } &&
14482 { ac_try='test -s conftest.$ac_objext'
14483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14484 (eval $ac_try) 2>&5
14485 ac_status=$?
14486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14487 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014488 ac_cv_struct_tm=time.h
14489else
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014491sed 's/^/| /' conftest.$ac_ext >&5
14492
Martin v. Löwis11437992002-04-12 09:54:03 +000014493ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014495rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014496fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014497echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14498echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014499if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014500
14501cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014502#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014504
14505fi
14506
Martin v. Löwis11437992002-04-12 09:54:03 +000014507echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14508echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14509if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014511else
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 cat >conftest.$ac_ext <<_ACEOF
14513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014514/* confdefs.h. */
14515_ACEOF
14516cat confdefs.h >>conftest.$ac_ext
14517cat >>conftest.$ac_ext <<_ACEOF
14518/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014519#include <sys/types.h>
14520#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014521
14522
Martin v. Löwis11437992002-04-12 09:54:03 +000014523int
14524main ()
14525{
14526static struct tm ac_aggr;
14527if (ac_aggr.tm_zone)
14528return 0;
14529 ;
14530 return 0;
14531}
14532_ACEOF
14533rm -f conftest.$ac_objext
14534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14535 (eval $ac_compile) 2>&5
14536 ac_status=$?
14537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538 (exit $ac_status); } &&
14539 { ac_try='test -s conftest.$ac_objext'
14540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14541 (eval $ac_try) 2>&5
14542 ac_status=$?
14543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14544 (exit $ac_status); }; }; then
14545 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014546else
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014548sed 's/^/| /' conftest.$ac_ext >&5
14549
14550cat >conftest.$ac_ext <<_ACEOF
14551#line $LINENO "configure"
14552/* confdefs.h. */
14553_ACEOF
14554cat confdefs.h >>conftest.$ac_ext
14555cat >>conftest.$ac_ext <<_ACEOF
14556/* end confdefs.h. */
14557#include <sys/types.h>
14558#include <$ac_cv_struct_tm>
14559
14560
14561int
14562main ()
14563{
14564static struct tm ac_aggr;
14565if (sizeof ac_aggr.tm_zone)
14566return 0;
14567 ;
14568 return 0;
14569}
14570_ACEOF
14571rm -f conftest.$ac_objext
14572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14573 (eval $ac_compile) 2>&5
14574 ac_status=$?
14575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576 (exit $ac_status); } &&
14577 { ac_try='test -s conftest.$ac_objext'
14578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14579 (eval $ac_try) 2>&5
14580 ac_status=$?
14581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); }; }; then
14583 ac_cv_member_struct_tm_tm_zone=yes
14584else
14585 echo "$as_me: failed program was:" >&5
14586sed 's/^/| /' conftest.$ac_ext >&5
14587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014590rm -f conftest.$ac_objext conftest.$ac_ext
14591fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014592rm -f conftest.$ac_objext conftest.$ac_ext
14593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014594echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14595echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14596if test $ac_cv_member_struct_tm_tm_zone = yes; then
14597
14598cat >>confdefs.h <<_ACEOF
14599#define HAVE_STRUCT_TM_TM_ZONE 1
14600_ACEOF
14601
14602
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014603fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14606
14607cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014608#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014609_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014610
14611else
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 echo "$as_me:$LINENO: checking for tzname" >&5
14613echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14614if test "${ac_cv_var_tzname+set}" = set; then
14615 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014616else
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 cat >conftest.$ac_ext <<_ACEOF
14618#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014619/* confdefs.h. */
14620_ACEOF
14621cat confdefs.h >>conftest.$ac_ext
14622cat >>conftest.$ac_ext <<_ACEOF
14623/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014624#include <time.h>
14625#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014626extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
Martin v. Löwis11437992002-04-12 09:54:03 +000014629int
14630main ()
14631{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014632atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 ;
14634 return 0;
14635}
14636_ACEOF
14637rm -f conftest.$ac_objext conftest$ac_exeext
14638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14639 (eval $ac_link) 2>&5
14640 ac_status=$?
14641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14642 (exit $ac_status); } &&
14643 { ac_try='test -s conftest$ac_exeext'
14644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14645 (eval $ac_try) 2>&5
14646 ac_status=$?
14647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14648 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014649 ac_cv_var_tzname=yes
14650else
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014652sed 's/^/| /' conftest.$ac_ext >&5
14653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014655fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014657fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014658echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14659echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014660 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014661
14662cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014663#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014664_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014665
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014666 fi
14667fi
14668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14670echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14671if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14672 echo $ECHO_N "(cached) $ECHO_C" >&6
14673else
14674 cat >conftest.$ac_ext <<_ACEOF
14675#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014676/* confdefs.h. */
14677_ACEOF
14678cat confdefs.h >>conftest.$ac_ext
14679cat >>conftest.$ac_ext <<_ACEOF
14680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014681$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014682int
14683main ()
14684{
14685static struct stat ac_aggr;
14686if (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
Skip Montanaro6dead952003-09-25 14:50:04 +000014707sed 's/^/| /' conftest.$ac_ext >&5
14708
14709cat >conftest.$ac_ext <<_ACEOF
14710#line $LINENO "configure"
14711/* confdefs.h. */
14712_ACEOF
14713cat confdefs.h >>conftest.$ac_ext
14714cat >>conftest.$ac_ext <<_ACEOF
14715/* end confdefs.h. */
14716$ac_includes_default
14717int
14718main ()
14719{
14720static struct stat ac_aggr;
14721if (sizeof ac_aggr.st_rdev)
14722return 0;
14723 ;
14724 return 0;
14725}
14726_ACEOF
14727rm -f conftest.$ac_objext
14728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14729 (eval $ac_compile) 2>&5
14730 ac_status=$?
14731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732 (exit $ac_status); } &&
14733 { ac_try='test -s conftest.$ac_objext'
14734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14735 (eval $ac_try) 2>&5
14736 ac_status=$?
14737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738 (exit $ac_status); }; }; then
14739 ac_cv_member_struct_stat_st_rdev=yes
14740else
14741 echo "$as_me: failed program was:" >&5
14742sed 's/^/| /' conftest.$ac_ext >&5
14743
Martin v. Löwis11437992002-04-12 09:54:03 +000014744ac_cv_member_struct_stat_st_rdev=no
14745fi
14746rm -f conftest.$ac_objext conftest.$ac_ext
14747fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014748rm -f conftest.$ac_objext conftest.$ac_ext
14749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014750echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14751echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14752if test $ac_cv_member_struct_stat_st_rdev = yes; then
14753
14754cat >>confdefs.h <<_ACEOF
14755#define HAVE_STRUCT_STAT_ST_RDEV 1
14756_ACEOF
14757
14758
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014759fi
14760
Martin v. Löwis11437992002-04-12 09:54:03 +000014761echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14762echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14763if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14764 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014765else
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 cat >conftest.$ac_ext <<_ACEOF
14767#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014768/* confdefs.h. */
14769_ACEOF
14770cat confdefs.h >>conftest.$ac_ext
14771cat >>conftest.$ac_ext <<_ACEOF
14772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014773$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014774int
14775main ()
14776{
14777static struct stat ac_aggr;
14778if (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
Michael W. Hudson54241132001-12-07 15:38:26 +000014797else
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014799sed 's/^/| /' conftest.$ac_ext >&5
14800
14801cat >conftest.$ac_ext <<_ACEOF
14802#line $LINENO "configure"
14803/* confdefs.h. */
14804_ACEOF
14805cat confdefs.h >>conftest.$ac_ext
14806cat >>conftest.$ac_ext <<_ACEOF
14807/* end confdefs.h. */
14808$ac_includes_default
14809int
14810main ()
14811{
14812static struct stat ac_aggr;
14813if (sizeof ac_aggr.st_blksize)
14814return 0;
14815 ;
14816 return 0;
14817}
14818_ACEOF
14819rm -f conftest.$ac_objext
14820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14821 (eval $ac_compile) 2>&5
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 (exit $ac_status); } &&
14825 { ac_try='test -s conftest.$ac_objext'
14826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14827 (eval $ac_try) 2>&5
14828 ac_status=$?
14829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14830 (exit $ac_status); }; }; then
14831 ac_cv_member_struct_stat_st_blksize=yes
14832else
14833 echo "$as_me: failed program was:" >&5
14834sed 's/^/| /' conftest.$ac_ext >&5
14835
Martin v. Löwis11437992002-04-12 09:54:03 +000014836ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014837fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014838rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014839fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014840rm -f conftest.$ac_objext conftest.$ac_ext
14841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014842echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14843echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14844if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014845
Martin v. Löwis11437992002-04-12 09:54:03 +000014846cat >>confdefs.h <<_ACEOF
14847#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14848_ACEOF
14849
14850
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014851fi
14852
Martin v. Löwis11437992002-04-12 09:54:03 +000014853echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14854echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14855if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014857else
Martin v. Löwis11437992002-04-12 09:54:03 +000014858 cat >conftest.$ac_ext <<_ACEOF
14859#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014860/* confdefs.h. */
14861_ACEOF
14862cat confdefs.h >>conftest.$ac_ext
14863cat >>conftest.$ac_ext <<_ACEOF
14864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014865$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014866int
14867main ()
14868{
14869static struct stat ac_aggr;
14870if (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
Michael W. Hudson54241132001-12-07 15:38:26 +000014889else
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014891sed 's/^/| /' conftest.$ac_ext >&5
14892
14893cat >conftest.$ac_ext <<_ACEOF
14894#line $LINENO "configure"
14895/* confdefs.h. */
14896_ACEOF
14897cat confdefs.h >>conftest.$ac_ext
14898cat >>conftest.$ac_ext <<_ACEOF
14899/* end confdefs.h. */
14900$ac_includes_default
14901int
14902main ()
14903{
14904static struct stat ac_aggr;
14905if (sizeof ac_aggr.st_blocks)
14906return 0;
14907 ;
14908 return 0;
14909}
14910_ACEOF
14911rm -f conftest.$ac_objext
14912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14913 (eval $ac_compile) 2>&5
14914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); } &&
14917 { ac_try='test -s conftest.$ac_objext'
14918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14919 (eval $ac_try) 2>&5
14920 ac_status=$?
14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922 (exit $ac_status); }; }; then
14923 ac_cv_member_struct_stat_st_blocks=yes
14924else
14925 echo "$as_me: failed program was:" >&5
14926sed 's/^/| /' conftest.$ac_ext >&5
14927
Martin v. Löwis11437992002-04-12 09:54:03 +000014928ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014930rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014931fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014932rm -f conftest.$ac_objext conftest.$ac_ext
14933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014934echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14935echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14936if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014937
Martin v. Löwis11437992002-04-12 09:54:03 +000014938cat >>confdefs.h <<_ACEOF
14939#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14940_ACEOF
14941
14942
14943cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014944#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014945_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014946
14947else
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014949fi
14950
Michael W. Hudson54241132001-12-07 15:38:26 +000014951
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
14953echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14954echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14955if test "${ac_cv_header_time_altzone+set}" = set; then
14956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957else
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 cat >conftest.$ac_ext <<_ACEOF
14959#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014960/* confdefs.h. */
14961_ACEOF
14962cat confdefs.h >>conftest.$ac_ext
14963cat >>conftest.$ac_ext <<_ACEOF
14964/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014965#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014966int
14967main ()
14968{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014969return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 ;
14971 return 0;
14972}
14973_ACEOF
14974rm -f conftest.$ac_objext
14975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14976 (eval $ac_compile) 2>&5
14977 ac_status=$?
14978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14979 (exit $ac_status); } &&
14980 { ac_try='test -s conftest.$ac_objext'
14981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14982 (eval $ac_try) 2>&5
14983 ac_status=$?
14984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14985 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014986 ac_cv_header_time_altzone=yes
14987else
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014989sed 's/^/| /' conftest.$ac_ext >&5
14990
Martin v. Löwis11437992002-04-12 09:54:03 +000014991ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014993rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014994fi
14995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14997echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014998if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014999
15000cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015001#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015003
15004fi
15005
Guido van Rossumda88dad1995-01-26 00:46:29 +000015006was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015007echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15008echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15009cat >conftest.$ac_ext <<_ACEOF
15010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* confdefs.h. */
15012_ACEOF
15013cat confdefs.h >>conftest.$ac_ext
15014cat >>conftest.$ac_ext <<_ACEOF
15015/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015016
15017#include <sys/types.h>
15018#include <sys/select.h>
15019#include <sys/time.h>
15020
Martin v. Löwis11437992002-04-12 09:54:03 +000015021int
15022main ()
15023{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015024;
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 ;
15026 return 0;
15027}
15028_ACEOF
15029rm -f conftest.$ac_objext
15030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15031 (eval $ac_compile) 2>&5
15032 ac_status=$?
15033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15034 (exit $ac_status); } &&
15035 { ac_try='test -s conftest.$ac_objext'
15036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15037 (eval $ac_try) 2>&5
15038 ac_status=$?
15039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15040 (exit $ac_status); }; }; then
15041
15042
15043cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015044#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015045_ACEOF
15046
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015047 was_it_defined=yes
15048
Guido van Rossumf78abae1997-01-21 22:02:36 +000015049else
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015051sed 's/^/| /' conftest.$ac_ext >&5
15052
Guido van Rossum7f43da71994-08-01 12:15:30 +000015053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015054rm -f conftest.$ac_objext conftest.$ac_ext
15055echo "$as_me:$LINENO: result: $was_it_defined" >&5
15056echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015057
Martin v. Löwis11437992002-04-12 09:54:03 +000015058echo "$as_me:$LINENO: checking for addrinfo" >&5
15059echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15060if test "${ac_cv_struct_addrinfo+set}" = set; then
15061 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015062else
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 cat >conftest.$ac_ext <<_ACEOF
15064#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015065/* confdefs.h. */
15066_ACEOF
15067cat confdefs.h >>conftest.$ac_ext
15068cat >>conftest.$ac_ext <<_ACEOF
15069/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015070
15071# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015072int
15073main ()
15074{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015075struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 ;
15077 return 0;
15078}
15079_ACEOF
15080rm -f conftest.$ac_objext
15081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15082 (eval $ac_compile) 2>&5
15083 ac_status=$?
15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); } &&
15086 { ac_try='test -s conftest.$ac_objext'
15087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15088 (eval $ac_try) 2>&5
15089 ac_status=$?
15090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015092 ac_cv_struct_addrinfo=yes
15093else
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015095sed 's/^/| /' conftest.$ac_ext >&5
15096
Martin v. Löwis11437992002-04-12 09:54:03 +000015097ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015098fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015099rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015100fi
15101
Martin v. Löwis11437992002-04-12 09:54:03 +000015102echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15103echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015104if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
15106cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015107#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015108_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015109
15110fi
15111
Martin v. Löwis11437992002-04-12 09:54:03 +000015112echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15113echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15114if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15115 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015116else
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 cat >conftest.$ac_ext <<_ACEOF
15118#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015119/* confdefs.h. */
15120_ACEOF
15121cat confdefs.h >>conftest.$ac_ext
15122cat >>conftest.$ac_ext <<_ACEOF
15123/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015124
15125# include <sys/types.h>
15126# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015127int
15128main ()
15129{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015130struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 ;
15132 return 0;
15133}
15134_ACEOF
15135rm -f conftest.$ac_objext
15136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15137 (eval $ac_compile) 2>&5
15138 ac_status=$?
15139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140 (exit $ac_status); } &&
15141 { ac_try='test -s conftest.$ac_objext'
15142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15143 (eval $ac_try) 2>&5
15144 ac_status=$?
15145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15146 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015147 ac_cv_struct_sockaddr_storage=yes
15148else
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015150sed 's/^/| /' conftest.$ac_ext >&5
15151
Martin v. Löwis11437992002-04-12 09:54:03 +000015152ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015154rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015155fi
15156
Martin v. Löwis11437992002-04-12 09:54:03 +000015157echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15158echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015159if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015160
15161cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015162#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015163_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015164
15165fi
15166
Guido van Rossum627b2d71993-12-24 10:39:16 +000015167# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015168
Michael W. Hudson54241132001-12-07 15:38:26 +000015169
Martin v. Löwis11437992002-04-12 09:54:03 +000015170echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15171echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15172if test "${ac_cv_c_char_unsigned+set}" = set; then
15173 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015174else
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 cat >conftest.$ac_ext <<_ACEOF
15176#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015177/* confdefs.h. */
15178_ACEOF
15179cat confdefs.h >>conftest.$ac_ext
15180cat >>conftest.$ac_ext <<_ACEOF
15181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015182$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015183int
15184main ()
15185{
15186static int test_array [1 - 2 * !(((char) -1) < 0)];
15187test_array [0] = 0
15188
15189 ;
15190 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015191}
Martin v. Löwis11437992002-04-12 09:54:03 +000015192_ACEOF
15193rm -f conftest.$ac_objext
15194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15195 (eval $ac_compile) 2>&5
15196 ac_status=$?
15197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15198 (exit $ac_status); } &&
15199 { ac_try='test -s conftest.$ac_objext'
15200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15201 (eval $ac_try) 2>&5
15202 ac_status=$?
15203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15204 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015205 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015206else
15207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015208sed 's/^/| /' conftest.$ac_ext >&5
15209
Martin v. Löwis11437992002-04-12 09:54:03 +000015210ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015212rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015214echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15215echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015216if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015218#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015219_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015220
15221fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015222
Martin v. Löwis11437992002-04-12 09:54:03 +000015223echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15224echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15225if test "${ac_cv_c_const+set}" = set; then
15226 echo $ECHO_N "(cached) $ECHO_C" >&6
15227else
15228 cat >conftest.$ac_ext <<_ACEOF
15229#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015230/* confdefs.h. */
15231_ACEOF
15232cat confdefs.h >>conftest.$ac_ext
15233cat >>conftest.$ac_ext <<_ACEOF
15234/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015235
Martin v. Löwis11437992002-04-12 09:54:03 +000015236int
15237main ()
15238{
15239/* FIXME: Include the comments suggested by Paul. */
15240#ifndef __cplusplus
15241 /* Ultrix mips cc rejects this. */
15242 typedef int charset[2];
15243 const charset x;
15244 /* SunOS 4.1.1 cc rejects this. */
15245 char const *const *ccp;
15246 char **p;
15247 /* NEC SVR4.0.2 mips cc rejects this. */
15248 struct point {int x, y;};
15249 static struct point const zero = {0,0};
15250 /* AIX XL C 1.02.0.0 rejects this.
15251 It does not let you subtract one const X* pointer from another in
15252 an arm of an if-expression whose if-part is not a constant
15253 expression */
15254 const char *g = "string";
15255 ccp = &g + (g ? g-g : 0);
15256 /* HPUX 7.0 cc rejects these. */
15257 ++ccp;
15258 p = (char**) ccp;
15259 ccp = (char const *const *) p;
15260 { /* SCO 3.2v4 cc rejects this. */
15261 char *t;
15262 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015263
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 *t++ = 0;
15265 }
15266 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15267 int x[] = {25, 17};
15268 const int *foo = &x[0];
15269 ++foo;
15270 }
15271 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15272 typedef const int *iptr;
15273 iptr p = 0;
15274 ++p;
15275 }
15276 { /* AIX XL C 1.02.0.0 rejects this saying
15277 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15278 struct s { int j; const int *ap[3]; };
15279 struct s *b; b->j = 5;
15280 }
15281 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15282 const int foo = 10;
15283 }
15284#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015285
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 ;
15287 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015288}
Martin v. Löwis11437992002-04-12 09:54:03 +000015289_ACEOF
15290rm -f conftest.$ac_objext
15291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15292 (eval $ac_compile) 2>&5
15293 ac_status=$?
15294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15295 (exit $ac_status); } &&
15296 { ac_try='test -s conftest.$ac_objext'
15297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15298 (eval $ac_try) 2>&5
15299 ac_status=$?
15300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15301 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015302 ac_cv_c_const=yes
15303else
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015305sed 's/^/| /' conftest.$ac_ext >&5
15306
Martin v. Löwis11437992002-04-12 09:54:03 +000015307ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015309rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015311echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15312echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015313if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
15315cat >>confdefs.h <<\_ACEOF
15316#define const
15317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015318
15319fi
15320
Michael W. Hudson54241132001-12-07 15:38:26 +000015321
Guido van Rossumda88dad1995-01-26 00:46:29 +000015322works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015323echo "$as_me:$LINENO: checking for working volatile" >&5
15324echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15325cat >conftest.$ac_ext <<_ACEOF
15326#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* confdefs.h. */
15328_ACEOF
15329cat confdefs.h >>conftest.$ac_ext
15330cat >>conftest.$ac_ext <<_ACEOF
15331/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015332
Martin v. Löwis11437992002-04-12 09:54:03 +000015333int
15334main ()
15335{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015336volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 ;
15338 return 0;
15339}
15340_ACEOF
15341rm -f conftest.$ac_objext
15342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15343 (eval $ac_compile) 2>&5
15344 ac_status=$?
15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346 (exit $ac_status); } &&
15347 { ac_try='test -s conftest.$ac_objext'
15348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15349 (eval $ac_try) 2>&5
15350 ac_status=$?
15351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15352 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015353 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015354else
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015356sed 's/^/| /' conftest.$ac_ext >&5
15357
Martin v. Löwis11437992002-04-12 09:54:03 +000015358
15359cat >>confdefs.h <<\_ACEOF
15360#define volatile
15361_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015362
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015363
Guido van Rossum627b2d71993-12-24 10:39:16 +000015364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015365rm -f conftest.$ac_objext conftest.$ac_ext
15366echo "$as_me:$LINENO: result: $works" >&5
15367echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015368
Guido van Rossumda88dad1995-01-26 00:46:29 +000015369works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015370echo "$as_me:$LINENO: checking for working signed char" >&5
15371echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15372cat >conftest.$ac_ext <<_ACEOF
15373#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015374/* confdefs.h. */
15375_ACEOF
15376cat confdefs.h >>conftest.$ac_ext
15377cat >>conftest.$ac_ext <<_ACEOF
15378/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015379
Martin v. Löwis11437992002-04-12 09:54:03 +000015380int
15381main ()
15382{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015383signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015384 ;
15385 return 0;
15386}
15387_ACEOF
15388rm -f conftest.$ac_objext
15389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15390 (eval $ac_compile) 2>&5
15391 ac_status=$?
15392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15393 (exit $ac_status); } &&
15394 { ac_try='test -s conftest.$ac_objext'
15395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15396 (eval $ac_try) 2>&5
15397 ac_status=$?
15398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015400 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015401else
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015403sed 's/^/| /' conftest.$ac_ext >&5
15404
Martin v. Löwis11437992002-04-12 09:54:03 +000015405
15406cat >>confdefs.h <<\_ACEOF
15407#define signed
15408_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015409
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015410
Guido van Rossum7f43da71994-08-01 12:15:30 +000015411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015412rm -f conftest.$ac_objext conftest.$ac_ext
15413echo "$as_me:$LINENO: result: $works" >&5
15414echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015415
Guido van Rossumda88dad1995-01-26 00:46:29 +000015416have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015417echo "$as_me:$LINENO: checking for prototypes" >&5
15418echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15419cat >conftest.$ac_ext <<_ACEOF
15420#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015421/* confdefs.h. */
15422_ACEOF
15423cat confdefs.h >>conftest.$ac_ext
15424cat >>conftest.$ac_ext <<_ACEOF
15425/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015426int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015427int
15428main ()
15429{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015430return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 ;
15432 return 0;
15433}
15434_ACEOF
15435rm -f conftest.$ac_objext
15436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15437 (eval $ac_compile) 2>&5
15438 ac_status=$?
15439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15440 (exit $ac_status); } &&
15441 { ac_try='test -s conftest.$ac_objext'
15442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15443 (eval $ac_try) 2>&5
15444 ac_status=$?
15445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15446 (exit $ac_status); }; }; then
15447
15448
15449cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015450#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015451_ACEOF
15452
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015453 have_prototypes=yes
15454
Guido van Rossumf78abae1997-01-21 22:02:36 +000015455else
Martin v. Löwis11437992002-04-12 09:54:03 +000015456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015457sed 's/^/| /' conftest.$ac_ext >&5
15458
Guido van Rossum7f43da71994-08-01 12:15:30 +000015459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015460rm -f conftest.$ac_objext conftest.$ac_ext
15461echo "$as_me:$LINENO: result: $have_prototypes" >&5
15462echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015463
Guido van Rossumda88dad1995-01-26 00:46:29 +000015464works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015465echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15466echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15467cat >conftest.$ac_ext <<_ACEOF
15468#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015469/* confdefs.h. */
15470_ACEOF
15471cat confdefs.h >>conftest.$ac_ext
15472cat >>conftest.$ac_ext <<_ACEOF
15473/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015474
15475#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015476int foo(int x, ...) {
15477 va_list va;
15478 va_start(va, x);
15479 va_arg(va, int);
15480 va_arg(va, char *);
15481 va_arg(va, double);
15482 return 0;
15483}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485int
15486main ()
15487{
Guido van Rossum90eea071996-08-30 20:58:57 +000015488return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015489 ;
15490 return 0;
15491}
15492_ACEOF
15493rm -f conftest.$ac_objext
15494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15495 (eval $ac_compile) 2>&5
15496 ac_status=$?
15497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15498 (exit $ac_status); } &&
15499 { ac_try='test -s conftest.$ac_objext'
15500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15501 (eval $ac_try) 2>&5
15502 ac_status=$?
15503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504 (exit $ac_status); }; }; then
15505
15506
15507cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015508#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015509_ACEOF
15510
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015511 works=yes
15512
Guido van Rossumf78abae1997-01-21 22:02:36 +000015513else
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015515sed 's/^/| /' conftest.$ac_ext >&5
15516
Guido van Rossum627b2d71993-12-24 10:39:16 +000015517fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015518rm -f conftest.$ac_objext conftest.$ac_ext
15519echo "$as_me:$LINENO: result: $works" >&5
15520echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015521
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015522# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015523echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15524echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15525cat >conftest.$ac_ext <<_ACEOF
15526#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015527/* confdefs.h. */
15528_ACEOF
15529cat confdefs.h >>conftest.$ac_ext
15530cat >>conftest.$ac_ext <<_ACEOF
15531/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015532#include <sys/types.h>
15533#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015534int
15535main ()
15536{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015537struct sockaddr x;
15538x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015539 ;
15540 return 0;
15541}
15542_ACEOF
15543rm -f conftest.$ac_objext
15544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15545 (eval $ac_compile) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); } &&
15549 { ac_try='test -s conftest.$ac_objext'
15550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15551 (eval $ac_try) 2>&5
15552 ac_status=$?
15553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15554 (exit $ac_status); }; }; then
15555 echo "$as_me:$LINENO: result: yes" >&5
15556echo "${ECHO_T}yes" >&6
15557
15558cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015559#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015560_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015561
15562else
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015564sed 's/^/| /' conftest.$ac_ext >&5
15565
Martin v. Löwis11437992002-04-12 09:54:03 +000015566echo "$as_me:$LINENO: result: no" >&5
15567echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015569rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015570
Guido van Rossumda88dad1995-01-26 00:46:29 +000015571va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015572echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15573echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15574cat >conftest.$ac_ext <<_ACEOF
15575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015576/* confdefs.h. */
15577_ACEOF
15578cat confdefs.h >>conftest.$ac_ext
15579cat >>conftest.$ac_ext <<_ACEOF
15580/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015581
15582#ifdef HAVE_STDARG_PROTOTYPES
15583#include <stdarg.h>
15584#else
15585#include <varargs.h>
15586#endif
15587
Martin v. Löwis11437992002-04-12 09:54:03 +000015588int
15589main ()
15590{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015591va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 ;
15593 return 0;
15594}
15595_ACEOF
15596rm -f conftest.$ac_objext
15597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15598 (eval $ac_compile) 2>&5
15599 ac_status=$?
15600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15601 (exit $ac_status); } &&
15602 { ac_try='test -s conftest.$ac_objext'
15603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15604 (eval $ac_try) 2>&5
15605 ac_status=$?
15606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15607 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015608 :
15609else
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015611sed 's/^/| /' conftest.$ac_ext >&5
15612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613
15614
15615cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015616#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015617_ACEOF
15618
Guido van Rossumda88dad1995-01-26 00:46:29 +000015619 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015620
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015622rm -f conftest.$ac_objext conftest.$ac_ext
15623echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15624echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015625
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015626# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
15628
15629
15630echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15631echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15632if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15633 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015634else
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 cat >conftest.$ac_ext <<_ACEOF
15636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015637/* confdefs.h. */
15638_ACEOF
15639cat confdefs.h >>conftest.$ac_ext
15640cat >>conftest.$ac_ext <<_ACEOF
15641/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015642/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015643 which can conflict with char gethostbyname_r (); below.
15644 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015645 <limits.h> exists even on freestanding compilers. Under hpux,
15646 including <limits.h> includes <sys/time.h> and causes problems
15647 checking for functions defined therein. */
15648#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015649# include <limits.h>
15650#else
15651# include <assert.h>
15652#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015653/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015654#ifdef __cplusplus
15655extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015656{
Martin v. Löwis11437992002-04-12 09:54:03 +000015657#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015658/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 builtin and then its argument prototype would still apply. */
15660char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015661/* The GNU C library defines this for functions which it implements
15662 to always fail with ENOSYS. Some functions are actually named
15663 something starting with __ and the normal name is an alias. */
15664#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15665choke me
15666#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015667char (*f) () = gethostbyname_r;
15668#endif
15669#ifdef __cplusplus
15670}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015671#endif
15672
Skip Montanaro6dead952003-09-25 14:50:04 +000015673int
15674main ()
15675{
15676return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 ;
15678 return 0;
15679}
15680_ACEOF
15681rm -f conftest.$ac_objext conftest$ac_exeext
15682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15683 (eval $ac_link) 2>&5
15684 ac_status=$?
15685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686 (exit $ac_status); } &&
15687 { ac_try='test -s conftest$ac_exeext'
15688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15689 (eval $ac_try) 2>&5
15690 ac_status=$?
15691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15692 (exit $ac_status); }; }; then
15693 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015694else
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015696sed 's/^/| /' conftest.$ac_ext >&5
15697
Martin v. Löwis11437992002-04-12 09:54:03 +000015698ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015700rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015702echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15703echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15704if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015705
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015707#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015708_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015709
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15711echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015712 OLD_CFLAGS=$CFLAGS
15713 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 cat >conftest.$ac_ext <<_ACEOF
15715#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015716/* confdefs.h. */
15717_ACEOF
15718cat confdefs.h >>conftest.$ac_ext
15719cat >>conftest.$ac_ext <<_ACEOF
15720/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015721
15722# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Martin v. Löwis11437992002-04-12 09:54:03 +000015724int
15725main ()
15726{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015727
15728 char *name;
15729 struct hostent *he, *res;
15730 char buffer[2048];
15731 int buflen = 2048;
15732 int h_errnop;
15733
15734 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
15736 ;
15737 return 0;
15738}
15739_ACEOF
15740rm -f conftest.$ac_objext
15741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15742 (eval $ac_compile) 2>&5
15743 ac_status=$?
15744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15745 (exit $ac_status); } &&
15746 { ac_try='test -s conftest.$ac_objext'
15747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15748 (eval $ac_try) 2>&5
15749 ac_status=$?
15750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751 (exit $ac_status); }; }; then
15752
15753 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015754#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015755_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015756
Martin v. Löwis11437992002-04-12 09:54:03 +000015757
15758cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015759#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015760_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015761
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 echo "$as_me:$LINENO: result: yes" >&5
15763echo "${ECHO_T}yes" >&6
15764
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015765else
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015767sed 's/^/| /' conftest.$ac_ext >&5
15768
Martin v. Löwis11437992002-04-12 09:54:03 +000015769
15770 echo "$as_me:$LINENO: result: no" >&5
15771echo "${ECHO_T}no" >&6
15772 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15773echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15774 cat >conftest.$ac_ext <<_ACEOF
15775#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015776/* confdefs.h. */
15777_ACEOF
15778cat confdefs.h >>conftest.$ac_ext
15779cat >>conftest.$ac_ext <<_ACEOF
15780/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015781
15782# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
Martin v. Löwis11437992002-04-12 09:54:03 +000015784int
15785main ()
15786{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015787
15788 char *name;
15789 struct hostent *he;
15790 char buffer[2048];
15791 int buflen = 2048;
15792 int h_errnop;
15793
15794 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
15796 ;
15797 return 0;
15798}
15799_ACEOF
15800rm -f conftest.$ac_objext
15801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15802 (eval $ac_compile) 2>&5
15803 ac_status=$?
15804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15805 (exit $ac_status); } &&
15806 { ac_try='test -s conftest.$ac_objext'
15807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15808 (eval $ac_try) 2>&5
15809 ac_status=$?
15810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15811 (exit $ac_status); }; }; then
15812
15813 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015814#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015815_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015819#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015820_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015821
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 echo "$as_me:$LINENO: result: yes" >&5
15823echo "${ECHO_T}yes" >&6
15824
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015825else
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015827sed 's/^/| /' conftest.$ac_ext >&5
15828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830 echo "$as_me:$LINENO: result: no" >&5
15831echo "${ECHO_T}no" >&6
15832 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15833echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15834 cat >conftest.$ac_ext <<_ACEOF
15835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015836/* confdefs.h. */
15837_ACEOF
15838cat confdefs.h >>conftest.$ac_ext
15839cat >>conftest.$ac_ext <<_ACEOF
15840/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015841
15842# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844int
15845main ()
15846{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015847
15848 char *name;
15849 struct hostent *he;
15850 struct hostent_data data;
15851
15852 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
15854 ;
15855 return 0;
15856}
15857_ACEOF
15858rm -f conftest.$ac_objext
15859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15860 (eval $ac_compile) 2>&5
15861 ac_status=$?
15862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15863 (exit $ac_status); } &&
15864 { ac_try='test -s conftest.$ac_objext'
15865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15866 (eval $ac_try) 2>&5
15867 ac_status=$?
15868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15869 (exit $ac_status); }; }; then
15870
15871 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015872#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015873_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015874
Martin v. Löwis11437992002-04-12 09:54:03 +000015875
15876cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015877#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015878_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015879
Martin v. Löwis11437992002-04-12 09:54:03 +000015880 echo "$as_me:$LINENO: result: yes" >&5
15881echo "${ECHO_T}yes" >&6
15882
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015883else
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015885sed 's/^/| /' conftest.$ac_ext >&5
15886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887
15888 echo "$as_me:$LINENO: result: no" >&5
15889echo "${ECHO_T}no" >&6
15890
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015891fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015892rm -f conftest.$ac_objext conftest.$ac_ext
15893
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015895rm -f conftest.$ac_objext conftest.$ac_ext
15896
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015898rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015899 CFLAGS=$OLD_CFLAGS
15900
15901else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903
15904for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015905do
Martin v. Löwis11437992002-04-12 09:54:03 +000015906as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15907echo "$as_me:$LINENO: checking for $ac_func" >&5
15908echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15909if eval "test \"\${$as_ac_var+set}\" = set"; then
15910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015911else
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 cat >conftest.$ac_ext <<_ACEOF
15913#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015914/* confdefs.h. */
15915_ACEOF
15916cat confdefs.h >>conftest.$ac_ext
15917cat >>conftest.$ac_ext <<_ACEOF
15918/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015919/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015920 which can conflict with char $ac_func (); below.
15921 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015922 <limits.h> exists even on freestanding compilers. Under hpux,
15923 including <limits.h> includes <sys/time.h> and causes problems
15924 checking for functions defined therein. */
15925#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015926# include <limits.h>
15927#else
15928# include <assert.h>
15929#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015930/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015931#ifdef __cplusplus
15932extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015933{
Martin v. Löwis11437992002-04-12 09:54:03 +000015934#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015935/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 builtin and then its argument prototype would still apply. */
15937char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015938/* The GNU C library defines this for functions which it implements
15939 to always fail with ENOSYS. Some functions are actually named
15940 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015941#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015942choke me
15943#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015944char (*f) () = $ac_func;
15945#endif
15946#ifdef __cplusplus
15947}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015948#endif
15949
Skip Montanaro6dead952003-09-25 14:50:04 +000015950int
15951main ()
15952{
15953return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 ;
15955 return 0;
15956}
15957_ACEOF
15958rm -f conftest.$ac_objext conftest$ac_exeext
15959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15960 (eval $ac_link) 2>&5
15961 ac_status=$?
15962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15963 (exit $ac_status); } &&
15964 { ac_try='test -s conftest$ac_exeext'
15965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15966 (eval $ac_try) 2>&5
15967 ac_status=$?
15968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15969 (exit $ac_status); }; }; then
15970 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015971else
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015973sed 's/^/| /' conftest.$ac_ext >&5
15974
Martin v. Löwis11437992002-04-12 09:54:03 +000015975eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015977rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015979echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15980echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15981if test `eval echo '${'$as_ac_var'}'` = yes; then
15982 cat >>confdefs.h <<_ACEOF
15983#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15984_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015985
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015986fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015987done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015988
Michael W. Hudson54241132001-12-07 15:38:26 +000015989
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015990fi
15991
Michael W. Hudson54241132001-12-07 15:38:26 +000015992
15993
15994
15995
15996
15997
Guido van Rossum627b2d71993-12-24 10:39:16 +000015998# checks for system services
15999# (none yet)
16000
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016001# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016002echo "$as_me:$LINENO: checking for __fpu_control" >&5
16003echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16004if test "${ac_cv_func___fpu_control+set}" = set; then
16005 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016006else
Martin v. Löwis11437992002-04-12 09:54:03 +000016007 cat >conftest.$ac_ext <<_ACEOF
16008#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016009/* confdefs.h. */
16010_ACEOF
16011cat confdefs.h >>conftest.$ac_ext
16012cat >>conftest.$ac_ext <<_ACEOF
16013/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016014/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016015 which can conflict with char __fpu_control (); below.
16016 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016017 <limits.h> exists even on freestanding compilers. Under hpux,
16018 including <limits.h> includes <sys/time.h> and causes problems
16019 checking for functions defined therein. */
16020#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016021# include <limits.h>
16022#else
16023# include <assert.h>
16024#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016025/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016026#ifdef __cplusplus
16027extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016028{
Martin v. Löwis11437992002-04-12 09:54:03 +000016029#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016030/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 builtin and then its argument prototype would still apply. */
16032char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016033/* The GNU C library defines this for functions which it implements
16034 to always fail with ENOSYS. Some functions are actually named
16035 something starting with __ and the normal name is an alias. */
16036#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16037choke me
16038#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016039char (*f) () = __fpu_control;
16040#endif
16041#ifdef __cplusplus
16042}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016043#endif
16044
Skip Montanaro6dead952003-09-25 14:50:04 +000016045int
16046main ()
16047{
16048return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016049 ;
16050 return 0;
16051}
16052_ACEOF
16053rm -f conftest.$ac_objext conftest$ac_exeext
16054if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16055 (eval $ac_link) 2>&5
16056 ac_status=$?
16057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16058 (exit $ac_status); } &&
16059 { ac_try='test -s conftest$ac_exeext'
16060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16061 (eval $ac_try) 2>&5
16062 ac_status=$?
16063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064 (exit $ac_status); }; }; then
16065 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016066else
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016068sed 's/^/| /' conftest.$ac_ext >&5
16069
Martin v. Löwis11437992002-04-12 09:54:03 +000016070ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016071fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016072rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016074echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16075echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16076if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016077 :
16078else
Martin v. Löwis11437992002-04-12 09:54:03 +000016079
16080echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16081echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16082if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016084else
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016086LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016087cat >conftest.$ac_ext <<_ACEOF
16088#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016089/* confdefs.h. */
16090_ACEOF
16091cat confdefs.h >>conftest.$ac_ext
16092cat >>conftest.$ac_ext <<_ACEOF
16093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016094
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016095/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016096#ifdef __cplusplus
16097extern "C"
16098#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016099/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016100 builtin and then its argument prototype would still apply. */
16101char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016102int
16103main ()
16104{
16105__fpu_control ();
16106 ;
16107 return 0;
16108}
16109_ACEOF
16110rm -f conftest.$ac_objext conftest$ac_exeext
16111if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16112 (eval $ac_link) 2>&5
16113 ac_status=$?
16114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16115 (exit $ac_status); } &&
16116 { ac_try='test -s conftest$ac_exeext'
16117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16118 (eval $ac_try) 2>&5
16119 ac_status=$?
16120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16121 (exit $ac_status); }; }; then
16122 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016123else
Martin v. Löwis11437992002-04-12 09:54:03 +000016124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016125sed 's/^/| /' conftest.$ac_ext >&5
16126
Martin v. Löwis11437992002-04-12 09:54:03 +000016127ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016129rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16130LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016132echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16133echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16134if test $ac_cv_lib_ieee___fpu_control = yes; then
16135 cat >>confdefs.h <<_ACEOF
16136#define HAVE_LIBIEEE 1
16137_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016138
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016139 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016140
Guido van Rossum627b2d71993-12-24 10:39:16 +000016141fi
16142
Michael W. Hudson54241132001-12-07 15:38:26 +000016143
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016144fi
16145
Michael W. Hudson54241132001-12-07 15:38:26 +000016146
Guido van Rossum7f253911997-05-09 02:42:48 +000016147# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016148echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16149echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16150
Guido van Rossum7f253911997-05-09 02:42:48 +000016151# Check whether --with-fpectl or --without-fpectl was given.
16152if test "${with_fpectl+set}" = set; then
16153 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016154
Guido van Rossum7f253911997-05-09 02:42:48 +000016155if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016156then
16157
16158cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016159#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016160_ACEOF
16161
16162 echo "$as_me:$LINENO: result: yes" >&5
16163echo "${ECHO_T}yes" >&6
16164else echo "$as_me:$LINENO: result: no" >&5
16165echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016166fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016167else
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 echo "$as_me:$LINENO: result: no" >&5
16169echo "${ECHO_T}no" >&6
16170fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016171
Guido van Rossum7f43da71994-08-01 12:15:30 +000016172# check for --with-libm=...
16173
Guido van Rossum563e7081996-09-10 18:20:48 +000016174case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016175Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016176BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016177*) LIBM=-lm
16178esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016179echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16180echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16181
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016182# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016183if test "${with_libm+set}" = set; then
16184 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016185
Guido van Rossum7f253911997-05-09 02:42:48 +000016186if test "$withval" = no
16187then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16189echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016190elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016191then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16193echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16194else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16195echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16196 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016197fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016198else
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16200echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16201fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016202
16203# check for --with-libc=...
16204
Martin v. Löwis11437992002-04-12 09:54:03 +000016205echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16206echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16207
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016208# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016209if test "${with_libc+set}" = set; then
16210 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016211
Guido van Rossum7f253911997-05-09 02:42:48 +000016212if test "$withval" = no
16213then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16215echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016216elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016217then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16219echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16220else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16221echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16222 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016223fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016224else
Martin v. Löwis11437992002-04-12 09:54:03 +000016225 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16226echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16227fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016228
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016229# check for hypot() in math library
16230LIBS_SAVE=$LIBS
16231LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016232
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016233for ac_func in hypot
16234do
Martin v. Löwis11437992002-04-12 09:54:03 +000016235as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16236echo "$as_me:$LINENO: checking for $ac_func" >&5
16237echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16238if eval "test \"\${$as_ac_var+set}\" = set"; then
16239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016240else
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 cat >conftest.$ac_ext <<_ACEOF
16242#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016243/* confdefs.h. */
16244_ACEOF
16245cat confdefs.h >>conftest.$ac_ext
16246cat >>conftest.$ac_ext <<_ACEOF
16247/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016248/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016249 which can conflict with char $ac_func (); below.
16250 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016251 <limits.h> exists even on freestanding compilers. Under hpux,
16252 including <limits.h> includes <sys/time.h> and causes problems
16253 checking for functions defined therein. */
16254#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016255# include <limits.h>
16256#else
16257# include <assert.h>
16258#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016259/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016260#ifdef __cplusplus
16261extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016262{
Martin v. Löwis11437992002-04-12 09:54:03 +000016263#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016264/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 builtin and then its argument prototype would still apply. */
16266char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016267/* The GNU C library defines this for functions which it implements
16268 to always fail with ENOSYS. Some functions are actually named
16269 something starting with __ and the normal name is an alias. */
16270#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16271choke me
16272#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016273char (*f) () = $ac_func;
16274#endif
16275#ifdef __cplusplus
16276}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016277#endif
16278
Skip Montanaro6dead952003-09-25 14:50:04 +000016279int
16280main ()
16281{
16282return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 ;
16284 return 0;
16285}
16286_ACEOF
16287rm -f conftest.$ac_objext conftest$ac_exeext
16288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16289 (eval $ac_link) 2>&5
16290 ac_status=$?
16291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16292 (exit $ac_status); } &&
16293 { ac_try='test -s conftest$ac_exeext'
16294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16295 (eval $ac_try) 2>&5
16296 ac_status=$?
16297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16298 (exit $ac_status); }; }; then
16299 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016300else
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016302sed 's/^/| /' conftest.$ac_ext >&5
16303
Martin v. Löwis11437992002-04-12 09:54:03 +000016304eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016308echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16309echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16310if test `eval echo '${'$as_ac_var'}'` = yes; then
16311 cat >>confdefs.h <<_ACEOF
16312#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16313_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016314
Michael W. Hudson54241132001-12-07 15:38:26 +000016315else
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016317fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016318done
16319
Michael W. Hudson54241132001-12-07 15:38:26 +000016320
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016321LIBS=$LIBS_SAVE
16322
Guido van Rossumef2255b2000-03-10 22:30:29 +000016323# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016324if test "${ac_cv_header_wchar_h+set}" = set; then
16325 echo "$as_me:$LINENO: checking for wchar.h" >&5
16326echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16327if test "${ac_cv_header_wchar_h+set}" = set; then
16328 echo $ECHO_N "(cached) $ECHO_C" >&6
16329fi
16330echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16331echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016332else
Martin v. Löwis11437992002-04-12 09:54:03 +000016333 # Is the header compilable?
16334echo "$as_me:$LINENO: checking wchar.h usability" >&5
16335echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16336cat >conftest.$ac_ext <<_ACEOF
16337#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016338/* confdefs.h. */
16339_ACEOF
16340cat confdefs.h >>conftest.$ac_ext
16341cat >>conftest.$ac_ext <<_ACEOF
16342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016343$ac_includes_default
16344#include <wchar.h>
16345_ACEOF
16346rm -f conftest.$ac_objext
16347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16348 (eval $ac_compile) 2>&5
16349 ac_status=$?
16350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16351 (exit $ac_status); } &&
16352 { ac_try='test -s conftest.$ac_objext'
16353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16354 (eval $ac_try) 2>&5
16355 ac_status=$?
16356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16357 (exit $ac_status); }; }; then
16358 ac_header_compiler=yes
16359else
16360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016361sed 's/^/| /' conftest.$ac_ext >&5
16362
Martin v. Löwis11437992002-04-12 09:54:03 +000016363ac_header_compiler=no
16364fi
16365rm -f conftest.$ac_objext conftest.$ac_ext
16366echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16367echo "${ECHO_T}$ac_header_compiler" >&6
16368
16369# Is the header present?
16370echo "$as_me:$LINENO: checking wchar.h presence" >&5
16371echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16372cat >conftest.$ac_ext <<_ACEOF
16373#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016374/* confdefs.h. */
16375_ACEOF
16376cat confdefs.h >>conftest.$ac_ext
16377cat >>conftest.$ac_ext <<_ACEOF
16378/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016379#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016380_ACEOF
16381if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16382 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16383 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016384 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 rm -f conftest.er1
16386 cat conftest.err >&5
16387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388 (exit $ac_status); } >/dev/null; then
16389 if test -s conftest.err; then
16390 ac_cpp_err=$ac_c_preproc_warn_flag
16391 else
16392 ac_cpp_err=
16393 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016394else
Martin v. Löwis11437992002-04-12 09:54:03 +000016395 ac_cpp_err=yes
16396fi
16397if test -z "$ac_cpp_err"; then
16398 ac_header_preproc=yes
16399else
16400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016401sed 's/^/| /' conftest.$ac_ext >&5
16402
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016404fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016405rm -f conftest.err conftest.$ac_ext
16406echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16407echo "${ECHO_T}$ac_header_preproc" >&6
16408
16409# So? What about this header?
16410case $ac_header_compiler:$ac_header_preproc in
16411 yes:no )
16412 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16413echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16414 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016415echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16416 (
16417 cat <<\_ASBOX
16418## ------------------------------------ ##
16419## Report this to bug-autoconf@gnu.org. ##
16420## ------------------------------------ ##
16421_ASBOX
16422 ) |
16423 sed "s/^/$as_me: WARNING: /" >&2
16424 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016425 no:yes )
16426 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16427echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16428 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16429echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16430 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016431echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16432 (
16433 cat <<\_ASBOX
16434## ------------------------------------ ##
16435## Report this to bug-autoconf@gnu.org. ##
16436## ------------------------------------ ##
16437_ASBOX
16438 ) |
16439 sed "s/^/$as_me: WARNING: /" >&2
16440 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016441esac
16442echo "$as_me:$LINENO: checking for wchar.h" >&5
16443echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16444if test "${ac_cv_header_wchar_h+set}" = set; then
16445 echo $ECHO_N "(cached) $ECHO_C" >&6
16446else
16447 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016449echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16450echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16451
16452fi
16453if test $ac_cv_header_wchar_h = yes; then
16454
16455
16456cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016457#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016458_ACEOF
16459
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016460 wchar_h="yes"
16461
Guido van Rossumef2255b2000-03-10 22:30:29 +000016462else
Martin v. Löwis11437992002-04-12 09:54:03 +000016463 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016464
16465fi
16466
Michael W. Hudson54241132001-12-07 15:38:26 +000016467
Martin v. Löwis11437992002-04-12 09:54:03 +000016468
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016469# determine wchar_t size
16470if test "$wchar_h" = yes
16471then
Martin v. Löwis11437992002-04-12 09:54:03 +000016472 echo "$as_me:$LINENO: checking for wchar_t" >&5
16473echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16474if test "${ac_cv_type_wchar_t+set}" = set; then
16475 echo $ECHO_N "(cached) $ECHO_C" >&6
16476else
16477 cat >conftest.$ac_ext <<_ACEOF
16478#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016479/* confdefs.h. */
16480_ACEOF
16481cat confdefs.h >>conftest.$ac_ext
16482cat >>conftest.$ac_ext <<_ACEOF
16483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016484#include <wchar.h>
16485
Martin v. Löwis11437992002-04-12 09:54:03 +000016486int
16487main ()
16488{
16489if ((wchar_t *) 0)
16490 return 0;
16491if (sizeof (wchar_t))
16492 return 0;
16493 ;
16494 return 0;
16495}
16496_ACEOF
16497rm -f conftest.$ac_objext
16498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16499 (eval $ac_compile) 2>&5
16500 ac_status=$?
16501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16502 (exit $ac_status); } &&
16503 { ac_try='test -s conftest.$ac_objext'
16504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16505 (eval $ac_try) 2>&5
16506 ac_status=$?
16507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16508 (exit $ac_status); }; }; then
16509 ac_cv_type_wchar_t=yes
16510else
16511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016512sed 's/^/| /' conftest.$ac_ext >&5
16513
Martin v. Löwis11437992002-04-12 09:54:03 +000016514ac_cv_type_wchar_t=no
16515fi
16516rm -f conftest.$ac_objext conftest.$ac_ext
16517fi
16518echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16519echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16520
16521echo "$as_me:$LINENO: checking size of wchar_t" >&5
16522echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16523if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16524 echo $ECHO_N "(cached) $ECHO_C" >&6
16525else
16526 if test "$ac_cv_type_wchar_t" = yes; then
16527 # The cast to unsigned long works around a bug in the HP C Compiler
16528 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16529 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16530 # This bug is HP SR number 8606223364.
16531 if test "$cross_compiling" = yes; then
16532 # Depending upon the size, compute the lo and hi bounds.
16533cat >conftest.$ac_ext <<_ACEOF
16534#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016535/* confdefs.h. */
16536_ACEOF
16537cat confdefs.h >>conftest.$ac_ext
16538cat >>conftest.$ac_ext <<_ACEOF
16539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016540#include <wchar.h>
16541
Martin v. Löwis11437992002-04-12 09:54:03 +000016542int
16543main ()
16544{
16545static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16546test_array [0] = 0
16547
16548 ;
16549 return 0;
16550}
16551_ACEOF
16552rm -f conftest.$ac_objext
16553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16554 (eval $ac_compile) 2>&5
16555 ac_status=$?
16556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); } &&
16558 { ac_try='test -s conftest.$ac_objext'
16559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16560 (eval $ac_try) 2>&5
16561 ac_status=$?
16562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16563 (exit $ac_status); }; }; then
16564 ac_lo=0 ac_mid=0
16565 while :; do
16566 cat >conftest.$ac_ext <<_ACEOF
16567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016568/* confdefs.h. */
16569_ACEOF
16570cat confdefs.h >>conftest.$ac_ext
16571cat >>conftest.$ac_ext <<_ACEOF
16572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016573#include <wchar.h>
16574
Martin v. Löwis11437992002-04-12 09:54:03 +000016575int
16576main ()
16577{
16578static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16579test_array [0] = 0
16580
16581 ;
16582 return 0;
16583}
16584_ACEOF
16585rm -f conftest.$ac_objext
16586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16587 (eval $ac_compile) 2>&5
16588 ac_status=$?
16589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16590 (exit $ac_status); } &&
16591 { ac_try='test -s conftest.$ac_objext'
16592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16593 (eval $ac_try) 2>&5
16594 ac_status=$?
16595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16596 (exit $ac_status); }; }; then
16597 ac_hi=$ac_mid; break
16598else
16599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016600sed 's/^/| /' conftest.$ac_ext >&5
16601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602ac_lo=`expr $ac_mid + 1`
16603 if test $ac_lo -le $ac_mid; then
16604 ac_lo= ac_hi=
16605 break
16606 fi
16607 ac_mid=`expr 2 '*' $ac_mid + 1`
16608fi
16609rm -f conftest.$ac_objext conftest.$ac_ext
16610 done
16611else
16612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016613sed 's/^/| /' conftest.$ac_ext >&5
16614
Martin v. Löwis11437992002-04-12 09:54:03 +000016615cat >conftest.$ac_ext <<_ACEOF
16616#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016617/* confdefs.h. */
16618_ACEOF
16619cat confdefs.h >>conftest.$ac_ext
16620cat >>conftest.$ac_ext <<_ACEOF
16621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016622#include <wchar.h>
16623
Martin v. Löwis11437992002-04-12 09:54:03 +000016624int
16625main ()
16626{
16627static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16628test_array [0] = 0
16629
16630 ;
16631 return 0;
16632}
16633_ACEOF
16634rm -f conftest.$ac_objext
16635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16636 (eval $ac_compile) 2>&5
16637 ac_status=$?
16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639 (exit $ac_status); } &&
16640 { ac_try='test -s conftest.$ac_objext'
16641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16642 (eval $ac_try) 2>&5
16643 ac_status=$?
16644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16645 (exit $ac_status); }; }; then
16646 ac_hi=-1 ac_mid=-1
16647 while :; do
16648 cat >conftest.$ac_ext <<_ACEOF
16649#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016650/* confdefs.h. */
16651_ACEOF
16652cat confdefs.h >>conftest.$ac_ext
16653cat >>conftest.$ac_ext <<_ACEOF
16654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016655#include <wchar.h>
16656
Martin v. Löwis11437992002-04-12 09:54:03 +000016657int
16658main ()
16659{
16660static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16661test_array [0] = 0
16662
16663 ;
16664 return 0;
16665}
16666_ACEOF
16667rm -f conftest.$ac_objext
16668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16669 (eval $ac_compile) 2>&5
16670 ac_status=$?
16671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16672 (exit $ac_status); } &&
16673 { ac_try='test -s conftest.$ac_objext'
16674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16675 (eval $ac_try) 2>&5
16676 ac_status=$?
16677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16678 (exit $ac_status); }; }; then
16679 ac_lo=$ac_mid; break
16680else
16681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016682sed 's/^/| /' conftest.$ac_ext >&5
16683
Martin v. Löwis11437992002-04-12 09:54:03 +000016684ac_hi=`expr '(' $ac_mid ')' - 1`
16685 if test $ac_mid -le $ac_hi; then
16686 ac_lo= ac_hi=
16687 break
16688 fi
16689 ac_mid=`expr 2 '*' $ac_mid`
16690fi
16691rm -f conftest.$ac_objext conftest.$ac_ext
16692 done
16693else
16694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016695sed 's/^/| /' conftest.$ac_ext >&5
16696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697ac_lo= ac_hi=
16698fi
16699rm -f conftest.$ac_objext conftest.$ac_ext
16700fi
16701rm -f conftest.$ac_objext conftest.$ac_ext
16702# Binary search between lo and hi bounds.
16703while test "x$ac_lo" != "x$ac_hi"; do
16704 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16705 cat >conftest.$ac_ext <<_ACEOF
16706#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016707/* confdefs.h. */
16708_ACEOF
16709cat confdefs.h >>conftest.$ac_ext
16710cat >>conftest.$ac_ext <<_ACEOF
16711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016712#include <wchar.h>
16713
Martin v. Löwis11437992002-04-12 09:54:03 +000016714int
16715main ()
16716{
16717static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16718test_array [0] = 0
16719
16720 ;
16721 return 0;
16722}
16723_ACEOF
16724rm -f conftest.$ac_objext
16725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16726 (eval $ac_compile) 2>&5
16727 ac_status=$?
16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729 (exit $ac_status); } &&
16730 { ac_try='test -s conftest.$ac_objext'
16731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16732 (eval $ac_try) 2>&5
16733 ac_status=$?
16734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16735 (exit $ac_status); }; }; then
16736 ac_hi=$ac_mid
16737else
16738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016739sed 's/^/| /' conftest.$ac_ext >&5
16740
Martin v. Löwis11437992002-04-12 09:54:03 +000016741ac_lo=`expr '(' $ac_mid ')' + 1`
16742fi
16743rm -f conftest.$ac_objext conftest.$ac_ext
16744done
16745case $ac_lo in
16746?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016747'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16748See \`config.log' for more details." >&5
16749echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16750See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 { (exit 1); exit 1; }; } ;;
16752esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016753else
16754 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016755 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16756See \`config.log' for more details." >&5
16757echo "$as_me: error: cannot run test program while cross compiling
16758See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016760else
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 cat >conftest.$ac_ext <<_ACEOF
16762#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016763/* confdefs.h. */
16764_ACEOF
16765cat confdefs.h >>conftest.$ac_ext
16766cat >>conftest.$ac_ext <<_ACEOF
16767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016768#include <wchar.h>
16769
16770long longval () { return (long) (sizeof (wchar_t)); }
16771unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016772#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016773#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016774int
16775main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016776{
Martin v. Löwis11437992002-04-12 09:54:03 +000016777
16778 FILE *f = fopen ("conftest.val", "w");
16779 if (! f)
16780 exit (1);
16781 if (((long) (sizeof (wchar_t))) < 0)
16782 {
16783 long i = longval ();
16784 if (i != ((long) (sizeof (wchar_t))))
16785 exit (1);
16786 fprintf (f, "%ld\n", i);
16787 }
16788 else
16789 {
16790 unsigned long i = ulongval ();
16791 if (i != ((long) (sizeof (wchar_t))))
16792 exit (1);
16793 fprintf (f, "%lu\n", i);
16794 }
16795 exit (ferror (f) || fclose (f) != 0);
16796
16797 ;
16798 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016799}
Martin v. Löwis11437992002-04-12 09:54:03 +000016800_ACEOF
16801rm -f conftest$ac_exeext
16802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16803 (eval $ac_link) 2>&5
16804 ac_status=$?
16805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16808 (eval $ac_try) 2>&5
16809 ac_status=$?
16810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16811 (exit $ac_status); }; }; then
16812 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016813else
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 echo "$as_me: program exited with status $ac_status" >&5
16815echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016816sed 's/^/| /' conftest.$ac_ext >&5
16817
Martin v. Löwis11437992002-04-12 09:54:03 +000016818( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016819{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16820See \`config.log' for more details." >&5
16821echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16822See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016823 { (exit 1); exit 1; }; }
16824fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016825rm -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 +000016826fi
16827fi
16828rm -f conftest.val
16829else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016830 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016831fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016833echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16834echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16835cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016836#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016837_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016838
Michael W. Hudson54241132001-12-07 15:38:26 +000016839
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016840fi
16841
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016842echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16843echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16844have_ucs4_tcl=no
16845cat >conftest.$ac_ext <<_ACEOF
16846#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016847/* confdefs.h. */
16848_ACEOF
16849cat confdefs.h >>conftest.$ac_ext
16850cat >>conftest.$ac_ext <<_ACEOF
16851/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016852
16853#include <tcl.h>
16854#if TCL_UTF_MAX != 6
16855# error "NOT UCS4_TCL"
16856#endif
16857int
16858main ()
16859{
16860
16861 ;
16862 return 0;
16863}
16864_ACEOF
16865rm -f conftest.$ac_objext
16866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16867 (eval $ac_compile) 2>&5
16868 ac_status=$?
16869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16870 (exit $ac_status); } &&
16871 { ac_try='test -s conftest.$ac_objext'
16872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16873 (eval $ac_try) 2>&5
16874 ac_status=$?
16875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876 (exit $ac_status); }; }; then
16877
16878
16879cat >>confdefs.h <<\_ACEOF
16880#define HAVE_UCS4_TCL 1
16881_ACEOF
16882
16883 have_ucs4_tcl=yes
16884
16885else
16886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016887sed 's/^/| /' conftest.$ac_ext >&5
16888
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016889fi
16890rm -f conftest.$ac_objext conftest.$ac_ext
16891echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16892echo "${ECHO_T}$have_ucs4_tcl" >&6
16893
Skip Montanaro6dead952003-09-25 14:50:04 +000016894# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016895if test "$wchar_h" = yes
16896then
16897 # check whether wchar_t is signed or not
16898 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16899echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16900 if test "${ac_cv_wchar_t_signed+set}" = set; then
16901 echo $ECHO_N "(cached) $ECHO_C" >&6
16902else
16903
16904 if test "$cross_compiling" = yes; then
16905 ac_cv_wchar_t_signed=yes
16906else
16907 cat >conftest.$ac_ext <<_ACEOF
16908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016909/* confdefs.h. */
16910_ACEOF
16911cat confdefs.h >>conftest.$ac_ext
16912cat >>conftest.$ac_ext <<_ACEOF
16913/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016914
16915 #include <wchar.h>
16916 int main()
16917 {
16918 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16919 }
16920
16921_ACEOF
16922rm -f conftest$ac_exeext
16923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16924 (eval $ac_link) 2>&5
16925 ac_status=$?
16926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16929 (eval $ac_try) 2>&5
16930 ac_status=$?
16931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16932 (exit $ac_status); }; }; then
16933 ac_cv_wchar_t_signed=yes
16934else
16935 echo "$as_me: program exited with status $ac_status" >&5
16936echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016937sed 's/^/| /' conftest.$ac_ext >&5
16938
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016939( exit $ac_status )
16940ac_cv_wchar_t_signed=no
16941fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016942rm -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 +000016943fi
16944fi
16945
16946 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
16947echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
16948fi
16949
Martin v. Löwis11437992002-04-12 09:54:03 +000016950echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16951echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016952# Check whether --enable-unicode or --disable-unicode was given.
16953if test "${enable_unicode+set}" = set; then
16954 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016955
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016956else
16957 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016958fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016959
16960if test $enable_unicode = yes
16961then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016962 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016963 case "$have_ucs4_tcl" in
16964 yes) enable_unicode="ucs4"
16965 ;;
16966 *) enable_unicode="ucs2"
16967 ;;
16968 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016969fi
16970
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016971
16972
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016973case "$enable_unicode" in
16974ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016976#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016977_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016978
16979 ;;
16980ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016982#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016983_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016984
16985 ;;
16986esac
16987
Michael W. Hudson54241132001-12-07 15:38:26 +000016988
Martin v. Löwis11437992002-04-12 09:54:03 +000016989
16990
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016991
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016992if test "$enable_unicode" = "no"
16993then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016994 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 echo "$as_me:$LINENO: result: not used" >&5
16996echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016997else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016998 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016999
17000cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017001#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017002_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017003
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017004
17005 # wchar_t is only usable if it maps to an unsigned type
17006 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17007 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017008 then
17009 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017010
Martin v. Löwis11437992002-04-12 09:54:03 +000017011cat >>confdefs.h <<\_ACEOF
17012#define HAVE_USABLE_WCHAR_T 1
17013_ACEOF
17014
17015 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017016#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017017_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017018
17019 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17020 then
17021 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017023#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017024_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017025
17026 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17027 then
17028 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017030#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017031_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017032
17033 else
17034 PY_UNICODE_TYPE="no type found"
17035 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017036 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17037echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017038fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017039
17040# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017041echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17042echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17043if test "${ac_cv_c_bigendian+set}" = set; then
17044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017045else
Martin v. Löwis11437992002-04-12 09:54:03 +000017046 # See if sys/param.h defines the BYTE_ORDER macro.
17047cat >conftest.$ac_ext <<_ACEOF
17048#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017049/* confdefs.h. */
17050_ACEOF
17051cat confdefs.h >>conftest.$ac_ext
17052cat >>conftest.$ac_ext <<_ACEOF
17053/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017054#include <sys/types.h>
17055#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017056
Martin v. Löwis11437992002-04-12 09:54:03 +000017057int
17058main ()
17059{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017060#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17061 bogus endian macros
17062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017063
17064 ;
17065 return 0;
17066}
17067_ACEOF
17068rm -f conftest.$ac_objext
17069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17070 (eval $ac_compile) 2>&5
17071 ac_status=$?
17072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073 (exit $ac_status); } &&
17074 { ac_try='test -s conftest.$ac_objext'
17075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17076 (eval $ac_try) 2>&5
17077 ac_status=$?
17078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17079 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017080 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017081cat >conftest.$ac_ext <<_ACEOF
17082#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017083/* confdefs.h. */
17084_ACEOF
17085cat confdefs.h >>conftest.$ac_ext
17086cat >>conftest.$ac_ext <<_ACEOF
17087/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017088#include <sys/types.h>
17089#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017090
Martin v. Löwis11437992002-04-12 09:54:03 +000017091int
17092main ()
17093{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017094#if BYTE_ORDER != BIG_ENDIAN
17095 not big endian
17096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017097
17098 ;
17099 return 0;
17100}
17101_ACEOF
17102rm -f conftest.$ac_objext
17103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17104 (eval $ac_compile) 2>&5
17105 ac_status=$?
17106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17107 (exit $ac_status); } &&
17108 { ac_try='test -s conftest.$ac_objext'
17109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17110 (eval $ac_try) 2>&5
17111 ac_status=$?
17112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17113 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017114 ac_cv_c_bigendian=yes
17115else
Martin v. Löwis11437992002-04-12 09:54:03 +000017116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017117sed 's/^/| /' conftest.$ac_ext >&5
17118
Martin v. Löwis11437992002-04-12 09:54:03 +000017119ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017121rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017122else
Martin v. Löwis11437992002-04-12 09:54:03 +000017123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017124sed 's/^/| /' conftest.$ac_ext >&5
17125
Martin v. Löwis11437992002-04-12 09:54:03 +000017126# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017127if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017128 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017129 ac_cv_c_bigendian=unknown
17130 cat >conftest.$ac_ext <<_ACEOF
17131#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017132/* confdefs.h. */
17133_ACEOF
17134cat confdefs.h >>conftest.$ac_ext
17135cat >>conftest.$ac_ext <<_ACEOF
17136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017137short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17138short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17139void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17140short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17141short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17142void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017143int
17144main ()
17145{
17146 _ascii (); _ebcdic ();
17147 ;
17148 return 0;
17149}
17150_ACEOF
17151rm -f conftest.$ac_objext
17152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17153 (eval $ac_compile) 2>&5
17154 ac_status=$?
17155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17156 (exit $ac_status); } &&
17157 { ac_try='test -s conftest.$ac_objext'
17158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17159 (eval $ac_try) 2>&5
17160 ac_status=$?
17161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17162 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017163 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017164 ac_cv_c_bigendian=yes
17165fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017166if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017167 if test "$ac_cv_c_bigendian" = unknown; then
17168 ac_cv_c_bigendian=no
17169 else
17170 # finding both strings is unlikely to happen, but who knows?
17171 ac_cv_c_bigendian=unknown
17172 fi
17173fi
17174else
17175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017176sed 's/^/| /' conftest.$ac_ext >&5
17177
Martin v. Löwis11437992002-04-12 09:54:03 +000017178fi
17179rm -f conftest.$ac_objext conftest.$ac_ext
17180else
17181 cat >conftest.$ac_ext <<_ACEOF
17182#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017183/* confdefs.h. */
17184_ACEOF
17185cat confdefs.h >>conftest.$ac_ext
17186cat >>conftest.$ac_ext <<_ACEOF
17187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017188int
17189main ()
17190{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017191 /* Are we little or big endian? From Harbison&Steele. */
17192 union
17193 {
17194 long l;
17195 char c[sizeof (long)];
17196 } u;
17197 u.l = 1;
17198 exit (u.c[sizeof (long) - 1] == 1);
17199}
Martin v. Löwis11437992002-04-12 09:54:03 +000017200_ACEOF
17201rm -f conftest$ac_exeext
17202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17203 (eval $ac_link) 2>&5
17204 ac_status=$?
17205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17208 (eval $ac_try) 2>&5
17209 ac_status=$?
17210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17211 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017212 ac_cv_c_bigendian=no
17213else
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 echo "$as_me: program exited with status $ac_status" >&5
17215echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017216sed 's/^/| /' conftest.$ac_ext >&5
17217
Martin v. Löwis11437992002-04-12 09:54:03 +000017218( exit $ac_status )
17219ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017220fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017221rm -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 +000017222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017223fi
17224rm -f conftest.$ac_objext conftest.$ac_ext
17225fi
17226echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17227echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17228case $ac_cv_c_bigendian in
17229 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017230
Martin v. Löwis11437992002-04-12 09:54:03 +000017231cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017232#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017233_ACEOF
17234 ;;
17235 no)
17236 ;;
17237 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017238 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017239presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017240echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017241presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17242 { (exit 1); exit 1; }; } ;;
17243esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017244
Michael W. Hudson54241132001-12-07 15:38:26 +000017245
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017246# Check whether right shifting a negative integer extends the sign bit
17247# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017248echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17249echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17250if test "${ac_cv_rshift_extends_sign+set}" = set; then
17251 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017252else
Martin v. Löwis11437992002-04-12 09:54:03 +000017253
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017254if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017255 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017256else
Martin v. Löwis11437992002-04-12 09:54:03 +000017257 cat >conftest.$ac_ext <<_ACEOF
17258#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017259/* confdefs.h. */
17260_ACEOF
17261cat confdefs.h >>conftest.$ac_ext
17262cat >>conftest.$ac_ext <<_ACEOF
17263/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017264
17265int main()
17266{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017267 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017268}
17269
Martin v. Löwis11437992002-04-12 09:54:03 +000017270_ACEOF
17271rm -f conftest$ac_exeext
17272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17273 (eval $ac_link) 2>&5
17274 ac_status=$?
17275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17278 (eval $ac_try) 2>&5
17279 ac_status=$?
17280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017282 ac_cv_rshift_extends_sign=yes
17283else
Martin v. Löwis11437992002-04-12 09:54:03 +000017284 echo "$as_me: program exited with status $ac_status" >&5
17285echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017286sed 's/^/| /' conftest.$ac_ext >&5
17287
Martin v. Löwis11437992002-04-12 09:54:03 +000017288( exit $ac_status )
17289ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017290fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017291rm -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 +000017292fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017293fi
17294
Martin v. Löwis11437992002-04-12 09:54:03 +000017295echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17296echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017297if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017298then
Martin v. Löwis11437992002-04-12 09:54:03 +000017299
17300cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017301#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017302_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017303
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017304fi
17305
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017306# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017307echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17308echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17309if test "${ac_cv_have_getc_unlocked+set}" = set; then
17310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017311else
Martin v. Löwis11437992002-04-12 09:54:03 +000017312
17313cat >conftest.$ac_ext <<_ACEOF
17314#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017315/* confdefs.h. */
17316_ACEOF
17317cat confdefs.h >>conftest.$ac_ext
17318cat >>conftest.$ac_ext <<_ACEOF
17319/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017320#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017321int
17322main ()
17323{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017324
17325 FILE *f = fopen("/dev/null", "r");
17326 flockfile(f);
17327 getc_unlocked(f);
17328 funlockfile(f);
17329
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 ;
17331 return 0;
17332}
17333_ACEOF
17334rm -f conftest.$ac_objext conftest$ac_exeext
17335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17336 (eval $ac_link) 2>&5
17337 ac_status=$?
17338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17339 (exit $ac_status); } &&
17340 { ac_try='test -s conftest$ac_exeext'
17341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17342 (eval $ac_try) 2>&5
17343 ac_status=$?
17344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17345 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017346 ac_cv_have_getc_unlocked=yes
17347else
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017349sed 's/^/| /' conftest.$ac_ext >&5
17350
Martin v. Löwis11437992002-04-12 09:54:03 +000017351ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017353rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017354fi
17355
Martin v. Löwis11437992002-04-12 09:54:03 +000017356echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17357echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017358if test "$ac_cv_have_getc_unlocked" = yes
17359then
Martin v. Löwis11437992002-04-12 09:54:03 +000017360
17361cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017362#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017363_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017364
17365fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017366
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017367# check for readline 2.2
17368cat >conftest.$ac_ext <<_ACEOF
17369#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017370/* confdefs.h. */
17371_ACEOF
17372cat confdefs.h >>conftest.$ac_ext
17373cat >>conftest.$ac_ext <<_ACEOF
17374/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017375#include <readline/readline.h>
17376_ACEOF
17377if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17378 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17379 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017380 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017381 rm -f conftest.er1
17382 cat conftest.err >&5
17383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17384 (exit $ac_status); } >/dev/null; then
17385 if test -s conftest.err; then
17386 ac_cpp_err=$ac_c_preproc_warn_flag
17387 else
17388 ac_cpp_err=
17389 fi
17390else
17391 ac_cpp_err=yes
17392fi
17393if test -z "$ac_cpp_err"; then
17394 have_readline=yes
17395else
17396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017397sed 's/^/| /' conftest.$ac_ext >&5
17398
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017399 have_readline=no
17400fi
17401rm -f conftest.err conftest.$ac_ext
17402if test $have_readline = yes
17403then
17404 cat >conftest.$ac_ext <<_ACEOF
17405#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017406/* confdefs.h. */
17407_ACEOF
17408cat confdefs.h >>conftest.$ac_ext
17409cat >>conftest.$ac_ext <<_ACEOF
17410/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017411#include <readline/readline.h>
17412
17413_ACEOF
17414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017415 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017416
17417cat >>confdefs.h <<\_ACEOF
17418#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17419_ACEOF
17420
17421fi
17422rm -f conftest*
17423
17424fi
17425
Martin v. Löwis0daad592001-09-30 21:09:59 +000017426# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017427echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17428echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17429if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17430 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017431else
Martin v. Löwis11437992002-04-12 09:54:03 +000017432 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017433LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017434cat >conftest.$ac_ext <<_ACEOF
17435#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017436/* confdefs.h. */
17437_ACEOF
17438cat confdefs.h >>conftest.$ac_ext
17439cat >>conftest.$ac_ext <<_ACEOF
17440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017441
Guido van Rossum353ae582001-07-10 16:45:32 +000017442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017443#ifdef __cplusplus
17444extern "C"
17445#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 builtin and then its argument prototype would still apply. */
17448char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017449int
17450main ()
17451{
17452rl_pre_input_hook ();
17453 ;
17454 return 0;
17455}
17456_ACEOF
17457rm -f conftest.$ac_objext conftest$ac_exeext
17458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17459 (eval $ac_link) 2>&5
17460 ac_status=$?
17461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17462 (exit $ac_status); } &&
17463 { ac_try='test -s conftest$ac_exeext'
17464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17465 (eval $ac_try) 2>&5
17466 ac_status=$?
17467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17468 (exit $ac_status); }; }; then
17469 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017470else
Martin v. Löwis11437992002-04-12 09:54:03 +000017471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017472sed 's/^/| /' conftest.$ac_ext >&5
17473
Martin v. Löwis11437992002-04-12 09:54:03 +000017474ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017476rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17477LIBS=$ac_check_lib_save_LIBS
17478fi
17479echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17480echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17481if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017482
Martin v. Löwis11437992002-04-12 09:54:03 +000017483cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017484#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017485_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017486
Martin v. Löwis0daad592001-09-30 21:09:59 +000017487fi
17488
Michael W. Hudson54241132001-12-07 15:38:26 +000017489
Martin v. Löwis0daad592001-09-30 21:09:59 +000017490# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017491echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17492echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17493if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17494 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017495else
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017497LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017498cat >conftest.$ac_ext <<_ACEOF
17499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017500/* confdefs.h. */
17501_ACEOF
17502cat confdefs.h >>conftest.$ac_ext
17503cat >>conftest.$ac_ext <<_ACEOF
17504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017505
Martin v. Löwis0daad592001-09-30 21:09:59 +000017506/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017507#ifdef __cplusplus
17508extern "C"
17509#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017510/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017511 builtin and then its argument prototype would still apply. */
17512char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017513int
17514main ()
17515{
17516rl_completion_matches ();
17517 ;
17518 return 0;
17519}
17520_ACEOF
17521rm -f conftest.$ac_objext conftest$ac_exeext
17522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17523 (eval $ac_link) 2>&5
17524 ac_status=$?
17525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526 (exit $ac_status); } &&
17527 { ac_try='test -s conftest$ac_exeext'
17528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17529 (eval $ac_try) 2>&5
17530 ac_status=$?
17531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17532 (exit $ac_status); }; }; then
17533 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017534else
Martin v. Löwis11437992002-04-12 09:54:03 +000017535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017536sed 's/^/| /' conftest.$ac_ext >&5
17537
Martin v. Löwis11437992002-04-12 09:54:03 +000017538ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017540rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17541LIBS=$ac_check_lib_save_LIBS
17542fi
17543echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17544echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17545if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017546
Martin v. Löwis11437992002-04-12 09:54:03 +000017547cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017548#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017549_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017550
Guido van Rossum353ae582001-07-10 16:45:32 +000017551fi
17552
Jack Jansendd19cf82001-12-06 22:36:17 +000017553
Martin v. Löwis11437992002-04-12 09:54:03 +000017554echo "$as_me:$LINENO: checking for broken nice()" >&5
17555echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17556if test "${ac_cv_broken_nice+set}" = set; then
17557 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017558else
Martin v. Löwis11437992002-04-12 09:54:03 +000017559
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017560if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017561 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017562else
Martin v. Löwis11437992002-04-12 09:54:03 +000017563 cat >conftest.$ac_ext <<_ACEOF
17564#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017565/* confdefs.h. */
17566_ACEOF
17567cat confdefs.h >>conftest.$ac_ext
17568cat >>conftest.$ac_ext <<_ACEOF
17569/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017570
17571int main()
17572{
17573 int val1 = nice(1);
17574 if (val1 != -1 && val1 == nice(2))
17575 exit(0);
17576 exit(1);
17577}
17578
Martin v. Löwis11437992002-04-12 09:54:03 +000017579_ACEOF
17580rm -f conftest$ac_exeext
17581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17582 (eval $ac_link) 2>&5
17583 ac_status=$?
17584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17585 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17587 (eval $ac_try) 2>&5
17588 ac_status=$?
17589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17590 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017591 ac_cv_broken_nice=yes
17592else
Martin v. Löwis11437992002-04-12 09:54:03 +000017593 echo "$as_me: program exited with status $ac_status" >&5
17594echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017595sed 's/^/| /' conftest.$ac_ext >&5
17596
Martin v. Löwis11437992002-04-12 09:54:03 +000017597( exit $ac_status )
17598ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017599fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017600rm -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 +000017601fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017602fi
17603
Martin v. Löwis11437992002-04-12 09:54:03 +000017604echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17605echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017606if test "$ac_cv_broken_nice" = yes
17607then
Martin v. Löwis11437992002-04-12 09:54:03 +000017608
17609cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017610#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017611_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017612
17613fi
17614
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017615# tzset(3) exists and works like we expect it to
17616echo "$as_me:$LINENO: checking for working tzset()" >&5
17617echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17618if test "${ac_cv_working_tzset+set}" = set; then
17619 echo $ECHO_N "(cached) $ECHO_C" >&6
17620else
17621
17622if test "$cross_compiling" = yes; then
17623 ac_cv_working_tzset=no
17624else
17625 cat >conftest.$ac_ext <<_ACEOF
17626#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017627/* confdefs.h. */
17628_ACEOF
17629cat confdefs.h >>conftest.$ac_ext
17630cat >>conftest.$ac_ext <<_ACEOF
17631/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017632
17633#include <stdlib.h>
17634#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017635#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017636int main()
17637{
Brett Cannon18367812003-09-19 00:59:16 +000017638 /* Note that we need to ensure that not only does tzset(3)
17639 do 'something' with localtime, but it works as documented
17640 in the library reference and as expected by the test suite.
17641
17642 Red Hat 6.2 doesn't understand the southern hemisphere
17643 after New Year's Day; it thinks swaps on that day.
17644 */
17645
17646 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17647 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17648
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017649 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017650 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017651 if (localtime(&groundhogday)->tm_hour != 0)
17652 exit(1);
17653
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017654 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017655 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017656 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017657 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017658
17659 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17660 tzset();
17661 if (localtime(&groundhogday)->tm_hour != 11)
17662 exit(1);
17663 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17664 exit(1);
17665 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17666 exit(1);
17667
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017668 exit(0);
17669}
17670
17671_ACEOF
17672rm -f conftest$ac_exeext
17673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17674 (eval $ac_link) 2>&5
17675 ac_status=$?
17676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17679 (eval $ac_try) 2>&5
17680 ac_status=$?
17681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17682 (exit $ac_status); }; }; then
17683 ac_cv_working_tzset=yes
17684else
17685 echo "$as_me: program exited with status $ac_status" >&5
17686echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017687sed 's/^/| /' conftest.$ac_ext >&5
17688
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017689( exit $ac_status )
17690ac_cv_working_tzset=no
17691fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017692rm -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 +000017693fi
17694fi
17695
17696echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17697echo "${ECHO_T}$ac_cv_working_tzset" >&6
17698if test "$ac_cv_working_tzset" = yes
17699then
17700
17701cat >>confdefs.h <<\_ACEOF
17702#define HAVE_WORKING_TZSET 1
17703_ACEOF
17704
17705fi
17706
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017707# Look for subsecond timestamps in struct stat
17708echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17709echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17710if test "${ac_cv_stat_tv_nsec+set}" = set; then
17711 echo $ECHO_N "(cached) $ECHO_C" >&6
17712else
17713 cat >conftest.$ac_ext <<_ACEOF
17714#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017715/* confdefs.h. */
17716_ACEOF
17717cat confdefs.h >>conftest.$ac_ext
17718cat >>conftest.$ac_ext <<_ACEOF
17719/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017720#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017721int
17722main ()
17723{
17724
17725struct stat st;
17726st.st_mtim.tv_nsec = 1;
17727
17728 ;
17729 return 0;
17730}
17731_ACEOF
17732rm -f conftest.$ac_objext
17733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17734 (eval $ac_compile) 2>&5
17735 ac_status=$?
17736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17737 (exit $ac_status); } &&
17738 { ac_try='test -s conftest.$ac_objext'
17739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17740 (eval $ac_try) 2>&5
17741 ac_status=$?
17742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17743 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017744 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017745else
17746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017747sed 's/^/| /' conftest.$ac_ext >&5
17748
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017749ac_cv_stat_tv_nsec=no
17750fi
17751rm -f conftest.$ac_objext conftest.$ac_ext
17752fi
17753
17754echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17755echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17756if test "$ac_cv_stat_tv_nsec" = yes
17757then
17758
17759cat >>confdefs.h <<\_ACEOF
17760#define HAVE_STAT_TV_NSEC 1
17761_ACEOF
17762
17763fi
17764
Jack Jansen666b1e72001-10-31 12:11:48 +000017765# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017766echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17767echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17768if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17769 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017770else
Martin v. Löwis11437992002-04-12 09:54:03 +000017771 cat >conftest.$ac_ext <<_ACEOF
17772#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017773/* confdefs.h. */
17774_ACEOF
17775cat confdefs.h >>conftest.$ac_ext
17776cat >>conftest.$ac_ext <<_ACEOF
17777/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017778#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017779int
17780main ()
17781{
Jack Jansen666b1e72001-10-31 12:11:48 +000017782
17783 int rtn;
17784 rtn = mvwdelch(0,0,0);
17785
Martin v. Löwis11437992002-04-12 09:54:03 +000017786 ;
17787 return 0;
17788}
17789_ACEOF
17790rm -f conftest.$ac_objext
17791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17792 (eval $ac_compile) 2>&5
17793 ac_status=$?
17794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17795 (exit $ac_status); } &&
17796 { ac_try='test -s conftest.$ac_objext'
17797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17798 (eval $ac_try) 2>&5
17799 ac_status=$?
17800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17801 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017802 ac_cv_mvwdelch_is_expression=yes
17803else
Martin v. Löwis11437992002-04-12 09:54:03 +000017804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017805sed 's/^/| /' conftest.$ac_ext >&5
17806
Martin v. Löwis11437992002-04-12 09:54:03 +000017807ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017809rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017810fi
17811
Martin v. Löwis11437992002-04-12 09:54:03 +000017812echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17813echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017814
17815if test "$ac_cv_mvwdelch_is_expression" = yes
17816then
Martin v. Löwis11437992002-04-12 09:54:03 +000017817
17818cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017819#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017820_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017821
17822fi
17823
Martin v. Löwis11437992002-04-12 09:54:03 +000017824echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17825echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17826if test "${ac_cv_window_has_flags+set}" = set; then
17827 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017828else
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 cat >conftest.$ac_ext <<_ACEOF
17830#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017831/* confdefs.h. */
17832_ACEOF
17833cat confdefs.h >>conftest.$ac_ext
17834cat >>conftest.$ac_ext <<_ACEOF
17835/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017836#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017837int
17838main ()
17839{
Jack Jansen666b1e72001-10-31 12:11:48 +000017840
17841 WINDOW *w;
17842 w->_flags = 0;
17843
Martin v. Löwis11437992002-04-12 09:54:03 +000017844 ;
17845 return 0;
17846}
17847_ACEOF
17848rm -f conftest.$ac_objext
17849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17850 (eval $ac_compile) 2>&5
17851 ac_status=$?
17852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17853 (exit $ac_status); } &&
17854 { ac_try='test -s conftest.$ac_objext'
17855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17856 (eval $ac_try) 2>&5
17857 ac_status=$?
17858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17859 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017860 ac_cv_window_has_flags=yes
17861else
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017863sed 's/^/| /' conftest.$ac_ext >&5
17864
Martin v. Löwis11437992002-04-12 09:54:03 +000017865ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017867rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017868fi
17869
Martin v. Löwis11437992002-04-12 09:54:03 +000017870echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17871echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017872
Jack Jansen666b1e72001-10-31 12:11:48 +000017873
17874if test "$ac_cv_window_has_flags" = yes
17875then
Martin v. Löwis11437992002-04-12 09:54:03 +000017876
17877cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017878#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017879_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017880
17881fi
17882
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017883echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17884echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17885
17886if test -e /dev/ptmx
17887then
17888 echo "$as_me:$LINENO: result: yes" >&5
17889echo "${ECHO_T}yes" >&6
17890
17891cat >>confdefs.h <<\_ACEOF
17892#define HAVE_DEV_PTMX 1
17893_ACEOF
17894
17895else
17896 echo "$as_me:$LINENO: result: no" >&5
17897echo "${ECHO_T}no" >&6
17898fi
17899
Neal Norwitz865400f2003-03-21 01:42:58 +000017900echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17901echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17902
17903if test -e /dev/ptc
17904then
17905 echo "$as_me:$LINENO: result: yes" >&5
17906echo "${ECHO_T}yes" >&6
17907
17908cat >>confdefs.h <<\_ACEOF
17909#define HAVE_DEV_PTC 1
17910_ACEOF
17911
17912else
17913 echo "$as_me:$LINENO: result: no" >&5
17914echo "${ECHO_T}no" >&6
17915fi
17916
Martin v. Löwis11437992002-04-12 09:54:03 +000017917echo "$as_me:$LINENO: checking for socklen_t" >&5
17918echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17919if test "${ac_cv_type_socklen_t+set}" = set; then
17920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017921else
Martin v. Löwis11437992002-04-12 09:54:03 +000017922 cat >conftest.$ac_ext <<_ACEOF
17923#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017924/* confdefs.h. */
17925_ACEOF
17926cat confdefs.h >>conftest.$ac_ext
17927cat >>conftest.$ac_ext <<_ACEOF
17928/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000017929
17930#ifdef HAVE_SYS_TYPES_H
17931#include <sys/types.h>
17932#endif
17933#ifdef HAVE_SYS_SOCKET_H
17934#include <sys/socket.h>
17935#endif
17936
17937
Martin v. Löwis11437992002-04-12 09:54:03 +000017938int
17939main ()
17940{
17941if ((socklen_t *) 0)
17942 return 0;
17943if (sizeof (socklen_t))
17944 return 0;
17945 ;
17946 return 0;
17947}
17948_ACEOF
17949rm -f conftest.$ac_objext
17950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17951 (eval $ac_compile) 2>&5
17952 ac_status=$?
17953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17954 (exit $ac_status); } &&
17955 { ac_try='test -s conftest.$ac_objext'
17956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17957 (eval $ac_try) 2>&5
17958 ac_status=$?
17959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17960 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017961 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017962else
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017964sed 's/^/| /' conftest.$ac_ext >&5
17965
Martin v. Löwis11437992002-04-12 09:54:03 +000017966ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017967fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017968rm -f conftest.$ac_objext conftest.$ac_ext
17969fi
17970echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17971echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17972if test $ac_cv_type_socklen_t = yes; then
17973 :
17974else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017975
Martin v. Löwis01c04012002-11-11 14:58:44 +000017976cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017977#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017978_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017979
17980fi
17981
Michael W. Hudson54241132001-12-07 15:38:26 +000017982
Michael W. Hudson54241132001-12-07 15:38:26 +000017983
17984
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017985for h in `(cd $srcdir;echo Python/thread_*.h)`
17986do
17987 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17988done
17989
Michael W. Hudson54241132001-12-07 15:38:26 +000017990
Jack Jansen0b06be72002-06-21 14:48:38 +000017991SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017992echo "$as_me:$LINENO: checking for build directories" >&5
17993echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017994for dir in $SRCDIRS; do
17995 if test ! -d $dir; then
17996 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017997 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017998done
Martin v. Löwis11437992002-04-12 09:54:03 +000017999echo "$as_me:$LINENO: result: done" >&5
18000echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018001
Guido van Rossum627b2d71993-12-24 10:39:16 +000018002# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018003 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018004
Martin v. Löwis11437992002-04-12 09:54:03 +000018005cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018006# This file is a shell script that caches the results of configure
18007# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018008# scripts and configure runs, see configure's option --config-cache.
18009# It is not useful on other systems. If it contains results you don't
18010# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018011#
Martin v. Löwis11437992002-04-12 09:54:03 +000018012# config.status only pays attention to the cache file if you give it
18013# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018014#
Skip Montanaro6dead952003-09-25 14:50:04 +000018015# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018016# loading this file, other *unset* `ac_cv_foo' will be assigned the
18017# following values.
18018
18019_ACEOF
18020
Guido van Rossumf78abae1997-01-21 22:02:36 +000018021# The following way of writing the cache mishandles newlines in values,
18022# but we know of no workaround that is simple, portable, and efficient.
18023# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018024# Ultrix sh set writes to stderr and can't be redirected directly,
18025# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018026{
18027 (set) 2>&1 |
18028 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18029 *ac_space=\ *)
18030 # `set' does not quote correctly, so add quotes (double-quote
18031 # substitution turns \\\\ into \\, and sed turns \\ into \).
18032 sed -n \
18033 "s/'/'\\\\''/g;
18034 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18035 ;;
18036 *)
18037 # `set' quotes correctly as required by POSIX, so do not add quotes.
18038 sed -n \
18039 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18040 ;;
18041 esac;
18042} |
18043 sed '
18044 t clear
18045 : clear
18046 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18047 t end
18048 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18049 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018050if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018051 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018052 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18053 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018054 else
18055 echo "not updating unwritable cache $cache_file"
18056 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018057fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018058rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018059
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018060test "x$prefix" = xNONE && prefix=$ac_default_prefix
18061# Let make expand exec_prefix.
18062test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018063
Martin v. Löwis11437992002-04-12 09:54:03 +000018064# VPATH may cause trouble with some makes, so we remove $(srcdir),
18065# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18066# trailing colons and then remove the whole line if VPATH becomes empty
18067# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018068if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18070s/:*\$(srcdir):*/:/;
18071s/:*\${srcdir}:*/:/;
18072s/:*@srcdir@:*/:/;
18073s/^\([^=]*=[ ]*\):*/\1/;
18074s/:*$//;
18075s/^[^=]*=[ ]*$//;
18076}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018077fi
18078
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018079DEFS=-DHAVE_CONFIG_H
18080
Skip Montanaro6dead952003-09-25 14:50:04 +000018081ac_libobjs=
18082ac_ltlibobjs=
18083for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18084 # 1. Remove the extension, and $U if already installed.
18085 ac_i=`echo "$ac_i" |
18086 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18087 # 2. Add them.
18088 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18089 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18090done
18091LIBOBJS=$ac_libobjs
18092
18093LTLIBOBJS=$ac_ltlibobjs
18094
18095
Martin v. Löwis11437992002-04-12 09:54:03 +000018096
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018097: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018098ac_clean_files_save=$ac_clean_files
18099ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18100{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18101echo "$as_me: creating $CONFIG_STATUS" >&6;}
18102cat >$CONFIG_STATUS <<_ACEOF
18103#! $SHELL
18104# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018105# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018106# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018107# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018108
Martin v. Löwis11437992002-04-12 09:54:03 +000018109debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018110ac_cs_recheck=false
18111ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018112SHELL=\${CONFIG_SHELL-$SHELL}
18113_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018114
Martin v. Löwis11437992002-04-12 09:54:03 +000018115cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018116## --------------------- ##
18117## M4sh Initialization. ##
18118## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018119
Martin v. Löwis11437992002-04-12 09:54:03 +000018120# Be Bourne compatible
18121if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18122 emulate sh
18123 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018124 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18125 # is contrary to our usage. Disable this feature.
18126 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018127elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18128 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018129fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018130
Martin v. Löwis11437992002-04-12 09:54:03 +000018131# Support unset when possible.
18132if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18133 as_unset=unset
18134else
18135 as_unset=false
18136fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018137
Skip Montanaro6dead952003-09-25 14:50:04 +000018138
18139# Work around bugs in pre-3.0 UWIN ksh.
18140$as_unset ENV MAIL MAILPATH
18141PS1='$ '
18142PS2='> '
18143PS4='+ '
18144
18145# NLS nuisances.
18146for as_var in \
18147 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18148 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18149 LC_TELEPHONE LC_TIME
18150do
18151 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18152 eval $as_var=C; export $as_var
18153 else
18154 $as_unset $as_var
18155 fi
18156done
18157
18158# Required to use basename.
18159if expr a : '\(a\)' >/dev/null 2>&1; then
18160 as_expr=expr
18161else
18162 as_expr=false
18163fi
18164
18165if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18166 as_basename=basename
18167else
18168 as_basename=false
18169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018170
18171
18172# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018173as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018174$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18175 X"$0" : 'X\(//\)$' \| \
18176 X"$0" : 'X\(/\)$' \| \
18177 . : '\(.\)' 2>/dev/null ||
18178echo X/"$0" |
18179 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18180 /^X\/\(\/\/\)$/{ s//\1/; q; }
18181 /^X\/\(\/\).*/{ s//\1/; q; }
18182 s/.*/./; q'`
18183
Skip Montanaro6dead952003-09-25 14:50:04 +000018184
Martin v. Löwis11437992002-04-12 09:54:03 +000018185# PATH needs CR, and LINENO needs CR and PATH.
18186# Avoid depending upon Character Ranges.
18187as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18188as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18189as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18190as_cr_digits='0123456789'
18191as_cr_alnum=$as_cr_Letters$as_cr_digits
18192
18193# The user is always right.
18194if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018195 echo "#! /bin/sh" >conf$$.sh
18196 echo "exit 0" >>conf$$.sh
18197 chmod +x conf$$.sh
18198 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018199 PATH_SEPARATOR=';'
18200 else
18201 PATH_SEPARATOR=:
18202 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018203 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018204fi
18205
18206
18207 as_lineno_1=$LINENO
18208 as_lineno_2=$LINENO
18209 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18210 test "x$as_lineno_1" != "x$as_lineno_2" &&
18211 test "x$as_lineno_3" = "x$as_lineno_2" || {
18212 # Find who we are. Look in the path if we contain no path at all
18213 # relative or not.
18214 case $0 in
18215 *[\\/]* ) as_myself=$0 ;;
18216 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18217for as_dir in $PATH
18218do
18219 IFS=$as_save_IFS
18220 test -z "$as_dir" && as_dir=.
18221 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18222done
18223
18224 ;;
18225 esac
18226 # We did not find ourselves, most probably we were run as `sh COMMAND'
18227 # in which case we are not to be found in the path.
18228 if test "x$as_myself" = x; then
18229 as_myself=$0
18230 fi
18231 if test ! -f "$as_myself"; then
18232 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18233echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18234 { (exit 1); exit 1; }; }
18235 fi
18236 case $CONFIG_SHELL in
18237 '')
18238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18239for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18240do
18241 IFS=$as_save_IFS
18242 test -z "$as_dir" && as_dir=.
18243 for as_base in sh bash ksh sh5; do
18244 case $as_dir in
18245 /*)
18246 if ("$as_dir/$as_base" -c '
18247 as_lineno_1=$LINENO
18248 as_lineno_2=$LINENO
18249 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18250 test "x$as_lineno_1" != "x$as_lineno_2" &&
18251 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018252 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18253 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018254 CONFIG_SHELL=$as_dir/$as_base
18255 export CONFIG_SHELL
18256 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18257 fi;;
18258 esac
18259 done
18260done
18261;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018262 esac
18263
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18265 # uniformly replaced by the line number. The first 'sed' inserts a
18266 # line-number line before each line; the second 'sed' does the real
18267 # work. The second script uses 'N' to pair each line-number line
18268 # with the numbered line, and appends trailing '-' during
18269 # substitution so that $LINENO is not a special case at line end.
18270 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18271 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18272 sed '=' <$as_myself |
18273 sed '
18274 N
18275 s,$,-,
18276 : loop
18277 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18278 t loop
18279 s,-$,,
18280 s,^['$as_cr_digits']*\n,,
18281 ' >$as_me.lineno &&
18282 chmod +x $as_me.lineno ||
18283 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18284echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18285 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018286
Martin v. Löwis11437992002-04-12 09:54:03 +000018287 # Don't try to exec as it changes $[0], causing all sort of problems
18288 # (the dirname of $[0] is not the place where we might find the
18289 # original and so on. Autoconf is especially sensible to this).
18290 . ./$as_me.lineno
18291 # Exit status is that of the last command.
18292 exit
18293}
18294
18295
18296case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18297 *c*,-n*) ECHO_N= ECHO_C='
18298' ECHO_T=' ' ;;
18299 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18300 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18301esac
18302
18303if expr a : '\(a\)' >/dev/null 2>&1; then
18304 as_expr=expr
18305else
18306 as_expr=false
18307fi
18308
18309rm -f conf$$ conf$$.exe conf$$.file
18310echo >conf$$.file
18311if ln -s conf$$.file conf$$ 2>/dev/null; then
18312 # We could just check for DJGPP; but this test a) works b) is more generic
18313 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18314 if test -f conf$$.exe; then
18315 # Don't use ln at all; we don't have any links
18316 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018317 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 as_ln_s='ln -s'
18319 fi
18320elif ln conf$$.file conf$$ 2>/dev/null; then
18321 as_ln_s=ln
18322else
18323 as_ln_s='cp -p'
18324fi
18325rm -f conf$$ conf$$.exe conf$$.file
18326
Skip Montanaro6dead952003-09-25 14:50:04 +000018327if mkdir -p . 2>/dev/null; then
18328 as_mkdir_p=:
18329else
18330 as_mkdir_p=false
18331fi
18332
Martin v. Löwis11437992002-04-12 09:54:03 +000018333as_executable_p="test -f"
18334
18335# Sed expression to map a string onto a valid CPP name.
18336as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18337
18338# Sed expression to map a string onto a valid variable name.
18339as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18340
18341
18342# IFS
18343# We need space, tab and new line, in precisely that order.
18344as_nl='
18345'
18346IFS=" $as_nl"
18347
18348# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018349$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018350
18351exec 6>&1
18352
18353# Open the log real soon, to keep \$[0] and so on meaningful, and to
18354# report actual input values of CONFIG_FILES etc. instead of their
18355# values after options handling. Logging --version etc. is OK.
18356exec 5>>config.log
18357{
18358 echo
18359 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18360## Running $as_me. ##
18361_ASBOX
18362} >&5
18363cat >&5 <<_CSEOF
18364
Fred Drake9bd44622003-07-30 17:39:48 +000018365This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018366generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018367
18368 CONFIG_FILES = $CONFIG_FILES
18369 CONFIG_HEADERS = $CONFIG_HEADERS
18370 CONFIG_LINKS = $CONFIG_LINKS
18371 CONFIG_COMMANDS = $CONFIG_COMMANDS
18372 $ $0 $@
18373
18374_CSEOF
18375echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18376echo >&5
18377_ACEOF
18378
18379# Files that config.status was made for.
18380if test -n "$ac_config_files"; then
18381 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18382fi
18383
18384if test -n "$ac_config_headers"; then
18385 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18386fi
18387
18388if test -n "$ac_config_links"; then
18389 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18390fi
18391
18392if test -n "$ac_config_commands"; then
18393 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18394fi
18395
18396cat >>$CONFIG_STATUS <<\_ACEOF
18397
18398ac_cs_usage="\
18399\`$as_me' instantiates files from templates according to the
18400current configuration.
18401
18402Usage: $0 [OPTIONS] [FILE]...
18403
18404 -h, --help print this help, then exit
18405 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018406 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018407 -d, --debug don't remove temporary files
18408 --recheck update $as_me by reconfiguring in the same conditions
18409 --file=FILE[:TEMPLATE]
18410 instantiate the configuration file FILE
18411 --header=FILE[:TEMPLATE]
18412 instantiate the configuration header FILE
18413
18414Configuration files:
18415$config_files
18416
18417Configuration headers:
18418$config_headers
18419
18420Report bugs to <bug-autoconf@gnu.org>."
18421_ACEOF
18422
18423cat >>$CONFIG_STATUS <<_ACEOF
18424ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018425python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018426configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018427 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18428
18429Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18430Free Software Foundation, Inc.
18431This config.status script is free software; the Free Software Foundation
18432gives unlimited permission to copy, distribute and modify it."
18433srcdir=$srcdir
18434INSTALL="$INSTALL"
18435_ACEOF
18436
18437cat >>$CONFIG_STATUS <<\_ACEOF
18438# If no file are specified by the user, then we need to provide default
18439# value. By we need to know if files were specified by the user.
18440ac_need_defaults=:
18441while test $# != 0
18442do
18443 case $1 in
18444 --*=*)
18445 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18446 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018447 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018448 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018449 -*)
18450 ac_option=$1
18451 ac_optarg=$2
18452 ac_shift=shift
18453 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018454 *) # This is not an option, so the user has probably given explicit
18455 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018456 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 ac_need_defaults=false;;
18458 esac
18459
Skip Montanaro6dead952003-09-25 14:50:04 +000018460 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018461 # Handling of the options.
18462_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018463cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018464 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18465 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018466 --version | --vers* | -V )
18467 echo "$ac_cs_version"; exit 0 ;;
18468 --he | --h)
18469 # Conflict between --help and --header
18470 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18471Try \`$0 --help' for more information." >&5
18472echo "$as_me: error: ambiguous option: $1
18473Try \`$0 --help' for more information." >&2;}
18474 { (exit 1); exit 1; }; };;
18475 --help | --hel | -h )
18476 echo "$ac_cs_usage"; exit 0 ;;
18477 --debug | --d* | -d )
18478 debug=: ;;
18479 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018480 $ac_shift
18481 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 ac_need_defaults=false;;
18483 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018484 $ac_shift
18485 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018487 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18488 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18489 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018490
18491 # This is an error.
18492 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18493Try \`$0 --help' for more information." >&5
18494echo "$as_me: error: unrecognized option: $1
18495Try \`$0 --help' for more information." >&2;}
18496 { (exit 1); exit 1; }; } ;;
18497
18498 *) ac_config_targets="$ac_config_targets $1" ;;
18499
18500 esac
18501 shift
18502done
18503
Skip Montanaro6dead952003-09-25 14:50:04 +000018504ac_configure_extra_args=
18505
18506if $ac_cs_silent; then
18507 exec 6>/dev/null
18508 ac_configure_extra_args="$ac_configure_extra_args --silent"
18509fi
18510
18511_ACEOF
18512cat >>$CONFIG_STATUS <<_ACEOF
18513if \$ac_cs_recheck; then
18514 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18515 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18516fi
18517
Martin v. Löwis11437992002-04-12 09:54:03 +000018518_ACEOF
18519
18520
18521
18522
18523
18524cat >>$CONFIG_STATUS <<\_ACEOF
18525for ac_config_target in $ac_config_targets
18526do
18527 case "$ac_config_target" in
18528 # Handling of arguments.
18529 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18530 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18531 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18532 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18533echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18534 { (exit 1); exit 1; }; };;
18535 esac
18536done
18537
18538# If the user did not use the arguments to specify the items to instantiate,
18539# then the envvar interface is used. Set only those that are not.
18540# We use the long form for the default assignment because of an extremely
18541# bizarre bug on SunOS 4.1.3.
18542if $ac_need_defaults; then
18543 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18544 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18545fi
18546
Skip Montanaro6dead952003-09-25 14:50:04 +000018547# Have a temporary directory for convenience. Make it in the build tree
18548# simply because there is no reason to put it here, and in addition,
18549# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018550# Create a temporary directory, and hook for its removal unless debugging.
18551$debug ||
18552{
18553 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18554 trap '{ (exit 1); exit 1; }' 1 2 13 15
18555}
18556
18557# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018558
Martin v. Löwis11437992002-04-12 09:54:03 +000018559{
Skip Montanaro6dead952003-09-25 14:50:04 +000018560 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018561 test -n "$tmp" && test -d "$tmp"
18562} ||
18563{
Skip Montanaro6dead952003-09-25 14:50:04 +000018564 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 (umask 077 && mkdir $tmp)
18566} ||
18567{
Skip Montanaro6dead952003-09-25 14:50:04 +000018568 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 { (exit 1); exit 1; }
18570}
18571
18572_ACEOF
18573
18574cat >>$CONFIG_STATUS <<_ACEOF
18575
18576#
18577# CONFIG_FILES section.
18578#
18579
18580# No need to generate the scripts if there are no CONFIG_FILES.
18581# This happens for instance when ./config.status config.h
18582if test -n "\$CONFIG_FILES"; then
18583 # Protect against being on the right side of a sed subst in config.status.
18584 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18585 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18586s,@SHELL@,$SHELL,;t t
18587s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18588s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18589s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18590s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18591s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18592s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18593s,@exec_prefix@,$exec_prefix,;t t
18594s,@prefix@,$prefix,;t t
18595s,@program_transform_name@,$program_transform_name,;t t
18596s,@bindir@,$bindir,;t t
18597s,@sbindir@,$sbindir,;t t
18598s,@libexecdir@,$libexecdir,;t t
18599s,@datadir@,$datadir,;t t
18600s,@sysconfdir@,$sysconfdir,;t t
18601s,@sharedstatedir@,$sharedstatedir,;t t
18602s,@localstatedir@,$localstatedir,;t t
18603s,@libdir@,$libdir,;t t
18604s,@includedir@,$includedir,;t t
18605s,@oldincludedir@,$oldincludedir,;t t
18606s,@infodir@,$infodir,;t t
18607s,@mandir@,$mandir,;t t
18608s,@build_alias@,$build_alias,;t t
18609s,@host_alias@,$host_alias,;t t
18610s,@target_alias@,$target_alias,;t t
18611s,@DEFS@,$DEFS,;t t
18612s,@ECHO_C@,$ECHO_C,;t t
18613s,@ECHO_N@,$ECHO_N,;t t
18614s,@ECHO_T@,$ECHO_T,;t t
18615s,@LIBS@,$LIBS,;t t
18616s,@VERSION@,$VERSION,;t t
18617s,@SOVERSION@,$SOVERSION,;t t
18618s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18619s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18620s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18621s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18622s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18623s,@MACHDEP@,$MACHDEP,;t t
18624s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018625s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018626s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018627s,@CXX@,$CXX,;t t
18628s,@MAINOBJ@,$MAINOBJ,;t t
18629s,@EXEEXT@,$EXEEXT,;t t
18630s,@CC@,$CC,;t t
18631s,@CFLAGS@,$CFLAGS,;t t
18632s,@LDFLAGS@,$LDFLAGS,;t t
18633s,@CPPFLAGS@,$CPPFLAGS,;t t
18634s,@ac_ct_CC@,$ac_ct_CC,;t t
18635s,@OBJEXT@,$OBJEXT,;t t
18636s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018637s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018638s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18639s,@LIBRARY@,$LIBRARY,;t t
18640s,@LDLIBRARY@,$LDLIBRARY,;t t
18641s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18642s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18643s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18644s,@INSTSONAME@,$INSTSONAME,;t t
18645s,@RUNSHARED@,$RUNSHARED,;t t
18646s,@LINKCC@,$LINKCC,;t t
18647s,@RANLIB@,$RANLIB,;t t
18648s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18649s,@AR@,$AR,;t t
18650s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18651s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18652s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18653s,@LN@,$LN,;t t
18654s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018655s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018656s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18657s,@SO@,$SO,;t t
18658s,@LDSHARED@,$LDSHARED,;t t
18659s,@BLDSHARED@,$BLDSHARED,;t t
18660s,@CCSHARED@,$CCSHARED,;t t
18661s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18662s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018663s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018664s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18665s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18666s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18667s,@LDLAST@,$LDLAST,;t t
18668s,@THREADOBJ@,$THREADOBJ,;t t
18669s,@DLINCLDIR@,$DLINCLDIR,;t t
18670s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18671s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018672s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018673s,@LIBOBJS@,$LIBOBJS,;t t
18674s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18675s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18676s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18677s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18678s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18679s,@LIBM@,$LIBM,;t t
18680s,@LIBC@,$LIBC,;t t
18681s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18682s,@THREADHEADERS@,$THREADHEADERS,;t t
18683s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018684s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018685CEOF
18686
18687_ACEOF
18688
18689 cat >>$CONFIG_STATUS <<\_ACEOF
18690 # Split the substitutions into bite-sized pieces for seds with
18691 # small command number limits, like on Digital OSF/1 and HP-UX.
18692 ac_max_sed_lines=48
18693 ac_sed_frag=1 # Number of current file.
18694 ac_beg=1 # First line for current file.
18695 ac_end=$ac_max_sed_lines # Line after last line for current file.
18696 ac_more_lines=:
18697 ac_sed_cmds=
18698 while $ac_more_lines; do
18699 if test $ac_beg -gt 1; then
18700 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18701 else
18702 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18703 fi
18704 if test ! -s $tmp/subs.frag; then
18705 ac_more_lines=false
18706 else
18707 # The purpose of the label and of the branching condition is to
18708 # speed up the sed processing (if there are no `@' at all, there
18709 # is no need to browse any of the substitutions).
18710 # These are the two extra sed commands mentioned above.
18711 (echo ':t
18712 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18713 if test -z "$ac_sed_cmds"; then
18714 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18715 else
18716 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18717 fi
18718 ac_sed_frag=`expr $ac_sed_frag + 1`
18719 ac_beg=$ac_end
18720 ac_end=`expr $ac_end + $ac_max_sed_lines`
18721 fi
18722 done
18723 if test -z "$ac_sed_cmds"; then
18724 ac_sed_cmds=cat
18725 fi
18726fi # test -n "$CONFIG_FILES"
18727
18728_ACEOF
18729cat >>$CONFIG_STATUS <<\_ACEOF
18730for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18731 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18732 case $ac_file in
18733 - | *:- | *:-:* ) # input from stdin
18734 cat >$tmp/stdin
18735 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18736 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18737 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18738 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18739 * ) ac_file_in=$ac_file.in ;;
18740 esac
18741
18742 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18743 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18744$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18745 X"$ac_file" : 'X\(//\)[^/]' \| \
18746 X"$ac_file" : 'X\(//\)$' \| \
18747 X"$ac_file" : 'X\(/\)' \| \
18748 . : '\(.\)' 2>/dev/null ||
18749echo X"$ac_file" |
18750 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18751 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18752 /^X\(\/\/\)$/{ s//\1/; q; }
18753 /^X\(\/\).*/{ s//\1/; q; }
18754 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018755 { if $as_mkdir_p; then
18756 mkdir -p "$ac_dir"
18757 else
18758 as_dir="$ac_dir"
18759 as_dirs=
18760 while test ! -d "$as_dir"; do
18761 as_dirs="$as_dir $as_dirs"
18762 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18763$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18764 X"$as_dir" : 'X\(//\)[^/]' \| \
18765 X"$as_dir" : 'X\(//\)$' \| \
18766 X"$as_dir" : 'X\(/\)' \| \
18767 . : '\(.\)' 2>/dev/null ||
18768echo X"$as_dir" |
18769 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18770 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18771 /^X\(\/\/\)$/{ s//\1/; q; }
18772 /^X\(\/\).*/{ s//\1/; q; }
18773 s/.*/./; q'`
18774 done
18775 test ! -n "$as_dirs" || mkdir $as_dirs
18776 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18777echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18778 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018779
18780 ac_builddir=.
18781
18782if test "$ac_dir" != .; then
18783 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18784 # A "../" for each directory in $ac_dir_suffix.
18785 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18786else
18787 ac_dir_suffix= ac_top_builddir=
18788fi
18789
18790case $srcdir in
18791 .) # No --srcdir option. We are building in place.
18792 ac_srcdir=.
18793 if test -z "$ac_top_builddir"; then
18794 ac_top_srcdir=.
18795 else
18796 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18797 fi ;;
18798 [\\/]* | ?:[\\/]* ) # Absolute path.
18799 ac_srcdir=$srcdir$ac_dir_suffix;
18800 ac_top_srcdir=$srcdir ;;
18801 *) # Relative path.
18802 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18803 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18804esac
18805# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18806# absolute.
18807ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018808ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018809ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18810ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18811
18812
18813 case $INSTALL in
18814 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18815 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18816 esac
18817
18818 if test x"$ac_file" != x-; then
18819 { echo "$as_me:$LINENO: creating $ac_file" >&5
18820echo "$as_me: creating $ac_file" >&6;}
18821 rm -f "$ac_file"
18822 fi
18823 # Let's still pretend it is `configure' which instantiates (i.e., don't
18824 # use $as_me), people would be surprised to read:
18825 # /* config.h. Generated by config.status. */
18826 if test x"$ac_file" = x-; then
18827 configure_input=
18828 else
18829 configure_input="$ac_file. "
18830 fi
18831 configure_input=$configure_input"Generated from `echo $ac_file_in |
18832 sed 's,.*/,,'` by configure."
18833
18834 # First look for the input files in the build tree, otherwise in the
18835 # src tree.
18836 ac_file_inputs=`IFS=:
18837 for f in $ac_file_in; do
18838 case $f in
18839 -) echo $tmp/stdin ;;
18840 [\\/$]*)
18841 # Absolute (can't be DOS-style, as IFS=:)
18842 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18843echo "$as_me: error: cannot find input file: $f" >&2;}
18844 { (exit 1); exit 1; }; }
18845 echo $f;;
18846 *) # Relative
18847 if test -f "$f"; then
18848 # Build tree
18849 echo $f
18850 elif test -f "$srcdir/$f"; then
18851 # Source tree
18852 echo $srcdir/$f
18853 else
18854 # /dev/null tree
18855 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18856echo "$as_me: error: cannot find input file: $f" >&2;}
18857 { (exit 1); exit 1; }; }
18858 fi;;
18859 esac
18860 done` || { (exit 1); exit 1; }
18861_ACEOF
18862cat >>$CONFIG_STATUS <<_ACEOF
18863 sed "$ac_vpsub
18864$extrasub
18865_ACEOF
18866cat >>$CONFIG_STATUS <<\_ACEOF
18867:t
18868/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18869s,@configure_input@,$configure_input,;t t
18870s,@srcdir@,$ac_srcdir,;t t
18871s,@abs_srcdir@,$ac_abs_srcdir,;t t
18872s,@top_srcdir@,$ac_top_srcdir,;t t
18873s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18874s,@builddir@,$ac_builddir,;t t
18875s,@abs_builddir@,$ac_abs_builddir,;t t
18876s,@top_builddir@,$ac_top_builddir,;t t
18877s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18878s,@INSTALL@,$ac_INSTALL,;t t
18879" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18880 rm -f $tmp/stdin
18881 if test x"$ac_file" != x-; then
18882 mv $tmp/out $ac_file
18883 else
18884 cat $tmp/out
18885 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018886 fi
18887
Martin v. Löwis11437992002-04-12 09:54:03 +000018888done
18889_ACEOF
18890cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018891
Martin v. Löwis11437992002-04-12 09:54:03 +000018892#
18893# CONFIG_HEADER section.
18894#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018895
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018896# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18897# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018898#
18899# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018900ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18901ac_dB='[ ].*$,\1#\2'
18902ac_dC=' '
18903ac_dD=',;t'
18904# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18905ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18906ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018907ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018908ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018909
Martin v. Löwis11437992002-04-12 09:54:03 +000018910for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018911 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018912 case $ac_file in
18913 - | *:- | *:-:* ) # input from stdin
18914 cat >$tmp/stdin
18915 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18916 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18917 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18918 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18919 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018920 esac
18921
Martin v. Löwis11437992002-04-12 09:54:03 +000018922 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18923echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018924
Martin v. Löwis11437992002-04-12 09:54:03 +000018925 # First look for the input files in the build tree, otherwise in the
18926 # src tree.
18927 ac_file_inputs=`IFS=:
18928 for f in $ac_file_in; do
18929 case $f in
18930 -) echo $tmp/stdin ;;
18931 [\\/$]*)
18932 # Absolute (can't be DOS-style, as IFS=:)
18933 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18934echo "$as_me: error: cannot find input file: $f" >&2;}
18935 { (exit 1); exit 1; }; }
18936 echo $f;;
18937 *) # Relative
18938 if test -f "$f"; then
18939 # Build tree
18940 echo $f
18941 elif test -f "$srcdir/$f"; then
18942 # Source tree
18943 echo $srcdir/$f
18944 else
18945 # /dev/null tree
18946 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18947echo "$as_me: error: cannot find input file: $f" >&2;}
18948 { (exit 1); exit 1; }; }
18949 fi;;
18950 esac
18951 done` || { (exit 1); exit 1; }
18952 # Remove the trailing spaces.
18953 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018954
Martin v. Löwis11437992002-04-12 09:54:03 +000018955_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018956
Martin v. Löwis11437992002-04-12 09:54:03 +000018957# Transform confdefs.h into two sed scripts, `conftest.defines' and
18958# `conftest.undefs', that substitutes the proper values into
18959# config.h.in to produce config.h. The first handles `#define'
18960# templates, and the second `#undef' templates.
18961# And first: Protect against being on the right side of a sed subst in
18962# config.status. Protect against being in an unquoted here document
18963# in config.status.
18964rm -f conftest.defines conftest.undefs
18965# Using a here document instead of a string reduces the quoting nightmare.
18966# Putting comments in sed scripts is not portable.
18967#
18968# `end' is used to avoid that the second main sed command (meant for
18969# 0-ary CPP macros) applies to n-ary macro definitions.
18970# See the Autoconf documentation for `clear'.
18971cat >confdef2sed.sed <<\_ACEOF
18972s/[\\&,]/\\&/g
18973s,[\\$`],\\&,g
18974t clear
18975: clear
18976s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18977t end
18978s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18979: end
18980_ACEOF
18981# If some macros were called several times there might be several times
18982# the same #defines, which is useless. Nevertheless, we may not want to
18983# sort them, since we want the *last* AC-DEFINE to be honored.
18984uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18985sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18986rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018987
18988# This sed command replaces #undef with comments. This is necessary, for
18989# example, in the case of _POSIX_SOURCE, which is predefined and required
18990# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018991cat >>conftest.undefs <<\_ACEOF
18992s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18993_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018994
Martin v. Löwis11437992002-04-12 09:54:03 +000018995# Break up conftest.defines because some shells have a limit on the size
18996# of here documents, and old seds have small limits too (100 cmds).
18997echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000018998echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018999echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19000echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019001rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019002while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019003do
Martin v. Löwis11437992002-04-12 09:54:03 +000019004 # Write a limited-size here document to $tmp/defines.sed.
19005 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19006 # Speed up: don't consider the non `#define' lines.
19007 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19008 # Work around the forget-to-reset-the-flag bug.
19009 echo 't clr' >>$CONFIG_STATUS
19010 echo ': clr' >>$CONFIG_STATUS
19011 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019012 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019013 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19014 rm -f $tmp/in
19015 mv $tmp/out $tmp/in
19016' >>$CONFIG_STATUS
19017 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19018 rm -f conftest.defines
19019 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019020done
Martin v. Löwis11437992002-04-12 09:54:03 +000019021rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019022echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019023echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019024
Martin v. Löwis11437992002-04-12 09:54:03 +000019025# Break up conftest.undefs because some shells have a limit on the size
19026# of here documents, and old seds have small limits too (100 cmds).
19027echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19028rm -f conftest.tail
19029while grep . conftest.undefs >/dev/null
19030do
19031 # Write a limited-size here document to $tmp/undefs.sed.
19032 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19033 # Speed up: don't consider the non `#undef'
19034 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19035 # Work around the forget-to-reset-the-flag bug.
19036 echo 't clr' >>$CONFIG_STATUS
19037 echo ': clr' >>$CONFIG_STATUS
19038 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19039 echo 'CEOF
19040 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19041 rm -f $tmp/in
19042 mv $tmp/out $tmp/in
19043' >>$CONFIG_STATUS
19044 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19045 rm -f conftest.undefs
19046 mv conftest.tail conftest.undefs
19047done
19048rm -f conftest.undefs
19049
19050cat >>$CONFIG_STATUS <<\_ACEOF
19051 # Let's still pretend it is `configure' which instantiates (i.e., don't
19052 # use $as_me), people would be surprised to read:
19053 # /* config.h. Generated by config.status. */
19054 if test x"$ac_file" = x-; then
19055 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019056 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019058 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019059 cat $tmp/in >>$tmp/config.h
19060 rm -f $tmp/in
19061 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019062 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19064echo "$as_me: $ac_file is unchanged" >&6;}
19065 else
19066 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19067$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19068 X"$ac_file" : 'X\(//\)[^/]' \| \
19069 X"$ac_file" : 'X\(//\)$' \| \
19070 X"$ac_file" : 'X\(/\)' \| \
19071 . : '\(.\)' 2>/dev/null ||
19072echo X"$ac_file" |
19073 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19074 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19075 /^X\(\/\/\)$/{ s//\1/; q; }
19076 /^X\(\/\).*/{ s//\1/; q; }
19077 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019078 { if $as_mkdir_p; then
19079 mkdir -p "$ac_dir"
19080 else
19081 as_dir="$ac_dir"
19082 as_dirs=
19083 while test ! -d "$as_dir"; do
19084 as_dirs="$as_dir $as_dirs"
19085 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19086$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19087 X"$as_dir" : 'X\(//\)[^/]' \| \
19088 X"$as_dir" : 'X\(//\)$' \| \
19089 X"$as_dir" : 'X\(/\)' \| \
19090 . : '\(.\)' 2>/dev/null ||
19091echo X"$as_dir" |
19092 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19093 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19094 /^X\(\/\/\)$/{ s//\1/; q; }
19095 /^X\(\/\).*/{ s//\1/; q; }
19096 s/.*/./; q'`
19097 done
19098 test ! -n "$as_dirs" || mkdir $as_dirs
19099 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19100echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19101 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019102
Martin v. Löwis11437992002-04-12 09:54:03 +000019103 rm -f $ac_file
19104 mv $tmp/config.h $ac_file
19105 fi
19106 else
19107 cat $tmp/config.h
19108 rm -f $tmp/config.h
19109 fi
19110done
19111_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019112
Martin v. Löwis11437992002-04-12 09:54:03 +000019113cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019114
Martin v. Löwis11437992002-04-12 09:54:03 +000019115{ (exit 0); exit 0; }
19116_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019117chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019118ac_clean_files=$ac_clean_files_save
19119
19120
19121# configure is writing to config.log, and then calls config.status.
19122# config.status does its own redirection, appending to config.log.
19123# Unfortunately, on DOS this fails, as config.log is still kept open
19124# by configure, so config.status won't be able to write to it; its
19125# output is simply discarded. So we exec the FD to /dev/null,
19126# effectively closing config.log, so it can be properly (re)opened and
19127# appended to by config.status. When coming back to configure, we
19128# need to make the FD available again.
19129if test "$no_create" != yes; then
19130 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019131 ac_config_status_args=
19132 test "$silent" = yes &&
19133 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019135 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019136 exec 5>>config.log
19137 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19138 # would make configure fail if this is the last instruction.
19139 $ac_cs_success || { (exit 1); exit 1; }
19140fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019141
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019142
19143echo "creating Setup"
19144if test ! -f Modules/Setup
19145then
19146 cp $srcdir/Modules/Setup.dist Modules/Setup
19147fi
19148
19149echo "creating Setup.local"
19150if test ! -f Modules/Setup.local
19151then
19152 echo "# Edit this file for local setup changes" >Modules/Setup.local
19153fi
19154
19155echo "creating Makefile"
19156$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19157 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019158 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019159mv config.c Modules