blob: 0589db76c6e223a424aeea0e0093088e0b50b490 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanaro4d474be2004-01-17 00:29:32 +00002# From configure.in Revision: 1.443 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaro6dead952003-09-25 14:50:04 +00004# Generated by GNU Autoconf 2.57 for python 2.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000010## --------------------- ##
11## M4sh Initialization. ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22 set -o posix
23fi
24
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27 as_unset=unset
28else
29 as_unset=false
30fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in \
41 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43 LC_TELEPHONE LC_TIME
44do
45 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
46 eval $as_var=C; export $as_var
47 else
48 $as_unset $as_var
49 fi
50done
51
52# Required to use basename.
53if expr a : '\(a\)' >/dev/null 2>&1; then
54 as_expr=expr
55else
56 as_expr=false
57fi
58
59if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60 as_basename=basename
61else
62 as_basename=false
63fi
Martin v. Löwis11437992002-04-12 09:54:03 +000064
65
66# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000067as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000068$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69 X"$0" : 'X\(//\)$' \| \
70 X"$0" : 'X\(/\)$' \| \
71 . : '\(.\)' 2>/dev/null ||
72echo X/"$0" |
73 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74 /^X\/\(\/\/\)$/{ s//\1/; q; }
75 /^X\/\(\/\).*/{ s//\1/; q; }
76 s/.*/./; q'`
77
Skip Montanaro6dead952003-09-25 14:50:04 +000078
Martin v. Löwis11437992002-04-12 09:54:03 +000079# PATH needs CR, and LINENO needs CR and PATH.
80# Avoid depending upon Character Ranges.
81as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84as_cr_digits='0123456789'
85as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87# The user is always right.
88if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000089 echo "#! /bin/sh" >conf$$.sh
90 echo "exit 0" >>conf$$.sh
91 chmod +x conf$$.sh
92 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000093 PATH_SEPARATOR=';'
94 else
95 PATH_SEPARATOR=:
96 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000097 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000098fi
99
100
101 as_lineno_1=$LINENO
102 as_lineno_2=$LINENO
103 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104 test "x$as_lineno_1" != "x$as_lineno_2" &&
105 test "x$as_lineno_3" = "x$as_lineno_2" || {
106 # Find who we are. Look in the path if we contain no path at all
107 # relative or not.
108 case $0 in
109 *[\\/]* ) as_myself=$0 ;;
110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111for as_dir in $PATH
112do
113 IFS=$as_save_IFS
114 test -z "$as_dir" && as_dir=.
115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116done
117
118 ;;
119 esac
120 # We did not find ourselves, most probably we were run as `sh COMMAND'
121 # in which case we are not to be found in the path.
122 if test "x$as_myself" = x; then
123 as_myself=$0
124 fi
125 if test ! -f "$as_myself"; then
126 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127 { (exit 1); exit 1; }; }
128 fi
129 case $CONFIG_SHELL in
130 '')
131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133do
134 IFS=$as_save_IFS
135 test -z "$as_dir" && as_dir=.
136 for as_base in sh bash ksh sh5; do
137 case $as_dir in
138 /*)
139 if ("$as_dir/$as_base" -c '
140 as_lineno_1=$LINENO
141 as_lineno_2=$LINENO
142 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143 test "x$as_lineno_1" != "x$as_lineno_2" &&
144 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000145 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000147 CONFIG_SHELL=$as_dir/$as_base
148 export CONFIG_SHELL
149 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150 fi;;
151 esac
152 done
153done
154;;
155 esac
156
157 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158 # uniformly replaced by the line number. The first 'sed' inserts a
159 # line-number line before each line; the second 'sed' does the real
160 # work. The second script uses 'N' to pair each line-number line
161 # with the numbered line, and appends trailing '-' during
162 # substitution so that $LINENO is not a special case at line end.
163 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
165 sed '=' <$as_myself |
166 sed '
167 N
168 s,$,-,
169 : loop
170 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171 t loop
172 s,-$,,
173 s,^['$as_cr_digits']*\n,,
174 ' >$as_me.lineno &&
175 chmod +x $as_me.lineno ||
176 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177 { (exit 1); exit 1; }; }
178
179 # Don't try to exec as it changes $[0], causing all sort of problems
180 # (the dirname of $[0] is not the place where we might find the
181 # original and so on. Autoconf is especially sensible to this).
182 . ./$as_me.lineno
183 # Exit status is that of the last command.
184 exit
185}
186
187
188case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189 *c*,-n*) ECHO_N= ECHO_C='
190' ECHO_T=' ' ;;
191 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
193esac
194
195if expr a : '\(a\)' >/dev/null 2>&1; then
196 as_expr=expr
197else
198 as_expr=false
199fi
200
201rm -f conf$$ conf$$.exe conf$$.file
202echo >conf$$.file
203if ln -s conf$$.file conf$$ 2>/dev/null; then
204 # We could just check for DJGPP; but this test a) works b) is more generic
205 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206 if test -f conf$$.exe; then
207 # Don't use ln at all; we don't have any links
208 as_ln_s='cp -p'
209 else
210 as_ln_s='ln -s'
211 fi
212elif ln conf$$.file conf$$ 2>/dev/null; then
213 as_ln_s=ln
214else
215 as_ln_s='cp -p'
216fi
217rm -f conf$$ conf$$.exe conf$$.file
218
Skip Montanaro6dead952003-09-25 14:50:04 +0000219if mkdir -p . 2>/dev/null; then
220 as_mkdir_p=:
221else
222 as_mkdir_p=false
223fi
224
Martin v. Löwis11437992002-04-12 09:54:03 +0000225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000241$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000254ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000255ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000268PACKAGE_NAME='python'
269PACKAGE_TARNAME='python'
Fred Drake9bd44622003-07-30 17:39:48 +0000270PACKAGE_VERSION='2.4'
271PACKAGE_STRING='python 2.4'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000272PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000273
274ac_unique_file="Include/object.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
Skip Montanaro6dead952003-09-25 14:50:04 +0000312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
313ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000314
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000316ac_init_help=
317ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# The variables have the same names as the options, with
319# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000320cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000321exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000322no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000329site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000330srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332x_includes=NONE
333x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353ac_prev=
354for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000355do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
Martin v. Löwis11437992002-04-12 09:54:03 +0000367 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000372 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
374 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000377 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000394
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403
404 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000406 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413 *) ac_optarg=yes ;;
414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000415 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
426 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429
Martin v. Löwis11437992002-04-12 09:54:03 +0000430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436
437 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000440 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000479
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 # Obsolete; use --without-fp.
482 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486 no_create=yes ;;
487
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000500
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000511 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000518 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000535 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000545 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000556 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000557
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000561 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000566 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000574
Guido van Rossum7f43da71994-08-01 12:15:30 +0000575 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000578 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000585
586 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000588 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000592 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 *) ac_optarg=yes ;;
596 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000597 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598
599 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000601 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000607
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000624 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000625
Martin v. Löwis11437992002-04-12 09:54:03 +0000626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000629 ;;
630
Martin v. Löwis11437992002-04-12 09:54:03 +0000631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000641 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000647 ;;
648
649 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000650done
651
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000656fi
657
Martin v. Löwis11437992002-04-12 09:54:03 +0000658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000660do
Martin v. Löwis11437992002-04-12 09:54:03 +0000661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000666 esac
667done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Martin v. Löwis11437992002-04-12 09:54:03 +0000669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
678 esac
679done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000680
Martin v. Löwis11437992002-04-12 09:54:03 +0000681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000687
Martin v. Löwis11437992002-04-12 09:54:03 +0000688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000723 srcdir=..
724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000725else
726 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000727fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000729 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773
Martin v. Löwis11437992002-04-12 09:54:03 +0000774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000781\`configure' configures python 2.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
831
832 cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000837 case $ac_init_help in
Fred Drake9bd44622003-07-30 17:39:48 +0000838 short | recursive ) echo "Configuration of python 2.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000839 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 cat <<\_ACEOF
841
842Optional Features:
843 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
844 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000845 --enable-framework[=INSTALLDIR]
846 Build (MacOSX|Darwin) framework
847 --enable-shared disable/enable building shared python library
848 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
849 --enable-ipv6 Enable ipv6 (with ipv4) support
850 --disable-ipv6 Disable ipv6 support
851 --enable-unicode[=ucs[24]]
852 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853
854Optional Packages:
855 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
856 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000857 --without-gcc never use gcc
858 --with-cxx=<compiler> enable C++ support
859 --with-suffix=.exe set executable suffix
860 --with-pydebug build with Py_DEBUG defined
861 --with-libs='lib1 ...' link against additional libs
862 --with-signal-module disable/enable signal module
863 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
864 --with(out)-threads[=DIRECTORY]
865 disable/enable thread support
866 --with(out)-thread[=DIRECTORY]
867 deprecated; use --with(out)-threads
868 --with-pth use GNU pth threading libraries
869 --with(out)-universal-newlines
870 disable/enable foreign newlines
871 --with(out)-doc-strings disable/enable documentation strings
872 --with(out)-pymalloc disable/enable specialized mallocs
873 --with-wctype-functions use wctype.h functions
874 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
875 --with-dl-dld=DL_DIR GNU dynamic linking
876 --with-fpectl enable SIGFPE catching
877 --with-libm=STRING math library
878 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880Some influential environment variables:
881 CC C compiler command
882 CFLAGS C compiler flags
883 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
884 nonstandard directory <lib dir>
885 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
886 headers in a nonstandard directory <include dir>
887 CPP C preprocessor
888
889Use these variables to override the choices made by `configure' or to help
890it to find libraries and programs with nonstandard names/locations.
891
892_ACEOF
893fi
894
895if test "$ac_init_help" = "recursive"; then
896 # If there are subdirs, report their specific --help.
897 ac_popdir=`pwd`
898 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
899 test -d $ac_dir || continue
900 ac_builddir=.
901
902if test "$ac_dir" != .; then
903 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
904 # A "../" for each directory in $ac_dir_suffix.
905 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
906else
907 ac_dir_suffix= ac_top_builddir=
908fi
909
910case $srcdir in
911 .) # No --srcdir option. We are building in place.
912 ac_srcdir=.
913 if test -z "$ac_top_builddir"; then
914 ac_top_srcdir=.
915 else
916 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
917 fi ;;
918 [\\/]* | ?:[\\/]* ) # Absolute path.
919 ac_srcdir=$srcdir$ac_dir_suffix;
920 ac_top_srcdir=$srcdir ;;
921 *) # Relative path.
922 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
923 ac_top_srcdir=$ac_top_builddir$srcdir ;;
924esac
925# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
926# absolute.
927ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +0000928ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000929ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
930ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
931
932 cd $ac_dir
933 # Check for guested configure; otherwise get Cygnus style configure.
934 if test -f $ac_srcdir/configure.gnu; then
935 echo
936 $SHELL $ac_srcdir/configure.gnu --help=recursive
937 elif test -f $ac_srcdir/configure; then
938 echo
939 $SHELL $ac_srcdir/configure --help=recursive
940 elif test -f $ac_srcdir/configure.ac ||
941 test -f $ac_srcdir/configure.in; then
942 echo
943 $ac_configure --help
944 else
945 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
946 fi
947 cd $ac_popdir
948 done
949fi
950
951test -n "$ac_init_help" && exit 0
952if $ac_init_version; then
953 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000954python configure 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +0000955generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000956
957Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
958Free Software Foundation, Inc.
959This configure script is free software; the Free Software Foundation
960gives unlimited permission to copy, distribute and modify it.
961_ACEOF
962 exit 0
963fi
964exec 5>config.log
965cat >&5 <<_ACEOF
966This file contains any messages produced by compilers while
967running configure, to aid debugging if configure makes a mistake.
968
Fred Drake9bd44622003-07-30 17:39:48 +0000969It was created by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +0000970generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000971
972 $ $0 $@
973
974_ACEOF
975{
976cat <<_ASUNAME
977## --------- ##
978## Platform. ##
979## --------- ##
980
981hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
982uname -m = `(uname -m) 2>/dev/null || echo unknown`
983uname -r = `(uname -r) 2>/dev/null || echo unknown`
984uname -s = `(uname -s) 2>/dev/null || echo unknown`
985uname -v = `(uname -v) 2>/dev/null || echo unknown`
986
987/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
988/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
989
990/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
991/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
992/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
993hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
994/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
995/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
996/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
997
998_ASUNAME
999
1000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1001for as_dir in $PATH
1002do
1003 IFS=$as_save_IFS
1004 test -z "$as_dir" && as_dir=.
1005 echo "PATH: $as_dir"
1006done
1007
1008} >&5
1009
1010cat >&5 <<_ACEOF
1011
1012
1013## ----------- ##
1014## Core tests. ##
1015## ----------- ##
1016
1017_ACEOF
1018
1019
1020# Keep a trace of the command line.
1021# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001024# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001025ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001026ac_configure_args0=
1027ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001028ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001029ac_must_keep_next=false
1030for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001031do
Skip Montanaro6dead952003-09-25 14:50:04 +00001032 for ac_arg
1033 do
1034 case $ac_arg in
1035 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1036 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1037 | -silent | --silent | --silen | --sile | --sil)
1038 continue ;;
1039 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1040 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1041 esac
1042 case $ac_pass in
1043 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1044 2)
1045 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1046 if test $ac_must_keep_next = true; then
1047 ac_must_keep_next=false # Got value, back to normal.
1048 else
1049 case $ac_arg in
1050 *=* | --config-cache | -C | -disable-* | --disable-* \
1051 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1052 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1053 | -with-* | --with-* | -without-* | --without-* | --x)
1054 case "$ac_configure_args0 " in
1055 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1056 esac
1057 ;;
1058 -* ) ac_must_keep_next=true ;;
1059 esac
1060 fi
1061 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1062 # Get rid of the leading space.
1063 ac_sep=" "
1064 ;;
1065 esac
1066 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001067done
Skip Montanaro6dead952003-09-25 14:50:04 +00001068$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1069$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001070
1071# When interrupted or exit'd, cleanup temporary files, and complete
1072# config.log. We remove comments because anyway the quotes in there
1073# would cause problems or look ugly.
1074# WARNING: Be sure not to use single quotes in there, as some shells,
1075# such as our DU 5.0 friend, will then `close' the trap.
1076trap 'exit_status=$?
1077 # Save into config.log some information that might help in debugging.
1078 {
1079 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001080
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 cat <<\_ASBOX
1082## ---------------- ##
1083## Cache variables. ##
1084## ---------------- ##
1085_ASBOX
1086 echo
1087 # The following way of writing the cache mishandles newlines in values,
1088{
1089 (set) 2>&1 |
1090 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1091 *ac_space=\ *)
1092 sed -n \
1093 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1094 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1095 ;;
1096 *)
1097 sed -n \
1098 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1099 ;;
1100 esac;
1101}
1102 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001103
1104 cat <<\_ASBOX
1105## ----------------- ##
1106## Output variables. ##
1107## ----------------- ##
1108_ASBOX
1109 echo
1110 for ac_var in $ac_subst_vars
1111 do
1112 eval ac_val=$`echo $ac_var`
1113 echo "$ac_var='"'"'$ac_val'"'"'"
1114 done | sort
1115 echo
1116
1117 if test -n "$ac_subst_files"; then
1118 cat <<\_ASBOX
1119## ------------- ##
1120## Output files. ##
1121## ------------- ##
1122_ASBOX
1123 echo
1124 for ac_var in $ac_subst_files
1125 do
1126 eval ac_val=$`echo $ac_var`
1127 echo "$ac_var='"'"'$ac_val'"'"'"
1128 done | sort
1129 echo
1130 fi
1131
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 if test -s confdefs.h; then
1133 cat <<\_ASBOX
1134## ----------- ##
1135## confdefs.h. ##
1136## ----------- ##
1137_ASBOX
1138 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001139 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 echo
1141 fi
1142 test "$ac_signal" != 0 &&
1143 echo "$as_me: caught signal $ac_signal"
1144 echo "$as_me: exit $exit_status"
1145 } >&5
1146 rm -f core core.* *.core &&
1147 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1148 exit $exit_status
1149 ' 0
1150for ac_signal in 1 2 13 15; do
1151 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1152done
1153ac_signal=0
1154
1155# confdefs.h avoids OS command line length limits that DEFS can exceed.
1156rm -rf conftest* confdefs.h
1157# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1158echo >confdefs.h
1159
1160# Predefined preprocessor variables.
1161
1162cat >>confdefs.h <<_ACEOF
1163#define PACKAGE_NAME "$PACKAGE_NAME"
1164_ACEOF
1165
1166
1167cat >>confdefs.h <<_ACEOF
1168#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1169_ACEOF
1170
1171
1172cat >>confdefs.h <<_ACEOF
1173#define PACKAGE_VERSION "$PACKAGE_VERSION"
1174_ACEOF
1175
1176
1177cat >>confdefs.h <<_ACEOF
1178#define PACKAGE_STRING "$PACKAGE_STRING"
1179_ACEOF
1180
1181
1182cat >>confdefs.h <<_ACEOF
1183#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1184_ACEOF
1185
1186
1187# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188# Prefer explicitly selected file to automatically selected ones.
1189if test -z "$CONFIG_SITE"; then
1190 if test "x$prefix" != xNONE; then
1191 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1192 else
1193 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1194 fi
1195fi
1196for ac_site_file in $CONFIG_SITE; do
1197 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1199echo "$as_me: loading site script $ac_site_file" >&6;}
1200 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 . "$ac_site_file"
1202 fi
1203done
1204
1205if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 # Some versions of bash will fail to source /dev/null (special
1207 # files actually), so we avoid doing that.
1208 if test -f "$cache_file"; then
1209 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1210echo "$as_me: loading cache $cache_file" >&6;}
1211 case $cache_file in
1212 [\\/]* | ?:[\\/]* ) . $cache_file;;
1213 *) . ./$cache_file;;
1214 esac
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1218echo "$as_me: creating cache $cache_file" >&6;}
1219 >$cache_file
1220fi
1221
1222# Check that the precious variables saved in the cache have kept the same
1223# value.
1224ac_cache_corrupted=false
1225for ac_var in `(set) 2>&1 |
1226 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1227 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1228 eval ac_new_set=\$ac_env_${ac_var}_set
1229 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1230 eval ac_new_val="\$ac_env_${ac_var}_value"
1231 case $ac_old_set,$ac_new_set in
1232 set,)
1233 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1234echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1235 ac_cache_corrupted=: ;;
1236 ,set)
1237 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1238echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1239 ac_cache_corrupted=: ;;
1240 ,);;
1241 *)
1242 if test "x$ac_old_val" != "x$ac_new_val"; then
1243 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1244echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1245 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1246echo "$as_me: former value: $ac_old_val" >&2;}
1247 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1248echo "$as_me: current value: $ac_new_val" >&2;}
1249 ac_cache_corrupted=:
1250 fi;;
1251 esac
1252 # Pass precious variables to config.status.
1253 if test "$ac_new_set" = set; then
1254 case $ac_new_val in
1255 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1256 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1257 *) ac_arg=$ac_var=$ac_new_val ;;
1258 esac
1259 case " $ac_configure_args " in
1260 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1261 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1262 esac
1263 fi
1264done
1265if $ac_cache_corrupted; then
1266 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1267echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1268 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1269echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1270 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271fi
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001275ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1276ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1277ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Michael W. Hudson54241132001-12-07 15:38:26 +00001280
1281
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
Martin v. Löwis88afe662002-10-26 13:47:44 +00001296
1297
1298
1299
1300
1301
1302
1303
1304
Skip Montanaro6dead952003-09-25 14:50:04 +00001305
1306 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309
1310
1311
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001312
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001313
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001314# We don't use PACKAGE_ variables, and they cause conflicts
1315# with other autoconf-based packages that include Python.h
1316grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1317rm confdefs.h
1318mv confdefs.h.new confdefs.h
1319
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001320
Fred Drake9bd44622003-07-30 17:39:48 +00001321VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001322
Martin v. Löwis1142de32002-03-29 16:28:31 +00001323
1324SOVERSION=1.0
1325
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001326# The later defininition of _XOPEN_SOURCE disables certain features
1327# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1328
1329cat >>confdefs.h <<\_ACEOF
1330#define _GNU_SOURCE 1
1331_ACEOF
1332
1333
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001334# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1335# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1336# them.
1337
1338cat >>confdefs.h <<\_ACEOF
1339#define _NETBSD_SOURCE 1
1340_ACEOF
1341
1342
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001343# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1344# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1345# them.
1346
1347cat >>confdefs.h <<\_ACEOF
1348#define __BSD_VISIBLE 1
1349_ACEOF
1350
1351
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001352define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001353
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001354# Arguments passed to configure.
1355
1356CONFIG_ARGS="$ac_configure_args"
1357
Jack Jansene578a632001-08-15 01:27:14 +00001358# Check whether --enable-framework or --disable-framework was given.
1359if test "${enable_framework+set}" = set; then
1360 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
Jack Jansene578a632001-08-15 01:27:14 +00001362 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001364 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001365 esac
1366 case $enableval in
1367 no)
1368 PYTHONFRAMEWORK=
1369 PYTHONFRAMEWORKDIR=no-framework
1370 PYTHONFRAMEWORKPREFIX=
1371 PYTHONFRAMEWORKINSTALLDIR=
1372 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001373 ;;
1374 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001375 PYTHONFRAMEWORK=Python
1376 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001377 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001378 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1379 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001380 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Guido van Rossum563e7081996-09-10 18:20:48 +00001382else
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001385 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001386 PYTHONFRAMEWORKPREFIX=
1387 PYTHONFRAMEWORKINSTALLDIR=
1388 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001391
1392
1393
1394
Jack Jansene578a632001-08-15 01:27:14 +00001395
1396##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397## AC_HELP_STRING(--with-dyld,
1398## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001399##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001400# Set name for machine-dependent library files
1401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402echo "$as_me:$LINENO: checking MACHDEP" >&5
1403echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001404if test -z "$MACHDEP"
1405then
Guido van Rossum563e7081996-09-10 18:20:48 +00001406 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001407 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1408 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001412 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001413 ac_md_system=`echo $ac_sys_system |
1414 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1415 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001416 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001417 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001418
Guido van Rossum07397971997-04-29 21:49:50 +00001419 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001420 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001421 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001422 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001423 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001424 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001425 esac
1426fi
Guido van Rossum91922671997-10-09 20:24:13 +00001427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001428# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1429# disable features if it is defined, without any means to access these
1430# features as extensions. For these systems, we skip the definition of
1431# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1432# some feature, make sure there is no alternative way to access this
1433# feature. Also, when using wildcards, make sure you have verified the
1434# need for not defining _XOPEN_SOURCE on all systems matching the
1435# wildcard, and that the wildcard does not include future systems
1436# (which may remove their limitations).
1437case $ac_sys_system/$ac_sys_release in
1438 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1439 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001440 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1441 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001442 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001443 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1444 # of union __?sigval. Reported by Stuart Bishop.
1445 SunOS/5.6)
1446 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001447 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1448 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1449 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1450 define_xopen_source=no;;
1451 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001452 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001453 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001454 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001455 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1456 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1457 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1458 # This should hopefully be fixed in FreeBSD 4.9
1459 FreeBSD/4.8* | Darwin/6* )
1460 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001461 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1462 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1463 # has another value. By not (re)defining it, the defaults come in place.
1464 AIX/4)
1465 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001466esac
1467
1468if test $define_xopen_source = yes
1469then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001470
1471cat >>confdefs.h <<\_ACEOF
1472#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001473_ACEOF
1474
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001475
1476 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1477 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1478 # several APIs are not declared. Since this is also needed in some
1479 # cases for HP-UX, we define it globally.
1480
1481
1482cat >>confdefs.h <<\_ACEOF
1483#define _XOPEN_SOURCE_EXTENDED 1
1484_ACEOF
1485
1486
1487cat >>confdefs.h <<\_ACEOF
1488#define _POSIX_C_SOURCE 200112L
1489_ACEOF
1490
1491
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001492fi
1493
Guido van Rossum91922671997-10-09 20:24:13 +00001494#
1495# SGI compilers allow the specification of the both the ABI and the
1496# ISA on the command line. Depending on the values of these switches,
1497# different and often incompatable code will be generated.
1498#
1499# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1500# thus supply support for various ABI/ISA combinations. The MACHDEP
1501# variable is also adjusted.
1502#
1503
1504if test ! -z "$SGI_ABI"
1505then
1506 CC="cc $SGI_ABI"
1507 LDFLAGS="$SGI_ABI $LDFLAGS"
1508 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001510echo "$as_me:$LINENO: result: $MACHDEP" >&5
1511echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001512
Jack Jansen83f898c2002-12-30 22:23:40 +00001513# And add extra plat-mac for darwin
1514
Jack Jansen7b59b422003-03-17 15:44:10 +00001515
Jack Jansen83f898c2002-12-30 22:23:40 +00001516echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1517echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1518if test -z "$EXTRAPLATDIR"
1519then
1520 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001521 darwin)
1522 EXTRAPLATDIR="\$(PLATMACDIRS)"
1523 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1524 ;;
1525 *)
1526 EXTRAPLATDIR=""
1527 EXTRAMACHDEPPATH=""
1528 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001529 esac
1530fi
1531echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1532echo "${ECHO_T}$EXTRAPLATDIR" >&6
1533
Guido van Rossum627b2d71993-12-24 10:39:16 +00001534# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001535
1536# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1537# for debug/optimization stuff. BASECFLAGS is for flags that are required
1538# just to get things to compile and link. Users are free to override OPT
1539# when running configure or make. The build should not break if they do.
1540# BASECFLAGS should generally not be messed with, however.
1541
1542# XXX shouldn't some/most/all of this code be merged with the stuff later
1543# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001544echo "$as_me:$LINENO: checking for --without-gcc" >&5
1545echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001548if test "${with_gcc+set}" = set; then
1549 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
Guido van Rossum7f43da71994-08-01 12:15:30 +00001551 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001552 no) CC=cc
1553 without_gcc=yes;;
1554 yes) CC=gcc
1555 without_gcc=no;;
1556 *) CC=$withval
1557 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001558 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001559else
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001561 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001562 AIX*) CC=cc_r
1563 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001564 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001565 case $BE_HOST_CPU in
1566 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001567 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001568 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001569 BASECFLAGS="$BASECFLAGS -export pragma"
1570 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001571 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001572 ;;
1573 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001574 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001575 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001576 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001577 ;;
1578 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1580echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1581 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001582 ;;
1583 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001584 AR="\$(srcdir)/Modules/ar_beos"
1585 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001586 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001587 Monterey*)
1588 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001589 without_gcc=;;
1590 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001591 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001592fi;
1593echo "$as_me:$LINENO: result: $without_gcc" >&5
1594echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001595
1596
Guido van Rossum95012191999-12-16 17:50:52 +00001597
Fred Drakea1a84e72001-03-06 05:52:16 +00001598MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001599echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1600echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1601
Guido van Rossum95012191999-12-16 17:50:52 +00001602# Check whether --with-cxx or --without-cxx was given.
1603if test "${with_cxx+set}" = set; then
1604 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001605
Martin v. Löwis22352952000-12-13 17:37:02 +00001606 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001607 case $withval in
1608 no) CXX=
1609 with_cxx=no;;
1610 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001611 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001612 with_cxx=$withval;;
1613 esac
1614else
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
Guido van Rossum95012191999-12-16 17:50:52 +00001616 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001617 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001618
Martin v. Löwis11437992002-04-12 09:54:03 +00001619fi;
1620echo "$as_me:$LINENO: result: $with_cxx" >&5
1621echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001622
1623if test "$with_cxx" = "yes"
1624then
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1626echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1627 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001628fi
1629
1630
1631
1632
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001634then
1635 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1636do
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001638set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001639echo "$as_me:$LINENO: checking for $ac_word" >&5
1640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641if test "${ac_cv_prog_CXX+set}" = set; then
1642 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001643else
1644 if test -n "$CXX"; then
1645 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1646else
Martin v. Löwis11437992002-04-12 09:54:03 +00001647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1648for as_dir in $PATH
1649do
1650 IFS=$as_save_IFS
1651 test -z "$as_dir" && as_dir=.
1652 for ac_exec_ext in '' $ac_executable_extensions; do
1653 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1654 ac_cv_prog_CXX="$ac_prog"
1655 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1656 break 2
1657 fi
1658done
1659done
1660
Martin v. Löwis22352952000-12-13 17:37:02 +00001661fi
1662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001663CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001664if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 echo "$as_me:$LINENO: result: $CXX" >&5
1666echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001667else
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 echo "$as_me:$LINENO: result: no" >&5
1669echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001670fi
1671
Martin v. Löwis11437992002-04-12 09:54:03 +00001672 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001673done
1674test -n "$CXX" || CXX="notfound"
1675
1676 if test "$CXX" = "notfound"
1677 then
1678 CXX=
1679 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001680 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001681ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1685 cat >conftest.$ac_ext <<_ACEOF
1686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001687/* confdefs.h. */
1688_ACEOF
1689cat confdefs.h >>conftest.$ac_ext
1690cat >>conftest.$ac_ext <<_ACEOF
1691/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693int
1694main ()
1695{
Michael W. Hudson54241132001-12-07 15:38:26 +00001696
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 ;
1698 return 0;
1699}
1700_ACEOF
1701ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001702ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001703# Try to create an executable without -o first, disregard a.out.
1704# It will help us diagnose broken compilers, and finding out an intuition
1705# of exeext.
1706echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1707echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1708ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1709if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1710 (eval $ac_link_default) 2>&5
1711 ac_status=$?
1712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1713 (exit $ac_status); }; then
1714 # Find the output, starting from the most likely. This scheme is
1715# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1716# resort.
1717
1718# Be careful to initialize this variable, since it used to be cached.
1719# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1720ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001721# b.out is created by i960 compilers.
1722for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1723do
1724 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001726 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1727 ;;
1728 conftest.$ac_ext )
1729 # This is the source file.
1730 ;;
1731 [ab].out )
1732 # We found the default executable, but exeext='' is most
1733 # certainly right.
1734 break;;
1735 *.* )
1736 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1737 # FIXME: I believe we export ac_cv_exeext for Libtool,
1738 # but it would be cool to find out if it's true. Does anybody
1739 # maintain Libtool? --akim.
1740 export ac_cv_exeext
1741 break;;
1742 * )
1743 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 esac
1745done
1746else
1747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1751See \`config.log' for more details." >&5
1752echo "$as_me: error: C++ compiler cannot create executables
1753See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001756
1757ac_exeext=$ac_cv_exeext
1758echo "$as_me:$LINENO: result: $ac_file" >&5
1759echo "${ECHO_T}$ac_file" >&6
1760
1761# Check the compiler produces executables we can run. If not, either
1762# the compiler is broken, or we cross compile.
1763echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1764echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1765# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1766# If not cross compiling, check that we can run a simple program.
1767if test "$cross_compiling" != yes; then
1768 if { ac_try='./$ac_file'
1769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1770 (eval $ac_try) 2>&5
1771 ac_status=$?
1772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1773 (exit $ac_status); }; }; then
1774 cross_compiling=no
1775 else
1776 if test "$cross_compiling" = maybe; then
1777 cross_compiling=yes
1778 else
1779 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001780If you meant to cross compile, use \`--host'.
1781See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001782echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001783If you meant to cross compile, use \`--host'.
1784See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001785 { (exit 1); exit 1; }; }
1786 fi
1787 fi
1788fi
1789echo "$as_me:$LINENO: result: yes" >&5
1790echo "${ECHO_T}yes" >&6
1791
Skip Montanaro6dead952003-09-25 14:50:04 +00001792rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_clean_files=$ac_clean_files_save
1794# Check the compiler produces executables we can run. If not, either
1795# the compiler is broken, or we cross compile.
1796echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1797echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1798echo "$as_me:$LINENO: result: $cross_compiling" >&5
1799echo "${ECHO_T}$cross_compiling" >&6
1800
1801echo "$as_me:$LINENO: checking for suffix of executables" >&5
1802echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1804 (eval $ac_link) 2>&5
1805 ac_status=$?
1806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1807 (exit $ac_status); }; then
1808 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1809# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1810# work properly (i.e., refer to `conftest.exe'), while it won't with
1811# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001812for ac_file in conftest.exe conftest conftest.*; do
1813 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001814 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001816 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1817 export ac_cv_exeext
1818 break;;
1819 * ) break;;
1820 esac
1821done
1822else
Skip Montanaro6dead952003-09-25 14:50:04 +00001823 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1824See \`config.log' for more details." >&5
1825echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1826See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 { (exit 1); exit 1; }; }
1828fi
1829
1830rm -f conftest$ac_cv_exeext
1831echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1832echo "${ECHO_T}$ac_cv_exeext" >&6
1833
1834rm -f conftest.$ac_ext
1835EXEEXT=$ac_cv_exeext
1836ac_exeext=$EXEEXT
1837
1838 ac_ext=c
1839ac_cpp='$CPP $CPPFLAGS'
1840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1842ac_compiler_gnu=$ac_cv_c_compiler_gnu
1843
1844
Martin v. Löwis22352952000-12-13 17:37:02 +00001845
1846 fi
1847fi
1848
Guido van Rossum8b131c51995-03-09 14:10:13 +00001849# If the user switches compilers, we can't believe the cache
1850if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1851then
Martin v. Löwis11437992002-04-12 09:54:03 +00001852 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1853(it is also a good idea to do 'make clean' before compiling)" >&5
1854echo "$as_me: error: cached CC is different -- throw away $cache_file
1855(it is also a good idea to do 'make clean' before compiling)" >&2;}
1856 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001857fi
1858
Martin v. Löwis11437992002-04-12 09:54:03 +00001859ac_ext=c
1860ac_cpp='$CPP $CPPFLAGS'
1861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1863ac_compiler_gnu=$ac_cv_c_compiler_gnu
1864if test -n "$ac_tool_prefix"; then
1865 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1866set dummy ${ac_tool_prefix}gcc; ac_word=$2
1867echo "$as_me:$LINENO: checking for $ac_word" >&5
1868echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1869if test "${ac_cv_prog_CC+set}" = set; then
1870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001871else
1872 if test -n "$CC"; then
1873 ac_cv_prog_CC="$CC" # Let the user override the test.
1874else
Martin v. Löwis11437992002-04-12 09:54:03 +00001875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1876for as_dir in $PATH
1877do
1878 IFS=$as_save_IFS
1879 test -z "$as_dir" && as_dir=.
1880 for ac_exec_ext in '' $ac_executable_extensions; do
1881 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1882 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
Jack Jansendd19cf82001-12-06 22:36:17 +00001889fi
1890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001891CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001892if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001893 echo "$as_me:$LINENO: result: $CC" >&5
1894echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001895else
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 echo "$as_me:$LINENO: result: no" >&5
1897echo "${ECHO_T}no" >&6
1898fi
1899
1900fi
1901if test -z "$ac_cv_prog_CC"; then
1902 ac_ct_CC=$CC
1903 # Extract the first word of "gcc", so it can be a program name with args.
1904set dummy gcc; ac_word=$2
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920 ac_cv_prog_ac_ct_CC="gcc"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
1923 fi
1924done
1925done
1926
1927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
1933else
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
1936fi
1937
1938 CC=$ac_ct_CC
1939else
1940 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001941fi
1942
Jack Jansendd19cf82001-12-06 22:36:17 +00001943if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001944 if test -n "$ac_tool_prefix"; then
1945 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1946set dummy ${ac_tool_prefix}cc; ac_word=$2
1947echo "$as_me:$LINENO: checking for $ac_word" >&5
1948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1949if test "${ac_cv_prog_CC+set}" = set; then
1950 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001951else
1952 if test -n "$CC"; then
1953 ac_cv_prog_CC="$CC" # Let the user override the test.
1954else
Martin v. Löwis11437992002-04-12 09:54:03 +00001955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1956for as_dir in $PATH
1957do
1958 IFS=$as_save_IFS
1959 test -z "$as_dir" && as_dir=.
1960 for ac_exec_ext in '' $ac_executable_extensions; do
1961 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1962 ac_cv_prog_CC="${ac_tool_prefix}cc"
1963 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1964 break 2
1965 fi
1966done
1967done
1968
1969fi
1970fi
1971CC=$ac_cv_prog_CC
1972if test -n "$CC"; then
1973 echo "$as_me:$LINENO: result: $CC" >&5
1974echo "${ECHO_T}$CC" >&6
1975else
1976 echo "$as_me:$LINENO: result: no" >&5
1977echo "${ECHO_T}no" >&6
1978fi
1979
1980fi
1981if test -z "$ac_cv_prog_CC"; then
1982 ac_ct_CC=$CC
1983 # Extract the first word of "cc", so it can be a program name with args.
1984set dummy cc; ac_word=$2
1985echo "$as_me:$LINENO: checking for $ac_word" >&5
1986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1988 echo $ECHO_N "(cached) $ECHO_C" >&6
1989else
1990 if test -n "$ac_ct_CC"; then
1991 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1992else
1993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994for as_dir in $PATH
1995do
1996 IFS=$as_save_IFS
1997 test -z "$as_dir" && as_dir=.
1998 for ac_exec_ext in '' $ac_executable_extensions; do
1999 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000 ac_cv_prog_ac_ct_CC="cc"
2001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2002 break 2
2003 fi
2004done
2005done
2006
2007fi
2008fi
2009ac_ct_CC=$ac_cv_prog_ac_ct_CC
2010if test -n "$ac_ct_CC"; then
2011 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2012echo "${ECHO_T}$ac_ct_CC" >&6
2013else
2014 echo "$as_me:$LINENO: result: no" >&5
2015echo "${ECHO_T}no" >&6
2016fi
2017
2018 CC=$ac_ct_CC
2019else
2020 CC="$ac_cv_prog_CC"
2021fi
2022
2023fi
2024if test -z "$CC"; then
2025 # Extract the first word of "cc", so it can be a program name with args.
2026set dummy cc; ac_word=$2
2027echo "$as_me:$LINENO: checking for $ac_word" >&5
2028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2029if test "${ac_cv_prog_CC+set}" = set; then
2030 echo $ECHO_N "(cached) $ECHO_C" >&6
2031else
2032 if test -n "$CC"; then
2033 ac_cv_prog_CC="$CC" # Let the user override the test.
2034else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002035 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037for as_dir in $PATH
2038do
2039 IFS=$as_save_IFS
2040 test -z "$as_dir" && as_dir=.
2041 for ac_exec_ext in '' $ac_executable_extensions; do
2042 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2043 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2044 ac_prog_rejected=yes
2045 continue
2046 fi
2047 ac_cv_prog_CC="cc"
2048 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2049 break 2
2050 fi
2051done
2052done
2053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054if test $ac_prog_rejected = yes; then
2055 # We found a bogon in the path, so make sure we never use it.
2056 set dummy $ac_cv_prog_CC
2057 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002058 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002059 # We chose a different compiler from the bogus one.
2060 # However, it has the same basename, so the bogon will be chosen
2061 # first if we set CC to just the basename; use the full file name.
2062 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002063 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064 fi
2065fi
2066fi
2067fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002068CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002069if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002070 echo "$as_me:$LINENO: result: $CC" >&5
2071echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002072else
Martin v. Löwis11437992002-04-12 09:54:03 +00002073 echo "$as_me:$LINENO: result: no" >&5
2074echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002075fi
2076
Martin v. Löwis11437992002-04-12 09:54:03 +00002077fi
2078if test -z "$CC"; then
2079 if test -n "$ac_tool_prefix"; then
2080 for ac_prog in cl
2081 do
2082 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2084echo "$as_me:$LINENO: checking for $ac_word" >&5
2085echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2086if test "${ac_cv_prog_CC+set}" = set; then
2087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002088else
2089 if test -n "$CC"; then
2090 ac_cv_prog_CC="$CC" # Let the user override the test.
2091else
Martin v. Löwis11437992002-04-12 09:54:03 +00002092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2093for as_dir in $PATH
2094do
2095 IFS=$as_save_IFS
2096 test -z "$as_dir" && as_dir=.
2097 for ac_exec_ext in '' $ac_executable_extensions; do
2098 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2099 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2100 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2101 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002102 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002103done
2104done
2105
2106fi
2107fi
2108CC=$ac_cv_prog_CC
2109if test -n "$CC"; then
2110 echo "$as_me:$LINENO: result: $CC" >&5
2111echo "${ECHO_T}$CC" >&6
2112else
2113 echo "$as_me:$LINENO: result: no" >&5
2114echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002115fi
2116
Martin v. Löwis11437992002-04-12 09:54:03 +00002117 test -n "$CC" && break
2118 done
2119fi
2120if test -z "$CC"; then
2121 ac_ct_CC=$CC
2122 for ac_prog in cl
2123do
2124 # Extract the first word of "$ac_prog", so it can be a program name with args.
2125set dummy $ac_prog; ac_word=$2
2126echo "$as_me:$LINENO: checking for $ac_word" >&5
2127echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2128if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2129 echo $ECHO_N "(cached) $ECHO_C" >&6
2130else
2131 if test -n "$ac_ct_CC"; then
2132 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2133else
2134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2135for as_dir in $PATH
2136do
2137 IFS=$as_save_IFS
2138 test -z "$as_dir" && as_dir=.
2139 for ac_exec_ext in '' $ac_executable_extensions; do
2140 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2141 ac_cv_prog_ac_ct_CC="$ac_prog"
2142 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2143 break 2
2144 fi
2145done
2146done
Jack Jansendd19cf82001-12-06 22:36:17 +00002147
Martin v. Löwis11437992002-04-12 09:54:03 +00002148fi
2149fi
2150ac_ct_CC=$ac_cv_prog_ac_ct_CC
2151if test -n "$ac_ct_CC"; then
2152 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2153echo "${ECHO_T}$ac_ct_CC" >&6
2154else
2155 echo "$as_me:$LINENO: result: no" >&5
2156echo "${ECHO_T}no" >&6
2157fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002158
Martin v. Löwis11437992002-04-12 09:54:03 +00002159 test -n "$ac_ct_CC" && break
2160done
Michael W. Hudson54241132001-12-07 15:38:26 +00002161
Martin v. Löwis11437992002-04-12 09:54:03 +00002162 CC=$ac_ct_CC
2163fi
2164
2165fi
2166
2167
Skip Montanaro6dead952003-09-25 14:50:04 +00002168test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&5
2170echo "$as_me: error: no acceptable C compiler found in \$PATH
2171See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002172 { (exit 1); exit 1; }; }
2173
2174# Provide some information about the compiler.
2175echo "$as_me:$LINENO:" \
2176 "checking for C compiler version" >&5
2177ac_compiler=`set X $ac_compile; echo $2`
2178{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2179 (eval $ac_compiler --version </dev/null >&5) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }
2183{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2184 (eval $ac_compiler -v </dev/null >&5) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); }
2188{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2189 (eval $ac_compiler -V </dev/null >&5) 2>&5
2190 ac_status=$?
2191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2192 (exit $ac_status); }
2193
2194cat >conftest.$ac_ext <<_ACEOF
2195#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002196/* confdefs.h. */
2197_ACEOF
2198cat confdefs.h >>conftest.$ac_ext
2199cat >>conftest.$ac_ext <<_ACEOF
2200/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002201
Martin v. Löwis11437992002-04-12 09:54:03 +00002202int
2203main ()
2204{
2205
2206 ;
2207 return 0;
2208}
2209_ACEOF
2210ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002211ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002212# Try to create an executable without -o first, disregard a.out.
2213# It will help us diagnose broken compilers, and finding out an intuition
2214# of exeext.
2215echo "$as_me:$LINENO: checking for C compiler default output" >&5
2216echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2217ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2218if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2219 (eval $ac_link_default) 2>&5
2220 ac_status=$?
2221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222 (exit $ac_status); }; then
2223 # Find the output, starting from the most likely. This scheme is
2224# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2225# resort.
2226
2227# Be careful to initialize this variable, since it used to be cached.
2228# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2229ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002230# b.out is created by i960 compilers.
2231for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2232do
2233 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002234 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002235 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2236 ;;
2237 conftest.$ac_ext )
2238 # This is the source file.
2239 ;;
2240 [ab].out )
2241 # We found the default executable, but exeext='' is most
2242 # certainly right.
2243 break;;
2244 *.* )
2245 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2246 # FIXME: I believe we export ac_cv_exeext for Libtool,
2247 # but it would be cool to find out if it's true. Does anybody
2248 # maintain Libtool? --akim.
2249 export ac_cv_exeext
2250 break;;
2251 * )
2252 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 esac
2254done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002255else
Martin v. Löwis11437992002-04-12 09:54:03 +00002256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2260See \`config.log' for more details." >&5
2261echo "$as_me: error: C compiler cannot create executables
2262See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002263 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002264fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002265
Martin v. Löwis11437992002-04-12 09:54:03 +00002266ac_exeext=$ac_cv_exeext
2267echo "$as_me:$LINENO: result: $ac_file" >&5
2268echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270# Check the compiler produces executables we can run. If not, either
2271# the compiler is broken, or we cross compile.
2272echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2273echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2274# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2275# If not cross compiling, check that we can run a simple program.
2276if test "$cross_compiling" != yes; then
2277 if { ac_try='./$ac_file'
2278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2279 (eval $ac_try) 2>&5
2280 ac_status=$?
2281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2282 (exit $ac_status); }; }; then
2283 cross_compiling=no
2284 else
2285 if test "$cross_compiling" = maybe; then
2286 cross_compiling=yes
2287 else
2288 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002289If you meant to cross compile, use \`--host'.
2290See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002291echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002292If you meant to cross compile, use \`--host'.
2293See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002294 { (exit 1); exit 1; }; }
2295 fi
2296 fi
2297fi
2298echo "$as_me:$LINENO: result: yes" >&5
2299echo "${ECHO_T}yes" >&6
2300
Skip Montanaro6dead952003-09-25 14:50:04 +00002301rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002302ac_clean_files=$ac_clean_files_save
2303# Check the compiler produces executables we can run. If not, either
2304# the compiler is broken, or we cross compile.
2305echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2306echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2307echo "$as_me:$LINENO: result: $cross_compiling" >&5
2308echo "${ECHO_T}$cross_compiling" >&6
2309
2310echo "$as_me:$LINENO: checking for suffix of executables" >&5
2311echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2313 (eval $ac_link) 2>&5
2314 ac_status=$?
2315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2316 (exit $ac_status); }; then
2317 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2318# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2319# work properly (i.e., refer to `conftest.exe'), while it won't with
2320# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002321for ac_file in conftest.exe conftest conftest.*; do
2322 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002323 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002324 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2326 export ac_cv_exeext
2327 break;;
2328 * ) break;;
2329 esac
2330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002331else
Skip Montanaro6dead952003-09-25 14:50:04 +00002332 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2333See \`config.log' for more details." >&5
2334echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2335See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002336 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002337fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339rm -f conftest$ac_cv_exeext
2340echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2341echo "${ECHO_T}$ac_cv_exeext" >&6
2342
2343rm -f conftest.$ac_ext
2344EXEEXT=$ac_cv_exeext
2345ac_exeext=$EXEEXT
2346echo "$as_me:$LINENO: checking for suffix of object files" >&5
2347echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2348if test "${ac_cv_objext+set}" = set; then
2349 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002350else
Martin v. Löwis11437992002-04-12 09:54:03 +00002351 cat >conftest.$ac_ext <<_ACEOF
2352#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002353/* confdefs.h. */
2354_ACEOF
2355cat confdefs.h >>conftest.$ac_ext
2356cat >>conftest.$ac_ext <<_ACEOF
2357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002358
Martin v. Löwis11437992002-04-12 09:54:03 +00002359int
2360main ()
2361{
2362
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367rm -f conftest.o conftest.obj
2368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2369 (eval $ac_compile) 2>&5
2370 ac_status=$?
2371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2372 (exit $ac_status); }; then
2373 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2374 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002375 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002376 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2377 break;;
2378 esac
2379done
2380else
2381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002382sed 's/^/| /' conftest.$ac_ext >&5
2383
2384{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2385See \`config.log' for more details." >&5
2386echo "$as_me: error: cannot compute suffix of object files: cannot compile
2387See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002388 { (exit 1); exit 1; }; }
2389fi
2390
2391rm -f conftest.$ac_cv_objext conftest.$ac_ext
2392fi
2393echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2394echo "${ECHO_T}$ac_cv_objext" >&6
2395OBJEXT=$ac_cv_objext
2396ac_objext=$OBJEXT
2397echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2398echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2399if test "${ac_cv_c_compiler_gnu+set}" = set; then
2400 echo $ECHO_N "(cached) $ECHO_C" >&6
2401else
2402 cat >conftest.$ac_ext <<_ACEOF
2403#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002404/* confdefs.h. */
2405_ACEOF
2406cat confdefs.h >>conftest.$ac_ext
2407cat >>conftest.$ac_ext <<_ACEOF
2408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
Martin v. Löwis11437992002-04-12 09:54:03 +00002410int
2411main ()
2412{
2413#ifndef __GNUC__
2414 choke me
2415#endif
2416
2417 ;
2418 return 0;
2419}
2420_ACEOF
2421rm -f conftest.$ac_objext
2422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2423 (eval $ac_compile) 2>&5
2424 ac_status=$?
2425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2426 (exit $ac_status); } &&
2427 { ac_try='test -s conftest.$ac_objext'
2428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2429 (eval $ac_try) 2>&5
2430 ac_status=$?
2431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2432 (exit $ac_status); }; }; then
2433 ac_compiler_gnu=yes
2434else
2435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002436sed 's/^/| /' conftest.$ac_ext >&5
2437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438ac_compiler_gnu=no
2439fi
2440rm -f conftest.$ac_objext conftest.$ac_ext
2441ac_cv_c_compiler_gnu=$ac_compiler_gnu
2442
2443fi
2444echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2445echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2446GCC=`test $ac_compiler_gnu = yes && echo yes`
2447ac_test_CFLAGS=${CFLAGS+set}
2448ac_save_CFLAGS=$CFLAGS
2449CFLAGS="-g"
2450echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2451echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2452if test "${ac_cv_prog_cc_g+set}" = set; then
2453 echo $ECHO_N "(cached) $ECHO_C" >&6
2454else
2455 cat >conftest.$ac_ext <<_ACEOF
2456#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002457/* confdefs.h. */
2458_ACEOF
2459cat confdefs.h >>conftest.$ac_ext
2460cat >>conftest.$ac_ext <<_ACEOF
2461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
Martin v. Löwis11437992002-04-12 09:54:03 +00002463int
2464main ()
2465{
2466
2467 ;
2468 return 0;
2469}
2470_ACEOF
2471rm -f conftest.$ac_objext
2472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2473 (eval $ac_compile) 2>&5
2474 ac_status=$?
2475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2476 (exit $ac_status); } &&
2477 { ac_try='test -s conftest.$ac_objext'
2478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2479 (eval $ac_try) 2>&5
2480 ac_status=$?
2481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2482 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002483 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002484else
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002486sed 's/^/| /' conftest.$ac_ext >&5
2487
Martin v. Löwis11437992002-04-12 09:54:03 +00002488ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002490rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002492echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2493echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002494if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002496elif test $ac_cv_prog_cc_g = yes; then
2497 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498 CFLAGS="-g -O2"
2499 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002500 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002501 fi
2502else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002503 if test "$GCC" = yes; then
2504 CFLAGS="-O2"
2505 else
2506 CFLAGS=
2507 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002508fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002509echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2510echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2511if test "${ac_cv_prog_cc_stdc+set}" = set; then
2512 echo $ECHO_N "(cached) $ECHO_C" >&6
2513else
2514 ac_cv_prog_cc_stdc=no
2515ac_save_CC=$CC
2516cat >conftest.$ac_ext <<_ACEOF
2517#line $LINENO "configure"
2518/* confdefs.h. */
2519_ACEOF
2520cat confdefs.h >>conftest.$ac_ext
2521cat >>conftest.$ac_ext <<_ACEOF
2522/* end confdefs.h. */
2523#include <stdarg.h>
2524#include <stdio.h>
2525#include <sys/types.h>
2526#include <sys/stat.h>
2527/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2528struct buf { int x; };
2529FILE * (*rcsopen) (struct buf *, struct stat *, int);
2530static char *e (p, i)
2531 char **p;
2532 int i;
2533{
2534 return p[i];
2535}
2536static char *f (char * (*g) (char **, int), char **p, ...)
2537{
2538 char *s;
2539 va_list v;
2540 va_start (v,p);
2541 s = g (p, va_arg (v,int));
2542 va_end (v);
2543 return s;
2544}
2545int test (int i, double x);
2546struct s1 {int (*f) (int a);};
2547struct s2 {int (*f) (double a);};
2548int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2549int argc;
2550char **argv;
2551int
2552main ()
2553{
2554return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2555 ;
2556 return 0;
2557}
2558_ACEOF
2559# Don't try gcc -ansi; that turns off useful extensions and
2560# breaks some systems' header files.
2561# AIX -qlanglvl=ansi
2562# Ultrix and OSF/1 -std1
2563# HP-UX 10.20 and later -Ae
2564# HP-UX older versions -Aa -D_HPUX_SOURCE
2565# SVR4 -Xc -D__EXTENSIONS__
2566for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2567do
2568 CC="$ac_save_CC $ac_arg"
2569 rm -f conftest.$ac_objext
2570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2571 (eval $ac_compile) 2>&5
2572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); } &&
2575 { ac_try='test -s conftest.$ac_objext'
2576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2577 (eval $ac_try) 2>&5
2578 ac_status=$?
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); }; }; then
2581 ac_cv_prog_cc_stdc=$ac_arg
2582break
2583else
2584 echo "$as_me: failed program was:" >&5
2585sed 's/^/| /' conftest.$ac_ext >&5
2586
2587fi
2588rm -f conftest.$ac_objext
2589done
2590rm -f conftest.$ac_ext conftest.$ac_objext
2591CC=$ac_save_CC
2592
2593fi
2594
2595case "x$ac_cv_prog_cc_stdc" in
2596 x|xno)
2597 echo "$as_me:$LINENO: result: none needed" >&5
2598echo "${ECHO_T}none needed" >&6 ;;
2599 *)
2600 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2601echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2602 CC="$CC $ac_cv_prog_cc_stdc" ;;
2603esac
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605# Some people use a C++ compiler to compile C. Since we use `exit',
2606# in C++ we need to declare it. In case someone uses the same compiler
2607# for both compiling C and C++ we need to have the C++ compiler decide
2608# the declaration of exit, since it's the most demanding environment.
2609cat >conftest.$ac_ext <<_ACEOF
2610#ifndef __cplusplus
2611 choke me
2612#endif
2613_ACEOF
2614rm -f conftest.$ac_objext
2615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2616 (eval $ac_compile) 2>&5
2617 ac_status=$?
2618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2619 (exit $ac_status); } &&
2620 { ac_try='test -s conftest.$ac_objext'
2621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2622 (eval $ac_try) 2>&5
2623 ac_status=$?
2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); }; }; then
2626 for ac_declaration in \
2627 ''\
2628 '#include <stdlib.h>' \
2629 'extern "C" void std::exit (int) throw (); using std::exit;' \
2630 'extern "C" void std::exit (int); using std::exit;' \
2631 'extern "C" void exit (int) throw ();' \
2632 'extern "C" void exit (int);' \
2633 'void exit (int);'
2634do
2635 cat >conftest.$ac_ext <<_ACEOF
2636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002637/* confdefs.h. */
2638_ACEOF
2639cat confdefs.h >>conftest.$ac_ext
2640cat >>conftest.$ac_ext <<_ACEOF
2641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002642#include <stdlib.h>
2643$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002644int
2645main ()
2646{
2647exit (42);
2648 ;
2649 return 0;
2650}
2651_ACEOF
2652rm -f conftest.$ac_objext
2653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2654 (eval $ac_compile) 2>&5
2655 ac_status=$?
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); } &&
2658 { ac_try='test -s conftest.$ac_objext'
2659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2660 (eval $ac_try) 2>&5
2661 ac_status=$?
2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2663 (exit $ac_status); }; }; then
2664 :
2665else
2666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002667sed 's/^/| /' conftest.$ac_ext >&5
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669continue
2670fi
2671rm -f conftest.$ac_objext conftest.$ac_ext
2672 cat >conftest.$ac_ext <<_ACEOF
2673#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002674/* confdefs.h. */
2675_ACEOF
2676cat confdefs.h >>conftest.$ac_ext
2677cat >>conftest.$ac_ext <<_ACEOF
2678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002679$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002680int
2681main ()
2682{
2683exit (42);
2684 ;
2685 return 0;
2686}
2687_ACEOF
2688rm -f conftest.$ac_objext
2689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2690 (eval $ac_compile) 2>&5
2691 ac_status=$?
2692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693 (exit $ac_status); } &&
2694 { ac_try='test -s conftest.$ac_objext'
2695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2696 (eval $ac_try) 2>&5
2697 ac_status=$?
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); }; }; then
2700 break
2701else
2702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002703sed 's/^/| /' conftest.$ac_ext >&5
2704
Martin v. Löwis11437992002-04-12 09:54:03 +00002705fi
2706rm -f conftest.$ac_objext conftest.$ac_ext
2707done
2708rm -f conftest*
2709if test -n "$ac_declaration"; then
2710 echo '#ifdef __cplusplus' >>confdefs.h
2711 echo $ac_declaration >>confdefs.h
2712 echo '#endif' >>confdefs.h
2713fi
2714
2715else
2716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002717sed 's/^/| /' conftest.$ac_ext >&5
2718
Martin v. Löwis11437992002-04-12 09:54:03 +00002719fi
2720rm -f conftest.$ac_objext conftest.$ac_ext
2721ac_ext=c
2722ac_cpp='$CPP $CPPFLAGS'
2723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002727
2728# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002729
2730ac_ext=c
2731ac_cpp='$CPP $CPPFLAGS'
2732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2734ac_compiler_gnu=$ac_cv_c_compiler_gnu
2735echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2736echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002737# On Suns, sometimes $CPP names a directory.
2738if test -n "$CPP" && test -d "$CPP"; then
2739 CPP=
2740fi
2741if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 if test "${ac_cv_prog_CPP+set}" = set; then
2743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002744else
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 # Double quotes because CPP needs to be expanded
2746 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2747 do
2748 ac_preproc_ok=false
2749for ac_c_preproc_warn_flag in '' yes
2750do
2751 # Use a header file that comes with gcc, so configuring glibc
2752 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002753 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2754 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002755 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 # not just through cpp. "Syntax error" is here to catch this case.
2757 cat >conftest.$ac_ext <<_ACEOF
2758#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002759/* confdefs.h. */
2760_ACEOF
2761cat confdefs.h >>conftest.$ac_ext
2762cat >>conftest.$ac_ext <<_ACEOF
2763/* end confdefs.h. */
2764#ifdef __STDC__
2765# include <limits.h>
2766#else
2767# include <assert.h>
2768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 Syntax error
2770_ACEOF
2771if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2772 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2773 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002774 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 rm -f conftest.er1
2776 cat conftest.err >&5
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); } >/dev/null; then
2779 if test -s conftest.err; then
2780 ac_cpp_err=$ac_c_preproc_warn_flag
2781 else
2782 ac_cpp_err=
2783 fi
2784else
2785 ac_cpp_err=yes
2786fi
2787if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002788 :
2789else
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002791sed 's/^/| /' conftest.$ac_ext >&5
2792
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 # Broken: fails on valid input.
2794continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002796rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002797
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 # OK, works on sane cases. Now check whether non-existent headers
2799 # can be detected and how.
2800 cat >conftest.$ac_ext <<_ACEOF
2801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002802/* confdefs.h. */
2803_ACEOF
2804cat confdefs.h >>conftest.$ac_ext
2805cat >>conftest.$ac_ext <<_ACEOF
2806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002807#include <ac_nonexistent.h>
2808_ACEOF
2809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2811 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002812 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002813 rm -f conftest.er1
2814 cat conftest.err >&5
2815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2816 (exit $ac_status); } >/dev/null; then
2817 if test -s conftest.err; then
2818 ac_cpp_err=$ac_c_preproc_warn_flag
2819 else
2820 ac_cpp_err=
2821 fi
2822else
2823 ac_cpp_err=yes
2824fi
2825if test -z "$ac_cpp_err"; then
2826 # Broken: success on invalid input.
2827continue
2828else
2829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002830sed 's/^/| /' conftest.$ac_ext >&5
2831
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 # Passes both tests.
2833ac_preproc_ok=:
2834break
2835fi
2836rm -f conftest.err conftest.$ac_ext
2837
2838done
2839# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2840rm -f conftest.err conftest.$ac_ext
2841if $ac_preproc_ok; then
2842 break
2843fi
2844
2845 done
2846 ac_cv_prog_CPP=$CPP
2847
2848fi
2849 CPP=$ac_cv_prog_CPP
2850else
2851 ac_cv_prog_CPP=$CPP
2852fi
2853echo "$as_me:$LINENO: result: $CPP" >&5
2854echo "${ECHO_T}$CPP" >&6
2855ac_preproc_ok=false
2856for ac_c_preproc_warn_flag in '' yes
2857do
2858 # Use a header file that comes with gcc, so configuring glibc
2859 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002860 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2861 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 # On the NeXT, cc -E runs the code through the compiler's parser,
2863 # not just through cpp. "Syntax error" is here to catch this case.
2864 cat >conftest.$ac_ext <<_ACEOF
2865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002866/* confdefs.h. */
2867_ACEOF
2868cat confdefs.h >>conftest.$ac_ext
2869cat >>conftest.$ac_ext <<_ACEOF
2870/* end confdefs.h. */
2871#ifdef __STDC__
2872# include <limits.h>
2873#else
2874# include <assert.h>
2875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 Syntax error
2877_ACEOF
2878if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2879 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2880 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002881 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 rm -f conftest.er1
2883 cat conftest.err >&5
2884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2885 (exit $ac_status); } >/dev/null; then
2886 if test -s conftest.err; then
2887 ac_cpp_err=$ac_c_preproc_warn_flag
2888 else
2889 ac_cpp_err=
2890 fi
2891else
2892 ac_cpp_err=yes
2893fi
2894if test -z "$ac_cpp_err"; then
2895 :
2896else
2897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002898sed 's/^/| /' conftest.$ac_ext >&5
2899
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 # Broken: fails on valid input.
2901continue
2902fi
2903rm -f conftest.err conftest.$ac_ext
2904
2905 # OK, works on sane cases. Now check whether non-existent headers
2906 # can be detected and how.
2907 cat >conftest.$ac_ext <<_ACEOF
2908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002909/* confdefs.h. */
2910_ACEOF
2911cat confdefs.h >>conftest.$ac_ext
2912cat >>conftest.$ac_ext <<_ACEOF
2913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002914#include <ac_nonexistent.h>
2915_ACEOF
2916if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2918 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002919 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002920 rm -f conftest.er1
2921 cat conftest.err >&5
2922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923 (exit $ac_status); } >/dev/null; then
2924 if test -s conftest.err; then
2925 ac_cpp_err=$ac_c_preproc_warn_flag
2926 else
2927 ac_cpp_err=
2928 fi
2929else
2930 ac_cpp_err=yes
2931fi
2932if test -z "$ac_cpp_err"; then
2933 # Broken: success on invalid input.
2934continue
2935else
2936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002937sed 's/^/| /' conftest.$ac_ext >&5
2938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 # Passes both tests.
2940ac_preproc_ok=:
2941break
2942fi
2943rm -f conftest.err conftest.$ac_ext
2944
2945done
2946# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2947rm -f conftest.err conftest.$ac_ext
2948if $ac_preproc_ok; then
2949 :
2950else
Skip Montanaro6dead952003-09-25 14:50:04 +00002951 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2952See \`config.log' for more details." >&5
2953echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2954See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 { (exit 1); exit 1; }; }
2956fi
2957
2958ac_ext=c
2959ac_cpp='$CPP $CPPFLAGS'
2960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2962ac_compiler_gnu=$ac_cv_c_compiler_gnu
2963
2964
Skip Montanaro6dead952003-09-25 14:50:04 +00002965echo "$as_me:$LINENO: checking for egrep" >&5
2966echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2967if test "${ac_cv_prog_egrep+set}" = set; then
2968 echo $ECHO_N "(cached) $ECHO_C" >&6
2969else
2970 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2971 then ac_cv_prog_egrep='grep -E'
2972 else ac_cv_prog_egrep='egrep'
2973 fi
2974fi
2975echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2976echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2977 EGREP=$ac_cv_prog_egrep
2978
2979
Martin v. Löwis11437992002-04-12 09:54:03 +00002980
2981echo "$as_me:$LINENO: checking for AIX" >&5
2982echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2983cat >conftest.$ac_ext <<_ACEOF
2984#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002990#ifdef _AIX
2991 yes
2992#endif
2993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00002996 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 echo "$as_me:$LINENO: result: yes" >&5
2998echo "${ECHO_T}yes" >&6
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002
3003else
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 echo "$as_me:$LINENO: result: no" >&5
3005echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006fi
3007rm -f conftest*
3008
Michael W. Hudson54241132001-12-07 15:38:26 +00003009
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003010
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003011# Check for unsupported systems
3012case $ac_sys_system/$ac_sys_release in
Skip Montanaro4d474be2004-01-17 00:29:32 +00003013SunOS/4*|DYNIX/*|IRIX/4*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003014 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3015 echo See README for details.
3016 exit 1;;
3017esac
3018
Michael W. Hudson54241132001-12-07 15:38:26 +00003019
Martin v. Löwis11437992002-04-12 09:54:03 +00003020echo "$as_me:$LINENO: checking for --with-suffix" >&5
3021echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003022
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003023# Check whether --with-suffix or --without-suffix was given.
3024if test "${with_suffix+set}" = set; then
3025 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003026
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003027 case $withval in
3028 no) EXEEXT=;;
3029 yes) EXEEXT=.exe;;
3030 *) EXEEXT=$withval;;
3031 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003032fi;
3033echo "$as_me:$LINENO: result: $EXEEXT" >&5
3034echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003035
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003036# Test whether we're running on a non-case-sensitive system, in which
3037# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003038
Martin v. Löwis11437992002-04-12 09:54:03 +00003039echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3040echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003041if test ! -d CaseSensitiveTestDir; then
3042mkdir CaseSensitiveTestDir
3043fi
3044
3045if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003046then
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 echo "$as_me:$LINENO: result: yes" >&5
3048echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003049 BUILDEXEEXT=.exe
3050else
Martin v. Löwis11437992002-04-12 09:54:03 +00003051 echo "$as_me:$LINENO: result: no" >&5
3052echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003053 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003054fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003055rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003056
Guido van Rossumdd997f71998-10-07 19:58:26 +00003057case $MACHDEP in
3058bsdos*)
3059 case $CC in
3060 gcc) CC="$CC -D_HAVE_BSDI";;
3061 esac;;
3062esac
3063
Guido van Rossum24b1e751997-08-21 02:29:16 +00003064case $ac_sys_system in
3065hp*|HP*)
3066 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003067 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003068 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003069Monterey*)
3070 case $CC in
3071 cc) CC="$CC -Wl,-Bexport";;
3072 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003073SunOS*)
3074 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
3076cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003077#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003078_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003079
3080 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003081esac
3082
Michael W. Hudson54241132001-12-07 15:38:26 +00003083
3084
Martin v. Löwis11437992002-04-12 09:54:03 +00003085echo "$as_me:$LINENO: checking LIBRARY" >&5
3086echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003087if test -z "$LIBRARY"
3088then
3089 LIBRARY='libpython$(VERSION).a'
3090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003091echo "$as_me:$LINENO: result: $LIBRARY" >&5
3092echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003093
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003094# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003095# name of the library into which to insert object files). BLDLIBRARY is also
3096# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3097# is blank as the main program is not linked directly against LDLIBRARY.
3098# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3099# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3100# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3101# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003102#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003103# RUNSHARED is used to run shared python without installed libraries
3104#
3105# INSTSONAME is the name of the shared library that will be use to install
3106# on the system - some systems like version suffix, others don't
3107
3108
Michael W. Hudson54241132001-12-07 15:38:26 +00003109
3110
3111
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003112
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003113LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003114BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003115INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003116DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003117LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003118RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003119
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003120# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003121# If CXX is set, and if it is needed to link a main function that was
3122# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3123# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003124# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003125# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003126
Martin v. Löwis11437992002-04-12 09:54:03 +00003127echo "$as_me:$LINENO: checking LINKCC" >&5
3128echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003129if test -z "$LINKCC"
3130then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003131 if test -z "$CXX"; then
3132 LINKCC="\$(PURIFY) \$(CC)"
3133 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003134 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003135 $CXX -c conftest.$ac_ext 2>&5
3136 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3137 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3138 then
3139 LINKCC="\$(PURIFY) \$(CC)"
3140 else
3141 LINKCC="\$(PURIFY) \$(CXX)"
3142 fi
3143 rm -fr conftest*
3144 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003145 case $ac_sys_system in
3146 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003147 exp_extra="\"\""
3148 if test $ac_sys_release -ge 5 -o \
3149 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3150 exp_extra="."
3151 fi
3152 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003153 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003154 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003155 esac
3156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003157echo "$as_me:$LINENO: result: $LINKCC" >&5
3158echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003159
Martin v. Löwis11437992002-04-12 09:54:03 +00003160echo "$as_me:$LINENO: checking for --enable-shared" >&5
3161echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003162# Check whether --enable-shared or --disable-shared was given.
3163if test "${enable_shared+set}" = set; then
3164 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003165
Martin v. Löwis11437992002-04-12 09:54:03 +00003166fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003167
3168if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003169then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003170 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003171 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003172 enable_shared="yes";;
3173 *)
3174 enable_shared="no";;
3175 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003176fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003177echo "$as_me:$LINENO: result: $enable_shared" >&5
3178echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003179
3180
Martin v. Löwis11437992002-04-12 09:54:03 +00003181echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3182echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003183
Guido van Rossumb8552162001-09-05 14:58:11 +00003184# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3185# library that we build, but we do not want to link against it (we
3186# will find it with a -framework option). For this reason there is an
3187# extra variable BLDLIBRARY against which Python and the extension
3188# modules are linked, BLDLIBRARY. This is normally the same as
3189# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003190if test "$enable_framework"
3191then
3192 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003193 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003194 BLDLIBRARY=''
3195else
3196 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003197fi
Jack Jansene578a632001-08-15 01:27:14 +00003198
Martin v. Löwis1142de32002-03-29 16:28:31 +00003199# Other platforms follow
3200if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003201
3202cat >>confdefs.h <<\_ACEOF
3203#define Py_ENABLE_SHARED 1
3204_ACEOF
3205
Martin v. Löwis1142de32002-03-29 16:28:31 +00003206 case $ac_sys_system in
3207 BeOS*)
3208 LDLIBRARY='libpython$(VERSION).so'
3209 ;;
3210 CYGWIN*)
3211 LDLIBRARY='libpython$(VERSION).dll.a'
3212 DLLLIBRARY='libpython$(VERSION).dll'
3213 ;;
3214 SunOS*)
3215 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003216 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003217 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003218 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003220 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003221 LDLIBRARY='libpython$(VERSION).so'
3222 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003223 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003224 INSTSONAME="$LDLIBRARY".$SOVERSION
3225 ;;
3226 hp*|HP*)
3227 LDLIBRARY='libpython$(VERSION).sl'
3228 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003229 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003230 ;;
3231 OSF*)
3232 LDLIBRARY='libpython$(VERSION).so'
3233 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003234 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003235 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003236 atheos*)
3237 LDLIBRARY='libpython$(VERSION).so'
3238 BLDLIBRARY='-L. -lpython$(VERSION)'
3239 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3240 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003241 esac
Jason Tishler30765592003-09-04 11:04:06 +00003242else # shared is disabled
3243 case $ac_sys_system in
3244 CYGWIN*)
3245 BLDLIBRARY='$(LIBRARY)'
3246 LDLIBRARY='libpython$(VERSION).dll.a'
3247 ;;
3248 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003249fi
3250
Martin v. Löwis11437992002-04-12 09:54:03 +00003251echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3252echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003253
Martin v. Löwis11437992002-04-12 09:54:03 +00003254if test -n "$ac_tool_prefix"; then
3255 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3256set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3257echo "$as_me:$LINENO: checking for $ac_word" >&5
3258echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3259if test "${ac_cv_prog_RANLIB+set}" = set; then
3260 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261else
3262 if test -n "$RANLIB"; then
3263 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3264else
Martin v. Löwis11437992002-04-12 09:54:03 +00003265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3266for as_dir in $PATH
3267do
3268 IFS=$as_save_IFS
3269 test -z "$as_dir" && as_dir=.
3270 for ac_exec_ext in '' $ac_executable_extensions; do
3271 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3272 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3273 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3274 break 2
3275 fi
3276done
3277done
3278
Guido van Rossum627b2d71993-12-24 10:39:16 +00003279fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003281RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003282if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003283 echo "$as_me:$LINENO: result: $RANLIB" >&5
3284echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003285else
Martin v. Löwis11437992002-04-12 09:54:03 +00003286 echo "$as_me:$LINENO: result: no" >&5
3287echo "${ECHO_T}no" >&6
3288fi
3289
3290fi
3291if test -z "$ac_cv_prog_RANLIB"; then
3292 ac_ct_RANLIB=$RANLIB
3293 # Extract the first word of "ranlib", so it can be a program name with args.
3294set dummy ranlib; ac_word=$2
3295echo "$as_me:$LINENO: checking for $ac_word" >&5
3296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3297if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3298 echo $ECHO_N "(cached) $ECHO_C" >&6
3299else
3300 if test -n "$ac_ct_RANLIB"; then
3301 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3302else
3303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3304for as_dir in $PATH
3305do
3306 IFS=$as_save_IFS
3307 test -z "$as_dir" && as_dir=.
3308 for ac_exec_ext in '' $ac_executable_extensions; do
3309 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3310 ac_cv_prog_ac_ct_RANLIB="ranlib"
3311 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3312 break 2
3313 fi
3314done
3315done
3316
3317 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3318fi
3319fi
3320ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3321if test -n "$ac_ct_RANLIB"; then
3322 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3323echo "${ECHO_T}$ac_ct_RANLIB" >&6
3324else
3325 echo "$as_me:$LINENO: result: no" >&5
3326echo "${ECHO_T}no" >&6
3327fi
3328
3329 RANLIB=$ac_ct_RANLIB
3330else
3331 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003332fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003333
3334
Guido van Rossum7f43da71994-08-01 12:15:30 +00003335for ac_prog in ar aal
3336do
Martin v. Löwis11437992002-04-12 09:54:03 +00003337 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003338set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003339echo "$as_me:$LINENO: checking for $ac_word" >&5
3340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3341if test "${ac_cv_prog_AR+set}" = set; then
3342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343else
3344 if test -n "$AR"; then
3345 ac_cv_prog_AR="$AR" # Let the user override the test.
3346else
Martin v. Löwis11437992002-04-12 09:54:03 +00003347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in $PATH
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 for ac_exec_ext in '' $ac_executable_extensions; do
3353 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3354 ac_cv_prog_AR="$ac_prog"
3355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3356 break 2
3357 fi
3358done
3359done
3360
Guido van Rossum7f43da71994-08-01 12:15:30 +00003361fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003364if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 echo "$as_me:$LINENO: result: $AR" >&5
3366echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367else
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 echo "$as_me:$LINENO: result: no" >&5
3369echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003370fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003371
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003373done
3374test -n "$AR" || AR="ar"
3375
Michael W. Hudson54241132001-12-07 15:38:26 +00003376
Neil Schemenauera42c8272001-03-31 00:01:55 +00003377case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003378bsdos*|hp*|HP*)
3379 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003380 if test -z "$INSTALL"
3381 then
3382 INSTALL="${srcdir}/install-sh -c"
3383 fi
3384esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003385ac_aux_dir=
3386for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3387 if test -f $ac_dir/install-sh; then
3388 ac_aux_dir=$ac_dir
3389 ac_install_sh="$ac_aux_dir/install-sh -c"
3390 break
3391 elif test -f $ac_dir/install.sh; then
3392 ac_aux_dir=$ac_dir
3393 ac_install_sh="$ac_aux_dir/install.sh -c"
3394 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 elif test -f $ac_dir/shtool; then
3396 ac_aux_dir=$ac_dir
3397 ac_install_sh="$ac_aux_dir/shtool install -c"
3398 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003399 fi
3400done
3401if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3403echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3404 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003405fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003406ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3407ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3408ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003409
3410# Find a good install program. We prefer a C program (faster),
3411# so one script is as good as another. But avoid the broken or
3412# incompatible versions:
3413# SysV /etc/install, /usr/sbin/install
3414# SunOS /usr/etc/install
3415# IRIX /sbin/install
3416# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003417# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003418# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3419# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3420# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3421# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003422echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3423echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003424if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003425if test "${ac_cv_path_install+set}" = set; then
3426 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003427else
Martin v. Löwis11437992002-04-12 09:54:03 +00003428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3429for as_dir in $PATH
3430do
3431 IFS=$as_save_IFS
3432 test -z "$as_dir" && as_dir=.
3433 # Account for people who put trailing slashes in PATH elements.
3434case $as_dir/ in
3435 ./ | .// | /cC/* | \
3436 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3437 /usr/ucb/* ) ;;
3438 *)
3439 # OSF1 and SCO ODT 3.0 have their own names for install.
3440 # Don't use installbsd from OSF since it installs stuff as root
3441 # by default.
3442 for ac_prog in ginstall scoinst install; do
3443 for ac_exec_ext in '' $ac_executable_extensions; do
3444 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3445 if test $ac_prog = install &&
3446 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3447 # AIX install. It has an incompatible calling convention.
3448 :
3449 elif test $ac_prog = install &&
3450 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3451 # program-specific install script used by HP pwplus--don't use.
3452 :
3453 else
3454 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3455 break 3
3456 fi
3457 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003458 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 done
3460 ;;
3461esac
3462done
3463
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464
3465fi
3466 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003468 else
3469 # As a last resort, use the slow shell script. We don't cache a
3470 # path for INSTALL within a source directory, because that will
3471 # break other packages using the cache if that directory is
3472 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474 fi
3475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003476echo "$as_me:$LINENO: result: $INSTALL" >&5
3477echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003478
3479# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3480# It thinks the first close brace ends the variable substitution.
3481test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3482
Martin v. Löwis11437992002-04-12 09:54:03 +00003483test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003484
3485test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3486
Michael W. Hudson54241132001-12-07 15:38:26 +00003487
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003488# Not every filesystem supports hard links
3489
3490if test -z "$LN" ; then
3491 case $ac_sys_system in
3492 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003493 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003494 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003495 *) LN=ln;;
3496 esac
3497fi
3498
Fred Drake109d9862001-07-11 06:27:56 +00003499# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003500echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3501echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3502
Fred Drake109d9862001-07-11 06:27:56 +00003503# Check whether --with-pydebug or --without-pydebug was given.
3504if test "${with_pydebug+set}" = set; then
3505 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003506
Fred Drake109d9862001-07-11 06:27:56 +00003507if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003508then
3509
3510cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003511#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003512_ACEOF
3513
3514 echo "$as_me:$LINENO: result: yes" >&5
3515echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003516 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003517else echo "$as_me:$LINENO: result: no" >&5
3518echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003519fi
3520else
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 echo "$as_me:$LINENO: result: no" >&5
3522echo "${ECHO_T}no" >&6
3523fi;
Fred Drake109d9862001-07-11 06:27:56 +00003524
Skip Montanarodecc6a42003-01-01 20:07:49 +00003525# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3526# merged with this chunk of code?
3527
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003528# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003529# ------------------------
3530# (The following bit of code is complicated enough - please keep things
3531# indented properly. Just pretend you're editing Python code. ;-)
3532
3533# There are two parallel sets of case statements below, one that checks to
3534# see if OPT was set and one that does BASECFLAGS setting based upon
3535# compiler and platform. BASECFLAGS tweaks need to be made even if the
3536# user set OPT.
3537
3538# tweak OPT based on compiler and platform, only if the user didn't set
3539# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003540
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003541if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003542then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003543 case $GCC in
3544 yes)
3545 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003546 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003547 if test "$Py_DEBUG" = 'true' ; then
3548 # Optimization messes up debuggers, so turn it off for
3549 # debug builds.
3550 OPT="-g -Wall -Wstrict-prototypes"
3551 else
3552 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003553 fi
3554 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003555 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003556 OPT="-O3 -Wall -Wstrict-prototypes"
3557 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003558 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003559 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003560 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3561 ;;
3562 esac
Fred Drake109d9862001-07-11 06:27:56 +00003563 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003564
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003565 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003566 OPT="-O"
3567 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003568 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003569
3570 # The current (beta) Monterey compiler dies with optimizations
3571 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003572 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003573 Monterey*)
3574 OPT=""
3575 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003576 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003577
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003578fi
3579
Skip Montanarodecc6a42003-01-01 20:07:49 +00003580
3581# tweak BASECFLAGS based on compiler and platform
3582case $GCC in
3583yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003584 # Python violates C99 rules, by casting between incompatible
3585 # pointer types. GCC may generate bad code as a result of that,
3586 # so use -fno-strict-aliasing if supported.
3587 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3588echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3589 ac_save_cc="$CC"
3590 CC="$CC -fno-strict-aliasing"
3591 if test "$cross_compiling" = yes; then
3592 ac_cv_no_strict_aliasing_ok=no
3593else
3594 cat >conftest.$ac_ext <<_ACEOF
3595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003596/* confdefs.h. */
3597_ACEOF
3598cat confdefs.h >>conftest.$ac_ext
3599cat >>conftest.$ac_ext <<_ACEOF
3600/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003601int main() { return 0; }
3602_ACEOF
3603rm -f conftest$ac_exeext
3604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3605 (eval $ac_link) 2>&5
3606 ac_status=$?
3607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3608 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3610 (eval $ac_try) 2>&5
3611 ac_status=$?
3612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3613 (exit $ac_status); }; }; then
3614 ac_cv_no_strict_aliasing_ok=yes
3615else
3616 echo "$as_me: program exited with status $ac_status" >&5
3617echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003618sed 's/^/| /' conftest.$ac_ext >&5
3619
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003620( exit $ac_status )
3621ac_cv_no_strict_aliasing_ok=no
3622fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003623rm -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 +00003624fi
3625 CC="$ac_save_cc"
3626 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3627echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3628 if test $ac_cv_no_strict_aliasing_ok = yes
3629 then
3630 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3631 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003632 case $ac_sys_system in
3633 SCO_SV*)
3634 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3635 ;;
3636 # is there any other compiler on Darwin besides gcc?
3637 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003638 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003639 ;;
3640 esac
3641 ;;
3642
3643*)
3644 case $ac_sys_system in
3645 OpenUNIX*|UnixWare*)
3646 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3647 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003648 OSF*)
3649 BASECFLAGS="$BASECFLAGS -ieee -std"
3650 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003651 SCO_SV*)
3652 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3653 ;;
3654 esac
3655 ;;
3656esac
3657
Fred Drakee1ceaa02001-12-04 20:55:47 +00003658if test "$Py_DEBUG" = 'true'; then
3659 :
3660else
3661 OPT="-DNDEBUG $OPT"
3662fi
3663
Guido van Rossum563e7081996-09-10 18:20:48 +00003664if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003665then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003666 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003667fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003668
Martin v. Löwis11437992002-04-12 09:54:03 +00003669echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3670echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3671if test "${ac_cv_opt_olimit_ok+set}" = set; then
3672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003673else
3674 ac_save_cc="$CC"
3675CC="$CC -OPT:Olimit=0"
3676if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003677 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 cat >conftest.$ac_ext <<_ACEOF
3680#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003681/* confdefs.h. */
3682_ACEOF
3683cat confdefs.h >>conftest.$ac_ext
3684cat >>conftest.$ac_ext <<_ACEOF
3685/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003686int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687_ACEOF
3688rm -f conftest$ac_exeext
3689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3690 (eval $ac_link) 2>&5
3691 ac_status=$?
3692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3695 (eval $ac_try) 2>&5
3696 ac_status=$?
3697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3698 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003699 ac_cv_opt_olimit_ok=yes
3700else
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 echo "$as_me: program exited with status $ac_status" >&5
3702echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003703sed 's/^/| /' conftest.$ac_ext >&5
3704
Martin v. Löwis11437992002-04-12 09:54:03 +00003705( exit $ac_status )
3706ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003707fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003708rm -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 +00003709fi
Guido van Rossum91922671997-10-09 20:24:13 +00003710CC="$ac_save_cc"
3711fi
3712
Martin v. Löwis11437992002-04-12 09:54:03 +00003713echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3714echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003715if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003716 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003717 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3718 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3719 # environment?
3720 Darwin*)
3721 ;;
3722 *)
3723 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3724 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003725 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003726else
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3728echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3729 if test "${ac_cv_olimit_ok+set}" = set; then
3730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003731else
3732 ac_save_cc="$CC"
3733 CC="$CC -Olimit 1500"
3734 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003735 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003736else
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 cat >conftest.$ac_ext <<_ACEOF
3738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003739/* confdefs.h. */
3740_ACEOF
3741cat confdefs.h >>conftest.$ac_ext
3742cat >>conftest.$ac_ext <<_ACEOF
3743/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003744int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003745_ACEOF
3746rm -f conftest$ac_exeext
3747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3748 (eval $ac_link) 2>&5
3749 ac_status=$?
3750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3751 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3753 (eval $ac_try) 2>&5
3754 ac_status=$?
3755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003757 ac_cv_olimit_ok=yes
3758else
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 echo "$as_me: program exited with status $ac_status" >&5
3760echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003761sed 's/^/| /' conftest.$ac_ext >&5
3762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763( exit $ac_status )
3764ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003765fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003766rm -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 +00003767fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003768 CC="$ac_save_cc"
3769fi
3770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3772echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003773 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003774 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003775 fi
3776fi
3777
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003778# On some compilers, pthreads are available without further options
3779# (e.g. MacOS X). On some of these systems, the compiler will not
3780# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3781# So we have to see first whether pthreads are available without
3782# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003783echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3784echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3785if test "${ac_cv_pthread_is_default+set}" = set; then
3786 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003787else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003788 if test "$cross_compiling" = yes; then
3789 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003790else
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 cat >conftest.$ac_ext <<_ACEOF
3792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003793/* confdefs.h. */
3794_ACEOF
3795cat confdefs.h >>conftest.$ac_ext
3796cat >>conftest.$ac_ext <<_ACEOF
3797/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003798
Martin v. Löwis130fb172001-07-19 11:00:41 +00003799#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003800
3801void* routine(void* p){return NULL;}
3802
3803int main(){
3804 pthread_t p;
3805 if(pthread_create(&p,NULL,routine,NULL)!=0)
3806 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003807 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003808 return 0;
3809}
3810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811_ACEOF
3812rm -f conftest$ac_exeext
3813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3814 (eval $ac_link) 2>&5
3815 ac_status=$?
3816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3819 (eval $ac_try) 2>&5
3820 ac_status=$?
3821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3822 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003823
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003824 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003825 ac_cv_kthread=no
3826 ac_cv_pthread=no
3827
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 echo "$as_me: program exited with status $ac_status" >&5
3830echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003831sed 's/^/| /' conftest.$ac_ext >&5
3832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833( exit $ac_status )
3834ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003835fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003836rm -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 +00003837fi
3838
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003839fi
3840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3842echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003843
Michael W. Hudson54241132001-12-07 15:38:26 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003846then
3847 ac_cv_kpthread=no
3848else
3849# -Kpthread, if available, provides the right #defines
3850# and linker options to make pthread_create available
3851# Some compilers won't report that they do not support -Kpthread,
3852# so we need to run a program to see whether it really made the
3853# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003854echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3855echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3856if test "${ac_cv_kpthread+set}" = set; then
3857 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003858else
3859 ac_save_cc="$CC"
3860CC="$CC -Kpthread"
3861if test "$cross_compiling" = yes; then
3862 ac_cv_kpthread=no
3863else
Martin v. Löwis11437992002-04-12 09:54:03 +00003864 cat >conftest.$ac_ext <<_ACEOF
3865#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003866/* confdefs.h. */
3867_ACEOF
3868cat confdefs.h >>conftest.$ac_ext
3869cat >>conftest.$ac_ext <<_ACEOF
3870/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003871
3872#include <pthread.h>
3873
3874void* routine(void* p){return NULL;}
3875
3876int main(){
3877 pthread_t p;
3878 if(pthread_create(&p,NULL,routine,NULL)!=0)
3879 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003880 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003881 return 0;
3882}
3883
Martin v. Löwis11437992002-04-12 09:54:03 +00003884_ACEOF
3885rm -f conftest$ac_exeext
3886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3887 (eval $ac_link) 2>&5
3888 ac_status=$?
3889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3892 (eval $ac_try) 2>&5
3893 ac_status=$?
3894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003896 ac_cv_kpthread=yes
3897else
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 echo "$as_me: program exited with status $ac_status" >&5
3899echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003900sed 's/^/| /' conftest.$ac_ext >&5
3901
Martin v. Löwis11437992002-04-12 09:54:03 +00003902( exit $ac_status )
3903ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003904fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003905rm -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 +00003906fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003907CC="$ac_save_cc"
3908fi
3909
Martin v. Löwis11437992002-04-12 09:54:03 +00003910echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3911echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003912fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003913
Skip Montanarod8d39a02003-07-10 20:44:10 +00003914if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003915then
3916# -Kthread, if available, provides the right #defines
3917# and linker options to make pthread_create available
3918# Some compilers won't report that they do not support -Kthread,
3919# so we need to run a program to see whether it really made the
3920# function available.
3921echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3922echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3923if test "${ac_cv_kthread+set}" = set; then
3924 echo $ECHO_N "(cached) $ECHO_C" >&6
3925else
3926 ac_save_cc="$CC"
3927CC="$CC -Kthread"
3928if test "$cross_compiling" = yes; then
3929 ac_cv_kthread=no
3930else
3931 cat >conftest.$ac_ext <<_ACEOF
3932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003933/* confdefs.h. */
3934_ACEOF
3935cat confdefs.h >>conftest.$ac_ext
3936cat >>conftest.$ac_ext <<_ACEOF
3937/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003938
3939#include <pthread.h>
3940
3941void* routine(void* p){return NULL;}
3942
3943int main(){
3944 pthread_t p;
3945 if(pthread_create(&p,NULL,routine,NULL)!=0)
3946 return 1;
3947 (void)pthread_detach(p);
3948 return 0;
3949}
3950
3951_ACEOF
3952rm -f conftest$ac_exeext
3953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3954 (eval $ac_link) 2>&5
3955 ac_status=$?
3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3957 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3959 (eval $ac_try) 2>&5
3960 ac_status=$?
3961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3962 (exit $ac_status); }; }; then
3963 ac_cv_kthread=yes
3964else
3965 echo "$as_me: program exited with status $ac_status" >&5
3966echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003967sed 's/^/| /' conftest.$ac_ext >&5
3968
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003969( exit $ac_status )
3970ac_cv_kthread=no
3971fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003972rm -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 +00003973fi
3974CC="$ac_save_cc"
3975fi
3976
3977echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3978echo "${ECHO_T}$ac_cv_kthread" >&6
3979fi
3980
Skip Montanarod8d39a02003-07-10 20:44:10 +00003981if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003982then
3983# -pthread, if available, provides the right #defines
3984# and linker options to make pthread_create available
3985# Some compilers won't report that they do not support -pthread,
3986# so we need to run a program to see whether it really made the
3987# function available.
3988echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3989echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3990if test "${ac_cv_thread+set}" = set; then
3991 echo $ECHO_N "(cached) $ECHO_C" >&6
3992else
3993 ac_save_cc="$CC"
3994CC="$CC -pthread"
3995if test "$cross_compiling" = yes; then
3996 ac_cv_pthread=no
3997else
3998 cat >conftest.$ac_ext <<_ACEOF
3999#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004000/* confdefs.h. */
4001_ACEOF
4002cat confdefs.h >>conftest.$ac_ext
4003cat >>conftest.$ac_ext <<_ACEOF
4004/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004005
4006#include <pthread.h>
4007
4008void* routine(void* p){return NULL;}
4009
4010int main(){
4011 pthread_t p;
4012 if(pthread_create(&p,NULL,routine,NULL)!=0)
4013 return 1;
4014 (void)pthread_detach(p);
4015 return 0;
4016}
4017
4018_ACEOF
4019rm -f conftest$ac_exeext
4020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4021 (eval $ac_link) 2>&5
4022 ac_status=$?
4023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4026 (eval $ac_try) 2>&5
4027 ac_status=$?
4028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4029 (exit $ac_status); }; }; then
4030 ac_cv_pthread=yes
4031else
4032 echo "$as_me: program exited with status $ac_status" >&5
4033echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004034sed 's/^/| /' conftest.$ac_ext >&5
4035
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004036( exit $ac_status )
4037ac_cv_pthread=no
4038fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004039rm -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 +00004040fi
4041CC="$ac_save_cc"
4042fi
4043
4044echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4045echo "${ECHO_T}$ac_cv_pthread" >&6
4046fi
4047
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004048# If we have set a CC compiler flag for thread support then
4049# check if it works for CXX, too.
4050ac_cv_cxx_thread=no
4051if test ! -z "$CXX"
4052then
4053echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4054echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4055ac_save_cxx="$CXX"
4056
4057if test "$ac_cv_kpthread" = "yes"
4058then
4059 CXX="$CXX -Kpthread"
4060 ac_cv_cxx_thread=yes
4061elif test "$ac_cv_kthread" = "yes"
4062then
4063 CXX="$CXX -Kthread"
4064 ac_cv_cxx_thread=yes
4065elif test "$ac_cv_pthread" = "yes"
4066then
4067 CXX="$CXX -pthread"
4068 ac_cv_cxx_thread=yes
4069fi
4070
4071if test $ac_cv_cxx_thread = yes
4072then
4073 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4074 $CXX -c conftest.$ac_ext 2>&5
4075 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4076 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4077 then
4078 ac_cv_cxx_thread=yes
4079 else
4080 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004081 fi
4082 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004083fi
4084fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004085CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004086echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4087echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4088
Michael W. Hudson54241132001-12-07 15:38:26 +00004089
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004090# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004091echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4092echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4093if test "${ac_cv_header_stdc+set}" = set; then
4094 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004095else
Martin v. Löwis11437992002-04-12 09:54:03 +00004096 cat >conftest.$ac_ext <<_ACEOF
4097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004098/* confdefs.h. */
4099_ACEOF
4100cat confdefs.h >>conftest.$ac_ext
4101cat >>conftest.$ac_ext <<_ACEOF
4102/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004103#include <stdlib.h>
4104#include <stdarg.h>
4105#include <string.h>
4106#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Skip Montanaro6dead952003-09-25 14:50:04 +00004108int
4109main ()
4110{
4111
4112 ;
4113 return 0;
4114}
Martin v. Löwis11437992002-04-12 09:54:03 +00004115_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004116rm -f conftest.$ac_objext
4117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4118 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004121 (exit $ac_status); } &&
4122 { ac_try='test -s conftest.$ac_objext'
4123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4124 (eval $ac_try) 2>&5
4125 ac_status=$?
4126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4127 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128 ac_cv_header_stdc=yes
4129else
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004131sed 's/^/| /' conftest.$ac_ext >&5
4132
4133ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004135rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136
4137if test $ac_cv_header_stdc = yes; then
4138 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 cat >conftest.$ac_ext <<_ACEOF
4140#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004141/* confdefs.h. */
4142_ACEOF
4143cat confdefs.h >>conftest.$ac_ext
4144cat >>conftest.$ac_ext <<_ACEOF
4145/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004147
4148_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004150 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151 :
4152else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153 ac_cv_header_stdc=no
4154fi
4155rm -f conftest*
4156
4157fi
4158
4159if test $ac_cv_header_stdc = yes; then
4160 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 cat >conftest.$ac_ext <<_ACEOF
4162#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004163/* confdefs.h. */
4164_ACEOF
4165cat confdefs.h >>conftest.$ac_ext
4166cat >>conftest.$ac_ext <<_ACEOF
4167/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004168#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004169
4170_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004172 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173 :
4174else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175 ac_cv_header_stdc=no
4176fi
4177rm -f conftest*
4178
4179fi
4180
4181if test $ac_cv_header_stdc = yes; then
4182 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004184 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185else
Martin v. Löwis11437992002-04-12 09:54:03 +00004186 cat >conftest.$ac_ext <<_ACEOF
4187#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004188/* confdefs.h. */
4189_ACEOF
4190cat confdefs.h >>conftest.$ac_ext
4191cat >>conftest.$ac_ext <<_ACEOF
4192/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004193#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004194#if ((' ' & 0x0FF) == 0x020)
4195# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4196# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4197#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004198# define ISLOWER(c) \
4199 (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 || ('j' <= (c) && (c) <= 'r') \
4201 || ('s' <= (c) && (c) <= 'z'))
4202# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4203#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4206int
4207main ()
4208{
4209 int i;
4210 for (i = 0; i < 256; i++)
4211 if (XOR (islower (i), ISLOWER (i))
4212 || toupper (i) != TOUPPER (i))
4213 exit(2);
4214 exit (0);
4215}
4216_ACEOF
4217rm -f conftest$ac_exeext
4218if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4219 (eval $ac_link) 2>&5
4220 ac_status=$?
4221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4224 (eval $ac_try) 2>&5
4225 ac_status=$?
4226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4227 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004228 :
4229else
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 echo "$as_me: program exited with status $ac_status" >&5
4231echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004232sed 's/^/| /' conftest.$ac_ext >&5
4233
Martin v. Löwis11437992002-04-12 09:54:03 +00004234( exit $ac_status )
4235ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004236fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004237rm -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 +00004238fi
4239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004240fi
4241echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4242echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004243if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004244
4245cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004247_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248
4249fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250
Skip Montanarob9820a32004-01-17 00:16:12 +00004251# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4262 inttypes.h stdint.h unistd.h
4263do
4264as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4265echo "$as_me:$LINENO: checking for $ac_header" >&5
4266echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4267if eval "test \"\${$as_ac_Header+set}\" = set"; then
4268 echo $ECHO_N "(cached) $ECHO_C" >&6
4269else
4270 cat >conftest.$ac_ext <<_ACEOF
4271#line $LINENO "configure"
4272/* confdefs.h. */
4273_ACEOF
4274cat confdefs.h >>conftest.$ac_ext
4275cat >>conftest.$ac_ext <<_ACEOF
4276/* end confdefs.h. */
4277$ac_includes_default
4278
4279#include <$ac_header>
4280_ACEOF
4281rm -f conftest.$ac_objext
4282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4283 (eval $ac_compile) 2>&5
4284 ac_status=$?
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
4287 { ac_try='test -s conftest.$ac_objext'
4288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289 (eval $ac_try) 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); }; }; then
4293 eval "$as_ac_Header=yes"
4294else
4295 echo "$as_me: failed program was:" >&5
4296sed 's/^/| /' conftest.$ac_ext >&5
4297
4298eval "$as_ac_Header=no"
4299fi
4300rm -f conftest.$ac_objext conftest.$ac_ext
4301fi
4302echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4303echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4304if test `eval echo '${'$as_ac_Header'}'` = yes; then
4305 cat >>confdefs.h <<_ACEOF
4306#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4307_ACEOF
4308
4309fi
4310
4311done
4312
4313
Martin v. Löwis11437992002-04-12 09:54:03 +00004314
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
4349
4350
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004351
Barry Warsawfe33b792003-01-07 22:42:49 +00004352
Neal Norwitz82251032003-05-23 14:35: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 \
Barry Warsawfe33b792003-01-07 22:42:49 +00004361sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004362do
Martin v. Löwis11437992002-04-12 09:54:03 +00004363as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4364if eval "test \"\${$as_ac_Header+set}\" = set"; then
4365 echo "$as_me:$LINENO: checking for $ac_header" >&5
4366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4367if eval "test \"\${$as_ac_Header+set}\" = set"; then
4368 echo $ECHO_N "(cached) $ECHO_C" >&6
4369fi
4370echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4371echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372else
Martin v. Löwis11437992002-04-12 09:54:03 +00004373 # Is the header compilable?
4374echo "$as_me:$LINENO: checking $ac_header usability" >&5
4375echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4376cat >conftest.$ac_ext <<_ACEOF
4377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004378/* confdefs.h. */
4379_ACEOF
4380cat confdefs.h >>conftest.$ac_ext
4381cat >>conftest.$ac_ext <<_ACEOF
4382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004383$ac_includes_default
4384#include <$ac_header>
4385_ACEOF
4386rm -f conftest.$ac_objext
4387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4388 (eval $ac_compile) 2>&5
4389 ac_status=$?
4390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4391 (exit $ac_status); } &&
4392 { ac_try='test -s conftest.$ac_objext'
4393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4394 (eval $ac_try) 2>&5
4395 ac_status=$?
4396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4397 (exit $ac_status); }; }; then
4398 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004399else
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004401sed 's/^/| /' conftest.$ac_ext >&5
4402
Martin v. Löwis11437992002-04-12 09:54:03 +00004403ac_header_compiler=no
4404fi
4405rm -f conftest.$ac_objext conftest.$ac_ext
4406echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4407echo "${ECHO_T}$ac_header_compiler" >&6
4408
4409# Is the header present?
4410echo "$as_me:$LINENO: checking $ac_header presence" >&5
4411echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4412cat >conftest.$ac_ext <<_ACEOF
4413#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004414/* confdefs.h. */
4415_ACEOF
4416cat confdefs.h >>conftest.$ac_ext
4417cat >>conftest.$ac_ext <<_ACEOF
4418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004419#include <$ac_header>
4420_ACEOF
4421if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4422 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4423 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004424 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004425 rm -f conftest.er1
4426 cat conftest.err >&5
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428 (exit $ac_status); } >/dev/null; then
4429 if test -s conftest.err; then
4430 ac_cpp_err=$ac_c_preproc_warn_flag
4431 else
4432 ac_cpp_err=
4433 fi
4434else
4435 ac_cpp_err=yes
4436fi
4437if test -z "$ac_cpp_err"; then
4438 ac_header_preproc=yes
4439else
4440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004441sed 's/^/| /' conftest.$ac_ext >&5
4442
Martin v. Löwis11437992002-04-12 09:54:03 +00004443 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004444fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004445rm -f conftest.err conftest.$ac_ext
4446echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4447echo "${ECHO_T}$ac_header_preproc" >&6
4448
4449# So? What about this header?
4450case $ac_header_compiler:$ac_header_preproc in
4451 yes:no )
4452 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4453echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4454 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004455echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4456 (
4457 cat <<\_ASBOX
4458## ------------------------------------ ##
4459## Report this to bug-autoconf@gnu.org. ##
4460## ------------------------------------ ##
4461_ASBOX
4462 ) |
4463 sed "s/^/$as_me: WARNING: /" >&2
4464 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004465 no:yes )
4466 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4467echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4468 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4469echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4470 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004471echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4472 (
4473 cat <<\_ASBOX
4474## ------------------------------------ ##
4475## Report this to bug-autoconf@gnu.org. ##
4476## ------------------------------------ ##
4477_ASBOX
4478 ) |
4479 sed "s/^/$as_me: WARNING: /" >&2
4480 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004481esac
4482echo "$as_me:$LINENO: checking for $ac_header" >&5
4483echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4484if eval "test \"\${$as_ac_Header+set}\" = set"; then
4485 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004486else
Martin v. Löwis11437992002-04-12 09:54:03 +00004487 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004489echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4490echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4491
4492fi
4493if test `eval echo '${'$as_ac_Header'}'` = yes; then
4494 cat >>confdefs.h <<_ACEOF
4495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4496_ACEOF
4497
4498fi
4499
Guido van Rossum627b2d71993-12-24 10:39:16 +00004500done
4501
Martin v. Löwis11437992002-04-12 09:54:03 +00004502
4503
4504
4505
4506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004508for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4509 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4510echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4511echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4512if eval "test \"\${$as_ac_Header+set}\" = set"; then
4513 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004514else
Martin v. Löwis11437992002-04-12 09:54:03 +00004515 cat >conftest.$ac_ext <<_ACEOF
4516#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004517/* confdefs.h. */
4518_ACEOF
4519cat confdefs.h >>conftest.$ac_ext
4520cat >>conftest.$ac_ext <<_ACEOF
4521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522#include <sys/types.h>
4523#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004524
Martin v. Löwis11437992002-04-12 09:54:03 +00004525int
4526main ()
4527{
4528if ((DIR *) 0)
4529return 0;
4530 ;
4531 return 0;
4532}
4533_ACEOF
4534rm -f conftest.$ac_objext
4535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4536 (eval $ac_compile) 2>&5
4537 ac_status=$?
4538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539 (exit $ac_status); } &&
4540 { ac_try='test -s conftest.$ac_objext'
4541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4542 (eval $ac_try) 2>&5
4543 ac_status=$?
4544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4545 (exit $ac_status); }; }; then
4546 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004547else
Martin v. Löwis11437992002-04-12 09:54:03 +00004548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004549sed 's/^/| /' conftest.$ac_ext >&5
4550
Martin v. Löwis11437992002-04-12 09:54:03 +00004551eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004553rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004555echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4556echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4557if test `eval echo '${'$as_ac_Header'}'` = yes; then
4558 cat >>confdefs.h <<_ACEOF
4559#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4560_ACEOF
4561
4562ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004564
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565done
4566# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4567if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004568 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4569echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4570if test "${ac_cv_search_opendir+set}" = set; then
4571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572else
Martin v. Löwis11437992002-04-12 09:54:03 +00004573 ac_func_search_save_LIBS=$LIBS
4574ac_cv_search_opendir=no
4575cat >conftest.$ac_ext <<_ACEOF
4576#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004582
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004583/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004584#ifdef __cplusplus
4585extern "C"
4586#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004587/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004588 builtin and then its argument prototype would still apply. */
4589char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004590int
4591main ()
4592{
4593opendir ();
4594 ;
4595 return 0;
4596}
4597_ACEOF
4598rm -f conftest.$ac_objext conftest$ac_exeext
4599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4600 (eval $ac_link) 2>&5
4601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); } &&
4604 { ac_try='test -s conftest$ac_exeext'
4605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4606 (eval $ac_try) 2>&5
4607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); }; }; then
4610 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611else
Martin v. Löwis11437992002-04-12 09:54:03 +00004612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004613sed 's/^/| /' conftest.$ac_ext >&5
4614
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004616rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4617if test "$ac_cv_search_opendir" = no; then
4618 for ac_lib in dir; do
4619 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4620 cat >conftest.$ac_ext <<_ACEOF
4621#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004622/* confdefs.h. */
4623_ACEOF
4624cat confdefs.h >>conftest.$ac_ext
4625cat >>conftest.$ac_ext <<_ACEOF
4626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004627
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004628/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004629#ifdef __cplusplus
4630extern "C"
4631#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004632/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004633 builtin and then its argument prototype would still apply. */
4634char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004635int
4636main ()
4637{
4638opendir ();
4639 ;
4640 return 0;
4641}
4642_ACEOF
4643rm -f conftest.$ac_objext conftest$ac_exeext
4644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4645 (eval $ac_link) 2>&5
4646 ac_status=$?
4647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4648 (exit $ac_status); } &&
4649 { ac_try='test -s conftest$ac_exeext'
4650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4651 (eval $ac_try) 2>&5
4652 ac_status=$?
4653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4654 (exit $ac_status); }; }; then
4655 ac_cv_search_opendir="-l$ac_lib"
4656break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657else
Martin v. Löwis11437992002-04-12 09:54:03 +00004658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004659sed 's/^/| /' conftest.$ac_ext >&5
4660
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004661fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004662rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4663 done
4664fi
4665LIBS=$ac_func_search_save_LIBS
4666fi
4667echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4668echo "${ECHO_T}$ac_cv_search_opendir" >&6
4669if test "$ac_cv_search_opendir" != no; then
4670 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004673
Michael W. Hudson54241132001-12-07 15:38:26 +00004674else
Martin v. Löwis11437992002-04-12 09:54:03 +00004675 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4676echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4677if test "${ac_cv_search_opendir+set}" = set; then
4678 echo $ECHO_N "(cached) $ECHO_C" >&6
4679else
4680 ac_func_search_save_LIBS=$LIBS
4681ac_cv_search_opendir=no
4682cat >conftest.$ac_ext <<_ACEOF
4683#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004684/* confdefs.h. */
4685_ACEOF
4686cat confdefs.h >>conftest.$ac_ext
4687cat >>conftest.$ac_ext <<_ACEOF
4688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004689
4690/* Override any gcc2 internal prototype to avoid an error. */
4691#ifdef __cplusplus
4692extern "C"
4693#endif
4694/* We use char because int might match the return type of a gcc2
4695 builtin and then its argument prototype would still apply. */
4696char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004697int
4698main ()
4699{
4700opendir ();
4701 ;
4702 return 0;
4703}
4704_ACEOF
4705rm -f conftest.$ac_objext conftest$ac_exeext
4706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4707 (eval $ac_link) 2>&5
4708 ac_status=$?
4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710 (exit $ac_status); } &&
4711 { ac_try='test -s conftest$ac_exeext'
4712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4713 (eval $ac_try) 2>&5
4714 ac_status=$?
4715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4716 (exit $ac_status); }; }; then
4717 ac_cv_search_opendir="none required"
4718else
4719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004720sed 's/^/| /' conftest.$ac_ext >&5
4721
Martin v. Löwis11437992002-04-12 09:54:03 +00004722fi
4723rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4724if test "$ac_cv_search_opendir" = no; then
4725 for ac_lib in x; do
4726 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4727 cat >conftest.$ac_ext <<_ACEOF
4728#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004729/* confdefs.h. */
4730_ACEOF
4731cat confdefs.h >>conftest.$ac_ext
4732cat >>conftest.$ac_ext <<_ACEOF
4733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004734
4735/* Override any gcc2 internal prototype to avoid an error. */
4736#ifdef __cplusplus
4737extern "C"
4738#endif
4739/* We use char because int might match the return type of a gcc2
4740 builtin and then its argument prototype would still apply. */
4741char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004742int
4743main ()
4744{
4745opendir ();
4746 ;
4747 return 0;
4748}
4749_ACEOF
4750rm -f conftest.$ac_objext conftest$ac_exeext
4751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4752 (eval $ac_link) 2>&5
4753 ac_status=$?
4754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4755 (exit $ac_status); } &&
4756 { ac_try='test -s conftest$ac_exeext'
4757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4758 (eval $ac_try) 2>&5
4759 ac_status=$?
4760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4761 (exit $ac_status); }; }; then
4762 ac_cv_search_opendir="-l$ac_lib"
4763break
4764else
4765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004766sed 's/^/| /' conftest.$ac_ext >&5
4767
Martin v. Löwis11437992002-04-12 09:54:03 +00004768fi
4769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4770 done
4771fi
4772LIBS=$ac_func_search_save_LIBS
4773fi
4774echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4775echo "${ECHO_T}$ac_cv_search_opendir" >&6
4776if test "$ac_cv_search_opendir" != no; then
4777 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004779fi
4780
4781fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004782
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004783echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4784echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4785if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4786 echo $ECHO_N "(cached) $ECHO_C" >&6
4787else
4788 cat >conftest.$ac_ext <<_ACEOF
4789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004795#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004796int
4797main ()
4798{
4799return makedev(0, 0);
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext conftest$ac_exeext
4805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4806 (eval $ac_link) 2>&5
4807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
4810 { ac_try='test -s conftest$ac_exeext'
4811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 ac_cv_header_sys_types_h_makedev=yes
4817else
4818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004819sed 's/^/| /' conftest.$ac_ext >&5
4820
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004821ac_cv_header_sys_types_h_makedev=no
4822fi
4823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4824
4825fi
4826echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4827echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4828
4829if test $ac_cv_header_sys_types_h_makedev = no; then
4830if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4831 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4832echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4833if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4834 echo $ECHO_N "(cached) $ECHO_C" >&6
4835fi
4836echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4837echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4838else
4839 # Is the header compilable?
4840echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4841echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4842cat >conftest.$ac_ext <<_ACEOF
4843#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004844/* confdefs.h. */
4845_ACEOF
4846cat confdefs.h >>conftest.$ac_ext
4847cat >>conftest.$ac_ext <<_ACEOF
4848/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004849$ac_includes_default
4850#include <sys/mkdev.h>
4851_ACEOF
4852rm -f conftest.$ac_objext
4853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4854 (eval $ac_compile) 2>&5
4855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); } &&
4858 { ac_try='test -s conftest.$ac_objext'
4859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4860 (eval $ac_try) 2>&5
4861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); }; }; then
4864 ac_header_compiler=yes
4865else
4866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004867sed 's/^/| /' conftest.$ac_ext >&5
4868
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004869ac_header_compiler=no
4870fi
4871rm -f conftest.$ac_objext conftest.$ac_ext
4872echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4873echo "${ECHO_T}$ac_header_compiler" >&6
4874
4875# Is the header present?
4876echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4877echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4878cat >conftest.$ac_ext <<_ACEOF
4879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004880/* confdefs.h. */
4881_ACEOF
4882cat confdefs.h >>conftest.$ac_ext
4883cat >>conftest.$ac_ext <<_ACEOF
4884/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004885#include <sys/mkdev.h>
4886_ACEOF
4887if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4888 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4889 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004890 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004891 rm -f conftest.er1
4892 cat conftest.err >&5
4893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4894 (exit $ac_status); } >/dev/null; then
4895 if test -s conftest.err; then
4896 ac_cpp_err=$ac_c_preproc_warn_flag
4897 else
4898 ac_cpp_err=
4899 fi
4900else
4901 ac_cpp_err=yes
4902fi
4903if test -z "$ac_cpp_err"; then
4904 ac_header_preproc=yes
4905else
4906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004907sed 's/^/| /' conftest.$ac_ext >&5
4908
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004909 ac_header_preproc=no
4910fi
4911rm -f conftest.err conftest.$ac_ext
4912echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4913echo "${ECHO_T}$ac_header_preproc" >&6
4914
4915# So? What about this header?
4916case $ac_header_compiler:$ac_header_preproc in
4917 yes:no )
4918 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4919echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4920 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004921echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4922 (
4923 cat <<\_ASBOX
4924## ------------------------------------ ##
4925## Report this to bug-autoconf@gnu.org. ##
4926## ------------------------------------ ##
4927_ASBOX
4928 ) |
4929 sed "s/^/$as_me: WARNING: /" >&2
4930 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004931 no:yes )
4932 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4933echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4934 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4935echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4936 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004937echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4938 (
4939 cat <<\_ASBOX
4940## ------------------------------------ ##
4941## Report this to bug-autoconf@gnu.org. ##
4942## ------------------------------------ ##
4943_ASBOX
4944 ) |
4945 sed "s/^/$as_me: WARNING: /" >&2
4946 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004947esac
4948echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4949echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4950if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4951 echo $ECHO_N "(cached) $ECHO_C" >&6
4952else
4953 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4954fi
4955echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4956echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4957
4958fi
4959if test $ac_cv_header_sys_mkdev_h = yes; then
4960
4961cat >>confdefs.h <<\_ACEOF
4962#define MAJOR_IN_MKDEV 1
4963_ACEOF
4964
4965fi
4966
4967
4968
4969 if test $ac_cv_header_sys_mkdev_h = no; then
4970 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4971 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4972echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4973if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4974 echo $ECHO_N "(cached) $ECHO_C" >&6
4975fi
4976echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4977echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4978else
4979 # Is the header compilable?
4980echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4981echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4982cat >conftest.$ac_ext <<_ACEOF
4983#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004984/* confdefs.h. */
4985_ACEOF
4986cat confdefs.h >>conftest.$ac_ext
4987cat >>conftest.$ac_ext <<_ACEOF
4988/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004989$ac_includes_default
4990#include <sys/sysmacros.h>
4991_ACEOF
4992rm -f conftest.$ac_objext
4993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4994 (eval $ac_compile) 2>&5
4995 ac_status=$?
4996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997 (exit $ac_status); } &&
4998 { ac_try='test -s conftest.$ac_objext'
4999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5000 (eval $ac_try) 2>&5
5001 ac_status=$?
5002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5003 (exit $ac_status); }; }; then
5004 ac_header_compiler=yes
5005else
5006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005007sed 's/^/| /' conftest.$ac_ext >&5
5008
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005009ac_header_compiler=no
5010fi
5011rm -f conftest.$ac_objext conftest.$ac_ext
5012echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5013echo "${ECHO_T}$ac_header_compiler" >&6
5014
5015# Is the header present?
5016echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5017echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5018cat >conftest.$ac_ext <<_ACEOF
5019#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005020/* confdefs.h. */
5021_ACEOF
5022cat confdefs.h >>conftest.$ac_ext
5023cat >>conftest.$ac_ext <<_ACEOF
5024/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005025#include <sys/sysmacros.h>
5026_ACEOF
5027if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5029 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005030 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005031 rm -f conftest.er1
5032 cat conftest.err >&5
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); } >/dev/null; then
5035 if test -s conftest.err; then
5036 ac_cpp_err=$ac_c_preproc_warn_flag
5037 else
5038 ac_cpp_err=
5039 fi
5040else
5041 ac_cpp_err=yes
5042fi
5043if test -z "$ac_cpp_err"; then
5044 ac_header_preproc=yes
5045else
5046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005047sed 's/^/| /' conftest.$ac_ext >&5
5048
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005049 ac_header_preproc=no
5050fi
5051rm -f conftest.err conftest.$ac_ext
5052echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5053echo "${ECHO_T}$ac_header_preproc" >&6
5054
5055# So? What about this header?
5056case $ac_header_compiler:$ac_header_preproc in
5057 yes:no )
5058 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5059echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5060 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005061echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5062 (
5063 cat <<\_ASBOX
5064## ------------------------------------ ##
5065## Report this to bug-autoconf@gnu.org. ##
5066## ------------------------------------ ##
5067_ASBOX
5068 ) |
5069 sed "s/^/$as_me: WARNING: /" >&2
5070 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005071 no:yes )
5072 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5073echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5074 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5075echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5076 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005077echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5078 (
5079 cat <<\_ASBOX
5080## ------------------------------------ ##
5081## Report this to bug-autoconf@gnu.org. ##
5082## ------------------------------------ ##
5083_ASBOX
5084 ) |
5085 sed "s/^/$as_me: WARNING: /" >&2
5086 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005087esac
5088echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5089echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5090if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5091 echo $ECHO_N "(cached) $ECHO_C" >&6
5092else
5093 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5094fi
5095echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5096echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5097
5098fi
5099if test $ac_cv_header_sys_sysmacros_h = yes; then
5100
5101cat >>confdefs.h <<\_ACEOF
5102#define MAJOR_IN_SYSMACROS 1
5103_ACEOF
5104
5105fi
5106
5107
5108 fi
5109fi
5110
Michael W. Hudson54241132001-12-07 15:38:26 +00005111
Guido van Rossum627b2d71993-12-24 10:39:16 +00005112# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005113was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005114echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5115echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5116cat >conftest.$ac_ext <<_ACEOF
5117#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005118/* confdefs.h. */
5119_ACEOF
5120cat confdefs.h >>conftest.$ac_ext
5121cat >>conftest.$ac_ext <<_ACEOF
5122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005124
5125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005127 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005128 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005129else
Martin v. Löwis11437992002-04-12 09:54:03 +00005130
5131
5132cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005134_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005135
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005136
Guido van Rossum627b2d71993-12-24 10:39:16 +00005137fi
5138rm -f conftest*
5139
Martin v. Löwis11437992002-04-12 09:54:03 +00005140echo "$as_me:$LINENO: result: $was_it_defined" >&5
5141echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005142
Neal Norwitz11690112002-07-30 01:08:28 +00005143# Check whether using makedev requires defining _OSF_SOURCE
5144echo "$as_me:$LINENO: checking for makedev" >&5
5145echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5146cat >conftest.$ac_ext <<_ACEOF
5147#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005148/* confdefs.h. */
5149_ACEOF
5150cat confdefs.h >>conftest.$ac_ext
5151cat >>conftest.$ac_ext <<_ACEOF
5152/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005153#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005154int
5155main ()
5156{
5157 makedev(0, 0)
5158 ;
5159 return 0;
5160}
5161_ACEOF
5162rm -f conftest.$ac_objext conftest$ac_exeext
5163if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5164 (eval $ac_link) 2>&5
5165 ac_status=$?
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); } &&
5168 { ac_try='test -s conftest$ac_exeext'
5169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5170 (eval $ac_try) 2>&5
5171 ac_status=$?
5172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5173 (exit $ac_status); }; }; then
5174 ac_cv_has_makedev=yes
5175else
5176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005177sed 's/^/| /' conftest.$ac_ext >&5
5178
Neal Norwitz11690112002-07-30 01:08:28 +00005179ac_cv_has_makedev=no
5180fi
5181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5182if test "$ac_cv_has_makedev" = "no"; then
5183 # we didn't link, try if _OSF_SOURCE will allow us to link
5184 cat >conftest.$ac_ext <<_ACEOF
5185#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005191
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005192#define _OSF_SOURCE 1
5193#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005194
Neal Norwitz11690112002-07-30 01:08:28 +00005195int
5196main ()
5197{
5198 makedev(0, 0)
5199 ;
5200 return 0;
5201}
5202_ACEOF
5203rm -f conftest.$ac_objext conftest$ac_exeext
5204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5205 (eval $ac_link) 2>&5
5206 ac_status=$?
5207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208 (exit $ac_status); } &&
5209 { ac_try='test -s conftest$ac_exeext'
5210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5211 (eval $ac_try) 2>&5
5212 ac_status=$?
5213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214 (exit $ac_status); }; }; then
5215 ac_cv_has_makedev=yes
5216else
5217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005218sed 's/^/| /' conftest.$ac_ext >&5
5219
Neal Norwitz11690112002-07-30 01:08:28 +00005220ac_cv_has_makedev=no
5221fi
5222rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5223 if test "$ac_cv_has_makedev" = "yes"; then
5224
5225cat >>confdefs.h <<\_ACEOF
5226#define _OSF_SOURCE 1
5227_ACEOF
5228
5229 fi
5230fi
5231echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5232echo "${ECHO_T}$ac_cv_has_makedev" >&6
5233if test "$ac_cv_has_makedev" = "yes"; then
5234
5235cat >>confdefs.h <<\_ACEOF
5236#define HAVE_MAKEDEV 1
5237_ACEOF
5238
5239fi
5240
Martin v. Löwis399a6892002-10-04 10:22:02 +00005241# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5242# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5243# defined, but the compiler does not support pragma redefine_extname,
5244# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5245# structures (such as rlimit64) without declaring them. As a
5246# work-around, disable LFS on such configurations
5247
5248use_lfs=yes
5249echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5250echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5251cat >conftest.$ac_ext <<_ACEOF
5252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005253/* confdefs.h. */
5254_ACEOF
5255cat confdefs.h >>conftest.$ac_ext
5256cat >>conftest.$ac_ext <<_ACEOF
5257/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005258
5259#define _LARGEFILE_SOURCE 1
5260#define _FILE_OFFSET_BITS 64
5261#include <sys/resource.h>
5262
Martin v. Löwis399a6892002-10-04 10:22:02 +00005263int
5264main ()
5265{
5266struct rlimit foo;
5267 ;
5268 return 0;
5269}
5270_ACEOF
5271rm -f conftest.$ac_objext
5272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5273 (eval $ac_compile) 2>&5
5274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); } &&
5277 { ac_try='test -s conftest.$ac_objext'
5278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5279 (eval $ac_try) 2>&5
5280 ac_status=$?
5281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282 (exit $ac_status); }; }; then
5283 sol_lfs_bug=no
5284else
5285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005286sed 's/^/| /' conftest.$ac_ext >&5
5287
Martin v. Löwis399a6892002-10-04 10:22:02 +00005288sol_lfs_bug=yes
5289fi
5290rm -f conftest.$ac_objext conftest.$ac_ext
5291echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5292echo "${ECHO_T}$sol_lfs_bug" >&6
5293if test "$sol_lfs_bug" = "yes"; then
5294 use_lfs=no
5295fi
5296
5297if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005298# Two defines needed to enable largefile support on various platforms
5299# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005300
Martin v. Löwis11437992002-04-12 09:54:03 +00005301cat >>confdefs.h <<\_ACEOF
5302#define _LARGEFILE_SOURCE 1
5303_ACEOF
5304
5305
5306cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005307#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005308_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005309
Martin v. Löwis399a6892002-10-04 10:22:02 +00005310fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005311
Guido van Rossum84e7b241996-08-19 21:59:00 +00005312# Add some code to confdefs.h so that the test for off_t works on SCO
5313cat >> confdefs.h <<\EOF
5314#if defined(SCO_DS)
5315#undef _OFF_T
5316#endif
5317EOF
5318
Guido van Rossumef2255b2000-03-10 22:30:29 +00005319# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005320echo "$as_me:$LINENO: checking for mode_t" >&5
5321echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5322if test "${ac_cv_type_mode_t+set}" = set; then
5323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324else
Martin v. Löwis11437992002-04-12 09:54:03 +00005325 cat >conftest.$ac_ext <<_ACEOF
5326#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005327/* confdefs.h. */
5328_ACEOF
5329cat confdefs.h >>conftest.$ac_ext
5330cat >>conftest.$ac_ext <<_ACEOF
5331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005332$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005333int
5334main ()
5335{
5336if ((mode_t *) 0)
5337 return 0;
5338if (sizeof (mode_t))
5339 return 0;
5340 ;
5341 return 0;
5342}
5343_ACEOF
5344rm -f conftest.$ac_objext
5345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5346 (eval $ac_compile) 2>&5
5347 ac_status=$?
5348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349 (exit $ac_status); } &&
5350 { ac_try='test -s conftest.$ac_objext'
5351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5352 (eval $ac_try) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005356 ac_cv_type_mode_t=yes
5357else
Martin v. Löwis11437992002-04-12 09:54:03 +00005358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005359sed 's/^/| /' conftest.$ac_ext >&5
5360
Martin v. Löwis11437992002-04-12 09:54:03 +00005361ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005363rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005365echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5366echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5367if test $ac_cv_type_mode_t = yes; then
5368 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369else
Martin v. Löwis11437992002-04-12 09:54:03 +00005370
5371cat >>confdefs.h <<_ACEOF
5372#define mode_t int
5373_ACEOF
5374
5375fi
5376
5377echo "$as_me:$LINENO: checking for off_t" >&5
5378echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5379if test "${ac_cv_type_off_t+set}" = set; then
5380 echo $ECHO_N "(cached) $ECHO_C" >&6
5381else
5382 cat >conftest.$ac_ext <<_ACEOF
5383#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005384/* confdefs.h. */
5385_ACEOF
5386cat confdefs.h >>conftest.$ac_ext
5387cat >>conftest.$ac_ext <<_ACEOF
5388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005389$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005390int
5391main ()
5392{
5393if ((off_t *) 0)
5394 return 0;
5395if (sizeof (off_t))
5396 return 0;
5397 ;
5398 return 0;
5399}
5400_ACEOF
5401rm -f conftest.$ac_objext
5402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5403 (eval $ac_compile) 2>&5
5404 ac_status=$?
5405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406 (exit $ac_status); } &&
5407 { ac_try='test -s conftest.$ac_objext'
5408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409 (eval $ac_try) 2>&5
5410 ac_status=$?
5411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005413 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005414else
Martin v. Löwis11437992002-04-12 09:54:03 +00005415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005416sed 's/^/| /' conftest.$ac_ext >&5
5417
Martin v. Löwis11437992002-04-12 09:54:03 +00005418ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005420rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005421fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005422echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5423echo "${ECHO_T}$ac_cv_type_off_t" >&6
5424if test $ac_cv_type_off_t = yes; then
5425 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426else
Martin v. Löwis11437992002-04-12 09:54:03 +00005427
5428cat >>confdefs.h <<_ACEOF
5429#define off_t long
5430_ACEOF
5431
5432fi
5433
5434echo "$as_me:$LINENO: checking for pid_t" >&5
5435echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5436if test "${ac_cv_type_pid_t+set}" = set; then
5437 echo $ECHO_N "(cached) $ECHO_C" >&6
5438else
5439 cat >conftest.$ac_ext <<_ACEOF
5440#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005441/* confdefs.h. */
5442_ACEOF
5443cat confdefs.h >>conftest.$ac_ext
5444cat >>conftest.$ac_ext <<_ACEOF
5445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005446$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005447int
5448main ()
5449{
5450if ((pid_t *) 0)
5451 return 0;
5452if (sizeof (pid_t))
5453 return 0;
5454 ;
5455 return 0;
5456}
5457_ACEOF
5458rm -f conftest.$ac_objext
5459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5460 (eval $ac_compile) 2>&5
5461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); } &&
5464 { ac_try='test -s conftest.$ac_objext'
5465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5466 (eval $ac_try) 2>&5
5467 ac_status=$?
5468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5469 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005470 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005471else
Martin v. Löwis11437992002-04-12 09:54:03 +00005472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005473sed 's/^/| /' conftest.$ac_ext >&5
5474
Martin v. Löwis11437992002-04-12 09:54:03 +00005475ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005477rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005479echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5480echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5481if test $ac_cv_type_pid_t = yes; then
5482 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005483else
Martin v. Löwis11437992002-04-12 09:54:03 +00005484
5485cat >>confdefs.h <<_ACEOF
5486#define pid_t int
5487_ACEOF
5488
5489fi
5490
5491echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5492echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5493if test "${ac_cv_type_signal+set}" = set; then
5494 echo $ECHO_N "(cached) $ECHO_C" >&6
5495else
5496 cat >conftest.$ac_ext <<_ACEOF
5497#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005498/* confdefs.h. */
5499_ACEOF
5500cat confdefs.h >>conftest.$ac_ext
5501cat >>conftest.$ac_ext <<_ACEOF
5502/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005503#include <sys/types.h>
5504#include <signal.h>
5505#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005506# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005507#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005508#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005509extern "C" void (*signal (int, void (*)(int)))(int);
5510#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005511void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005512#endif
5513
Martin v. Löwis11437992002-04-12 09:54:03 +00005514int
5515main ()
5516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005517int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005518 ;
5519 return 0;
5520}
5521_ACEOF
5522rm -f conftest.$ac_objext
5523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5524 (eval $ac_compile) 2>&5
5525 ac_status=$?
5526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527 (exit $ac_status); } &&
5528 { ac_try='test -s conftest.$ac_objext'
5529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5530 (eval $ac_try) 2>&5
5531 ac_status=$?
5532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005534 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005535else
Martin v. Löwis11437992002-04-12 09:54:03 +00005536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005537sed 's/^/| /' conftest.$ac_ext >&5
5538
Martin v. Löwis11437992002-04-12 09:54:03 +00005539ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005541rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005543echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5544echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005545
Martin v. Löwis11437992002-04-12 09:54:03 +00005546cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005547#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005549
Michael W. Hudson54241132001-12-07 15:38:26 +00005550
Martin v. Löwis11437992002-04-12 09:54:03 +00005551echo "$as_me:$LINENO: checking for size_t" >&5
5552echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5553if test "${ac_cv_type_size_t+set}" = set; then
5554 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005555else
Martin v. Löwis11437992002-04-12 09:54:03 +00005556 cat >conftest.$ac_ext <<_ACEOF
5557#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005558/* confdefs.h. */
5559_ACEOF
5560cat confdefs.h >>conftest.$ac_ext
5561cat >>conftest.$ac_ext <<_ACEOF
5562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005563$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005564int
5565main ()
5566{
5567if ((size_t *) 0)
5568 return 0;
5569if (sizeof (size_t))
5570 return 0;
5571 ;
5572 return 0;
5573}
5574_ACEOF
5575rm -f conftest.$ac_objext
5576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5577 (eval $ac_compile) 2>&5
5578 ac_status=$?
5579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580 (exit $ac_status); } &&
5581 { ac_try='test -s conftest.$ac_objext'
5582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5583 (eval $ac_try) 2>&5
5584 ac_status=$?
5585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005587 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005588else
Martin v. Löwis11437992002-04-12 09:54:03 +00005589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005590sed 's/^/| /' conftest.$ac_ext >&5
5591
Martin v. Löwis11437992002-04-12 09:54:03 +00005592ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005594rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005596echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5597echo "${ECHO_T}$ac_cv_type_size_t" >&6
5598if test $ac_cv_type_size_t = yes; then
5599 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005600else
Martin v. Löwis11437992002-04-12 09:54:03 +00005601
5602cat >>confdefs.h <<_ACEOF
5603#define size_t unsigned
5604_ACEOF
5605
5606fi
5607
5608echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5609echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5610if test "${ac_cv_type_uid_t+set}" = set; then
5611 echo $ECHO_N "(cached) $ECHO_C" >&6
5612else
5613 cat >conftest.$ac_ext <<_ACEOF
5614#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005620#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005621
5622_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005624 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005625 ac_cv_type_uid_t=yes
5626else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005627 ac_cv_type_uid_t=no
5628fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005629rm -f conftest*
5630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005632echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5633echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005634if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635
Martin v. Löwis11437992002-04-12 09:54:03 +00005636cat >>confdefs.h <<\_ACEOF
5637#define uid_t int
5638_ACEOF
5639
5640
5641cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005642#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005644
5645fi
5646
Jack Jansendd19cf82001-12-06 22:36:17 +00005647
Michael W. Hudson54241132001-12-07 15:38:26 +00005648# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005649# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005650echo "$as_me:$LINENO: checking for int" >&5
5651echo $ECHO_N "checking for int... $ECHO_C" >&6
5652if test "${ac_cv_type_int+set}" = set; then
5653 echo $ECHO_N "(cached) $ECHO_C" >&6
5654else
5655 cat >conftest.$ac_ext <<_ACEOF
5656#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005657/* confdefs.h. */
5658_ACEOF
5659cat confdefs.h >>conftest.$ac_ext
5660cat >>conftest.$ac_ext <<_ACEOF
5661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005662$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005663int
5664main ()
5665{
5666if ((int *) 0)
5667 return 0;
5668if (sizeof (int))
5669 return 0;
5670 ;
5671 return 0;
5672}
5673_ACEOF
5674rm -f conftest.$ac_objext
5675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5676 (eval $ac_compile) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); } &&
5680 { ac_try='test -s conftest.$ac_objext'
5681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682 (eval $ac_try) 2>&5
5683 ac_status=$?
5684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685 (exit $ac_status); }; }; then
5686 ac_cv_type_int=yes
5687else
5688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005689sed 's/^/| /' conftest.$ac_ext >&5
5690
Martin v. Löwis11437992002-04-12 09:54:03 +00005691ac_cv_type_int=no
5692fi
5693rm -f conftest.$ac_objext conftest.$ac_ext
5694fi
5695echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5696echo "${ECHO_T}$ac_cv_type_int" >&6
5697
5698echo "$as_me:$LINENO: checking size of int" >&5
5699echo $ECHO_N "checking size of int... $ECHO_C" >&6
5700if test "${ac_cv_sizeof_int+set}" = set; then
5701 echo $ECHO_N "(cached) $ECHO_C" >&6
5702else
5703 if test "$ac_cv_type_int" = yes; then
5704 # The cast to unsigned long works around a bug in the HP C Compiler
5705 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5706 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5707 # This bug is HP SR number 8606223364.
5708 if test "$cross_compiling" = yes; then
5709 # Depending upon the size, compute the lo and hi bounds.
5710cat >conftest.$ac_ext <<_ACEOF
5711#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005712/* confdefs.h. */
5713_ACEOF
5714cat confdefs.h >>conftest.$ac_ext
5715cat >>conftest.$ac_ext <<_ACEOF
5716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005717$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005718int
5719main ()
5720{
5721static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5722test_array [0] = 0
5723
5724 ;
5725 return 0;
5726}
5727_ACEOF
5728rm -f conftest.$ac_objext
5729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5730 (eval $ac_compile) 2>&5
5731 ac_status=$?
5732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5733 (exit $ac_status); } &&
5734 { ac_try='test -s conftest.$ac_objext'
5735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
5738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739 (exit $ac_status); }; }; then
5740 ac_lo=0 ac_mid=0
5741 while :; do
5742 cat >conftest.$ac_ext <<_ACEOF
5743#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005744/* confdefs.h. */
5745_ACEOF
5746cat confdefs.h >>conftest.$ac_ext
5747cat >>conftest.$ac_ext <<_ACEOF
5748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005749$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005750int
5751main ()
5752{
5753static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5754test_array [0] = 0
5755
5756 ;
5757 return 0;
5758}
5759_ACEOF
5760rm -f conftest.$ac_objext
5761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5762 (eval $ac_compile) 2>&5
5763 ac_status=$?
5764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5765 (exit $ac_status); } &&
5766 { ac_try='test -s conftest.$ac_objext'
5767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5768 (eval $ac_try) 2>&5
5769 ac_status=$?
5770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771 (exit $ac_status); }; }; then
5772 ac_hi=$ac_mid; break
5773else
5774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005775sed 's/^/| /' conftest.$ac_ext >&5
5776
Martin v. Löwis11437992002-04-12 09:54:03 +00005777ac_lo=`expr $ac_mid + 1`
5778 if test $ac_lo -le $ac_mid; then
5779 ac_lo= ac_hi=
5780 break
5781 fi
5782 ac_mid=`expr 2 '*' $ac_mid + 1`
5783fi
5784rm -f conftest.$ac_objext conftest.$ac_ext
5785 done
5786else
5787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005788sed 's/^/| /' conftest.$ac_ext >&5
5789
Martin v. Löwis11437992002-04-12 09:54:03 +00005790cat >conftest.$ac_ext <<_ACEOF
5791#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005792/* confdefs.h. */
5793_ACEOF
5794cat confdefs.h >>conftest.$ac_ext
5795cat >>conftest.$ac_ext <<_ACEOF
5796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005797$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005798int
5799main ()
5800{
5801static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5802test_array [0] = 0
5803
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808rm -f conftest.$ac_objext
5809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5810 (eval $ac_compile) 2>&5
5811 ac_status=$?
5812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813 (exit $ac_status); } &&
5814 { ac_try='test -s conftest.$ac_objext'
5815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5816 (eval $ac_try) 2>&5
5817 ac_status=$?
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); }; }; then
5820 ac_hi=-1 ac_mid=-1
5821 while :; do
5822 cat >conftest.$ac_ext <<_ACEOF
5823#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005824/* confdefs.h. */
5825_ACEOF
5826cat confdefs.h >>conftest.$ac_ext
5827cat >>conftest.$ac_ext <<_ACEOF
5828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005829$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005830int
5831main ()
5832{
5833static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5834test_array [0] = 0
5835
5836 ;
5837 return 0;
5838}
5839_ACEOF
5840rm -f conftest.$ac_objext
5841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5842 (eval $ac_compile) 2>&5
5843 ac_status=$?
5844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5845 (exit $ac_status); } &&
5846 { ac_try='test -s conftest.$ac_objext'
5847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5848 (eval $ac_try) 2>&5
5849 ac_status=$?
5850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5851 (exit $ac_status); }; }; then
5852 ac_lo=$ac_mid; break
5853else
5854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005855sed 's/^/| /' conftest.$ac_ext >&5
5856
Martin v. Löwis11437992002-04-12 09:54:03 +00005857ac_hi=`expr '(' $ac_mid ')' - 1`
5858 if test $ac_mid -le $ac_hi; then
5859 ac_lo= ac_hi=
5860 break
5861 fi
5862 ac_mid=`expr 2 '*' $ac_mid`
5863fi
5864rm -f conftest.$ac_objext conftest.$ac_ext
5865 done
5866else
5867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005868sed 's/^/| /' conftest.$ac_ext >&5
5869
Martin v. Löwis11437992002-04-12 09:54:03 +00005870ac_lo= ac_hi=
5871fi
5872rm -f conftest.$ac_objext conftest.$ac_ext
5873fi
5874rm -f conftest.$ac_objext conftest.$ac_ext
5875# Binary search between lo and hi bounds.
5876while test "x$ac_lo" != "x$ac_hi"; do
5877 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5878 cat >conftest.$ac_ext <<_ACEOF
5879#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005880/* confdefs.h. */
5881_ACEOF
5882cat confdefs.h >>conftest.$ac_ext
5883cat >>conftest.$ac_ext <<_ACEOF
5884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005885$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005886int
5887main ()
5888{
5889static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5890test_array [0] = 0
5891
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext
5897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5898 (eval $ac_compile) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest.$ac_objext'
5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_hi=$ac_mid
5909else
5910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwis11437992002-04-12 09:54:03 +00005913ac_lo=`expr '(' $ac_mid ')' + 1`
5914fi
5915rm -f conftest.$ac_objext conftest.$ac_ext
5916done
5917case $ac_lo in
5918?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005919'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5920See \`config.log' for more details." >&5
5921echo "$as_me: error: cannot compute sizeof (int), 77
5922See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005923 { (exit 1); exit 1; }; } ;;
5924esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005925else
5926 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005927 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5928See \`config.log' for more details." >&5
5929echo "$as_me: error: cannot run test program while cross compiling
5930See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005931 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005932else
Martin v. Löwis11437992002-04-12 09:54:03 +00005933 cat >conftest.$ac_ext <<_ACEOF
5934#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005935/* confdefs.h. */
5936_ACEOF
5937cat confdefs.h >>conftest.$ac_ext
5938cat >>conftest.$ac_ext <<_ACEOF
5939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005940$ac_includes_default
5941long longval () { return (long) (sizeof (int)); }
5942unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005944#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005945int
5946main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005947{
Martin v. Löwis11437992002-04-12 09:54:03 +00005948
5949 FILE *f = fopen ("conftest.val", "w");
5950 if (! f)
5951 exit (1);
5952 if (((long) (sizeof (int))) < 0)
5953 {
5954 long i = longval ();
5955 if (i != ((long) (sizeof (int))))
5956 exit (1);
5957 fprintf (f, "%ld\n", i);
5958 }
5959 else
5960 {
5961 unsigned long i = ulongval ();
5962 if (i != ((long) (sizeof (int))))
5963 exit (1);
5964 fprintf (f, "%lu\n", i);
5965 }
5966 exit (ferror (f) || fclose (f) != 0);
5967
5968 ;
5969 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005970}
Martin v. Löwis11437992002-04-12 09:54:03 +00005971_ACEOF
5972rm -f conftest$ac_exeext
5973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5974 (eval $ac_link) 2>&5
5975 ac_status=$?
5976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5979 (eval $ac_try) 2>&5
5980 ac_status=$?
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); }; }; then
5983 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005984else
Martin v. Löwis11437992002-04-12 09:54:03 +00005985 echo "$as_me: program exited with status $ac_status" >&5
5986echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005987sed 's/^/| /' conftest.$ac_ext >&5
5988
Martin v. Löwis11437992002-04-12 09:54:03 +00005989( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00005990{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5991See \`config.log' for more details." >&5
5992echo "$as_me: error: cannot compute sizeof (int), 77
5993See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005994 { (exit 1); exit 1; }; }
5995fi
Skip Montanaro6dead952003-09-25 14:50:04 +00005996rm -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 +00005997fi
5998fi
5999rm -f conftest.val
6000else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006001 ac_cv_sizeof_int=0
6002fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006004echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6005echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6006cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006007#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006008_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006009
6010
Martin v. Löwis11437992002-04-12 09:54:03 +00006011echo "$as_me:$LINENO: checking for long" >&5
6012echo $ECHO_N "checking for long... $ECHO_C" >&6
6013if test "${ac_cv_type_long+set}" = set; then
6014 echo $ECHO_N "(cached) $ECHO_C" >&6
6015else
6016 cat >conftest.$ac_ext <<_ACEOF
6017#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006018/* confdefs.h. */
6019_ACEOF
6020cat confdefs.h >>conftest.$ac_ext
6021cat >>conftest.$ac_ext <<_ACEOF
6022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006023$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006024int
6025main ()
6026{
6027if ((long *) 0)
6028 return 0;
6029if (sizeof (long))
6030 return 0;
6031 ;
6032 return 0;
6033}
6034_ACEOF
6035rm -f conftest.$ac_objext
6036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6037 (eval $ac_compile) 2>&5
6038 ac_status=$?
6039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6040 (exit $ac_status); } &&
6041 { ac_try='test -s conftest.$ac_objext'
6042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6043 (eval $ac_try) 2>&5
6044 ac_status=$?
6045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6046 (exit $ac_status); }; }; then
6047 ac_cv_type_long=yes
6048else
6049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006050sed 's/^/| /' conftest.$ac_ext >&5
6051
Martin v. Löwis11437992002-04-12 09:54:03 +00006052ac_cv_type_long=no
6053fi
6054rm -f conftest.$ac_objext conftest.$ac_ext
6055fi
6056echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6057echo "${ECHO_T}$ac_cv_type_long" >&6
6058
6059echo "$as_me:$LINENO: checking size of long" >&5
6060echo $ECHO_N "checking size of long... $ECHO_C" >&6
6061if test "${ac_cv_sizeof_long+set}" = set; then
6062 echo $ECHO_N "(cached) $ECHO_C" >&6
6063else
6064 if test "$ac_cv_type_long" = yes; then
6065 # The cast to unsigned long works around a bug in the HP C Compiler
6066 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6067 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6068 # This bug is HP SR number 8606223364.
6069 if test "$cross_compiling" = yes; then
6070 # Depending upon the size, compute the lo and hi bounds.
6071cat >conftest.$ac_ext <<_ACEOF
6072#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006073/* confdefs.h. */
6074_ACEOF
6075cat confdefs.h >>conftest.$ac_ext
6076cat >>conftest.$ac_ext <<_ACEOF
6077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006078$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006079int
6080main ()
6081{
6082static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6083test_array [0] = 0
6084
6085 ;
6086 return 0;
6087}
6088_ACEOF
6089rm -f conftest.$ac_objext
6090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6091 (eval $ac_compile) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); } &&
6095 { ac_try='test -s conftest.$ac_objext'
6096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097 (eval $ac_try) 2>&5
6098 ac_status=$?
6099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100 (exit $ac_status); }; }; then
6101 ac_lo=0 ac_mid=0
6102 while :; do
6103 cat >conftest.$ac_ext <<_ACEOF
6104#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006105/* confdefs.h. */
6106_ACEOF
6107cat confdefs.h >>conftest.$ac_ext
6108cat >>conftest.$ac_ext <<_ACEOF
6109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006110$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006111int
6112main ()
6113{
6114static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6115test_array [0] = 0
6116
6117 ;
6118 return 0;
6119}
6120_ACEOF
6121rm -f conftest.$ac_objext
6122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6123 (eval $ac_compile) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); } &&
6127 { ac_try='test -s conftest.$ac_objext'
6128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6129 (eval $ac_try) 2>&5
6130 ac_status=$?
6131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132 (exit $ac_status); }; }; then
6133 ac_hi=$ac_mid; break
6134else
6135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006136sed 's/^/| /' conftest.$ac_ext >&5
6137
Martin v. Löwis11437992002-04-12 09:54:03 +00006138ac_lo=`expr $ac_mid + 1`
6139 if test $ac_lo -le $ac_mid; then
6140 ac_lo= ac_hi=
6141 break
6142 fi
6143 ac_mid=`expr 2 '*' $ac_mid + 1`
6144fi
6145rm -f conftest.$ac_objext conftest.$ac_ext
6146 done
6147else
6148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006149sed 's/^/| /' conftest.$ac_ext >&5
6150
Martin v. Löwis11437992002-04-12 09:54:03 +00006151cat >conftest.$ac_ext <<_ACEOF
6152#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006153/* confdefs.h. */
6154_ACEOF
6155cat confdefs.h >>conftest.$ac_ext
6156cat >>conftest.$ac_ext <<_ACEOF
6157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006158$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006159int
6160main ()
6161{
6162static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6163test_array [0] = 0
6164
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169rm -f conftest.$ac_objext
6170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6171 (eval $ac_compile) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); } &&
6175 { ac_try='test -s conftest.$ac_objext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
6181 ac_hi=-1 ac_mid=-1
6182 while :; do
6183 cat >conftest.$ac_ext <<_ACEOF
6184#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* confdefs.h. */
6186_ACEOF
6187cat confdefs.h >>conftest.$ac_ext
6188cat >>conftest.$ac_ext <<_ACEOF
6189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006190$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006191int
6192main ()
6193{
6194static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6195test_array [0] = 0
6196
6197 ;
6198 return 0;
6199}
6200_ACEOF
6201rm -f conftest.$ac_objext
6202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6203 (eval $ac_compile) 2>&5
6204 ac_status=$?
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206 (exit $ac_status); } &&
6207 { ac_try='test -s conftest.$ac_objext'
6208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6209 (eval $ac_try) 2>&5
6210 ac_status=$?
6211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212 (exit $ac_status); }; }; then
6213 ac_lo=$ac_mid; break
6214else
6215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006216sed 's/^/| /' conftest.$ac_ext >&5
6217
Martin v. Löwis11437992002-04-12 09:54:03 +00006218ac_hi=`expr '(' $ac_mid ')' - 1`
6219 if test $ac_mid -le $ac_hi; then
6220 ac_lo= ac_hi=
6221 break
6222 fi
6223 ac_mid=`expr 2 '*' $ac_mid`
6224fi
6225rm -f conftest.$ac_objext conftest.$ac_ext
6226 done
6227else
6228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006229sed 's/^/| /' conftest.$ac_ext >&5
6230
Martin v. Löwis11437992002-04-12 09:54:03 +00006231ac_lo= ac_hi=
6232fi
6233rm -f conftest.$ac_objext conftest.$ac_ext
6234fi
6235rm -f conftest.$ac_objext conftest.$ac_ext
6236# Binary search between lo and hi bounds.
6237while test "x$ac_lo" != "x$ac_hi"; do
6238 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6239 cat >conftest.$ac_ext <<_ACEOF
6240#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006241/* confdefs.h. */
6242_ACEOF
6243cat confdefs.h >>conftest.$ac_ext
6244cat >>conftest.$ac_ext <<_ACEOF
6245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006246$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006247int
6248main ()
6249{
6250static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6251test_array [0] = 0
6252
6253 ;
6254 return 0;
6255}
6256_ACEOF
6257rm -f conftest.$ac_objext
6258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6259 (eval $ac_compile) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); } &&
6263 { ac_try='test -s conftest.$ac_objext'
6264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); }; }; then
6269 ac_hi=$ac_mid
6270else
6271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006272sed 's/^/| /' conftest.$ac_ext >&5
6273
Martin v. Löwis11437992002-04-12 09:54:03 +00006274ac_lo=`expr '(' $ac_mid ')' + 1`
6275fi
6276rm -f conftest.$ac_objext conftest.$ac_ext
6277done
6278case $ac_lo in
6279?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006280'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6281See \`config.log' for more details." >&5
6282echo "$as_me: error: cannot compute sizeof (long), 77
6283See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006284 { (exit 1); exit 1; }; } ;;
6285esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006286else
6287 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006288 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6289See \`config.log' for more details." >&5
6290echo "$as_me: error: cannot run test program while cross compiling
6291See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006292 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006293else
Martin v. Löwis11437992002-04-12 09:54:03 +00006294 cat >conftest.$ac_ext <<_ACEOF
6295#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006296/* confdefs.h. */
6297_ACEOF
6298cat confdefs.h >>conftest.$ac_ext
6299cat >>conftest.$ac_ext <<_ACEOF
6300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006301$ac_includes_default
6302long longval () { return (long) (sizeof (long)); }
6303unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006304#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006305#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006306int
6307main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006308{
Martin v. Löwis11437992002-04-12 09:54:03 +00006309
6310 FILE *f = fopen ("conftest.val", "w");
6311 if (! f)
6312 exit (1);
6313 if (((long) (sizeof (long))) < 0)
6314 {
6315 long i = longval ();
6316 if (i != ((long) (sizeof (long))))
6317 exit (1);
6318 fprintf (f, "%ld\n", i);
6319 }
6320 else
6321 {
6322 unsigned long i = ulongval ();
6323 if (i != ((long) (sizeof (long))))
6324 exit (1);
6325 fprintf (f, "%lu\n", i);
6326 }
6327 exit (ferror (f) || fclose (f) != 0);
6328
6329 ;
6330 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006331}
Martin v. Löwis11437992002-04-12 09:54:03 +00006332_ACEOF
6333rm -f conftest$ac_exeext
6334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6335 (eval $ac_link) 2>&5
6336 ac_status=$?
6337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6340 (eval $ac_try) 2>&5
6341 ac_status=$?
6342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6343 (exit $ac_status); }; }; then
6344 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006345else
Martin v. Löwis11437992002-04-12 09:54:03 +00006346 echo "$as_me: program exited with status $ac_status" >&5
6347echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006348sed 's/^/| /' conftest.$ac_ext >&5
6349
Martin v. Löwis11437992002-04-12 09:54:03 +00006350( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006351{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6352See \`config.log' for more details." >&5
6353echo "$as_me: error: cannot compute sizeof (long), 77
6354See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006355 { (exit 1); exit 1; }; }
6356fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006357rm -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 +00006358fi
6359fi
6360rm -f conftest.val
6361else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006362 ac_cv_sizeof_long=0
6363fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006365echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6366echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6367cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006368#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006369_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006370
6371
Martin v. Löwis11437992002-04-12 09:54:03 +00006372echo "$as_me:$LINENO: checking for void *" >&5
6373echo $ECHO_N "checking for void *... $ECHO_C" >&6
6374if test "${ac_cv_type_void_p+set}" = set; then
6375 echo $ECHO_N "(cached) $ECHO_C" >&6
6376else
6377 cat >conftest.$ac_ext <<_ACEOF
6378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006379/* confdefs.h. */
6380_ACEOF
6381cat confdefs.h >>conftest.$ac_ext
6382cat >>conftest.$ac_ext <<_ACEOF
6383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006384$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006385int
6386main ()
6387{
6388if ((void * *) 0)
6389 return 0;
6390if (sizeof (void *))
6391 return 0;
6392 ;
6393 return 0;
6394}
6395_ACEOF
6396rm -f conftest.$ac_objext
6397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6398 (eval $ac_compile) 2>&5
6399 ac_status=$?
6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6401 (exit $ac_status); } &&
6402 { ac_try='test -s conftest.$ac_objext'
6403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6404 (eval $ac_try) 2>&5
6405 ac_status=$?
6406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6407 (exit $ac_status); }; }; then
6408 ac_cv_type_void_p=yes
6409else
6410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006411sed 's/^/| /' conftest.$ac_ext >&5
6412
Martin v. Löwis11437992002-04-12 09:54:03 +00006413ac_cv_type_void_p=no
6414fi
6415rm -f conftest.$ac_objext conftest.$ac_ext
6416fi
6417echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6418echo "${ECHO_T}$ac_cv_type_void_p" >&6
6419
6420echo "$as_me:$LINENO: checking size of void *" >&5
6421echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6422if test "${ac_cv_sizeof_void_p+set}" = set; then
6423 echo $ECHO_N "(cached) $ECHO_C" >&6
6424else
6425 if test "$ac_cv_type_void_p" = yes; then
6426 # The cast to unsigned long works around a bug in the HP C Compiler
6427 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6428 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6429 # This bug is HP SR number 8606223364.
6430 if test "$cross_compiling" = yes; then
6431 # Depending upon the size, compute the lo and hi bounds.
6432cat >conftest.$ac_ext <<_ACEOF
6433#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006434/* confdefs.h. */
6435_ACEOF
6436cat confdefs.h >>conftest.$ac_ext
6437cat >>conftest.$ac_ext <<_ACEOF
6438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006439$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006440int
6441main ()
6442{
6443static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6444test_array [0] = 0
6445
6446 ;
6447 return 0;
6448}
6449_ACEOF
6450rm -f conftest.$ac_objext
6451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6452 (eval $ac_compile) 2>&5
6453 ac_status=$?
6454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6455 (exit $ac_status); } &&
6456 { ac_try='test -s conftest.$ac_objext'
6457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6458 (eval $ac_try) 2>&5
6459 ac_status=$?
6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461 (exit $ac_status); }; }; then
6462 ac_lo=0 ac_mid=0
6463 while :; do
6464 cat >conftest.$ac_ext <<_ACEOF
6465#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006466/* confdefs.h. */
6467_ACEOF
6468cat confdefs.h >>conftest.$ac_ext
6469cat >>conftest.$ac_ext <<_ACEOF
6470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006471$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006472int
6473main ()
6474{
6475static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6476test_array [0] = 0
6477
6478 ;
6479 return 0;
6480}
6481_ACEOF
6482rm -f conftest.$ac_objext
6483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6484 (eval $ac_compile) 2>&5
6485 ac_status=$?
6486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6487 (exit $ac_status); } &&
6488 { ac_try='test -s conftest.$ac_objext'
6489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6490 (eval $ac_try) 2>&5
6491 ac_status=$?
6492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493 (exit $ac_status); }; }; then
6494 ac_hi=$ac_mid; break
6495else
6496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006497sed 's/^/| /' conftest.$ac_ext >&5
6498
Martin v. Löwis11437992002-04-12 09:54:03 +00006499ac_lo=`expr $ac_mid + 1`
6500 if test $ac_lo -le $ac_mid; then
6501 ac_lo= ac_hi=
6502 break
6503 fi
6504 ac_mid=`expr 2 '*' $ac_mid + 1`
6505fi
6506rm -f conftest.$ac_objext conftest.$ac_ext
6507 done
6508else
6509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006510sed 's/^/| /' conftest.$ac_ext >&5
6511
Martin v. Löwis11437992002-04-12 09:54:03 +00006512cat >conftest.$ac_ext <<_ACEOF
6513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006519$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006520int
6521main ()
6522{
6523static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6524test_array [0] = 0
6525
6526 ;
6527 return 0;
6528}
6529_ACEOF
6530rm -f conftest.$ac_objext
6531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6532 (eval $ac_compile) 2>&5
6533 ac_status=$?
6534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535 (exit $ac_status); } &&
6536 { ac_try='test -s conftest.$ac_objext'
6537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6538 (eval $ac_try) 2>&5
6539 ac_status=$?
6540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); }; }; then
6542 ac_hi=-1 ac_mid=-1
6543 while :; do
6544 cat >conftest.$ac_ext <<_ACEOF
6545#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006551$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006552int
6553main ()
6554{
6555static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6556test_array [0] = 0
6557
6558 ;
6559 return 0;
6560}
6561_ACEOF
6562rm -f conftest.$ac_objext
6563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6564 (eval $ac_compile) 2>&5
6565 ac_status=$?
6566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567 (exit $ac_status); } &&
6568 { ac_try='test -s conftest.$ac_objext'
6569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6570 (eval $ac_try) 2>&5
6571 ac_status=$?
6572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6573 (exit $ac_status); }; }; then
6574 ac_lo=$ac_mid; break
6575else
6576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006577sed 's/^/| /' conftest.$ac_ext >&5
6578
Martin v. Löwis11437992002-04-12 09:54:03 +00006579ac_hi=`expr '(' $ac_mid ')' - 1`
6580 if test $ac_mid -le $ac_hi; then
6581 ac_lo= ac_hi=
6582 break
6583 fi
6584 ac_mid=`expr 2 '*' $ac_mid`
6585fi
6586rm -f conftest.$ac_objext conftest.$ac_ext
6587 done
6588else
6589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006590sed 's/^/| /' conftest.$ac_ext >&5
6591
Martin v. Löwis11437992002-04-12 09:54:03 +00006592ac_lo= ac_hi=
6593fi
6594rm -f conftest.$ac_objext conftest.$ac_ext
6595fi
6596rm -f conftest.$ac_objext conftest.$ac_ext
6597# Binary search between lo and hi bounds.
6598while test "x$ac_lo" != "x$ac_hi"; do
6599 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6600 cat >conftest.$ac_ext <<_ACEOF
6601#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006602/* confdefs.h. */
6603_ACEOF
6604cat confdefs.h >>conftest.$ac_ext
6605cat >>conftest.$ac_ext <<_ACEOF
6606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006607$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006608int
6609main ()
6610{
6611static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6612test_array [0] = 0
6613
6614 ;
6615 return 0;
6616}
6617_ACEOF
6618rm -f conftest.$ac_objext
6619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6620 (eval $ac_compile) 2>&5
6621 ac_status=$?
6622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623 (exit $ac_status); } &&
6624 { ac_try='test -s conftest.$ac_objext'
6625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6626 (eval $ac_try) 2>&5
6627 ac_status=$?
6628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6629 (exit $ac_status); }; }; then
6630 ac_hi=$ac_mid
6631else
6632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006633sed 's/^/| /' conftest.$ac_ext >&5
6634
Martin v. Löwis11437992002-04-12 09:54:03 +00006635ac_lo=`expr '(' $ac_mid ')' + 1`
6636fi
6637rm -f conftest.$ac_objext conftest.$ac_ext
6638done
6639case $ac_lo in
6640?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006641'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6642See \`config.log' for more details." >&5
6643echo "$as_me: error: cannot compute sizeof (void *), 77
6644See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006645 { (exit 1); exit 1; }; } ;;
6646esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006647else
6648 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006649 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6650See \`config.log' for more details." >&5
6651echo "$as_me: error: cannot run test program while cross compiling
6652See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006653 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006654else
Martin v. Löwis11437992002-04-12 09:54:03 +00006655 cat >conftest.$ac_ext <<_ACEOF
6656#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006662$ac_includes_default
6663long longval () { return (long) (sizeof (void *)); }
6664unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006665#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006666#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006667int
6668main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006669{
Martin v. Löwis11437992002-04-12 09:54:03 +00006670
6671 FILE *f = fopen ("conftest.val", "w");
6672 if (! f)
6673 exit (1);
6674 if (((long) (sizeof (void *))) < 0)
6675 {
6676 long i = longval ();
6677 if (i != ((long) (sizeof (void *))))
6678 exit (1);
6679 fprintf (f, "%ld\n", i);
6680 }
6681 else
6682 {
6683 unsigned long i = ulongval ();
6684 if (i != ((long) (sizeof (void *))))
6685 exit (1);
6686 fprintf (f, "%lu\n", i);
6687 }
6688 exit (ferror (f) || fclose (f) != 0);
6689
6690 ;
6691 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006692}
Martin v. Löwis11437992002-04-12 09:54:03 +00006693_ACEOF
6694rm -f conftest$ac_exeext
6695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6696 (eval $ac_link) 2>&5
6697 ac_status=$?
6698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6701 (eval $ac_try) 2>&5
6702 ac_status=$?
6703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704 (exit $ac_status); }; }; then
6705 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006706else
Martin v. Löwis11437992002-04-12 09:54:03 +00006707 echo "$as_me: program exited with status $ac_status" >&5
6708echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006709sed 's/^/| /' conftest.$ac_ext >&5
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006712{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6713See \`config.log' for more details." >&5
6714echo "$as_me: error: cannot compute sizeof (void *), 77
6715See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 { (exit 1); exit 1; }; }
6717fi
Skip Montanaro6dead952003-09-25 14:50:04 +00006718rm -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 +00006719fi
6720fi
6721rm -f conftest.val
6722else
Guido van Rossumad678af1998-10-02 14:42:15 +00006723 ac_cv_sizeof_void_p=0
6724fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006726echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6727echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6728cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006729#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006730_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006731
6732
Martin v. Löwis11437992002-04-12 09:54:03 +00006733echo "$as_me:$LINENO: checking for short" >&5
6734echo $ECHO_N "checking for short... $ECHO_C" >&6
6735if test "${ac_cv_type_short+set}" = set; then
6736 echo $ECHO_N "(cached) $ECHO_C" >&6
6737else
6738 cat >conftest.$ac_ext <<_ACEOF
6739#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006740/* confdefs.h. */
6741_ACEOF
6742cat confdefs.h >>conftest.$ac_ext
6743cat >>conftest.$ac_ext <<_ACEOF
6744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006745$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006746int
6747main ()
6748{
6749if ((short *) 0)
6750 return 0;
6751if (sizeof (short))
6752 return 0;
6753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
6758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6759 (eval $ac_compile) 2>&5
6760 ac_status=$?
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); } &&
6763 { ac_try='test -s conftest.$ac_objext'
6764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6765 (eval $ac_try) 2>&5
6766 ac_status=$?
6767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6768 (exit $ac_status); }; }; then
6769 ac_cv_type_short=yes
6770else
6771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006772sed 's/^/| /' conftest.$ac_ext >&5
6773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774ac_cv_type_short=no
6775fi
6776rm -f conftest.$ac_objext conftest.$ac_ext
6777fi
6778echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6779echo "${ECHO_T}$ac_cv_type_short" >&6
6780
6781echo "$as_me:$LINENO: checking size of short" >&5
6782echo $ECHO_N "checking size of short... $ECHO_C" >&6
6783if test "${ac_cv_sizeof_short+set}" = set; then
6784 echo $ECHO_N "(cached) $ECHO_C" >&6
6785else
6786 if test "$ac_cv_type_short" = yes; then
6787 # The cast to unsigned long works around a bug in the HP C Compiler
6788 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6789 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6790 # This bug is HP SR number 8606223364.
6791 if test "$cross_compiling" = yes; then
6792 # Depending upon the size, compute the lo and hi bounds.
6793cat >conftest.$ac_ext <<_ACEOF
6794#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006795/* confdefs.h. */
6796_ACEOF
6797cat confdefs.h >>conftest.$ac_ext
6798cat >>conftest.$ac_ext <<_ACEOF
6799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006800$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006801int
6802main ()
6803{
6804static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6805test_array [0] = 0
6806
6807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6813 (eval $ac_compile) 2>&5
6814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); } &&
6817 { ac_try='test -s conftest.$ac_objext'
6818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6819 (eval $ac_try) 2>&5
6820 ac_status=$?
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); }; }; then
6823 ac_lo=0 ac_mid=0
6824 while :; do
6825 cat >conftest.$ac_ext <<_ACEOF
6826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006827/* confdefs.h. */
6828_ACEOF
6829cat confdefs.h >>conftest.$ac_ext
6830cat >>conftest.$ac_ext <<_ACEOF
6831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006832$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006833int
6834main ()
6835{
6836static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6837test_array [0] = 0
6838
6839 ;
6840 return 0;
6841}
6842_ACEOF
6843rm -f conftest.$ac_objext
6844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6845 (eval $ac_compile) 2>&5
6846 ac_status=$?
6847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848 (exit $ac_status); } &&
6849 { ac_try='test -s conftest.$ac_objext'
6850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6851 (eval $ac_try) 2>&5
6852 ac_status=$?
6853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6854 (exit $ac_status); }; }; then
6855 ac_hi=$ac_mid; break
6856else
6857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006858sed 's/^/| /' conftest.$ac_ext >&5
6859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860ac_lo=`expr $ac_mid + 1`
6861 if test $ac_lo -le $ac_mid; then
6862 ac_lo= ac_hi=
6863 break
6864 fi
6865 ac_mid=`expr 2 '*' $ac_mid + 1`
6866fi
6867rm -f conftest.$ac_objext conftest.$ac_ext
6868 done
6869else
6870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006871sed 's/^/| /' conftest.$ac_ext >&5
6872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873cat >conftest.$ac_ext <<_ACEOF
6874#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006875/* confdefs.h. */
6876_ACEOF
6877cat confdefs.h >>conftest.$ac_ext
6878cat >>conftest.$ac_ext <<_ACEOF
6879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006880$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006881int
6882main ()
6883{
6884static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6885test_array [0] = 0
6886
6887 ;
6888 return 0;
6889}
6890_ACEOF
6891rm -f conftest.$ac_objext
6892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6893 (eval $ac_compile) 2>&5
6894 ac_status=$?
6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6896 (exit $ac_status); } &&
6897 { ac_try='test -s conftest.$ac_objext'
6898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6899 (eval $ac_try) 2>&5
6900 ac_status=$?
6901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6902 (exit $ac_status); }; }; then
6903 ac_hi=-1 ac_mid=-1
6904 while :; do
6905 cat >conftest.$ac_ext <<_ACEOF
6906#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006907/* confdefs.h. */
6908_ACEOF
6909cat confdefs.h >>conftest.$ac_ext
6910cat >>conftest.$ac_ext <<_ACEOF
6911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006912$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006913int
6914main ()
6915{
6916static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6917test_array [0] = 0
6918
6919 ;
6920 return 0;
6921}
6922_ACEOF
6923rm -f conftest.$ac_objext
6924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6925 (eval $ac_compile) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest.$ac_objext'
6930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_lo=$ac_mid; break
6936else
6937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006938sed 's/^/| /' conftest.$ac_ext >&5
6939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940ac_hi=`expr '(' $ac_mid ')' - 1`
6941 if test $ac_mid -le $ac_hi; then
6942 ac_lo= ac_hi=
6943 break
6944 fi
6945 ac_mid=`expr 2 '*' $ac_mid`
6946fi
6947rm -f conftest.$ac_objext conftest.$ac_ext
6948 done
6949else
6950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006951sed 's/^/| /' conftest.$ac_ext >&5
6952
Martin v. Löwis11437992002-04-12 09:54:03 +00006953ac_lo= ac_hi=
6954fi
6955rm -f conftest.$ac_objext conftest.$ac_ext
6956fi
6957rm -f conftest.$ac_objext conftest.$ac_ext
6958# Binary search between lo and hi bounds.
6959while test "x$ac_lo" != "x$ac_hi"; do
6960 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6961 cat >conftest.$ac_ext <<_ACEOF
6962#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006963/* confdefs.h. */
6964_ACEOF
6965cat confdefs.h >>conftest.$ac_ext
6966cat >>conftest.$ac_ext <<_ACEOF
6967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006968$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006969int
6970main ()
6971{
6972static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6973test_array [0] = 0
6974
6975 ;
6976 return 0;
6977}
6978_ACEOF
6979rm -f conftest.$ac_objext
6980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6981 (eval $ac_compile) 2>&5
6982 ac_status=$?
6983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984 (exit $ac_status); } &&
6985 { ac_try='test -s conftest.$ac_objext'
6986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6987 (eval $ac_try) 2>&5
6988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); }; }; then
6991 ac_hi=$ac_mid
6992else
6993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006994sed 's/^/| /' conftest.$ac_ext >&5
6995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996ac_lo=`expr '(' $ac_mid ')' + 1`
6997fi
6998rm -f conftest.$ac_objext conftest.$ac_ext
6999done
7000case $ac_lo in
7001?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007002'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7003See \`config.log' for more details." >&5
7004echo "$as_me: error: cannot compute sizeof (short), 77
7005See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 { (exit 1); exit 1; }; } ;;
7007esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007008else
7009 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007010 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7011See \`config.log' for more details." >&5
7012echo "$as_me: error: cannot run test program while cross compiling
7013See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007015else
Martin v. Löwis11437992002-04-12 09:54:03 +00007016 cat >conftest.$ac_ext <<_ACEOF
7017#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007023$ac_includes_default
7024long longval () { return (long) (sizeof (short)); }
7025unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007026#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007027#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007028int
7029main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007030{
Martin v. Löwis11437992002-04-12 09:54:03 +00007031
7032 FILE *f = fopen ("conftest.val", "w");
7033 if (! f)
7034 exit (1);
7035 if (((long) (sizeof (short))) < 0)
7036 {
7037 long i = longval ();
7038 if (i != ((long) (sizeof (short))))
7039 exit (1);
7040 fprintf (f, "%ld\n", i);
7041 }
7042 else
7043 {
7044 unsigned long i = ulongval ();
7045 if (i != ((long) (sizeof (short))))
7046 exit (1);
7047 fprintf (f, "%lu\n", i);
7048 }
7049 exit (ferror (f) || fclose (f) != 0);
7050
7051 ;
7052 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007053}
Martin v. Löwis11437992002-04-12 09:54:03 +00007054_ACEOF
7055rm -f conftest$ac_exeext
7056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7057 (eval $ac_link) 2>&5
7058 ac_status=$?
7059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7062 (eval $ac_try) 2>&5
7063 ac_status=$?
7064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065 (exit $ac_status); }; }; then
7066 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007067else
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 echo "$as_me: program exited with status $ac_status" >&5
7069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007070sed 's/^/| /' conftest.$ac_ext >&5
7071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007073{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7074See \`config.log' for more details." >&5
7075echo "$as_me: error: cannot compute sizeof (short), 77
7076See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 { (exit 1); exit 1; }; }
7078fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007079rm -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 +00007080fi
7081fi
7082rm -f conftest.val
7083else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084 ac_cv_sizeof_short=0
7085fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007087echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7088echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7089cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007090#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007091_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007092
7093
Martin v. Löwis11437992002-04-12 09:54:03 +00007094echo "$as_me:$LINENO: checking for float" >&5
7095echo $ECHO_N "checking for float... $ECHO_C" >&6
7096if test "${ac_cv_type_float+set}" = set; then
7097 echo $ECHO_N "(cached) $ECHO_C" >&6
7098else
7099 cat >conftest.$ac_ext <<_ACEOF
7100#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007101/* confdefs.h. */
7102_ACEOF
7103cat confdefs.h >>conftest.$ac_ext
7104cat >>conftest.$ac_ext <<_ACEOF
7105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007106$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007107int
7108main ()
7109{
7110if ((float *) 0)
7111 return 0;
7112if (sizeof (float))
7113 return 0;
7114 ;
7115 return 0;
7116}
7117_ACEOF
7118rm -f conftest.$ac_objext
7119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7120 (eval $ac_compile) 2>&5
7121 ac_status=$?
7122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); } &&
7124 { ac_try='test -s conftest.$ac_objext'
7125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7126 (eval $ac_try) 2>&5
7127 ac_status=$?
7128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7129 (exit $ac_status); }; }; then
7130 ac_cv_type_float=yes
7131else
7132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007133sed 's/^/| /' conftest.$ac_ext >&5
7134
Martin v. Löwis11437992002-04-12 09:54:03 +00007135ac_cv_type_float=no
7136fi
7137rm -f conftest.$ac_objext conftest.$ac_ext
7138fi
7139echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7140echo "${ECHO_T}$ac_cv_type_float" >&6
7141
7142echo "$as_me:$LINENO: checking size of float" >&5
7143echo $ECHO_N "checking size of float... $ECHO_C" >&6
7144if test "${ac_cv_sizeof_float+set}" = set; then
7145 echo $ECHO_N "(cached) $ECHO_C" >&6
7146else
7147 if test "$ac_cv_type_float" = yes; then
7148 # The cast to unsigned long works around a bug in the HP C Compiler
7149 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7150 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7151 # This bug is HP SR number 8606223364.
7152 if test "$cross_compiling" = yes; then
7153 # Depending upon the size, compute the lo and hi bounds.
7154cat >conftest.$ac_ext <<_ACEOF
7155#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007156/* confdefs.h. */
7157_ACEOF
7158cat confdefs.h >>conftest.$ac_ext
7159cat >>conftest.$ac_ext <<_ACEOF
7160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007161$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007162int
7163main ()
7164{
7165static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7166test_array [0] = 0
7167
7168 ;
7169 return 0;
7170}
7171_ACEOF
7172rm -f conftest.$ac_objext
7173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7174 (eval $ac_compile) 2>&5
7175 ac_status=$?
7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177 (exit $ac_status); } &&
7178 { ac_try='test -s conftest.$ac_objext'
7179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7180 (eval $ac_try) 2>&5
7181 ac_status=$?
7182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7183 (exit $ac_status); }; }; then
7184 ac_lo=0 ac_mid=0
7185 while :; do
7186 cat >conftest.$ac_ext <<_ACEOF
7187#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007188/* confdefs.h. */
7189_ACEOF
7190cat confdefs.h >>conftest.$ac_ext
7191cat >>conftest.$ac_ext <<_ACEOF
7192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007193$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007194int
7195main ()
7196{
7197static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7198test_array [0] = 0
7199
7200 ;
7201 return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext
7205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7206 (eval $ac_compile) 2>&5
7207 ac_status=$?
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); } &&
7210 { ac_try='test -s conftest.$ac_objext'
7211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7212 (eval $ac_try) 2>&5
7213 ac_status=$?
7214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215 (exit $ac_status); }; }; then
7216 ac_hi=$ac_mid; break
7217else
7218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007219sed 's/^/| /' conftest.$ac_ext >&5
7220
Martin v. Löwis11437992002-04-12 09:54:03 +00007221ac_lo=`expr $ac_mid + 1`
7222 if test $ac_lo -le $ac_mid; then
7223 ac_lo= ac_hi=
7224 break
7225 fi
7226 ac_mid=`expr 2 '*' $ac_mid + 1`
7227fi
7228rm -f conftest.$ac_objext conftest.$ac_ext
7229 done
7230else
7231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007232sed 's/^/| /' conftest.$ac_ext >&5
7233
Martin v. Löwis11437992002-04-12 09:54:03 +00007234cat >conftest.$ac_ext <<_ACEOF
7235#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007236/* confdefs.h. */
7237_ACEOF
7238cat confdefs.h >>conftest.$ac_ext
7239cat >>conftest.$ac_ext <<_ACEOF
7240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007241$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007242int
7243main ()
7244{
7245static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7246test_array [0] = 0
7247
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
7253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7254 (eval $ac_compile) 2>&5
7255 ac_status=$?
7256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7257 (exit $ac_status); } &&
7258 { ac_try='test -s conftest.$ac_objext'
7259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7260 (eval $ac_try) 2>&5
7261 ac_status=$?
7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263 (exit $ac_status); }; }; then
7264 ac_hi=-1 ac_mid=-1
7265 while :; do
7266 cat >conftest.$ac_ext <<_ACEOF
7267#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007268/* confdefs.h. */
7269_ACEOF
7270cat confdefs.h >>conftest.$ac_ext
7271cat >>conftest.$ac_ext <<_ACEOF
7272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007273$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007274int
7275main ()
7276{
7277static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7278test_array [0] = 0
7279
7280 ;
7281 return 0;
7282}
7283_ACEOF
7284rm -f conftest.$ac_objext
7285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7286 (eval $ac_compile) 2>&5
7287 ac_status=$?
7288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7289 (exit $ac_status); } &&
7290 { ac_try='test -s conftest.$ac_objext'
7291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7292 (eval $ac_try) 2>&5
7293 ac_status=$?
7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295 (exit $ac_status); }; }; then
7296 ac_lo=$ac_mid; break
7297else
7298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007299sed 's/^/| /' conftest.$ac_ext >&5
7300
Martin v. Löwis11437992002-04-12 09:54:03 +00007301ac_hi=`expr '(' $ac_mid ')' - 1`
7302 if test $ac_mid -le $ac_hi; then
7303 ac_lo= ac_hi=
7304 break
7305 fi
7306 ac_mid=`expr 2 '*' $ac_mid`
7307fi
7308rm -f conftest.$ac_objext conftest.$ac_ext
7309 done
7310else
7311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007312sed 's/^/| /' conftest.$ac_ext >&5
7313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314ac_lo= ac_hi=
7315fi
7316rm -f conftest.$ac_objext conftest.$ac_ext
7317fi
7318rm -f conftest.$ac_objext conftest.$ac_ext
7319# Binary search between lo and hi bounds.
7320while test "x$ac_lo" != "x$ac_hi"; do
7321 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7322 cat >conftest.$ac_ext <<_ACEOF
7323#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007324/* confdefs.h. */
7325_ACEOF
7326cat confdefs.h >>conftest.$ac_ext
7327cat >>conftest.$ac_ext <<_ACEOF
7328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007329$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007330int
7331main ()
7332{
7333static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7334test_array [0] = 0
7335
7336 ;
7337 return 0;
7338}
7339_ACEOF
7340rm -f conftest.$ac_objext
7341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7342 (eval $ac_compile) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
7346 { ac_try='test -s conftest.$ac_objext'
7347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7348 (eval $ac_try) 2>&5
7349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7352 ac_hi=$ac_mid
7353else
7354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007355sed 's/^/| /' conftest.$ac_ext >&5
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357ac_lo=`expr '(' $ac_mid ')' + 1`
7358fi
7359rm -f conftest.$ac_objext conftest.$ac_ext
7360done
7361case $ac_lo in
7362?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007363'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7364See \`config.log' for more details." >&5
7365echo "$as_me: error: cannot compute sizeof (float), 77
7366See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007367 { (exit 1); exit 1; }; } ;;
7368esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007369else
7370 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007371 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7372See \`config.log' for more details." >&5
7373echo "$as_me: error: cannot run test program while cross compiling
7374See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007375 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007376else
Martin v. Löwis11437992002-04-12 09:54:03 +00007377 cat >conftest.$ac_ext <<_ACEOF
7378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007379/* confdefs.h. */
7380_ACEOF
7381cat confdefs.h >>conftest.$ac_ext
7382cat >>conftest.$ac_ext <<_ACEOF
7383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007384$ac_includes_default
7385long longval () { return (long) (sizeof (float)); }
7386unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007387#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007388#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007389int
7390main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007391{
Martin v. Löwis11437992002-04-12 09:54:03 +00007392
7393 FILE *f = fopen ("conftest.val", "w");
7394 if (! f)
7395 exit (1);
7396 if (((long) (sizeof (float))) < 0)
7397 {
7398 long i = longval ();
7399 if (i != ((long) (sizeof (float))))
7400 exit (1);
7401 fprintf (f, "%ld\n", i);
7402 }
7403 else
7404 {
7405 unsigned long i = ulongval ();
7406 if (i != ((long) (sizeof (float))))
7407 exit (1);
7408 fprintf (f, "%lu\n", i);
7409 }
7410 exit (ferror (f) || fclose (f) != 0);
7411
7412 ;
7413 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414}
Martin v. Löwis11437992002-04-12 09:54:03 +00007415_ACEOF
7416rm -f conftest$ac_exeext
7417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7418 (eval $ac_link) 2>&5
7419 ac_status=$?
7420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7423 (eval $ac_try) 2>&5
7424 ac_status=$?
7425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426 (exit $ac_status); }; }; then
7427 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007428else
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 echo "$as_me: program exited with status $ac_status" >&5
7430echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007431sed 's/^/| /' conftest.$ac_ext >&5
7432
Martin v. Löwis11437992002-04-12 09:54:03 +00007433( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007434{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7435See \`config.log' for more details." >&5
7436echo "$as_me: error: cannot compute sizeof (float), 77
7437See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007438 { (exit 1); exit 1; }; }
7439fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007440rm -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 +00007441fi
7442fi
7443rm -f conftest.val
7444else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445 ac_cv_sizeof_float=0
7446fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007448echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7449echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7450cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007451#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007452_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007453
7454
Martin v. Löwis11437992002-04-12 09:54:03 +00007455echo "$as_me:$LINENO: checking for double" >&5
7456echo $ECHO_N "checking for double... $ECHO_C" >&6
7457if test "${ac_cv_type_double+set}" = set; then
7458 echo $ECHO_N "(cached) $ECHO_C" >&6
7459else
7460 cat >conftest.$ac_ext <<_ACEOF
7461#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007462/* confdefs.h. */
7463_ACEOF
7464cat confdefs.h >>conftest.$ac_ext
7465cat >>conftest.$ac_ext <<_ACEOF
7466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007467$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007468int
7469main ()
7470{
7471if ((double *) 0)
7472 return 0;
7473if (sizeof (double))
7474 return 0;
7475 ;
7476 return 0;
7477}
7478_ACEOF
7479rm -f conftest.$ac_objext
7480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7481 (eval $ac_compile) 2>&5
7482 ac_status=$?
7483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7484 (exit $ac_status); } &&
7485 { ac_try='test -s conftest.$ac_objext'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; }; then
7491 ac_cv_type_double=yes
7492else
7493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007494sed 's/^/| /' conftest.$ac_ext >&5
7495
Martin v. Löwis11437992002-04-12 09:54:03 +00007496ac_cv_type_double=no
7497fi
7498rm -f conftest.$ac_objext conftest.$ac_ext
7499fi
7500echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7501echo "${ECHO_T}$ac_cv_type_double" >&6
7502
7503echo "$as_me:$LINENO: checking size of double" >&5
7504echo $ECHO_N "checking size of double... $ECHO_C" >&6
7505if test "${ac_cv_sizeof_double+set}" = set; then
7506 echo $ECHO_N "(cached) $ECHO_C" >&6
7507else
7508 if test "$ac_cv_type_double" = yes; then
7509 # The cast to unsigned long works around a bug in the HP C Compiler
7510 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7511 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7512 # This bug is HP SR number 8606223364.
7513 if test "$cross_compiling" = yes; then
7514 # Depending upon the size, compute the lo and hi bounds.
7515cat >conftest.$ac_ext <<_ACEOF
7516#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007517/* confdefs.h. */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007522$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007523int
7524main ()
7525{
7526static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7527test_array [0] = 0
7528
7529 ;
7530 return 0;
7531}
7532_ACEOF
7533rm -f conftest.$ac_objext
7534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7535 (eval $ac_compile) 2>&5
7536 ac_status=$?
7537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7538 (exit $ac_status); } &&
7539 { ac_try='test -s conftest.$ac_objext'
7540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7541 (eval $ac_try) 2>&5
7542 ac_status=$?
7543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7544 (exit $ac_status); }; }; then
7545 ac_lo=0 ac_mid=0
7546 while :; do
7547 cat >conftest.$ac_ext <<_ACEOF
7548#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007549/* confdefs.h. */
7550_ACEOF
7551cat confdefs.h >>conftest.$ac_ext
7552cat >>conftest.$ac_ext <<_ACEOF
7553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007554$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007555int
7556main ()
7557{
7558static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7559test_array [0] = 0
7560
7561 ;
7562 return 0;
7563}
7564_ACEOF
7565rm -f conftest.$ac_objext
7566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); } &&
7571 { ac_try='test -s conftest.$ac_objext'
7572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); }; }; then
7577 ac_hi=$ac_mid; break
7578else
7579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007580sed 's/^/| /' conftest.$ac_ext >&5
7581
Martin v. Löwis11437992002-04-12 09:54:03 +00007582ac_lo=`expr $ac_mid + 1`
7583 if test $ac_lo -le $ac_mid; then
7584 ac_lo= ac_hi=
7585 break
7586 fi
7587 ac_mid=`expr 2 '*' $ac_mid + 1`
7588fi
7589rm -f conftest.$ac_objext conftest.$ac_ext
7590 done
7591else
7592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007593sed 's/^/| /' conftest.$ac_ext >&5
7594
Martin v. Löwis11437992002-04-12 09:54:03 +00007595cat >conftest.$ac_ext <<_ACEOF
7596#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007597/* confdefs.h. */
7598_ACEOF
7599cat confdefs.h >>conftest.$ac_ext
7600cat >>conftest.$ac_ext <<_ACEOF
7601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007602$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007603int
7604main ()
7605{
7606static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7607test_array [0] = 0
7608
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613rm -f conftest.$ac_objext
7614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7625 ac_hi=-1 ac_mid=-1
7626 while :; do
7627 cat >conftest.$ac_ext <<_ACEOF
7628#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007629/* confdefs.h. */
7630_ACEOF
7631cat confdefs.h >>conftest.$ac_ext
7632cat >>conftest.$ac_ext <<_ACEOF
7633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007634$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007635int
7636main ()
7637{
7638static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7639test_array [0] = 0
7640
7641 ;
7642 return 0;
7643}
7644_ACEOF
7645rm -f conftest.$ac_objext
7646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7647 (eval $ac_compile) 2>&5
7648 ac_status=$?
7649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7650 (exit $ac_status); } &&
7651 { ac_try='test -s conftest.$ac_objext'
7652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7653 (eval $ac_try) 2>&5
7654 ac_status=$?
7655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7656 (exit $ac_status); }; }; then
7657 ac_lo=$ac_mid; break
7658else
7659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007660sed 's/^/| /' conftest.$ac_ext >&5
7661
Martin v. Löwis11437992002-04-12 09:54:03 +00007662ac_hi=`expr '(' $ac_mid ')' - 1`
7663 if test $ac_mid -le $ac_hi; then
7664 ac_lo= ac_hi=
7665 break
7666 fi
7667 ac_mid=`expr 2 '*' $ac_mid`
7668fi
7669rm -f conftest.$ac_objext conftest.$ac_ext
7670 done
7671else
7672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007673sed 's/^/| /' conftest.$ac_ext >&5
7674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675ac_lo= ac_hi=
7676fi
7677rm -f conftest.$ac_objext conftest.$ac_ext
7678fi
7679rm -f conftest.$ac_objext conftest.$ac_ext
7680# Binary search between lo and hi bounds.
7681while test "x$ac_lo" != "x$ac_hi"; do
7682 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7683 cat >conftest.$ac_ext <<_ACEOF
7684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007685/* confdefs.h. */
7686_ACEOF
7687cat confdefs.h >>conftest.$ac_ext
7688cat >>conftest.$ac_ext <<_ACEOF
7689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007691int
7692main ()
7693{
7694static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7695test_array [0] = 0
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
7702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7703 (eval $ac_compile) 2>&5
7704 ac_status=$?
7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706 (exit $ac_status); } &&
7707 { ac_try='test -s conftest.$ac_objext'
7708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7709 (eval $ac_try) 2>&5
7710 ac_status=$?
7711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712 (exit $ac_status); }; }; then
7713 ac_hi=$ac_mid
7714else
7715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007716sed 's/^/| /' conftest.$ac_ext >&5
7717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718ac_lo=`expr '(' $ac_mid ')' + 1`
7719fi
7720rm -f conftest.$ac_objext conftest.$ac_ext
7721done
7722case $ac_lo in
7723?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007724'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7725See \`config.log' for more details." >&5
7726echo "$as_me: error: cannot compute sizeof (double), 77
7727See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 { (exit 1); exit 1; }; } ;;
7729esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007730else
7731 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007732 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7733See \`config.log' for more details." >&5
7734echo "$as_me: error: cannot run test program while cross compiling
7735See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007737else
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 cat >conftest.$ac_ext <<_ACEOF
7739#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007740/* confdefs.h. */
7741_ACEOF
7742cat confdefs.h >>conftest.$ac_ext
7743cat >>conftest.$ac_ext <<_ACEOF
7744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745$ac_includes_default
7746long longval () { return (long) (sizeof (double)); }
7747unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007748#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007749#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007750int
7751main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007752{
Martin v. Löwis11437992002-04-12 09:54:03 +00007753
7754 FILE *f = fopen ("conftest.val", "w");
7755 if (! f)
7756 exit (1);
7757 if (((long) (sizeof (double))) < 0)
7758 {
7759 long i = longval ();
7760 if (i != ((long) (sizeof (double))))
7761 exit (1);
7762 fprintf (f, "%ld\n", i);
7763 }
7764 else
7765 {
7766 unsigned long i = ulongval ();
7767 if (i != ((long) (sizeof (double))))
7768 exit (1);
7769 fprintf (f, "%lu\n", i);
7770 }
7771 exit (ferror (f) || fclose (f) != 0);
7772
7773 ;
7774 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007775}
Martin v. Löwis11437992002-04-12 09:54:03 +00007776_ACEOF
7777rm -f conftest$ac_exeext
7778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7779 (eval $ac_link) 2>&5
7780 ac_status=$?
7781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7784 (eval $ac_try) 2>&5
7785 ac_status=$?
7786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7787 (exit $ac_status); }; }; then
7788 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007789else
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 echo "$as_me: program exited with status $ac_status" >&5
7791echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007792sed 's/^/| /' conftest.$ac_ext >&5
7793
Martin v. Löwis11437992002-04-12 09:54:03 +00007794( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007795{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7796See \`config.log' for more details." >&5
7797echo "$as_me: error: cannot compute sizeof (double), 77
7798See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 { (exit 1); exit 1; }; }
7800fi
Skip Montanaro6dead952003-09-25 14:50:04 +00007801rm -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 +00007802fi
7803fi
7804rm -f conftest.val
7805else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806 ac_cv_sizeof_double=0
7807fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007809echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7810echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7811cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007812#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007813_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007814
7815
Martin v. Löwis11437992002-04-12 09:54:03 +00007816echo "$as_me:$LINENO: checking for fpos_t" >&5
7817echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7818if test "${ac_cv_type_fpos_t+set}" = set; then
7819 echo $ECHO_N "(cached) $ECHO_C" >&6
7820else
7821 cat >conftest.$ac_ext <<_ACEOF
7822#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007823/* confdefs.h. */
7824_ACEOF
7825cat confdefs.h >>conftest.$ac_ext
7826cat >>conftest.$ac_ext <<_ACEOF
7827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007829int
7830main ()
7831{
7832if ((fpos_t *) 0)
7833 return 0;
7834if (sizeof (fpos_t))
7835 return 0;
7836 ;
7837 return 0;
7838}
7839_ACEOF
7840rm -f conftest.$ac_objext
7841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7842 (eval $ac_compile) 2>&5
7843 ac_status=$?
7844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845 (exit $ac_status); } &&
7846 { ac_try='test -s conftest.$ac_objext'
7847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848 (eval $ac_try) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; }; then
7852 ac_cv_type_fpos_t=yes
7853else
7854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007855sed 's/^/| /' conftest.$ac_ext >&5
7856
Martin v. Löwis11437992002-04-12 09:54:03 +00007857ac_cv_type_fpos_t=no
7858fi
7859rm -f conftest.$ac_objext conftest.$ac_ext
7860fi
7861echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7862echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7863
7864echo "$as_me:$LINENO: checking size of fpos_t" >&5
7865echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7866if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7867 echo $ECHO_N "(cached) $ECHO_C" >&6
7868else
7869 if test "$ac_cv_type_fpos_t" = yes; then
7870 # The cast to unsigned long works around a bug in the HP C Compiler
7871 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7872 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7873 # This bug is HP SR number 8606223364.
7874 if test "$cross_compiling" = yes; then
7875 # Depending upon the size, compute the lo and hi bounds.
7876cat >conftest.$ac_ext <<_ACEOF
7877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007878/* confdefs.h. */
7879_ACEOF
7880cat confdefs.h >>conftest.$ac_ext
7881cat >>conftest.$ac_ext <<_ACEOF
7882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007883$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007884int
7885main ()
7886{
7887static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7888test_array [0] = 0
7889
7890 ;
7891 return 0;
7892}
7893_ACEOF
7894rm -f conftest.$ac_objext
7895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7896 (eval $ac_compile) 2>&5
7897 ac_status=$?
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); } &&
7900 { ac_try='test -s conftest.$ac_objext'
7901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7902 (eval $ac_try) 2>&5
7903 ac_status=$?
7904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7905 (exit $ac_status); }; }; then
7906 ac_lo=0 ac_mid=0
7907 while :; do
7908 cat >conftest.$ac_ext <<_ACEOF
7909#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* confdefs.h. */
7911_ACEOF
7912cat confdefs.h >>conftest.$ac_ext
7913cat >>conftest.$ac_ext <<_ACEOF
7914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007916int
7917main ()
7918{
7919static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7920test_array [0] = 0
7921
7922 ;
7923 return 0;
7924}
7925_ACEOF
7926rm -f conftest.$ac_objext
7927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7928 (eval $ac_compile) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); } &&
7932 { ac_try='test -s conftest.$ac_objext'
7933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7934 (eval $ac_try) 2>&5
7935 ac_status=$?
7936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937 (exit $ac_status); }; }; then
7938 ac_hi=$ac_mid; break
7939else
7940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007941sed 's/^/| /' conftest.$ac_ext >&5
7942
Martin v. Löwis11437992002-04-12 09:54:03 +00007943ac_lo=`expr $ac_mid + 1`
7944 if test $ac_lo -le $ac_mid; then
7945 ac_lo= ac_hi=
7946 break
7947 fi
7948 ac_mid=`expr 2 '*' $ac_mid + 1`
7949fi
7950rm -f conftest.$ac_objext conftest.$ac_ext
7951 done
7952else
7953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007954sed 's/^/| /' conftest.$ac_ext >&5
7955
Martin v. Löwis11437992002-04-12 09:54:03 +00007956cat >conftest.$ac_ext <<_ACEOF
7957#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* confdefs.h. */
7959_ACEOF
7960cat confdefs.h >>conftest.$ac_ext
7961cat >>conftest.$ac_ext <<_ACEOF
7962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
7967static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
7975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7976 (eval $ac_compile) 2>&5
7977 ac_status=$?
7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979 (exit $ac_status); } &&
7980 { ac_try='test -s conftest.$ac_objext'
7981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7982 (eval $ac_try) 2>&5
7983 ac_status=$?
7984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7985 (exit $ac_status); }; }; then
7986 ac_hi=-1 ac_mid=-1
7987 while :; do
7988 cat >conftest.$ac_ext <<_ACEOF
7989#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007990/* confdefs.h. */
7991_ACEOF
7992cat confdefs.h >>conftest.$ac_ext
7993cat >>conftest.$ac_ext <<_ACEOF
7994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007995$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007996int
7997main ()
7998{
7999static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8000test_array [0] = 0
8001
8002 ;
8003 return 0;
8004}
8005_ACEOF
8006rm -f conftest.$ac_objext
8007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8008 (eval $ac_compile) 2>&5
8009 ac_status=$?
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); } &&
8012 { ac_try='test -s conftest.$ac_objext'
8013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8014 (eval $ac_try) 2>&5
8015 ac_status=$?
8016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8017 (exit $ac_status); }; }; then
8018 ac_lo=$ac_mid; break
8019else
8020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008021sed 's/^/| /' conftest.$ac_ext >&5
8022
Martin v. Löwis11437992002-04-12 09:54:03 +00008023ac_hi=`expr '(' $ac_mid ')' - 1`
8024 if test $ac_mid -le $ac_hi; then
8025 ac_lo= ac_hi=
8026 break
8027 fi
8028 ac_mid=`expr 2 '*' $ac_mid`
8029fi
8030rm -f conftest.$ac_objext conftest.$ac_ext
8031 done
8032else
8033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008034sed 's/^/| /' conftest.$ac_ext >&5
8035
Martin v. Löwis11437992002-04-12 09:54:03 +00008036ac_lo= ac_hi=
8037fi
8038rm -f conftest.$ac_objext conftest.$ac_ext
8039fi
8040rm -f conftest.$ac_objext conftest.$ac_ext
8041# Binary search between lo and hi bounds.
8042while test "x$ac_lo" != "x$ac_hi"; do
8043 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8044 cat >conftest.$ac_ext <<_ACEOF
8045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008046/* confdefs.h. */
8047_ACEOF
8048cat confdefs.h >>conftest.$ac_ext
8049cat >>conftest.$ac_ext <<_ACEOF
8050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008051$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008052int
8053main ()
8054{
8055static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8056test_array [0] = 0
8057
8058 ;
8059 return 0;
8060}
8061_ACEOF
8062rm -f conftest.$ac_objext
8063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8064 (eval $ac_compile) 2>&5
8065 ac_status=$?
8066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8067 (exit $ac_status); } &&
8068 { ac_try='test -s conftest.$ac_objext'
8069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8070 (eval $ac_try) 2>&5
8071 ac_status=$?
8072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073 (exit $ac_status); }; }; then
8074 ac_hi=$ac_mid
8075else
8076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008077sed 's/^/| /' conftest.$ac_ext >&5
8078
Martin v. Löwis11437992002-04-12 09:54:03 +00008079ac_lo=`expr '(' $ac_mid ')' + 1`
8080fi
8081rm -f conftest.$ac_objext conftest.$ac_ext
8082done
8083case $ac_lo in
8084?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008085'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8086See \`config.log' for more details." >&5
8087echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8088See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 { (exit 1); exit 1; }; } ;;
8090esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008091else
8092 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008093 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8094See \`config.log' for more details." >&5
8095echo "$as_me: error: cannot run test program while cross compiling
8096See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008098else
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 cat >conftest.$ac_ext <<_ACEOF
8100#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008101/* confdefs.h. */
8102_ACEOF
8103cat confdefs.h >>conftest.$ac_ext
8104cat >>conftest.$ac_ext <<_ACEOF
8105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008106$ac_includes_default
8107long longval () { return (long) (sizeof (fpos_t)); }
8108unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008109#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008113{
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
8115 FILE *f = fopen ("conftest.val", "w");
8116 if (! f)
8117 exit (1);
8118 if (((long) (sizeof (fpos_t))) < 0)
8119 {
8120 long i = longval ();
8121 if (i != ((long) (sizeof (fpos_t))))
8122 exit (1);
8123 fprintf (f, "%ld\n", i);
8124 }
8125 else
8126 {
8127 unsigned long i = ulongval ();
8128 if (i != ((long) (sizeof (fpos_t))))
8129 exit (1);
8130 fprintf (f, "%lu\n", i);
8131 }
8132 exit (ferror (f) || fclose (f) != 0);
8133
8134 ;
8135 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008136}
Martin v. Löwis11437992002-04-12 09:54:03 +00008137_ACEOF
8138rm -f conftest$ac_exeext
8139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8140 (eval $ac_link) 2>&5
8141 ac_status=$?
8142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145 (eval $ac_try) 2>&5
8146 ac_status=$?
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); }; }; then
8149 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008150else
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 echo "$as_me: program exited with status $ac_status" >&5
8152echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008153sed 's/^/| /' conftest.$ac_ext >&5
8154
Martin v. Löwis11437992002-04-12 09:54:03 +00008155( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008156{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8157See \`config.log' for more details." >&5
8158echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8159See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 { (exit 1); exit 1; }; }
8161fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008162rm -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 +00008163fi
8164fi
8165rm -f conftest.val
8166else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008167 ac_cv_sizeof_fpos_t=0
8168fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008170echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8171echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8172cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008173#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008174_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008175
Michael W. Hudson54241132001-12-07 15:38:26 +00008176
8177
Martin v. Löwis11437992002-04-12 09:54:03 +00008178echo "$as_me:$LINENO: checking for long long support" >&5
8179echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008180have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008181cat >conftest.$ac_ext <<_ACEOF
8182#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008183/* confdefs.h. */
8184_ACEOF
8185cat confdefs.h >>conftest.$ac_ext
8186cat >>conftest.$ac_ext <<_ACEOF
8187/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008188
Martin v. Löwis11437992002-04-12 09:54:03 +00008189int
8190main ()
8191{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008192long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 ;
8194 return 0;
8195}
8196_ACEOF
8197rm -f conftest.$ac_objext
8198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8199 (eval $ac_compile) 2>&5
8200 ac_status=$?
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); } &&
8203 { ac_try='test -s conftest.$ac_objext'
8204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205 (eval $ac_try) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); }; }; then
8209
8210
8211cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008212#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008213_ACEOF
8214
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008215 have_long_long=yes
8216
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008217else
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008219sed 's/^/| /' conftest.$ac_ext >&5
8220
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008222rm -f conftest.$ac_objext conftest.$ac_ext
8223echo "$as_me:$LINENO: result: $have_long_long" >&5
8224echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008225if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008226echo "$as_me:$LINENO: checking for long long" >&5
8227echo $ECHO_N "checking for long long... $ECHO_C" >&6
8228if test "${ac_cv_type_long_long+set}" = set; then
8229 echo $ECHO_N "(cached) $ECHO_C" >&6
8230else
8231 cat >conftest.$ac_ext <<_ACEOF
8232#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008233/* confdefs.h. */
8234_ACEOF
8235cat confdefs.h >>conftest.$ac_ext
8236cat >>conftest.$ac_ext <<_ACEOF
8237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008238$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008239int
8240main ()
8241{
8242if ((long long *) 0)
8243 return 0;
8244if (sizeof (long long))
8245 return 0;
8246 ;
8247 return 0;
8248}
8249_ACEOF
8250rm -f conftest.$ac_objext
8251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8252 (eval $ac_compile) 2>&5
8253 ac_status=$?
8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255 (exit $ac_status); } &&
8256 { ac_try='test -s conftest.$ac_objext'
8257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8258 (eval $ac_try) 2>&5
8259 ac_status=$?
8260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261 (exit $ac_status); }; }; then
8262 ac_cv_type_long_long=yes
8263else
8264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008265sed 's/^/| /' conftest.$ac_ext >&5
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267ac_cv_type_long_long=no
8268fi
8269rm -f conftest.$ac_objext conftest.$ac_ext
8270fi
8271echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8272echo "${ECHO_T}$ac_cv_type_long_long" >&6
8273
8274echo "$as_me:$LINENO: checking size of long long" >&5
8275echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8276if test "${ac_cv_sizeof_long_long+set}" = set; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279 if test "$ac_cv_type_long_long" = yes; then
8280 # The cast to unsigned long works around a bug in the HP C Compiler
8281 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8282 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8283 # This bug is HP SR number 8606223364.
8284 if test "$cross_compiling" = yes; then
8285 # Depending upon the size, compute the lo and hi bounds.
8286cat >conftest.$ac_ext <<_ACEOF
8287#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008288/* confdefs.h. */
8289_ACEOF
8290cat confdefs.h >>conftest.$ac_ext
8291cat >>conftest.$ac_ext <<_ACEOF
8292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008293$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008294int
8295main ()
8296{
8297static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8298test_array [0] = 0
8299
8300 ;
8301 return 0;
8302}
8303_ACEOF
8304rm -f conftest.$ac_objext
8305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8306 (eval $ac_compile) 2>&5
8307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); } &&
8310 { ac_try='test -s conftest.$ac_objext'
8311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8312 (eval $ac_try) 2>&5
8313 ac_status=$?
8314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
8316 ac_lo=0 ac_mid=0
8317 while :; do
8318 cat >conftest.$ac_ext <<_ACEOF
8319#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008320/* confdefs.h. */
8321_ACEOF
8322cat confdefs.h >>conftest.$ac_ext
8323cat >>conftest.$ac_ext <<_ACEOF
8324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008325$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008326int
8327main ()
8328{
8329static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8330test_array [0] = 0
8331
8332 ;
8333 return 0;
8334}
8335_ACEOF
8336rm -f conftest.$ac_objext
8337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8338 (eval $ac_compile) 2>&5
8339 ac_status=$?
8340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341 (exit $ac_status); } &&
8342 { ac_try='test -s conftest.$ac_objext'
8343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8344 (eval $ac_try) 2>&5
8345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); }; }; then
8348 ac_hi=$ac_mid; break
8349else
8350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008351sed 's/^/| /' conftest.$ac_ext >&5
8352
Martin v. Löwis11437992002-04-12 09:54:03 +00008353ac_lo=`expr $ac_mid + 1`
8354 if test $ac_lo -le $ac_mid; then
8355 ac_lo= ac_hi=
8356 break
8357 fi
8358 ac_mid=`expr 2 '*' $ac_mid + 1`
8359fi
8360rm -f conftest.$ac_objext conftest.$ac_ext
8361 done
8362else
8363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008364sed 's/^/| /' conftest.$ac_ext >&5
8365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366cat >conftest.$ac_ext <<_ACEOF
8367#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008368/* confdefs.h. */
8369_ACEOF
8370cat confdefs.h >>conftest.$ac_ext
8371cat >>conftest.$ac_ext <<_ACEOF
8372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008373$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008374int
8375main ()
8376{
8377static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8378test_array [0] = 0
8379
8380 ;
8381 return 0;
8382}
8383_ACEOF
8384rm -f conftest.$ac_objext
8385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8386 (eval $ac_compile) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest.$ac_objext'
8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
8396 ac_hi=-1 ac_mid=-1
8397 while :; do
8398 cat >conftest.$ac_ext <<_ACEOF
8399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* confdefs.h. */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008405$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008406int
8407main ()
8408{
8409static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8410test_array [0] = 0
8411
8412 ;
8413 return 0;
8414}
8415_ACEOF
8416rm -f conftest.$ac_objext
8417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8418 (eval $ac_compile) 2>&5
8419 ac_status=$?
8420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8421 (exit $ac_status); } &&
8422 { ac_try='test -s conftest.$ac_objext'
8423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8424 (eval $ac_try) 2>&5
8425 ac_status=$?
8426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8427 (exit $ac_status); }; }; then
8428 ac_lo=$ac_mid; break
8429else
8430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008431sed 's/^/| /' conftest.$ac_ext >&5
8432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433ac_hi=`expr '(' $ac_mid ')' - 1`
8434 if test $ac_mid -le $ac_hi; then
8435 ac_lo= ac_hi=
8436 break
8437 fi
8438 ac_mid=`expr 2 '*' $ac_mid`
8439fi
8440rm -f conftest.$ac_objext conftest.$ac_ext
8441 done
8442else
8443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008444sed 's/^/| /' conftest.$ac_ext >&5
8445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446ac_lo= ac_hi=
8447fi
8448rm -f conftest.$ac_objext conftest.$ac_ext
8449fi
8450rm -f conftest.$ac_objext conftest.$ac_ext
8451# Binary search between lo and hi bounds.
8452while test "x$ac_lo" != "x$ac_hi"; do
8453 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8454 cat >conftest.$ac_ext <<_ACEOF
8455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008456/* confdefs.h. */
8457_ACEOF
8458cat confdefs.h >>conftest.$ac_ext
8459cat >>conftest.$ac_ext <<_ACEOF
8460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008461$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
8465static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8466test_array [0] = 0
8467
8468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
8473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8474 (eval $ac_compile) 2>&5
8475 ac_status=$?
8476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8477 (exit $ac_status); } &&
8478 { ac_try='test -s conftest.$ac_objext'
8479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8480 (eval $ac_try) 2>&5
8481 ac_status=$?
8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483 (exit $ac_status); }; }; then
8484 ac_hi=$ac_mid
8485else
8486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008487sed 's/^/| /' conftest.$ac_ext >&5
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489ac_lo=`expr '(' $ac_mid ')' + 1`
8490fi
8491rm -f conftest.$ac_objext conftest.$ac_ext
8492done
8493case $ac_lo in
8494?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008495'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8496See \`config.log' for more details." >&5
8497echo "$as_me: error: cannot compute sizeof (long long), 77
8498See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 { (exit 1); exit 1; }; } ;;
8500esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008501else
8502 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008503 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8504See \`config.log' for more details." >&5
8505echo "$as_me: error: cannot run test program while cross compiling
8506See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008508else
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 cat >conftest.$ac_ext <<_ACEOF
8510#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008511/* confdefs.h. */
8512_ACEOF
8513cat confdefs.h >>conftest.$ac_ext
8514cat >>conftest.$ac_ext <<_ACEOF
8515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008516$ac_includes_default
8517long longval () { return (long) (sizeof (long long)); }
8518unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008519#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008520#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008521int
8522main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008523{
Martin v. Löwis11437992002-04-12 09:54:03 +00008524
8525 FILE *f = fopen ("conftest.val", "w");
8526 if (! f)
8527 exit (1);
8528 if (((long) (sizeof (long long))) < 0)
8529 {
8530 long i = longval ();
8531 if (i != ((long) (sizeof (long long))))
8532 exit (1);
8533 fprintf (f, "%ld\n", i);
8534 }
8535 else
8536 {
8537 unsigned long i = ulongval ();
8538 if (i != ((long) (sizeof (long long))))
8539 exit (1);
8540 fprintf (f, "%lu\n", i);
8541 }
8542 exit (ferror (f) || fclose (f) != 0);
8543
8544 ;
8545 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008546}
Martin v. Löwis11437992002-04-12 09:54:03 +00008547_ACEOF
8548rm -f conftest$ac_exeext
8549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8550 (eval $ac_link) 2>&5
8551 ac_status=$?
8552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8555 (eval $ac_try) 2>&5
8556 ac_status=$?
8557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8558 (exit $ac_status); }; }; then
8559 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008560else
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 echo "$as_me: program exited with status $ac_status" >&5
8562echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008563sed 's/^/| /' conftest.$ac_ext >&5
8564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008566{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8567See \`config.log' for more details." >&5
8568echo "$as_me: error: cannot compute sizeof (long long), 77
8569See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 { (exit 1); exit 1; }; }
8571fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008572rm -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 +00008573fi
8574fi
8575rm -f conftest.val
8576else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577 ac_cv_sizeof_long_long=0
8578fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008580echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8581echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8582cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008583#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008584_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008585
Michael W. Hudson54241132001-12-07 15:38:26 +00008586
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008587fi
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8590echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008591have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008592cat >conftest.$ac_ext <<_ACEOF
8593#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* confdefs.h. */
8595_ACEOF
8596cat confdefs.h >>conftest.$ac_ext
8597cat >>conftest.$ac_ext <<_ACEOF
8598/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600int
8601main ()
8602{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008603uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ;
8605 return 0;
8606}
8607_ACEOF
8608rm -f conftest.$ac_objext
8609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8610 (eval $ac_compile) 2>&5
8611 ac_status=$?
8612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613 (exit $ac_status); } &&
8614 { ac_try='test -s conftest.$ac_objext'
8615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8616 (eval $ac_try) 2>&5
8617 ac_status=$?
8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619 (exit $ac_status); }; }; then
8620
8621
8622cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008623#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008624_ACEOF
8625
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008626 have_uintptr_t=yes
8627
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008628else
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008630sed 's/^/| /' conftest.$ac_ext >&5
8631
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008633rm -f conftest.$ac_objext conftest.$ac_ext
8634echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8635echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008636if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008637echo "$as_me:$LINENO: checking for uintptr_t" >&5
8638echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8639if test "${ac_cv_type_uintptr_t+set}" = set; then
8640 echo $ECHO_N "(cached) $ECHO_C" >&6
8641else
8642 cat >conftest.$ac_ext <<_ACEOF
8643#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008644/* confdefs.h. */
8645_ACEOF
8646cat confdefs.h >>conftest.$ac_ext
8647cat >>conftest.$ac_ext <<_ACEOF
8648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008649$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008650int
8651main ()
8652{
8653if ((uintptr_t *) 0)
8654 return 0;
8655if (sizeof (uintptr_t))
8656 return 0;
8657 ;
8658 return 0;
8659}
8660_ACEOF
8661rm -f conftest.$ac_objext
8662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8663 (eval $ac_compile) 2>&5
8664 ac_status=$?
8665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8666 (exit $ac_status); } &&
8667 { ac_try='test -s conftest.$ac_objext'
8668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8669 (eval $ac_try) 2>&5
8670 ac_status=$?
8671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8672 (exit $ac_status); }; }; then
8673 ac_cv_type_uintptr_t=yes
8674else
8675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008676sed 's/^/| /' conftest.$ac_ext >&5
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678ac_cv_type_uintptr_t=no
8679fi
8680rm -f conftest.$ac_objext conftest.$ac_ext
8681fi
8682echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8683echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8684
8685echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8686echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8687if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8688 echo $ECHO_N "(cached) $ECHO_C" >&6
8689else
8690 if test "$ac_cv_type_uintptr_t" = yes; then
8691 # The cast to unsigned long works around a bug in the HP C Compiler
8692 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8693 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8694 # This bug is HP SR number 8606223364.
8695 if test "$cross_compiling" = yes; then
8696 # Depending upon the size, compute the lo and hi bounds.
8697cat >conftest.$ac_ext <<_ACEOF
8698#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008699/* confdefs.h. */
8700_ACEOF
8701cat confdefs.h >>conftest.$ac_ext
8702cat >>conftest.$ac_ext <<_ACEOF
8703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008704$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008705int
8706main ()
8707{
8708static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8709test_array [0] = 0
8710
8711 ;
8712 return 0;
8713}
8714_ACEOF
8715rm -f conftest.$ac_objext
8716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8717 (eval $ac_compile) 2>&5
8718 ac_status=$?
8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720 (exit $ac_status); } &&
8721 { ac_try='test -s conftest.$ac_objext'
8722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8723 (eval $ac_try) 2>&5
8724 ac_status=$?
8725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8726 (exit $ac_status); }; }; then
8727 ac_lo=0 ac_mid=0
8728 while :; do
8729 cat >conftest.$ac_ext <<_ACEOF
8730#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008731/* confdefs.h. */
8732_ACEOF
8733cat confdefs.h >>conftest.$ac_ext
8734cat >>conftest.$ac_ext <<_ACEOF
8735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008736$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008737int
8738main ()
8739{
8740static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8741test_array [0] = 0
8742
8743 ;
8744 return 0;
8745}
8746_ACEOF
8747rm -f conftest.$ac_objext
8748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8749 (eval $ac_compile) 2>&5
8750 ac_status=$?
8751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8752 (exit $ac_status); } &&
8753 { ac_try='test -s conftest.$ac_objext'
8754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8755 (eval $ac_try) 2>&5
8756 ac_status=$?
8757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8758 (exit $ac_status); }; }; then
8759 ac_hi=$ac_mid; break
8760else
8761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008762sed 's/^/| /' conftest.$ac_ext >&5
8763
Martin v. Löwis11437992002-04-12 09:54:03 +00008764ac_lo=`expr $ac_mid + 1`
8765 if test $ac_lo -le $ac_mid; then
8766 ac_lo= ac_hi=
8767 break
8768 fi
8769 ac_mid=`expr 2 '*' $ac_mid + 1`
8770fi
8771rm -f conftest.$ac_objext conftest.$ac_ext
8772 done
8773else
8774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008775sed 's/^/| /' conftest.$ac_ext >&5
8776
Martin v. Löwis11437992002-04-12 09:54:03 +00008777cat >conftest.$ac_ext <<_ACEOF
8778#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008779/* confdefs.h. */
8780_ACEOF
8781cat confdefs.h >>conftest.$ac_ext
8782cat >>conftest.$ac_ext <<_ACEOF
8783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008784$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008785int
8786main ()
8787{
8788static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8789test_array [0] = 0
8790
8791 ;
8792 return 0;
8793}
8794_ACEOF
8795rm -f conftest.$ac_objext
8796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8797 (eval $ac_compile) 2>&5
8798 ac_status=$?
8799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800 (exit $ac_status); } &&
8801 { ac_try='test -s conftest.$ac_objext'
8802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8803 (eval $ac_try) 2>&5
8804 ac_status=$?
8805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8806 (exit $ac_status); }; }; then
8807 ac_hi=-1 ac_mid=-1
8808 while :; do
8809 cat >conftest.$ac_ext <<_ACEOF
8810#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008811/* confdefs.h. */
8812_ACEOF
8813cat confdefs.h >>conftest.$ac_ext
8814cat >>conftest.$ac_ext <<_ACEOF
8815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008816$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008817int
8818main ()
8819{
8820static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8821test_array [0] = 0
8822
8823 ;
8824 return 0;
8825}
8826_ACEOF
8827rm -f conftest.$ac_objext
8828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8829 (eval $ac_compile) 2>&5
8830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); } &&
8833 { ac_try='test -s conftest.$ac_objext'
8834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8835 (eval $ac_try) 2>&5
8836 ac_status=$?
8837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8838 (exit $ac_status); }; }; then
8839 ac_lo=$ac_mid; break
8840else
8841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008842sed 's/^/| /' conftest.$ac_ext >&5
8843
Martin v. Löwis11437992002-04-12 09:54:03 +00008844ac_hi=`expr '(' $ac_mid ')' - 1`
8845 if test $ac_mid -le $ac_hi; then
8846 ac_lo= ac_hi=
8847 break
8848 fi
8849 ac_mid=`expr 2 '*' $ac_mid`
8850fi
8851rm -f conftest.$ac_objext conftest.$ac_ext
8852 done
8853else
8854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008855sed 's/^/| /' conftest.$ac_ext >&5
8856
Martin v. Löwis11437992002-04-12 09:54:03 +00008857ac_lo= ac_hi=
8858fi
8859rm -f conftest.$ac_objext conftest.$ac_ext
8860fi
8861rm -f conftest.$ac_objext conftest.$ac_ext
8862# Binary search between lo and hi bounds.
8863while test "x$ac_lo" != "x$ac_hi"; do
8864 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8865 cat >conftest.$ac_ext <<_ACEOF
8866#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* confdefs.h. */
8868_ACEOF
8869cat confdefs.h >>conftest.$ac_ext
8870cat >>conftest.$ac_ext <<_ACEOF
8871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008872$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
8876static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8877test_array [0] = 0
8878
8879 ;
8880 return 0;
8881}
8882_ACEOF
8883rm -f conftest.$ac_objext
8884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8885 (eval $ac_compile) 2>&5
8886 ac_status=$?
8887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8888 (exit $ac_status); } &&
8889 { ac_try='test -s conftest.$ac_objext'
8890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8891 (eval $ac_try) 2>&5
8892 ac_status=$?
8893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894 (exit $ac_status); }; }; then
8895 ac_hi=$ac_mid
8896else
8897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008898sed 's/^/| /' conftest.$ac_ext >&5
8899
Martin v. Löwis11437992002-04-12 09:54:03 +00008900ac_lo=`expr '(' $ac_mid ')' + 1`
8901fi
8902rm -f conftest.$ac_objext conftest.$ac_ext
8903done
8904case $ac_lo in
8905?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008906'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8907See \`config.log' for more details." >&5
8908echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8909See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 { (exit 1); exit 1; }; } ;;
8911esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008912else
8913 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008914 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8915See \`config.log' for more details." >&5
8916echo "$as_me: error: cannot run test program while cross compiling
8917See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008919else
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 cat >conftest.$ac_ext <<_ACEOF
8921#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
8928long longval () { return (long) (sizeof (uintptr_t)); }
8929unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008930#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008931#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008934{
Martin v. Löwis11437992002-04-12 09:54:03 +00008935
8936 FILE *f = fopen ("conftest.val", "w");
8937 if (! f)
8938 exit (1);
8939 if (((long) (sizeof (uintptr_t))) < 0)
8940 {
8941 long i = longval ();
8942 if (i != ((long) (sizeof (uintptr_t))))
8943 exit (1);
8944 fprintf (f, "%ld\n", i);
8945 }
8946 else
8947 {
8948 unsigned long i = ulongval ();
8949 if (i != ((long) (sizeof (uintptr_t))))
8950 exit (1);
8951 fprintf (f, "%lu\n", i);
8952 }
8953 exit (ferror (f) || fclose (f) != 0);
8954
8955 ;
8956 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008957}
Martin v. Löwis11437992002-04-12 09:54:03 +00008958_ACEOF
8959rm -f conftest$ac_exeext
8960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8961 (eval $ac_link) 2>&5
8962 ac_status=$?
8963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8966 (eval $ac_try) 2>&5
8967 ac_status=$?
8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969 (exit $ac_status); }; }; then
8970 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008971else
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 echo "$as_me: program exited with status $ac_status" >&5
8973echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Martin v. Löwis11437992002-04-12 09:54:03 +00008976( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008977{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8978See \`config.log' for more details." >&5
8979echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8980See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 { (exit 1); exit 1; }; }
8982fi
Skip Montanaro6dead952003-09-25 14:50:04 +00008983rm -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 +00008984fi
8985fi
8986rm -f conftest.val
8987else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008988 ac_cv_sizeof_uintptr_t=0
8989fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008990fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008991echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8992echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8993cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008994#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008995_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008996
Michael W. Hudson54241132001-12-07 15:38:26 +00008997
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008998fi
8999
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009000# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009001echo "$as_me:$LINENO: checking size of off_t" >&5
9002echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9003if test "${ac_cv_sizeof_off_t+set}" = set; then
9004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009005else
9006 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009007 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008else
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 cat >conftest.$ac_ext <<_ACEOF
9010#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* confdefs.h. */
9012_ACEOF
9013cat confdefs.h >>conftest.$ac_ext
9014cat >>conftest.$ac_ext <<_ACEOF
9015/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009016#include <stdio.h>
9017#include <sys/types.h>
9018main()
9019{
9020 FILE *f=fopen("conftestval", "w");
9021 if (!f) exit(1);
9022 fprintf(f, "%d\n", sizeof(off_t));
9023 exit(0);
9024}
Martin v. Löwis11437992002-04-12 09:54:03 +00009025_ACEOF
9026rm -f conftest$ac_exeext
9027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9028 (eval $ac_link) 2>&5
9029 ac_status=$?
9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009037 ac_cv_sizeof_off_t=`cat conftestval`
9038else
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 echo "$as_me: program exited with status $ac_status" >&5
9040echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009041sed 's/^/| /' conftest.$ac_ext >&5
9042
Martin v. Löwis11437992002-04-12 09:54:03 +00009043( exit $ac_status )
9044ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009045fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009046rm -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 +00009047fi
9048
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009049fi
9050
Martin v. Löwis11437992002-04-12 09:54:03 +00009051echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9052echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9053
9054cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009055#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009056_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009057
Michael W. Hudson54241132001-12-07 15:38:26 +00009058
Martin v. Löwis11437992002-04-12 09:54:03 +00009059echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9060echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009061if test "$have_long_long" = yes -a \
9062 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9063 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064
Martin v. Löwis11437992002-04-12 09:54:03 +00009065cat >>confdefs.h <<\_ACEOF
9066#define HAVE_LARGEFILE_SUPPORT 1
9067_ACEOF
9068
9069 echo "$as_me:$LINENO: result: yes" >&5
9070echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009071else
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 echo "$as_me:$LINENO: result: no" >&5
9073echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009074fi
9075
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009076# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009077echo "$as_me:$LINENO: checking size of time_t" >&5
9078echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9079if test "${ac_cv_sizeof_time_t+set}" = set; then
9080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009081else
9082 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009083 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009084else
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 cat >conftest.$ac_ext <<_ACEOF
9086#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009087/* confdefs.h. */
9088_ACEOF
9089cat confdefs.h >>conftest.$ac_ext
9090cat >>conftest.$ac_ext <<_ACEOF
9091/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009092#include <stdio.h>
9093#include <time.h>
9094main()
9095{
9096 FILE *f=fopen("conftestval", "w");
9097 if (!f) exit(1);
9098 fprintf(f, "%d\n", sizeof(time_t));
9099 exit(0);
9100}
Martin v. Löwis11437992002-04-12 09:54:03 +00009101_ACEOF
9102rm -f conftest$ac_exeext
9103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9104 (eval $ac_link) 2>&5
9105 ac_status=$?
9106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9109 (eval $ac_try) 2>&5
9110 ac_status=$?
9111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9112 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009113 ac_cv_sizeof_time_t=`cat conftestval`
9114else
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 echo "$as_me: program exited with status $ac_status" >&5
9116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009117sed 's/^/| /' conftest.$ac_ext >&5
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119( exit $ac_status )
9120ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009121fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009122rm -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 +00009123fi
9124
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009125fi
9126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9128echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9129
9130cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009131#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009132_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009133
Michael W. Hudson54241132001-12-07 15:38:26 +00009134
9135
Trent Mick635f6fb2000-08-23 21:33:05 +00009136# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009137ac_save_cc="$CC"
9138if test "$ac_cv_kpthread" = "yes"
9139then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009140elif test "$ac_cv_kthread" = "yes"
9141then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009142elif test "$ac_cv_pthread" = "yes"
9143then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009145echo "$as_me:$LINENO: checking for pthread_t" >&5
9146echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009147have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009148cat >conftest.$ac_ext <<_ACEOF
9149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009155#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009156int
9157main ()
9158{
Guido van Rossum12580492000-09-24 16:47:19 +00009159pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ;
9161 return 0;
9162}
9163_ACEOF
9164rm -f conftest.$ac_objext
9165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9166 (eval $ac_compile) 2>&5
9167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); } &&
9170 { ac_try='test -s conftest.$ac_objext'
9171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9172 (eval $ac_try) 2>&5
9173 ac_status=$?
9174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009176 have_pthread_t=yes
9177else
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009179sed 's/^/| /' conftest.$ac_ext >&5
9180
Trent Mick635f6fb2000-08-23 21:33:05 +00009181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009182rm -f conftest.$ac_objext conftest.$ac_ext
9183echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9184echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009185if test "$have_pthread_t" = yes ; then
9186 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9188echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9189 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9190 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009191else
9192 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009193 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009194else
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 cat >conftest.$ac_ext <<_ACEOF
9196#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* confdefs.h. */
9198_ACEOF
9199cat confdefs.h >>conftest.$ac_ext
9200cat >>conftest.$ac_ext <<_ACEOF
9201/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009202#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009203#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009204 main()
9205 {
9206 FILE *f=fopen("conftestval", "w");
9207 if (!f) exit(1);
9208 fprintf(f, "%d\n", sizeof(pthread_t));
9209 exit(0);
9210 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009211_ACEOF
9212rm -f conftest$ac_exeext
9213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9214 (eval $ac_link) 2>&5
9215 ac_status=$?
9216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9219 (eval $ac_try) 2>&5
9220 ac_status=$?
9221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9222 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009223 ac_cv_sizeof_pthread_t=`cat conftestval`
9224else
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 echo "$as_me: program exited with status $ac_status" >&5
9226echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009227sed 's/^/| /' conftest.$ac_ext >&5
9228
Martin v. Löwis11437992002-04-12 09:54:03 +00009229( exit $ac_status )
9230ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009231fi
Skip Montanaro6dead952003-09-25 14:50:04 +00009232rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009233fi
9234
Trent Mick635f6fb2000-08-23 21:33:05 +00009235fi
9236
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9238echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9239
9240cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009241#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009242_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009243
9244fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009245CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009246
Martin v. Löwis11437992002-04-12 09:54:03 +00009247echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9248echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009249# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9250if test "${enable_toolbox_glue+set}" = set; then
9251 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009252
Martin v. Löwis11437992002-04-12 09:54:03 +00009253fi;
Jack Jansene578a632001-08-15 01:27:14 +00009254
9255if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009256then
Jack Jansene578a632001-08-15 01:27:14 +00009257 case $ac_sys_system/$ac_sys_release in
9258 Darwin/*)
9259 enable_toolbox_glue="yes";;
9260 *)
9261 enable_toolbox_glue="no";;
9262 esac
9263fi
9264case "$enable_toolbox_glue" in
9265yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009266 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009267 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009268 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009269
9270cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009271#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009273
9274 ;;
9275*)
9276 extra_frameworks=""
9277 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009278 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009279 ;;
9280esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009281echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9282echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009283
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284
9285case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009286 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009287 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009288 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009291 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009292 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009293 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009294 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296esac
9297
Martin v. Löwis11437992002-04-12 09:54:03 +00009298echo "$as_me:$LINENO: checking for --enable-framework" >&5
9299echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009300if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009301then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009302 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009304 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305
Martin v. Löwis11437992002-04-12 09:54:03 +00009306cat >>confdefs.h <<\_ACEOF
9307#define WITH_NEXT_FRAMEWORK 1
9308_ACEOF
9309
9310 echo "$as_me:$LINENO: result: yes" >&5
9311echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009312else
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 echo "$as_me:$LINENO: result: no" >&5
9314echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009315fi
9316
Martin v. Löwis11437992002-04-12 09:54:03 +00009317echo "$as_me:$LINENO: checking for dyld" >&5
9318echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009319case $ac_sys_system/$ac_sys_release in
9320 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009321
Martin v. Löwis11437992002-04-12 09:54:03 +00009322cat >>confdefs.h <<\_ACEOF
9323#define WITH_DYLD 1
9324_ACEOF
9325
9326 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9327echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009328 ;;
9329 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 echo "$as_me:$LINENO: result: no" >&5
9331echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009332 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009333esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336
Michael W. Hudson54241132001-12-07 15:38:26 +00009337
9338
9339
9340
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009342# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009343echo "$as_me:$LINENO: checking SO" >&5
9344echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009345if test -z "$SO"
9346then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009347 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009348 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009349 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009350 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009351 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009352else
9353 # this might also be a termcap variable, see #610332
9354 echo
9355 echo '====================================================================='
9356 echo '+ +'
9357 echo '+ WARNING: You have set SO in your environment. +'
9358 echo '+ Do you really mean to change the extension for shared libraries? +'
9359 echo '+ Continuing in 10 seconds to let you to ponder. +'
9360 echo '+ +'
9361 echo '====================================================================='
9362 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009364echo "$as_me:$LINENO: result: $SO" >&5
9365echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009366# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009367# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009368# (Shared libraries in this instance are shared modules to be loaded into
9369# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009370echo "$as_me:$LINENO: checking LDSHARED" >&5
9371echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372if test -z "$LDSHARED"
9373then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009374 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009375 AIX*)
9376 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009377 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009378 ;;
9379 BeOS*)
9380 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009381 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009382 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009383 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009384 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009385 SunOS/4*) LDSHARED="ld";;
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 \"*\"";;
9393 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009394 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009395 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9396 if test "$enable_framework" ; then
9397 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009398 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9399 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009400 else
9401 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009402 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009403 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009404 Darwin/*)
9405 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9406 if test "$enable_framework" ; then
9407 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009408 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9409 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009410 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009411 # No framework, use the Python app as bundle-loader
9412 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009413 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009414 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009415 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009416 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009417 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009418 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009419 then
9420 LDSHARED="cc -shared ${LDFLAGS}"
9421 else
9422 LDSHARED="ld -Bshareable ${LDFLAGS}"
9423 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009424 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009425 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009426 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009427 then LDSHARED='$(CC) -shared'
9428 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009429 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009430 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009431 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009432 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009433 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009434 *) LDSHARED="ld";;
9435 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009436fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009437echo "$as_me:$LINENO: result: $LDSHARED" >&5
9438echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009439BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009440# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009441# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009442echo "$as_me:$LINENO: checking CCSHARED" >&5
9443echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009444if test -z "$CCSHARED"
9445then
Guido van Rossum07397971997-04-29 21:49:50 +00009446 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009447 SunOS*) if test "$GCC" = yes;
9448 then CCSHARED="-fPIC";
9449 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009450 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009451 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009452 else CCSHARED="+z";
9453 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009454 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009455 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009456 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009457 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009458 if test "$GCC" = "yes"
9459 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009460 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009461 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009462 SCO_SV*)
9463 if test "$GCC" = "yes"
9464 then CCSHARED="-fPIC"
9465 else CCSHARED="-Kpic -belf"
9466 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009467 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009468 IRIX*/6*) case $CC in
9469 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009470 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009471 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009472 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009475echo "$as_me:$LINENO: result: $CCSHARED" >&5
9476echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009477# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009478# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009479echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9480echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009481if test -z "$LINKFORSHARED"
9482then
Guido van Rossum07397971997-04-29 21:49:50 +00009483 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009484 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009485 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009486 LINKFORSHARED="-Wl,-E -Wl,+s";;
9487# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009488 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009489 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009490 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009492 # -u __dummy makes the linker aware of the objc runtime
9493 # in System.framework; otherwise, __objcInit (referenced in
9494 # crt1.o) gets erroneously defined as common, which breaks dynamic
9495 # loading of any modules which reference it in System.framework.
9496 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9497 # not used by the core itself but which needs to be in the core so
9498 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009499 # -prebind is no longer used, because it actually seems to give a
9500 # slowdown in stead of a speedup, maybe due to the large number of
9501 # dynamic loads Python does.
9502 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009503 if test "$enable_framework"
9504 then
Jack Jansenc8607b72003-12-08 01:10:12 +00009505 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework Python"
Jack Jansene578a632001-08-15 01:27:14 +00009506 fi
9507 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009508 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009509 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009510 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009512 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9513 then
9514 LINKFORSHARED="-Wl,--export-dynamic"
9515 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009516 SunOS/5*) case $CC in
9517 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009518 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009519 then
9520 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009521 fi;;
9522 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009523 CYGWIN*)
9524 if test $enable_shared = "no"
9525 then
9526 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9527 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009528 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009530echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9531echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009532
Michael W. Hudson54241132001-12-07 15:38:26 +00009533
Martin v. Löwis11437992002-04-12 09:54:03 +00009534echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9535echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009536if test ! "$LIBRARY" = "$LDLIBRARY"
9537then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009538 case $ac_sys_system in
9539 CYGWIN*)
9540 # Cygwin needs CCSHARED when building extension DLLs
9541 # but not when building the interpreter DLL.
9542 CFLAGSFORSHARED='';;
9543 *)
9544 CFLAGSFORSHARED='$(CCSHARED)'
9545 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009547echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9548echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009549
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009550# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9551# library (with --enable-shared).
9552# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009553# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9554# if it is not required, since it creates a dependency of the shared library
9555# to LIBS. This, in turn, means that applications linking the shared libpython
9556# don't need to link LIBS explicitly. The default should be only changed
9557# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009558
9559echo "$as_me:$LINENO: checking SHLIBS" >&5
9560echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9561case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009562 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009563 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009564esac
9565echo "$as_me:$LINENO: result: $SHLIBS" >&5
9566echo "${ECHO_T}$SHLIBS" >&6
9567
9568
Guido van Rossum627b2d71993-12-24 10:39:16 +00009569# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009570
9571echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9572echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9573if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9574 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009575else
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009577LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009578cat >conftest.$ac_ext <<_ACEOF
9579#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009580/* confdefs.h. */
9581_ACEOF
9582cat confdefs.h >>conftest.$ac_ext
9583cat >>conftest.$ac_ext <<_ACEOF
9584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009585
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009586/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009587#ifdef __cplusplus
9588extern "C"
9589#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009590/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009591 builtin and then its argument prototype would still apply. */
9592char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009593int
9594main ()
9595{
9596dlopen ();
9597 ;
9598 return 0;
9599}
9600_ACEOF
9601rm -f conftest.$ac_objext conftest$ac_exeext
9602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9603 (eval $ac_link) 2>&5
9604 ac_status=$?
9605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9606 (exit $ac_status); } &&
9607 { ac_try='test -s conftest$ac_exeext'
9608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9609 (eval $ac_try) 2>&5
9610 ac_status=$?
9611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9612 (exit $ac_status); }; }; then
9613 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009614else
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009616sed 's/^/| /' conftest.$ac_ext >&5
9617
Martin v. Löwis11437992002-04-12 09:54:03 +00009618ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009620rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9621LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009623echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9624echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9625if test $ac_cv_lib_dl_dlopen = yes; then
9626 cat >>confdefs.h <<_ACEOF
9627#define HAVE_LIBDL 1
9628_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009629
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009630 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009632fi
9633 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009634
9635echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9636echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9637if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9638 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009639else
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009641LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009642cat >conftest.$ac_ext <<_ACEOF
9643#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* confdefs.h. */
9645_ACEOF
9646cat confdefs.h >>conftest.$ac_ext
9647cat >>conftest.$ac_ext <<_ACEOF
9648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009649
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009650/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651#ifdef __cplusplus
9652extern "C"
9653#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009654/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 builtin and then its argument prototype would still apply. */
9656char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009657int
9658main ()
9659{
9660shl_load ();
9661 ;
9662 return 0;
9663}
9664_ACEOF
9665rm -f conftest.$ac_objext conftest$ac_exeext
9666if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9667 (eval $ac_link) 2>&5
9668 ac_status=$?
9669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9670 (exit $ac_status); } &&
9671 { ac_try='test -s conftest$ac_exeext'
9672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9673 (eval $ac_try) 2>&5
9674 ac_status=$?
9675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676 (exit $ac_status); }; }; then
9677 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009678else
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009680sed 's/^/| /' conftest.$ac_ext >&5
9681
Martin v. Löwis11437992002-04-12 09:54:03 +00009682ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9685LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009686fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009687echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9688echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9689if test $ac_cv_lib_dld_shl_load = yes; then
9690 cat >>confdefs.h <<_ACEOF
9691#define HAVE_LIBDLD 1
9692_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009693
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009694 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009695
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009696fi
9697 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009698
9699# only check for sem_ini if thread support is requested
9700if test "$with_threads" = "yes" -o -z "$with_threads"; then
9701 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009702echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9703if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009705else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009706 ac_func_search_save_LIBS=$LIBS
9707ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009708cat >conftest.$ac_ext <<_ACEOF
9709#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009710/* confdefs.h. */
9711_ACEOF
9712cat confdefs.h >>conftest.$ac_ext
9713cat >>conftest.$ac_ext <<_ACEOF
9714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009715
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009716/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717#ifdef __cplusplus
9718extern "C"
9719#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009720/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 builtin and then its argument prototype would still apply. */
9722char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009723int
9724main ()
9725{
9726sem_init ();
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731rm -f conftest.$ac_objext conftest$ac_exeext
9732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9733 (eval $ac_link) 2>&5
9734 ac_status=$?
9735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9736 (exit $ac_status); } &&
9737 { ac_try='test -s conftest$ac_exeext'
9738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9739 (eval $ac_try) 2>&5
9740 ac_status=$?
9741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9742 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009743 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009744else
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009746sed 's/^/| /' conftest.$ac_ext >&5
9747
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009749rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009750if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009751 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009752 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9753 cat >conftest.$ac_ext <<_ACEOF
9754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* confdefs.h. */
9756_ACEOF
9757cat confdefs.h >>conftest.$ac_ext
9758cat >>conftest.$ac_ext <<_ACEOF
9759/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009760
9761/* Override any gcc2 internal prototype to avoid an error. */
9762#ifdef __cplusplus
9763extern "C"
9764#endif
9765/* We use char because int might match the return type of a gcc2
9766 builtin and then its argument prototype would still apply. */
9767char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009768int
9769main ()
9770{
9771sem_init ();
9772 ;
9773 return 0;
9774}
Martin v. Löwis11437992002-04-12 09:54:03 +00009775_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009776rm -f conftest.$ac_objext conftest$ac_exeext
9777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9778 (eval $ac_link) 2>&5
9779 ac_status=$?
9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781 (exit $ac_status); } &&
9782 { ac_try='test -s conftest$ac_exeext'
9783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9784 (eval $ac_try) 2>&5
9785 ac_status=$?
9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787 (exit $ac_status); }; }; then
9788 ac_cv_search_sem_init="-l$ac_lib"
9789break
9790else
9791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009792sed 's/^/| /' conftest.$ac_ext >&5
9793
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009794fi
9795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9796 done
9797fi
9798LIBS=$ac_func_search_save_LIBS
9799fi
9800echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9801echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9802if test "$ac_cv_search_sem_init" != no; then
9803 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009804
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009805fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009806 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009807 # posix4 on Solaris 2.6
9808 # pthread (first!) on Linux
9809fi
9810
Martin v. Löwis19d17342003-06-14 21:03:05 +00009811# check if we need libintl for locale functions
9812echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9813echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9814if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9815 echo $ECHO_N "(cached) $ECHO_C" >&6
9816else
9817 ac_check_lib_save_LIBS=$LIBS
9818LIBS="-lintl $LIBS"
9819cat >conftest.$ac_ext <<_ACEOF
9820#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009821/* confdefs.h. */
9822_ACEOF
9823cat confdefs.h >>conftest.$ac_ext
9824cat >>conftest.$ac_ext <<_ACEOF
9825/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009826
9827/* Override any gcc2 internal prototype to avoid an error. */
9828#ifdef __cplusplus
9829extern "C"
9830#endif
9831/* We use char because int might match the return type of a gcc2
9832 builtin and then its argument prototype would still apply. */
9833char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009834int
9835main ()
9836{
9837textdomain ();
9838 ;
9839 return 0;
9840}
9841_ACEOF
9842rm -f conftest.$ac_objext conftest$ac_exeext
9843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9844 (eval $ac_link) 2>&5
9845 ac_status=$?
9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847 (exit $ac_status); } &&
9848 { ac_try='test -s conftest$ac_exeext'
9849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9850 (eval $ac_try) 2>&5
9851 ac_status=$?
9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853 (exit $ac_status); }; }; then
9854 ac_cv_lib_intl_textdomain=yes
9855else
9856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009857sed 's/^/| /' conftest.$ac_ext >&5
9858
Martin v. Löwis19d17342003-06-14 21:03:05 +00009859ac_cv_lib_intl_textdomain=no
9860fi
9861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9862LIBS=$ac_check_lib_save_LIBS
9863fi
9864echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9865echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9866if test $ac_cv_lib_intl_textdomain = yes; then
9867
9868cat >>confdefs.h <<\_ACEOF
9869#define WITH_LIBINTL 1
9870_ACEOF
9871
9872fi
9873
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009874
9875# checks for system dependent C++ extensions support
9876case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9878echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9879 cat >conftest.$ac_ext <<_ACEOF
9880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* confdefs.h. */
9882_ACEOF
9883cat confdefs.h >>conftest.$ac_ext
9884cat >>conftest.$ac_ext <<_ACEOF
9885/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009886#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009887int
9888main ()
9889{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009890loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 ;
9892 return 0;
9893}
9894_ACEOF
9895rm -f conftest.$ac_objext conftest$ac_exeext
9896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9897 (eval $ac_link) 2>&5
9898 ac_status=$?
9899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900 (exit $ac_status); } &&
9901 { ac_try='test -s conftest$ac_exeext'
9902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9903 (eval $ac_try) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009907
Martin v. Löwis11437992002-04-12 09:54:03 +00009908cat >>confdefs.h <<\_ACEOF
9909#define AIX_GENUINE_CPLUSPLUS 1
9910_ACEOF
9911
9912 echo "$as_me:$LINENO: result: yes" >&5
9913echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009914else
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009916sed 's/^/| /' conftest.$ac_ext >&5
9917
Martin v. Löwis11437992002-04-12 09:54:03 +00009918echo "$as_me:$LINENO: result: no" >&5
9919echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009920fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009922 *) ;;
9923esac
9924
Guido van Rossum70c7f481998-03-26 18:44:10 +00009925# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009926# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009927# BeOS' sockets are stashed in libnet.
9928case "$ac_sys_system" in
9929IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009930*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009931echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9932echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9933if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009935else
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009937LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009938cat >conftest.$ac_ext <<_ACEOF
9939#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009940/* confdefs.h. */
9941_ACEOF
9942cat confdefs.h >>conftest.$ac_ext
9943cat >>conftest.$ac_ext <<_ACEOF
9944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009945
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009946/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009950/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 builtin and then its argument prototype would still apply. */
9952char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009953int
9954main ()
9955{
9956t_open ();
9957 ;
9958 return 0;
9959}
9960_ACEOF
9961rm -f conftest.$ac_objext conftest$ac_exeext
9962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9963 (eval $ac_link) 2>&5
9964 ac_status=$?
9965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966 (exit $ac_status); } &&
9967 { ac_try='test -s conftest$ac_exeext'
9968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9969 (eval $ac_try) 2>&5
9970 ac_status=$?
9971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9972 (exit $ac_status); }; }; then
9973 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009974else
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009976sed 's/^/| /' conftest.$ac_ext >&5
9977
Martin v. Löwis11437992002-04-12 09:54:03 +00009978ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009979fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009980rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9981LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009982fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009983echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9984echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9985if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009986 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009987fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009988 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009989echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9990echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9991if test "${ac_cv_lib_socket_socket+set}" = set; then
9992 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009993else
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009995LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009996cat >conftest.$ac_ext <<_ACEOF
9997#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009998/* confdefs.h. */
9999_ACEOF
10000cat confdefs.h >>conftest.$ac_ext
10001cat >>conftest.$ac_ext <<_ACEOF
10002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010003
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010004/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010005#ifdef __cplusplus
10006extern "C"
10007#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010008/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 builtin and then its argument prototype would still apply. */
10010char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010011int
10012main ()
10013{
10014socket ();
10015 ;
10016 return 0;
10017}
10018_ACEOF
10019rm -f conftest.$ac_objext conftest$ac_exeext
10020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10021 (eval $ac_link) 2>&5
10022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); } &&
10025 { ac_try='test -s conftest$ac_exeext'
10026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10027 (eval $ac_try) 2>&5
10028 ac_status=$?
10029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030 (exit $ac_status); }; }; then
10031 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010032else
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010034sed 's/^/| /' conftest.$ac_ext >&5
10035
Martin v. Löwis11437992002-04-12 09:54:03 +000010036ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010038rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10039LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010041echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10042echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10043if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010044 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010045fi
10046 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010047;;
10048esac
10049case "$ac_sys_system" in
10050BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010051echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10052echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10053if test "${ac_cv_lib_net_socket+set}" = set; then
10054 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010055else
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010057LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010058cat >conftest.$ac_ext <<_ACEOF
10059#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010060/* confdefs.h. */
10061_ACEOF
10062cat confdefs.h >>conftest.$ac_ext
10063cat >>conftest.$ac_ext <<_ACEOF
10064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010065
Guido van Rossumad678af1998-10-02 14:42:15 +000010066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010067#ifdef __cplusplus
10068extern "C"
10069#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010070/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 builtin and then its argument prototype would still apply. */
10072char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010073int
10074main ()
10075{
10076socket ();
10077 ;
10078 return 0;
10079}
10080_ACEOF
10081rm -f conftest.$ac_objext conftest$ac_exeext
10082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10083 (eval $ac_link) 2>&5
10084 ac_status=$?
10085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); } &&
10087 { ac_try='test -s conftest$ac_exeext'
10088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10089 (eval $ac_try) 2>&5
10090 ac_status=$?
10091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10092 (exit $ac_status); }; }; then
10093 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010094else
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010096sed 's/^/| /' conftest.$ac_ext >&5
10097
Martin v. Löwis11437992002-04-12 09:54:03 +000010098ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010099fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10101LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010103echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10104echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10105if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010106 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010107fi
10108 # BeOS
10109;;
10110esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010111
Martin v. Löwis11437992002-04-12 09:54:03 +000010112echo "$as_me:$LINENO: checking for --with-libs" >&5
10113echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10114
Guido van Rossuma68acba1996-07-31 17:36:39 +000010115# Check whether --with-libs or --without-libs was given.
10116if test "${with_libs+set}" = set; then
10117 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010118
10119echo "$as_me:$LINENO: result: $withval" >&5
10120echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010121LIBS="$withval $LIBS"
10122
10123else
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 echo "$as_me:$LINENO: result: no" >&5
10125echo "${ECHO_T}no" >&6
10126fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010127
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010128# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010129
10130
Martin v. Löwis11437992002-04-12 09:54:03 +000010131echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10132echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10133
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010134# Check whether --with-signal-module or --without-signal-module was given.
10135if test "${with_signal_module+set}" = set; then
10136 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010137
Martin v. Löwis11437992002-04-12 09:54:03 +000010138fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010139
10140if test -z "$with_signal_module"
10141then with_signal_module="yes"
10142fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010143echo "$as_me:$LINENO: result: $with_signal_module" >&5
10144echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010145
10146if test "${with_signal_module}" = "yes"; then
10147 USE_SIGNAL_MODULE=""
10148 SIGNAL_OBJS=""
10149else
10150 USE_SIGNAL_MODULE="#"
10151 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10152fi
10153
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010154# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010155
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010156USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010157
Martin v. Löwis11437992002-04-12 09:54:03 +000010158echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10159echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10160
Guido van Rossumec2f0731997-01-22 20:54:01 +000010161
10162# Check whether --with-dec-threads or --without-dec-threads was given.
10163if test "${with_dec_threads+set}" = set; then
10164 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010165
10166echo "$as_me:$LINENO: result: $withval" >&5
10167echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010168LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010169if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010170 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010171fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010172else
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 echo "$as_me:$LINENO: result: no" >&5
10174echo "${ECHO_T}no" >&6
10175fi;
10176
10177# Templates for things AC_DEFINEd more than once.
10178# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010179
10180
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
10182
10183
10184
10185
10186echo "$as_me:$LINENO: checking for --with-threads" >&5
10187echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10188
Guido van Rossumec2f0731997-01-22 20:54:01 +000010189# Check whether --with-threads or --without-threads was given.
10190if test "${with_threads+set}" = set; then
10191 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010192
Martin v. Löwis11437992002-04-12 09:54:03 +000010193fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010194
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010195# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010197# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010198if test "${with_thread+set}" = set; then
10199 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010200 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010201fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010202
10203if test -z "$with_threads"
10204then with_threads="yes"
10205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010206echo "$as_me:$LINENO: result: $with_threads" >&5
10207echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010208
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010209
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010210if test "$with_threads" = "no"
10211then
10212 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010213elif test "$ac_cv_pthread_is_default" = yes
10214then
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010216#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010217_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010218
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010219 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010221#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010222_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010223
10224 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010226elif test "$ac_cv_kpthread" = "yes"
10227then
10228 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010229 if test "$ac_cv_cxx_thread" = "yes"; then
10230 CXX="$CXX -Kpthread"
10231 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010233#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010234_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010236 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010237 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010238elif test "$ac_cv_kthread" = "yes"
10239then
10240 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010241 if test "$ac_cv_cxx_thread" = "yes"; then
10242 CXX="$CXX -Kthread"
10243 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010244 cat >>confdefs.h <<\_ACEOF
10245#define WITH_THREAD 1
10246_ACEOF
10247
10248 posix_threads=yes
10249 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010250elif test "$ac_cv_pthread" = "yes"
10251then
10252 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010253 if test "$ac_cv_cxx_thread" = "yes"; then
10254 CXX="$CXX -pthread"
10255 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010256 cat >>confdefs.h <<\_ACEOF
10257#define WITH_THREAD 1
10258_ACEOF
10259
10260 posix_threads=yes
10261 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010262else
10263 if test ! -z "$with_threads" -a -d "$with_threads"
10264 then LDFLAGS="$LDFLAGS -L$with_threads"
10265 fi
10266 if test ! -z "$withval" -a -d "$withval"
10267 then LDFLAGS="$LDFLAGS -L$withval"
10268 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010269
10270 # According to the POSIX spec, a pthreads implementation must
10271 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10273echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10274 cat >conftest.$ac_ext <<_ACEOF
10275#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010276/* confdefs.h. */
10277_ACEOF
10278cat confdefs.h >>conftest.$ac_ext
10279cat >>conftest.$ac_ext <<_ACEOF
10280/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010281
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010283#ifdef _POSIX_THREADS
10284yes
10285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
10287_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010289 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010290 unistd_defines_pthreads=yes
10291else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292 unistd_defines_pthreads=no
10293fi
10294rm -f conftest*
10295
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10297echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010298
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010300#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010302
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 if test "${ac_cv_header_cthreads_h+set}" = set; then
10304 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10305echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10306if test "${ac_cv_header_cthreads_h+set}" = set; then
10307 echo $ECHO_N "(cached) $ECHO_C" >&6
10308fi
10309echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10310echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010311else
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 # Is the header compilable?
10313echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10314echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10315cat >conftest.$ac_ext <<_ACEOF
10316#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* confdefs.h. */
10318_ACEOF
10319cat confdefs.h >>conftest.$ac_ext
10320cat >>conftest.$ac_ext <<_ACEOF
10321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010322$ac_includes_default
10323#include <cthreads.h>
10324_ACEOF
10325rm -f conftest.$ac_objext
10326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10327 (eval $ac_compile) 2>&5
10328 ac_status=$?
10329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10330 (exit $ac_status); } &&
10331 { ac_try='test -s conftest.$ac_objext'
10332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10333 (eval $ac_try) 2>&5
10334 ac_status=$?
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); }; }; then
10337 ac_header_compiler=yes
10338else
10339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010340sed 's/^/| /' conftest.$ac_ext >&5
10341
Martin v. Löwis11437992002-04-12 09:54:03 +000010342ac_header_compiler=no
10343fi
10344rm -f conftest.$ac_objext conftest.$ac_ext
10345echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10346echo "${ECHO_T}$ac_header_compiler" >&6
10347
10348# Is the header present?
10349echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10350echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10351cat >conftest.$ac_ext <<_ACEOF
10352#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010353/* confdefs.h. */
10354_ACEOF
10355cat confdefs.h >>conftest.$ac_ext
10356cat >>conftest.$ac_ext <<_ACEOF
10357/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010358#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010359_ACEOF
10360if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10361 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10362 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010363 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 rm -f conftest.er1
10365 cat conftest.err >&5
10366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10367 (exit $ac_status); } >/dev/null; then
10368 if test -s conftest.err; then
10369 ac_cpp_err=$ac_c_preproc_warn_flag
10370 else
10371 ac_cpp_err=
10372 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010373else
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_cpp_err=yes
10375fi
10376if test -z "$ac_cpp_err"; then
10377 ac_header_preproc=yes
10378else
10379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010380sed 's/^/| /' conftest.$ac_ext >&5
10381
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010384rm -f conftest.err conftest.$ac_ext
10385echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10386echo "${ECHO_T}$ac_header_preproc" >&6
10387
10388# So? What about this header?
10389case $ac_header_compiler:$ac_header_preproc in
10390 yes:no )
10391 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10392echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10393 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010394echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10395 (
10396 cat <<\_ASBOX
10397## ------------------------------------ ##
10398## Report this to bug-autoconf@gnu.org. ##
10399## ------------------------------------ ##
10400_ASBOX
10401 ) |
10402 sed "s/^/$as_me: WARNING: /" >&2
10403 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 no:yes )
10405 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10406echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10407 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10408echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10409 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010410echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10411 (
10412 cat <<\_ASBOX
10413## ------------------------------------ ##
10414## Report this to bug-autoconf@gnu.org. ##
10415## ------------------------------------ ##
10416_ASBOX
10417 ) |
10418 sed "s/^/$as_me: WARNING: /" >&2
10419 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010420esac
10421echo "$as_me:$LINENO: checking for cthreads.h" >&5
10422echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10423if test "${ac_cv_header_cthreads_h+set}" = set; then
10424 echo $ECHO_N "(cached) $ECHO_C" >&6
10425else
10426 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010428echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10429echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10430
10431fi
10432if test $ac_cv_header_cthreads_h = yes; then
10433 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010434#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010435_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010436
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010438#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010439_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010440
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
10442cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010443#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010444_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010445
10446 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010447 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010448else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010449
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10451 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10452echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10453if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10454 echo $ECHO_N "(cached) $ECHO_C" >&6
10455fi
10456echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10457echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010458else
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 # Is the header compilable?
10460echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10461echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10462cat >conftest.$ac_ext <<_ACEOF
10463#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010464/* confdefs.h. */
10465_ACEOF
10466cat confdefs.h >>conftest.$ac_ext
10467cat >>conftest.$ac_ext <<_ACEOF
10468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010469$ac_includes_default
10470#include <mach/cthreads.h>
10471_ACEOF
10472rm -f conftest.$ac_objext
10473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10474 (eval $ac_compile) 2>&5
10475 ac_status=$?
10476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10477 (exit $ac_status); } &&
10478 { ac_try='test -s conftest.$ac_objext'
10479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10480 (eval $ac_try) 2>&5
10481 ac_status=$?
10482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10483 (exit $ac_status); }; }; then
10484 ac_header_compiler=yes
10485else
10486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010487sed 's/^/| /' conftest.$ac_ext >&5
10488
Martin v. Löwis11437992002-04-12 09:54:03 +000010489ac_header_compiler=no
10490fi
10491rm -f conftest.$ac_objext conftest.$ac_ext
10492echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10493echo "${ECHO_T}$ac_header_compiler" >&6
10494
10495# Is the header present?
10496echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10497echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10498cat >conftest.$ac_ext <<_ACEOF
10499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010500/* confdefs.h. */
10501_ACEOF
10502cat confdefs.h >>conftest.$ac_ext
10503cat >>conftest.$ac_ext <<_ACEOF
10504/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010505#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010506_ACEOF
10507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10509 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010510 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 rm -f conftest.er1
10512 cat conftest.err >&5
10513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } >/dev/null; then
10515 if test -s conftest.err; then
10516 ac_cpp_err=$ac_c_preproc_warn_flag
10517 else
10518 ac_cpp_err=
10519 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010520else
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_cpp_err=yes
10522fi
10523if test -z "$ac_cpp_err"; then
10524 ac_header_preproc=yes
10525else
10526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010527sed 's/^/| /' conftest.$ac_ext >&5
10528
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010531rm -f conftest.err conftest.$ac_ext
10532echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10533echo "${ECHO_T}$ac_header_preproc" >&6
10534
10535# So? What about this header?
10536case $ac_header_compiler:$ac_header_preproc in
10537 yes:no )
10538 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10539echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10540 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010541echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10542 (
10543 cat <<\_ASBOX
10544## ------------------------------------ ##
10545## Report this to bug-autoconf@gnu.org. ##
10546## ------------------------------------ ##
10547_ASBOX
10548 ) |
10549 sed "s/^/$as_me: WARNING: /" >&2
10550 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 no:yes )
10552 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10553echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10554 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10555echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10556 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010557echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10558 (
10559 cat <<\_ASBOX
10560## ------------------------------------ ##
10561## Report this to bug-autoconf@gnu.org. ##
10562## ------------------------------------ ##
10563_ASBOX
10564 ) |
10565 sed "s/^/$as_me: WARNING: /" >&2
10566 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010567esac
10568echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10569echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10570if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10571 echo $ECHO_N "(cached) $ECHO_C" >&6
10572else
10573 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010575echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10576echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10577
10578fi
10579if test $ac_cv_header_mach_cthreads_h = yes; then
10580 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010581#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010582_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010585#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010586_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010587
Martin v. Löwis11437992002-04-12 09:54:03 +000010588
10589cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010590#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010591_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010592
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010593 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010594else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010595
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 echo "$as_me:$LINENO: checking for --with-pth" >&5
10597echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10598
10599# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010600if test "${with_pth+set}" = set; then
10601 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010602 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010603echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010604 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010605#define WITH_THREAD 1
10606_ACEOF
10607
10608
10609cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010610#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010611_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010612
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010613 LIBS="-lpth $LIBS"
10614 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010615else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010616 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010617echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010618
10619 # Just looking for pthread_create in libpthread is not enough:
10620 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10621 # So we really have to include pthread.h, and then link.
10622 _libs=$LIBS
10623 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10625echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10626 cat >conftest.$ac_ext <<_ACEOF
10627#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010628/* confdefs.h. */
10629_ACEOF
10630cat confdefs.h >>conftest.$ac_ext
10631cat >>conftest.$ac_ext <<_ACEOF
10632/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010633#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010634
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010635void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010636int
10637main ()
10638{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010639
10640pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ;
10642 return 0;
10643}
10644_ACEOF
10645rm -f conftest.$ac_objext conftest$ac_exeext
10646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10647 (eval $ac_link) 2>&5
10648 ac_status=$?
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); } &&
10651 { ac_try='test -s conftest$ac_exeext'
10652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10653 (eval $ac_try) 2>&5
10654 ac_status=$?
10655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10656 (exit $ac_status); }; }; then
10657
10658 echo "$as_me:$LINENO: result: yes" >&5
10659echo "${ECHO_T}yes" >&6
10660 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010661#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010662_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010663
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010664 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010665 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010666else
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010668sed 's/^/| /' conftest.$ac_ext >&5
10669
Martin v. Löwis11437992002-04-12 09:54:03 +000010670
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010671 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10673echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10674if test "${ac_cv_func_pthread_detach+set}" = set; then
10675 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010676else
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 cat >conftest.$ac_ext <<_ACEOF
10678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010679/* confdefs.h. */
10680_ACEOF
10681cat confdefs.h >>conftest.$ac_ext
10682cat >>conftest.$ac_ext <<_ACEOF
10683/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010684/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010685 which can conflict with char pthread_detach (); below.
10686 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010687 <limits.h> exists even on freestanding compilers. Under hpux,
10688 including <limits.h> includes <sys/time.h> and causes problems
10689 checking for functions defined therein. */
10690#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010691# include <limits.h>
10692#else
10693# include <assert.h>
10694#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010695/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010696#ifdef __cplusplus
10697extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010698{
Martin v. Löwis11437992002-04-12 09:54:03 +000010699#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010700/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010701 builtin and then its argument prototype would still apply. */
10702char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010703/* The GNU C library defines this for functions which it implements
10704 to always fail with ENOSYS. Some functions are actually named
10705 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010706#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010707choke me
10708#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010709char (*f) () = pthread_detach;
10710#endif
10711#ifdef __cplusplus
10712}
Guido van Rossumad678af1998-10-02 14:42:15 +000010713#endif
10714
Skip Montanaro6dead952003-09-25 14:50:04 +000010715int
10716main ()
10717{
10718return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ;
10720 return 0;
10721}
10722_ACEOF
10723rm -f conftest.$ac_objext conftest$ac_exeext
10724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10725 (eval $ac_link) 2>&5
10726 ac_status=$?
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); } &&
10729 { ac_try='test -s conftest$ac_exeext'
10730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10731 (eval $ac_try) 2>&5
10732 ac_status=$?
10733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10734 (exit $ac_status); }; }; then
10735 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010736else
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010738sed 's/^/| /' conftest.$ac_ext >&5
10739
Martin v. Löwis11437992002-04-12 09:54:03 +000010740ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010742rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010744echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10745echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10746if test $ac_cv_func_pthread_detach = yes; then
10747 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010748#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010749_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010750
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010751 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010752 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010753else
Guido van Rossumad678af1998-10-02 14:42:15 +000010754
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010755 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10756 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10757echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10758if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10759 echo $ECHO_N "(cached) $ECHO_C" >&6
10760fi
10761echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10762echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10763else
10764 # Is the header compilable?
10765echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10766echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10767cat >conftest.$ac_ext <<_ACEOF
10768#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010769/* confdefs.h. */
10770_ACEOF
10771cat confdefs.h >>conftest.$ac_ext
10772cat >>conftest.$ac_ext <<_ACEOF
10773/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010774$ac_includes_default
10775#include <atheos/threads.h>
10776_ACEOF
10777rm -f conftest.$ac_objext
10778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10779 (eval $ac_compile) 2>&5
10780 ac_status=$?
10781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782 (exit $ac_status); } &&
10783 { ac_try='test -s conftest.$ac_objext'
10784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10785 (eval $ac_try) 2>&5
10786 ac_status=$?
10787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10788 (exit $ac_status); }; }; then
10789 ac_header_compiler=yes
10790else
10791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010792sed 's/^/| /' conftest.$ac_ext >&5
10793
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010794ac_header_compiler=no
10795fi
10796rm -f conftest.$ac_objext conftest.$ac_ext
10797echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10798echo "${ECHO_T}$ac_header_compiler" >&6
10799
10800# Is the header present?
10801echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10802echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10803cat >conftest.$ac_ext <<_ACEOF
10804#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010805/* confdefs.h. */
10806_ACEOF
10807cat confdefs.h >>conftest.$ac_ext
10808cat >>conftest.$ac_ext <<_ACEOF
10809/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010810#include <atheos/threads.h>
10811_ACEOF
10812if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10813 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10814 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010815 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010816 rm -f conftest.er1
10817 cat conftest.err >&5
10818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10819 (exit $ac_status); } >/dev/null; then
10820 if test -s conftest.err; then
10821 ac_cpp_err=$ac_c_preproc_warn_flag
10822 else
10823 ac_cpp_err=
10824 fi
10825else
10826 ac_cpp_err=yes
10827fi
10828if test -z "$ac_cpp_err"; then
10829 ac_header_preproc=yes
10830else
10831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010832sed 's/^/| /' conftest.$ac_ext >&5
10833
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010834 ac_header_preproc=no
10835fi
10836rm -f conftest.err conftest.$ac_ext
10837echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10838echo "${ECHO_T}$ac_header_preproc" >&6
10839
10840# So? What about this header?
10841case $ac_header_compiler:$ac_header_preproc in
10842 yes:no )
10843 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10844echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10845 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010846echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10847 (
10848 cat <<\_ASBOX
10849## ------------------------------------ ##
10850## Report this to bug-autoconf@gnu.org. ##
10851## ------------------------------------ ##
10852_ASBOX
10853 ) |
10854 sed "s/^/$as_me: WARNING: /" >&2
10855 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010856 no:yes )
10857 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10858echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10859 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10860echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10861 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010862echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10863 (
10864 cat <<\_ASBOX
10865## ------------------------------------ ##
10866## Report this to bug-autoconf@gnu.org. ##
10867## ------------------------------------ ##
10868_ASBOX
10869 ) |
10870 sed "s/^/$as_me: WARNING: /" >&2
10871 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010872esac
10873echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10874echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10875if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10876 echo $ECHO_N "(cached) $ECHO_C" >&6
10877else
10878 ac_cv_header_atheos_threads_h=$ac_header_preproc
10879fi
10880echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10881echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10882
10883fi
10884if test $ac_cv_header_atheos_threads_h = yes; then
10885 cat >>confdefs.h <<\_ACEOF
10886#define WITH_THREAD 1
10887_ACEOF
10888
10889
10890cat >>confdefs.h <<\_ACEOF
10891#define ATHEOS_THREADS 1
10892_ACEOF
10893
10894 THREADOBJ="Python/thread.o"
10895else
10896
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10898 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10899echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10900if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10901 echo $ECHO_N "(cached) $ECHO_C" >&6
10902fi
10903echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10904echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010905else
Martin v. Löwis11437992002-04-12 09:54:03 +000010906 # Is the header compilable?
10907echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10908echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10909cat >conftest.$ac_ext <<_ACEOF
10910#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010911/* confdefs.h. */
10912_ACEOF
10913cat confdefs.h >>conftest.$ac_ext
10914cat >>conftest.$ac_ext <<_ACEOF
10915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010916$ac_includes_default
10917#include <kernel/OS.h>
10918_ACEOF
10919rm -f conftest.$ac_objext
10920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10921 (eval $ac_compile) 2>&5
10922 ac_status=$?
10923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); } &&
10925 { ac_try='test -s conftest.$ac_objext'
10926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10927 (eval $ac_try) 2>&5
10928 ac_status=$?
10929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10930 (exit $ac_status); }; }; then
10931 ac_header_compiler=yes
10932else
10933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010934sed 's/^/| /' conftest.$ac_ext >&5
10935
Martin v. Löwis11437992002-04-12 09:54:03 +000010936ac_header_compiler=no
10937fi
10938rm -f conftest.$ac_objext conftest.$ac_ext
10939echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10940echo "${ECHO_T}$ac_header_compiler" >&6
10941
10942# Is the header present?
10943echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10944echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10945cat >conftest.$ac_ext <<_ACEOF
10946#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* confdefs.h. */
10948_ACEOF
10949cat confdefs.h >>conftest.$ac_ext
10950cat >>conftest.$ac_ext <<_ACEOF
10951/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010952#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010953_ACEOF
10954if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10955 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10956 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010957 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 rm -f conftest.er1
10959 cat conftest.err >&5
10960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10961 (exit $ac_status); } >/dev/null; then
10962 if test -s conftest.err; then
10963 ac_cpp_err=$ac_c_preproc_warn_flag
10964 else
10965 ac_cpp_err=
10966 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010967else
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ac_cpp_err=yes
10969fi
10970if test -z "$ac_cpp_err"; then
10971 ac_header_preproc=yes
10972else
10973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010974sed 's/^/| /' conftest.$ac_ext >&5
10975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010978rm -f conftest.err conftest.$ac_ext
10979echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10980echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982# So? What about this header?
10983case $ac_header_compiler:$ac_header_preproc in
10984 yes:no )
10985 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10986echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10987 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010988echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
10989 (
10990 cat <<\_ASBOX
10991## ------------------------------------ ##
10992## Report this to bug-autoconf@gnu.org. ##
10993## ------------------------------------ ##
10994_ASBOX
10995 ) |
10996 sed "s/^/$as_me: WARNING: /" >&2
10997 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 no:yes )
10999 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11000echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11001 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11002echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11003 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011004echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11005 (
11006 cat <<\_ASBOX
11007## ------------------------------------ ##
11008## Report this to bug-autoconf@gnu.org. ##
11009## ------------------------------------ ##
11010_ASBOX
11011 ) |
11012 sed "s/^/$as_me: WARNING: /" >&2
11013 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011014esac
11015echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11016echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11017if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
11019else
11020 ac_cv_header_kernel_OS_h=$ac_header_preproc
11021fi
11022echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11023echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11024
11025fi
11026if test $ac_cv_header_kernel_OS_h = yes; then
11027 cat >>confdefs.h <<\_ACEOF
11028#define WITH_THREAD 1
11029_ACEOF
11030
11031
11032cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011033#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011034_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011035
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011036 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011037else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011038
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11040echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11041if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11042 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011043else
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011045LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011046cat >conftest.$ac_ext <<_ACEOF
11047#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* confdefs.h. */
11049_ACEOF
11050cat confdefs.h >>conftest.$ac_ext
11051cat >>conftest.$ac_ext <<_ACEOF
11052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011053
Greg Steinadf63d62000-07-05 10:38:09 +000011054/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011055#ifdef __cplusplus
11056extern "C"
11057#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011058/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 builtin and then its argument prototype would still apply. */
11060char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011061int
11062main ()
11063{
11064pthread_create ();
11065 ;
11066 return 0;
11067}
11068_ACEOF
11069rm -f conftest.$ac_objext conftest$ac_exeext
11070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11071 (eval $ac_link) 2>&5
11072 ac_status=$?
11073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074 (exit $ac_status); } &&
11075 { ac_try='test -s conftest$ac_exeext'
11076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11077 (eval $ac_try) 2>&5
11078 ac_status=$?
11079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11080 (exit $ac_status); }; }; then
11081 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011082else
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011084sed 's/^/| /' conftest.$ac_ext >&5
11085
Martin v. Löwis11437992002-04-12 09:54:03 +000011086ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011088rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11089LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011091echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11092echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11093if test $ac_cv_lib_pthreads_pthread_create = yes; then
11094 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011095#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011096_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011097
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011098 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011099 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011100 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011101else
Greg Steinadf63d62000-07-05 10:38:09 +000011102
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11104echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11105if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11106 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011107else
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011109LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011110cat >conftest.$ac_ext <<_ACEOF
11111#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011112/* confdefs.h. */
11113_ACEOF
11114cat confdefs.h >>conftest.$ac_ext
11115cat >>conftest.$ac_ext <<_ACEOF
11116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
Guido van Rossum49545951997-12-02 19:28:29 +000011118/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011119#ifdef __cplusplus
11120extern "C"
11121#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011122/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 builtin and then its argument prototype would still apply. */
11124char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011125int
11126main ()
11127{
11128pthread_create ();
11129 ;
11130 return 0;
11131}
11132_ACEOF
11133rm -f conftest.$ac_objext conftest$ac_exeext
11134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11135 (eval $ac_link) 2>&5
11136 ac_status=$?
11137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138 (exit $ac_status); } &&
11139 { ac_try='test -s conftest$ac_exeext'
11140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11141 (eval $ac_try) 2>&5
11142 ac_status=$?
11143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11144 (exit $ac_status); }; }; then
11145 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011146else
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011148sed 's/^/| /' conftest.$ac_ext >&5
11149
Martin v. Löwis11437992002-04-12 09:54:03 +000011150ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011152rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11153LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011155echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11156echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11157if test $ac_cv_lib_c_r_pthread_create = yes; then
11158 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011159#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011160_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011161
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011162 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011163 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011164 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011165else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011166
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11168echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11169if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011171else
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011173LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011174cat >conftest.$ac_ext <<_ACEOF
11175#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011176/* confdefs.h. */
11177_ACEOF
11178cat confdefs.h >>conftest.$ac_ext
11179cat >>conftest.$ac_ext <<_ACEOF
11180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011181
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011182/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011183#ifdef __cplusplus
11184extern "C"
11185#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011186/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 builtin and then its argument prototype would still apply. */
11188char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011189int
11190main ()
11191{
11192__d6_pthread_create ();
11193 ;
11194 return 0;
11195}
11196_ACEOF
11197rm -f conftest.$ac_objext conftest$ac_exeext
11198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11199 (eval $ac_link) 2>&5
11200 ac_status=$?
11201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11202 (exit $ac_status); } &&
11203 { ac_try='test -s conftest$ac_exeext'
11204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11205 (eval $ac_try) 2>&5
11206 ac_status=$?
11207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11208 (exit $ac_status); }; }; then
11209 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011210else
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011212sed 's/^/| /' conftest.$ac_ext >&5
11213
Martin v. Löwis11437992002-04-12 09:54:03 +000011214ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011216rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11217LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011219echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11220echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11221if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11222 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011223#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011224_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011225
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011226 echo Systems with __d6_pthread_create are not supported anymore.
11227 echo See README
11228 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011229 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011230 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011231 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011232else
Guido van Rossum49545951997-12-02 19:28:29 +000011233
Martin v. Löwis11437992002-04-12 09:54:03 +000011234 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11235echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11236if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11237 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011238else
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011240LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011241cat >conftest.$ac_ext <<_ACEOF
11242#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* confdefs.h. */
11244_ACEOF
11245cat confdefs.h >>conftest.$ac_ext
11246cat >>conftest.$ac_ext <<_ACEOF
11247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011248
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011249/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011250#ifdef __cplusplus
11251extern "C"
11252#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011253/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 builtin and then its argument prototype would still apply. */
11255char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011256int
11257main ()
11258{
11259__pthread_create_system ();
11260 ;
11261 return 0;
11262}
11263_ACEOF
11264rm -f conftest.$ac_objext conftest$ac_exeext
11265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11266 (eval $ac_link) 2>&5
11267 ac_status=$?
11268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11269 (exit $ac_status); } &&
11270 { ac_try='test -s conftest$ac_exeext'
11271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11272 (eval $ac_try) 2>&5
11273 ac_status=$?
11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275 (exit $ac_status); }; }; then
11276 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011277else
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011279sed 's/^/| /' conftest.$ac_ext >&5
11280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11284LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011286echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11287echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11288if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11289 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011290#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011291_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011293 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011294 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011295 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011296else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011297
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11299echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11300if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11301 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011302else
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011304LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011305cat >conftest.$ac_ext <<_ACEOF
11306#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011307/* confdefs.h. */
11308_ACEOF
11309cat confdefs.h >>conftest.$ac_ext
11310cat >>conftest.$ac_ext <<_ACEOF
11311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
Guido van Rossumb93a8621998-05-07 13:27:32 +000011313/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011314#ifdef __cplusplus
11315extern "C"
11316#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011317/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 builtin and then its argument prototype would still apply. */
11319char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011320int
11321main ()
11322{
11323pthread_create ();
11324 ;
11325 return 0;
11326}
11327_ACEOF
11328rm -f conftest.$ac_objext conftest$ac_exeext
11329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11330 (eval $ac_link) 2>&5
11331 ac_status=$?
11332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11333 (exit $ac_status); } &&
11334 { ac_try='test -s conftest$ac_exeext'
11335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11336 (eval $ac_try) 2>&5
11337 ac_status=$?
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339 (exit $ac_status); }; }; then
11340 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011341else
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011343sed 's/^/| /' conftest.$ac_ext >&5
11344
Martin v. Löwis11437992002-04-12 09:54:03 +000011345ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11348LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011350echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11351echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11352if test $ac_cv_lib_cma_pthread_create = yes; then
11353 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011354#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011355_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011356
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011357 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011358 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011359 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011360else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011361
Martin v. Löwis130fb172001-07-19 11:00:41 +000011362 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011363fi
11364
Guido van Rossum627b2d71993-12-24 10:39:16 +000011365
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011366fi
11367
Guido van Rossum0be3e491997-05-22 20:33:33 +000011368fi
11369
Guido van Rossum49545951997-12-02 19:28:29 +000011370fi
11371
Guido van Rossumb93a8621998-05-07 13:27:32 +000011372fi
11373
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011374fi
11375
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011376
Michael W. Hudson54241132001-12-07 15:38:26 +000011377fi
11378
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011379
11380fi
11381
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011383rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11384fi;
11385fi
11386
11387
11388fi
11389
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011390
Michael W. Hudson54241132001-12-07 15:38:26 +000011391
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11393echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11394if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011396else
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011398LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011399cat >conftest.$ac_ext <<_ACEOF
11400#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011401/* confdefs.h. */
11402_ACEOF
11403cat confdefs.h >>conftest.$ac_ext
11404cat >>conftest.$ac_ext <<_ACEOF
11405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011407/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011408#ifdef __cplusplus
11409extern "C"
11410#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011411/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 builtin and then its argument prototype would still apply. */
11413char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011414int
11415main ()
11416{
11417usconfig ();
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422rm -f conftest.$ac_objext conftest$ac_exeext
11423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11424 (eval $ac_link) 2>&5
11425 ac_status=$?
11426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427 (exit $ac_status); } &&
11428 { ac_try='test -s conftest$ac_exeext'
11429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11430 (eval $ac_try) 2>&5
11431 ac_status=$?
11432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11433 (exit $ac_status); }; }; then
11434 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435else
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011437sed 's/^/| /' conftest.$ac_ext >&5
11438
Martin v. Löwis11437992002-04-12 09:54:03 +000011439ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11442LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011444echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11445echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11446if test $ac_cv_lib_mpc_usconfig = yes; then
11447 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011448#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011449_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450
Martin v. Löwis130fb172001-07-19 11:00:41 +000011451 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011452 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011453 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011454fi
11455
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011456
Neal Norwitza978ab02002-11-02 16:58:05 +000011457 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11459echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11460if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11461 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011462else
Martin v. Löwis11437992002-04-12 09:54:03 +000011463 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011464LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011465cat >conftest.$ac_ext <<_ACEOF
11466#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011473/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474#ifdef __cplusplus
11475extern "C"
11476#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011477/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 builtin and then its argument prototype would still apply. */
11479char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
11482{
11483thr_create ();
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488rm -f conftest.$ac_objext conftest$ac_exeext
11489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11490 (eval $ac_link) 2>&5
11491 ac_status=$?
11492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11493 (exit $ac_status); } &&
11494 { ac_try='test -s conftest$ac_exeext'
11495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11496 (eval $ac_try) 2>&5
11497 ac_status=$?
11498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11499 (exit $ac_status); }; }; then
11500 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011501else
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011503sed 's/^/| /' conftest.$ac_ext >&5
11504
Martin v. Löwis11437992002-04-12 09:54:03 +000011505ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011507rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011509fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011510echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11511echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11512if test $ac_cv_lib_thread_thr_create = yes; then
11513 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011514#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011515_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011516
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011517 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011518 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011519 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011520fi
11521
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011522 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011523
Martin v. Löwis130fb172001-07-19 11:00:41 +000011524 if test "$USE_THREAD_MODULE" != "#"
11525 then
11526 # If the above checks didn't disable threads, (at least) OSF1
11527 # needs this '-threads' argument during linking.
11528 case $ac_sys_system in
11529 OSF1) LDLAST=-threads;;
11530 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011531 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011532fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011533
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011534if test "$posix_threads" = "yes"; then
11535 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011536
11537cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011538#define _POSIX_THREADS 1
11539_ACEOF
11540
11541 fi
11542
11543 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11544 case $ac_sys_system/$ac_sys_release in
11545 SunOS/5.6)
11546cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011547#define HAVE_PTHREAD_DESTRUCTOR 1
11548_ACEOF
11549
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011550 ;;
11551 SunOS/5.8)
11552cat >>confdefs.h <<\_ACEOF
11553#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11554_ACEOF
11555
11556 ;;
11557 esac
11558
11559 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11560echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11561 if test "${ac_cv_pthread_system_supported+set}" = set; then
11562 echo $ECHO_N "(cached) $ECHO_C" >&6
11563else
11564 if test "$cross_compiling" = yes; then
11565 ac_cv_pthread_system_supported=no
11566else
11567 cat >conftest.$ac_ext <<_ACEOF
11568#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011569/* confdefs.h. */
11570_ACEOF
11571cat confdefs.h >>conftest.$ac_ext
11572cat >>conftest.$ac_ext <<_ACEOF
11573/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011574#include <pthread.h>
11575 void *foo(void *parm) {
11576 return NULL;
11577 }
11578 main() {
11579 pthread_attr_t attr;
11580 pthread_t id;
11581 if (pthread_attr_init(&attr)) exit(-1);
11582 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11583 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11584 exit(0);
11585 }
11586_ACEOF
11587rm -f conftest$ac_exeext
11588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11589 (eval $ac_link) 2>&5
11590 ac_status=$?
11591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594 (eval $ac_try) 2>&5
11595 ac_status=$?
11596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597 (exit $ac_status); }; }; then
11598 ac_cv_pthread_system_supported=yes
11599else
11600 echo "$as_me: program exited with status $ac_status" >&5
11601echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011602sed 's/^/| /' conftest.$ac_ext >&5
11603
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011604( exit $ac_status )
11605ac_cv_pthread_system_supported=no
11606fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011607rm -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 +000011608fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011609
Guido van Rossum627b2d71993-12-24 10:39:16 +000011610fi
11611
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011612 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11613echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11614 if test "$ac_cv_pthread_system_supported" = "yes"; then
11615
11616cat >>confdefs.h <<\_ACEOF
11617#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11618_ACEOF
11619
11620 fi
11621
11622for ac_func in pthread_sigmask
11623do
11624as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11625echo "$as_me:$LINENO: checking for $ac_func" >&5
11626echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11627if eval "test \"\${$as_ac_var+set}\" = set"; then
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
11629else
11630 cat >conftest.$ac_ext <<_ACEOF
11631#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* confdefs.h. */
11633_ACEOF
11634cat confdefs.h >>conftest.$ac_ext
11635cat >>conftest.$ac_ext <<_ACEOF
11636/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011637/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011638 which can conflict with char $ac_func (); below.
11639 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011640 <limits.h> exists even on freestanding compilers. Under hpux,
11641 including <limits.h> includes <sys/time.h> and causes problems
11642 checking for functions defined therein. */
11643#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011644# include <limits.h>
11645#else
11646# include <assert.h>
11647#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011648/* Override any gcc2 internal prototype to avoid an error. */
11649#ifdef __cplusplus
11650extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011651{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011652#endif
11653/* We use char because int might match the return type of a gcc2
11654 builtin and then its argument prototype would still apply. */
11655char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011656/* The GNU C library defines this for functions which it implements
11657 to always fail with ENOSYS. Some functions are actually named
11658 something starting with __ and the normal name is an alias. */
11659#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11660choke me
11661#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011662char (*f) () = $ac_func;
11663#endif
11664#ifdef __cplusplus
11665}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011666#endif
11667
Skip Montanaro6dead952003-09-25 14:50:04 +000011668int
11669main ()
11670{
11671return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011672 ;
11673 return 0;
11674}
11675_ACEOF
11676rm -f conftest.$ac_objext conftest$ac_exeext
11677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11678 (eval $ac_link) 2>&5
11679 ac_status=$?
11680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11681 (exit $ac_status); } &&
11682 { ac_try='test -s conftest$ac_exeext'
11683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11684 (eval $ac_try) 2>&5
11685 ac_status=$?
11686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11687 (exit $ac_status); }; }; then
11688 eval "$as_ac_var=yes"
11689else
11690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011691sed 's/^/| /' conftest.$ac_ext >&5
11692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011693eval "$as_ac_var=no"
11694fi
11695rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11696fi
11697echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11698echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11699if test `eval echo '${'$as_ac_var'}'` = yes; then
11700 cat >>confdefs.h <<_ACEOF
11701#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11702_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011703 case $ac_sys_system in
11704 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011705
Jason Tishlerfac083d2003-07-22 15:20:49 +000011706cat >>confdefs.h <<\_ACEOF
11707#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11708_ACEOF
11709
11710 ;;
11711 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011712fi
11713done
11714
11715fi
11716
11717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011718# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011719
11720
11721echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11722echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011723# Check whether --enable-ipv6 or --disable-ipv6 was given.
11724if test "${enable_ipv6+set}" = set; then
11725 enableval="$enable_ipv6"
11726 case "$enableval" in
11727 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 echo "$as_me:$LINENO: result: no" >&5
11729echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011730 ipv6=no
11731 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 *) echo "$as_me:$LINENO: result: yes" >&5
11733echo "${ECHO_T}yes" >&6
11734 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011735#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011736_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011737
11738 ipv6=yes
11739 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011740 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011741else
Martin v. Löwis11437992002-04-12 09:54:03 +000011742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011743 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 echo "$as_me:$LINENO: result: no" >&5
11745echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011746 ipv6=no
11747
11748else
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 cat >conftest.$ac_ext <<_ACEOF
11750#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011751/* confdefs.h. */
11752_ACEOF
11753cat confdefs.h >>conftest.$ac_ext
11754cat >>conftest.$ac_ext <<_ACEOF
11755/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011756 /* AF_INET6 available check */
11757#include <sys/types.h>
11758#include <sys/socket.h>
11759main()
11760{
11761 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11762 exit(1);
11763 else
11764 exit(0);
11765}
11766
Martin v. Löwis11437992002-04-12 09:54:03 +000011767_ACEOF
11768rm -f conftest$ac_exeext
11769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11770 (eval $ac_link) 2>&5
11771 ac_status=$?
11772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11775 (eval $ac_try) 2>&5
11776 ac_status=$?
11777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11778 (exit $ac_status); }; }; then
11779 echo "$as_me:$LINENO: result: yes" >&5
11780echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011781 ipv6=yes
11782else
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 echo "$as_me: program exited with status $ac_status" >&5
11784echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011785sed 's/^/| /' conftest.$ac_ext >&5
11786
Martin v. Löwis11437992002-04-12 09:54:03 +000011787( exit $ac_status )
11788echo "$as_me:$LINENO: result: no" >&5
11789echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011790 ipv6=no
11791fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011792rm -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 +000011793fi
11794
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011795if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11797echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11798 cat >conftest.$ac_ext <<_ACEOF
11799#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011800/* confdefs.h. */
11801_ACEOF
11802cat confdefs.h >>conftest.$ac_ext
11803cat >>conftest.$ac_ext <<_ACEOF
11804/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011805#include <sys/types.h>
11806#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011807int
11808main ()
11809{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011810struct sockaddr_in6 x;
11811x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 ;
11813 return 0;
11814}
11815_ACEOF
11816rm -f conftest.$ac_objext
11817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11818 (eval $ac_compile) 2>&5
11819 ac_status=$?
11820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11821 (exit $ac_status); } &&
11822 { ac_try='test -s conftest.$ac_objext'
11823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11824 (eval $ac_try) 2>&5
11825 ac_status=$?
11826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11827 (exit $ac_status); }; }; then
11828 echo "$as_me:$LINENO: result: yes" >&5
11829echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011830 ipv6=yes
11831else
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011833sed 's/^/| /' conftest.$ac_ext >&5
11834
Martin v. Löwis11437992002-04-12 09:54:03 +000011835echo "$as_me:$LINENO: result: no" >&5
11836echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011837 ipv6=no
11838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011839rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011840fi
11841
11842if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011844#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011845_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011846
11847fi
11848
Martin v. Löwis11437992002-04-12 09:54:03 +000011849fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011850
11851ipv6type=unknown
11852ipv6lib=none
11853ipv6trylibc=no
11854
11855if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11857echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011858 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11859 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011860 case $i in
11861 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 cat >conftest.$ac_ext <<_ACEOF
11863#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011864/* confdefs.h. */
11865_ACEOF
11866cat confdefs.h >>conftest.$ac_ext
11867cat >>conftest.$ac_ext <<_ACEOF
11868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870#include <netinet/in.h>
11871#ifdef IPV6_INRIA_VERSION
11872yes
11873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011876 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011877 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011878fi
11879rm -f conftest*
11880
11881 ;;
11882 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011883 cat >conftest.$ac_ext <<_ACEOF
11884#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011885/* confdefs.h. */
11886_ACEOF
11887cat confdefs.h >>conftest.$ac_ext
11888cat >>conftest.$ac_ext <<_ACEOF
11889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011891#include <netinet/in.h>
11892#ifdef __KAME__
11893yes
11894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011895_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011897 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011898 ipv6type=$i;
11899 ipv6lib=inet6
11900 ipv6libdir=/usr/local/v6/lib
11901 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011902fi
11903rm -f conftest*
11904
11905 ;;
11906 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011907 cat >conftest.$ac_ext <<_ACEOF
11908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011909/* confdefs.h. */
11910_ACEOF
11911cat confdefs.h >>conftest.$ac_ext
11912cat >>conftest.$ac_ext <<_ACEOF
11913/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011914
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011915#include <features.h>
11916#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11917yes
11918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011919_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011921 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011922 ipv6type=$i;
11923 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011924fi
11925rm -f conftest*
11926
11927 ;;
11928 linux-inet6)
11929 if test -d /usr/inet6; then
11930 ipv6type=$i
11931 ipv6lib=inet6
11932 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011933 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011934 fi
11935 ;;
11936 solaris)
11937 if test -f /etc/netconfig; then
11938 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11939 ipv6type=$i
11940 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011941 fi
11942 fi
11943 ;;
11944 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 cat >conftest.$ac_ext <<_ACEOF
11946#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011947/* confdefs.h. */
11948_ACEOF
11949cat confdefs.h >>conftest.$ac_ext
11950cat >>conftest.$ac_ext <<_ACEOF
11951/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011952
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011953#include <sys/param.h>
11954#ifdef _TOSHIBA_INET6
11955yes
11956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011957_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011959 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011960 ipv6type=$i;
11961 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011962 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011963fi
11964rm -f conftest*
11965
11966 ;;
11967 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 cat >conftest.$ac_ext <<_ACEOF
11969#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011970/* confdefs.h. */
11971_ACEOF
11972cat confdefs.h >>conftest.$ac_ext
11973cat >>conftest.$ac_ext <<_ACEOF
11974/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011975
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011976#include </usr/local/v6/include/sys/v6config.h>
11977#ifdef __V6D__
11978yes
11979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011980_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011982 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011983 ipv6type=$i;
11984 ipv6lib=v6;
11985 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011986 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011987fi
11988rm -f conftest*
11989
11990 ;;
11991 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 cat >conftest.$ac_ext <<_ACEOF
11993#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011994/* confdefs.h. */
11995_ACEOF
11996cat confdefs.h >>conftest.$ac_ext
11997cat >>conftest.$ac_ext <<_ACEOF
11998/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012000#include <sys/param.h>
12001#ifdef _ZETA_MINAMI_INET6
12002yes
12003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012004_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012006 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012007 ipv6type=$i;
12008 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012009 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012010fi
12011rm -f conftest*
12012
12013 ;;
12014 esac
12015 if test "$ipv6type" != "unknown"; then
12016 break
12017 fi
12018 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 echo "$as_me:$LINENO: result: $ipv6type" >&5
12020echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012021fi
12022
12023if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12024 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12025 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12026 echo "using lib$ipv6lib"
12027 else
12028 if test $ipv6trylibc = "yes"; then
12029 echo "using libc"
12030 else
12031 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12032 echo "You need to fetch lib$ipv6lib.a from appropriate"
12033 echo 'ipv6 kit and compile beforehand.'
12034 exit 1
12035 fi
12036 fi
12037fi
12038
Jack Jansen7b8c7542002-04-14 20:12:41 +000012039# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012040echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12041echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012042
12043# Check whether --with-universal-newlines or --without-universal-newlines was given.
12044if test "${with_universal_newlines+set}" = set; then
12045 withval="$with_universal_newlines"
12046
12047fi;
12048
12049if test -z "$with_universal_newlines"
12050then with_universal_newlines="yes"
12051fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012052if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012053then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012054 echo --without-universal-newlines is unsupported, see README
12055 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012056else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012057
12058cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012059#define WITH_UNIVERSAL_NEWLINES 1
12060_ACEOF
12061
12062fi
12063echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12064echo "${ECHO_T}$with_universal_newlines" >&6
12065
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012066# Check for --with-doc-strings
12067echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12068echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12069
12070# Check whether --with-doc-strings or --without-doc-strings was given.
12071if test "${with_doc_strings+set}" = set; then
12072 withval="$with_doc_strings"
12073
12074fi;
12075
12076if test -z "$with_doc_strings"
12077then with_doc_strings="yes"
12078fi
12079if test "$with_doc_strings" != "no"
12080then
12081
12082cat >>confdefs.h <<\_ACEOF
12083#define WITH_DOC_STRINGS 1
12084_ACEOF
12085
12086fi
12087echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12088echo "${ECHO_T}$with_doc_strings" >&6
12089
Neil Schemenauera35c6882001-02-27 04:45:05 +000012090# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012091echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12092echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12093
Neil Schemenauera35c6882001-02-27 04:45:05 +000012094# Check whether --with-pymalloc or --without-pymalloc was given.
12095if test "${with_pymalloc+set}" = set; then
12096 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012097
Martin v. Löwis11437992002-04-12 09:54:03 +000012098fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012099
Neil Schemenauer16c22972002-03-22 15:34:49 +000012100if test -z "$with_pymalloc"
12101then with_pymalloc="yes"
12102fi
12103if test "$with_pymalloc" != "no"
12104then
Martin v. Löwis11437992002-04-12 09:54:03 +000012105
12106cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012107#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012108_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012109
12110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012111echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12112echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012113
Barry Warsawef82cd72000-06-30 16:21:01 +000012114# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012115echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12116echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12117
Barry Warsawef82cd72000-06-30 16:21:01 +000012118# Check whether --with-wctype-functions or --without-wctype-functions was given.
12119if test "${with_wctype_functions+set}" = set; then
12120 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012121
Barry Warsawef82cd72000-06-30 16:21:01 +000012122if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012123then
12124
12125cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012126#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012127_ACEOF
12128
12129 echo "$as_me:$LINENO: result: yes" >&5
12130echo "${ECHO_T}yes" >&6
12131else echo "$as_me:$LINENO: result: no" >&5
12132echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012133fi
12134else
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 echo "$as_me:$LINENO: result: no" >&5
12136echo "${ECHO_T}no" >&6
12137fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012139# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012140
Guido van Rossum98935bf2001-09-05 19:13:16 +000012141DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012142
Martin v. Löwis11437992002-04-12 09:54:03 +000012143echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12144echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12145
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012146# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012147if test "${with_sgi_dl+set}" = set; then
12148 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012149
12150echo "$as_me:$LINENO: result: $withval" >&5
12151echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012152echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012153exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
12155cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012157_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012158
Guido van Rossume97ee181999-12-20 21:27:22 +000012159DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012160dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012161if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012162then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012163else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12164echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12165 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012166fi
12167DLINCLDIR=${dldir}
12168LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012169else
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 echo "$as_me:$LINENO: result: no" >&5
12171echo "${ECHO_T}no" >&6
12172fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012173
Martin v. Löwis11437992002-04-12 09:54:03 +000012174echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12175echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012176
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012178if test "${with_dl_dld+set}" = set; then
12179 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012180
12181echo "$as_me:$LINENO: result: $withval" >&5
12182echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012183echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012184exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012185
12186cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012187#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012188_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012189
Guido van Rossume97ee181999-12-20 21:27:22 +000012190DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012191dldir=`echo "$withval" | sed 's/,.*//'`
12192dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012193if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012194then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012195else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12196echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12197 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012198fi
12199DLINCLDIR=${dldir}
12200LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012201else
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 echo "$as_me:$LINENO: result: no" >&5
12203echo "${ECHO_T}no" >&6
12204fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012205
Guido van Rossume97ee181999-12-20 21:27:22 +000012206# the dlopen() function means we might want to use dynload_shlib.o. some
12207# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
Thomas Wouters3a584202000-08-05 23:28:51 +000012209for ac_func in dlopen
12210do
Martin v. Löwis11437992002-04-12 09:54:03 +000012211as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12212echo "$as_me:$LINENO: checking for $ac_func" >&5
12213echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12214if eval "test \"\${$as_ac_var+set}\" = set"; then
12215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012216else
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 cat >conftest.$ac_ext <<_ACEOF
12218#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012219/* confdefs.h. */
12220_ACEOF
12221cat confdefs.h >>conftest.$ac_ext
12222cat >>conftest.$ac_ext <<_ACEOF
12223/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012224/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012225 which can conflict with char $ac_func (); below.
12226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012227 <limits.h> exists even on freestanding compilers. Under hpux,
12228 including <limits.h> includes <sys/time.h> and causes problems
12229 checking for functions defined therein. */
12230#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012231# include <limits.h>
12232#else
12233# include <assert.h>
12234#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012235/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012236#ifdef __cplusplus
12237extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012238{
Martin v. Löwis11437992002-04-12 09:54:03 +000012239#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012240/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 builtin and then its argument prototype would still apply. */
12242char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012243/* The GNU C library defines this for functions which it implements
12244 to always fail with ENOSYS. Some functions are actually named
12245 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012246#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012247choke me
12248#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012249char (*f) () = $ac_func;
12250#endif
12251#ifdef __cplusplus
12252}
Guido van Rossume97ee181999-12-20 21:27:22 +000012253#endif
12254
Skip Montanaro6dead952003-09-25 14:50:04 +000012255int
12256main ()
12257{
12258return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 ;
12260 return 0;
12261}
12262_ACEOF
12263rm -f conftest.$ac_objext conftest$ac_exeext
12264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12265 (eval $ac_link) 2>&5
12266 ac_status=$?
12267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12268 (exit $ac_status); } &&
12269 { ac_try='test -s conftest$ac_exeext'
12270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12271 (eval $ac_try) 2>&5
12272 ac_status=$?
12273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274 (exit $ac_status); }; }; then
12275 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012276else
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012278sed 's/^/| /' conftest.$ac_ext >&5
12279
Martin v. Löwis11437992002-04-12 09:54:03 +000012280eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012284echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12285echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12286if test `eval echo '${'$as_ac_var'}'` = yes; then
12287 cat >>confdefs.h <<_ACEOF
12288#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12289_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012290
Guido van Rossume97ee181999-12-20 21:27:22 +000012291fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012292done
Guido van Rossume97ee181999-12-20 21:27:22 +000012293
Michael W. Hudson54241132001-12-07 15:38:26 +000012294
Guido van Rossume97ee181999-12-20 21:27:22 +000012295# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12296# loading of modules.
12297
Martin v. Löwis11437992002-04-12 09:54:03 +000012298echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12299echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012300if test -z "$DYNLOADFILE"
12301then
12302 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012303 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12304 if test "$ac_cv_func_dlopen" = yes
12305 then DYNLOADFILE="dynload_shlib.o"
12306 else DYNLOADFILE="dynload_aix.o"
12307 fi
12308 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012309 BeOS*) DYNLOADFILE="dynload_beos.o";;
12310 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012311 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012312 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012313 *)
12314 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12315 # out any dynamic loading
12316 if test "$ac_cv_func_dlopen" = yes
12317 then DYNLOADFILE="dynload_shlib.o"
12318 else DYNLOADFILE="dynload_stub.o"
12319 fi
12320 ;;
12321 esac
12322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012323echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12324echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012325if test "$DYNLOADFILE" != "dynload_stub.o"
12326then
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
12328cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012329#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012330_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012331
12332fi
12333
Neil Schemenauer4e425612001-06-19 15:44:15 +000012334# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12335
Michael W. Hudson54241132001-12-07 15:38:26 +000012336
Martin v. Löwis11437992002-04-12 09:54:03 +000012337echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12338echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012339if test -z "$MACHDEP_OBJS"
12340then
Jack Jansene578a632001-08-15 01:27:14 +000012341 MACHDEP_OBJS=$extra_machdep_objs
12342else
12343 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012345echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12346echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012347
Guido van Rossum627b2d71993-12-24 10:39:16 +000012348# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012420
Martin v. Löwisd5843682002-11-21 20:41:28 +000012421for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012422 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012423 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012424 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012425 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012426 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012427 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012428 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012429 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012430 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012431 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012432 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012433do
Martin v. Löwis11437992002-04-12 09:54:03 +000012434as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12435echo "$as_me:$LINENO: checking for $ac_func" >&5
12436echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12437if eval "test \"\${$as_ac_var+set}\" = set"; then
12438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439else
Martin v. Löwis11437992002-04-12 09:54:03 +000012440 cat >conftest.$ac_ext <<_ACEOF
12441#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* confdefs.h. */
12443_ACEOF
12444cat confdefs.h >>conftest.$ac_ext
12445cat >>conftest.$ac_ext <<_ACEOF
12446/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012447/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012448 which can conflict with char $ac_func (); below.
12449 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012450 <limits.h> exists even on freestanding compilers. Under hpux,
12451 including <limits.h> includes <sys/time.h> and causes problems
12452 checking for functions defined therein. */
12453#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012454# include <limits.h>
12455#else
12456# include <assert.h>
12457#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012458/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012459#ifdef __cplusplus
12460extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012461{
Martin v. Löwis11437992002-04-12 09:54:03 +000012462#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012463/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 builtin and then its argument prototype would still apply. */
12465char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012466/* The GNU C library defines this for functions which it implements
12467 to always fail with ENOSYS. Some functions are actually named
12468 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012470choke me
12471#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012472char (*f) () = $ac_func;
12473#endif
12474#ifdef __cplusplus
12475}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012476#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012477
Skip Montanaro6dead952003-09-25 14:50:04 +000012478int
12479main ()
12480{
12481return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 ;
12483 return 0;
12484}
12485_ACEOF
12486rm -f conftest.$ac_objext conftest$ac_exeext
12487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12488 (eval $ac_link) 2>&5
12489 ac_status=$?
12490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12491 (exit $ac_status); } &&
12492 { ac_try='test -s conftest$ac_exeext'
12493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12494 (eval $ac_try) 2>&5
12495 ac_status=$?
12496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497 (exit $ac_status); }; }; then
12498 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012499else
Martin v. Löwis11437992002-04-12 09:54:03 +000012500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012501sed 's/^/| /' conftest.$ac_ext >&5
12502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012507echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12508echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12509if test `eval echo '${'$as_ac_var'}'` = yes; then
12510 cat >>confdefs.h <<_ACEOF
12511#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12512_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012513
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012514fi
12515done
12516
Michael W. Hudson54241132001-12-07 15:38:26 +000012517
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012518# For some functions, having a definition is not sufficient, since
12519# we want to take their address.
12520echo "$as_me:$LINENO: checking for chroot" >&5
12521echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12522cat >conftest.$ac_ext <<_ACEOF
12523#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012524/* confdefs.h. */
12525_ACEOF
12526cat confdefs.h >>conftest.$ac_ext
12527cat >>conftest.$ac_ext <<_ACEOF
12528/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012529#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012530int
12531main ()
12532{
12533void *x=chroot
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538rm -f conftest.$ac_objext
12539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12540 (eval $ac_compile) 2>&5
12541 ac_status=$?
12542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543 (exit $ac_status); } &&
12544 { ac_try='test -s conftest.$ac_objext'
12545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12546 (eval $ac_try) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); }; }; then
12550
12551cat >>confdefs.h <<\_ACEOF
12552#define HAVE_CHROOT 1
12553_ACEOF
12554
12555 echo "$as_me:$LINENO: result: yes" >&5
12556echo "${ECHO_T}yes" >&6
12557else
12558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012559sed 's/^/| /' conftest.$ac_ext >&5
12560
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012561echo "$as_me:$LINENO: result: no" >&5
12562echo "${ECHO_T}no" >&6
12563
12564fi
12565rm -f conftest.$ac_objext conftest.$ac_ext
12566echo "$as_me:$LINENO: checking for link" >&5
12567echo $ECHO_N "checking for link... $ECHO_C" >&6
12568cat >conftest.$ac_ext <<_ACEOF
12569#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012570/* confdefs.h. */
12571_ACEOF
12572cat confdefs.h >>conftest.$ac_ext
12573cat >>conftest.$ac_ext <<_ACEOF
12574/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012575#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012576int
12577main ()
12578{
12579void *x=link
12580 ;
12581 return 0;
12582}
12583_ACEOF
12584rm -f conftest.$ac_objext
12585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12586 (eval $ac_compile) 2>&5
12587 ac_status=$?
12588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12589 (exit $ac_status); } &&
12590 { ac_try='test -s conftest.$ac_objext'
12591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12592 (eval $ac_try) 2>&5
12593 ac_status=$?
12594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12595 (exit $ac_status); }; }; then
12596
12597cat >>confdefs.h <<\_ACEOF
12598#define HAVE_LINK 1
12599_ACEOF
12600
12601 echo "$as_me:$LINENO: result: yes" >&5
12602echo "${ECHO_T}yes" >&6
12603else
12604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012605sed 's/^/| /' conftest.$ac_ext >&5
12606
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012607echo "$as_me:$LINENO: result: no" >&5
12608echo "${ECHO_T}no" >&6
12609
12610fi
12611rm -f conftest.$ac_objext conftest.$ac_ext
12612echo "$as_me:$LINENO: checking for symlink" >&5
12613echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12614cat >conftest.$ac_ext <<_ACEOF
12615#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012616/* confdefs.h. */
12617_ACEOF
12618cat confdefs.h >>conftest.$ac_ext
12619cat >>conftest.$ac_ext <<_ACEOF
12620/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012621#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012622int
12623main ()
12624{
12625void *x=symlink
12626 ;
12627 return 0;
12628}
12629_ACEOF
12630rm -f conftest.$ac_objext
12631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12632 (eval $ac_compile) 2>&5
12633 ac_status=$?
12634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12635 (exit $ac_status); } &&
12636 { ac_try='test -s conftest.$ac_objext'
12637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12638 (eval $ac_try) 2>&5
12639 ac_status=$?
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); }; }; then
12642
12643cat >>confdefs.h <<\_ACEOF
12644#define HAVE_SYMLINK 1
12645_ACEOF
12646
12647 echo "$as_me:$LINENO: result: yes" >&5
12648echo "${ECHO_T}yes" >&6
12649else
12650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012651sed 's/^/| /' conftest.$ac_ext >&5
12652
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012653echo "$as_me:$LINENO: result: no" >&5
12654echo "${ECHO_T}no" >&6
12655
12656fi
12657rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012658echo "$as_me:$LINENO: checking for fchdir" >&5
12659echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12660cat >conftest.$ac_ext <<_ACEOF
12661#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012662/* confdefs.h. */
12663_ACEOF
12664cat confdefs.h >>conftest.$ac_ext
12665cat >>conftest.$ac_ext <<_ACEOF
12666/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012667#include <unistd.h>
12668int
12669main ()
12670{
12671void *x=fchdir
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676rm -f conftest.$ac_objext
12677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12678 (eval $ac_compile) 2>&5
12679 ac_status=$?
12680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12681 (exit $ac_status); } &&
12682 { ac_try='test -s conftest.$ac_objext'
12683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12684 (eval $ac_try) 2>&5
12685 ac_status=$?
12686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12687 (exit $ac_status); }; }; then
12688
12689cat >>confdefs.h <<\_ACEOF
12690#define HAVE_FCHDIR 1
12691_ACEOF
12692
12693 echo "$as_me:$LINENO: result: yes" >&5
12694echo "${ECHO_T}yes" >&6
12695else
12696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012697sed 's/^/| /' conftest.$ac_ext >&5
12698
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012699echo "$as_me:$LINENO: result: no" >&5
12700echo "${ECHO_T}no" >&6
12701
12702fi
12703rm -f conftest.$ac_objext conftest.$ac_ext
12704echo "$as_me:$LINENO: checking for fsync" >&5
12705echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12706cat >conftest.$ac_ext <<_ACEOF
12707#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012708/* confdefs.h. */
12709_ACEOF
12710cat confdefs.h >>conftest.$ac_ext
12711cat >>conftest.$ac_ext <<_ACEOF
12712/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012713#include <unistd.h>
12714int
12715main ()
12716{
12717void *x=fsync
12718 ;
12719 return 0;
12720}
12721_ACEOF
12722rm -f conftest.$ac_objext
12723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12724 (eval $ac_compile) 2>&5
12725 ac_status=$?
12726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12727 (exit $ac_status); } &&
12728 { ac_try='test -s conftest.$ac_objext'
12729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12730 (eval $ac_try) 2>&5
12731 ac_status=$?
12732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12733 (exit $ac_status); }; }; then
12734
12735cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012736#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012737_ACEOF
12738
12739 echo "$as_me:$LINENO: result: yes" >&5
12740echo "${ECHO_T}yes" >&6
12741else
12742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012743sed 's/^/| /' conftest.$ac_ext >&5
12744
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012745echo "$as_me:$LINENO: result: no" >&5
12746echo "${ECHO_T}no" >&6
12747
12748fi
12749rm -f conftest.$ac_objext conftest.$ac_ext
12750echo "$as_me:$LINENO: checking for fdatasync" >&5
12751echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12752cat >conftest.$ac_ext <<_ACEOF
12753#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012754/* confdefs.h. */
12755_ACEOF
12756cat confdefs.h >>conftest.$ac_ext
12757cat >>conftest.$ac_ext <<_ACEOF
12758/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012759#include <unistd.h>
12760int
12761main ()
12762{
12763void *x=fdatasync
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768rm -f conftest.$ac_objext
12769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12770 (eval $ac_compile) 2>&5
12771 ac_status=$?
12772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12773 (exit $ac_status); } &&
12774 { ac_try='test -s conftest.$ac_objext'
12775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12776 (eval $ac_try) 2>&5
12777 ac_status=$?
12778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12779 (exit $ac_status); }; }; then
12780
12781cat >>confdefs.h <<\_ACEOF
12782#define HAVE_FDATASYNC 1
12783_ACEOF
12784
12785 echo "$as_me:$LINENO: result: yes" >&5
12786echo "${ECHO_T}yes" >&6
12787else
12788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012789sed 's/^/| /' conftest.$ac_ext >&5
12790
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012791echo "$as_me:$LINENO: result: no" >&5
12792echo "${ECHO_T}no" >&6
12793
12794fi
12795rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012796
Martin v. Löwisd5843682002-11-21 20:41:28 +000012797# On some systems (eg. FreeBSD 5), we would find a definition of the
12798# functions ctermid_r, setgroups in the library, but no prototype
12799# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12800# address to avoid compiler warnings and potential miscompilations
12801# because of the missing prototypes.
12802
12803echo "$as_me:$LINENO: checking for ctermid_r" >&5
12804echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12805cat >conftest.$ac_ext <<_ACEOF
12806#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* confdefs.h. */
12808_ACEOF
12809cat confdefs.h >>conftest.$ac_ext
12810cat >>conftest.$ac_ext <<_ACEOF
12811/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012812
12813#include "confdefs.h"
12814#include <stdio.h>
12815
Martin v. Löwisd5843682002-11-21 20:41:28 +000012816int
12817main ()
12818{
12819void* p = ctermid_r
12820 ;
12821 return 0;
12822}
12823_ACEOF
12824rm -f conftest.$ac_objext
12825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12826 (eval $ac_compile) 2>&5
12827 ac_status=$?
12828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829 (exit $ac_status); } &&
12830 { ac_try='test -s conftest.$ac_objext'
12831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12832 (eval $ac_try) 2>&5
12833 ac_status=$?
12834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835 (exit $ac_status); }; }; then
12836
12837cat >>confdefs.h <<\_ACEOF
12838#define HAVE_CTERMID_R 1
12839_ACEOF
12840
12841 echo "$as_me:$LINENO: result: yes" >&5
12842echo "${ECHO_T}yes" >&6
12843else
12844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012845sed 's/^/| /' conftest.$ac_ext >&5
12846
Martin v. Löwisd5843682002-11-21 20:41:28 +000012847echo "$as_me:$LINENO: result: no" >&5
12848echo "${ECHO_T}no" >&6
12849
12850fi
12851rm -f conftest.$ac_objext conftest.$ac_ext
12852
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012853echo "$as_me:$LINENO: checking for flock" >&5
12854echo $ECHO_N "checking for flock... $ECHO_C" >&6
12855cat >conftest.$ac_ext <<_ACEOF
12856#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* confdefs.h. */
12858_ACEOF
12859cat confdefs.h >>conftest.$ac_ext
12860cat >>conftest.$ac_ext <<_ACEOF
12861/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012862
12863#include "confdefs.h"
12864#include <sys/file.h>
12865
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012866int
12867main ()
12868{
12869void* p = flock
12870 ;
12871 return 0;
12872}
12873_ACEOF
12874rm -f conftest.$ac_objext
12875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12876 (eval $ac_compile) 2>&5
12877 ac_status=$?
12878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12879 (exit $ac_status); } &&
12880 { ac_try='test -s conftest.$ac_objext'
12881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12882 (eval $ac_try) 2>&5
12883 ac_status=$?
12884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12885 (exit $ac_status); }; }; then
12886
12887cat >>confdefs.h <<\_ACEOF
12888#define HAVE_FLOCK 1
12889_ACEOF
12890
12891 echo "$as_me:$LINENO: result: yes" >&5
12892echo "${ECHO_T}yes" >&6
12893else
12894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012895sed 's/^/| /' conftest.$ac_ext >&5
12896
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012897echo "$as_me:$LINENO: result: no" >&5
12898echo "${ECHO_T}no" >&6
12899
12900fi
12901rm -f conftest.$ac_objext conftest.$ac_ext
12902
12903echo "$as_me:$LINENO: checking for getpagesize" >&5
12904echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12905cat >conftest.$ac_ext <<_ACEOF
12906#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012907/* confdefs.h. */
12908_ACEOF
12909cat confdefs.h >>conftest.$ac_ext
12910cat >>conftest.$ac_ext <<_ACEOF
12911/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012912
12913#include "confdefs.h"
12914#include <unistd.h>
12915
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012916int
12917main ()
12918{
12919void* p = getpagesize
12920 ;
12921 return 0;
12922}
12923_ACEOF
12924rm -f conftest.$ac_objext
12925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12926 (eval $ac_compile) 2>&5
12927 ac_status=$?
12928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929 (exit $ac_status); } &&
12930 { ac_try='test -s conftest.$ac_objext'
12931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12932 (eval $ac_try) 2>&5
12933 ac_status=$?
12934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12935 (exit $ac_status); }; }; then
12936
12937cat >>confdefs.h <<\_ACEOF
12938#define HAVE_GETPAGESIZE 1
12939_ACEOF
12940
12941 echo "$as_me:$LINENO: result: yes" >&5
12942echo "${ECHO_T}yes" >&6
12943else
12944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012945sed 's/^/| /' conftest.$ac_ext >&5
12946
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012947echo "$as_me:$LINENO: result: no" >&5
12948echo "${ECHO_T}no" >&6
12949
12950fi
12951rm -f conftest.$ac_objext conftest.$ac_ext
12952
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012953for ac_prog in true
12954do
12955 # Extract the first word of "$ac_prog", so it can be a program name with args.
12956set dummy $ac_prog; ac_word=$2
12957echo "$as_me:$LINENO: checking for $ac_word" >&5
12958echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12959if test "${ac_cv_prog_TRUE+set}" = set; then
12960 echo $ECHO_N "(cached) $ECHO_C" >&6
12961else
12962 if test -n "$TRUE"; then
12963 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12964else
12965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12966for as_dir in $PATH
12967do
12968 IFS=$as_save_IFS
12969 test -z "$as_dir" && as_dir=.
12970 for ac_exec_ext in '' $ac_executable_extensions; do
12971 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12972 ac_cv_prog_TRUE="$ac_prog"
12973 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12974 break 2
12975 fi
12976done
12977done
12978
12979fi
12980fi
12981TRUE=$ac_cv_prog_TRUE
12982if test -n "$TRUE"; then
12983 echo "$as_me:$LINENO: result: $TRUE" >&5
12984echo "${ECHO_T}$TRUE" >&6
12985else
12986 echo "$as_me:$LINENO: result: no" >&5
12987echo "${ECHO_T}no" >&6
12988fi
12989
12990 test -n "$TRUE" && break
12991done
12992test -n "$TRUE" || TRUE="/bin/true"
12993
12994
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012995echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12996echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12997if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12998 echo $ECHO_N "(cached) $ECHO_C" >&6
12999else
13000 ac_check_lib_save_LIBS=$LIBS
13001LIBS="-lc $LIBS"
13002cat >conftest.$ac_ext <<_ACEOF
13003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* confdefs.h. */
13005_ACEOF
13006cat confdefs.h >>conftest.$ac_ext
13007cat >>conftest.$ac_ext <<_ACEOF
13008/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013009
13010/* Override any gcc2 internal prototype to avoid an error. */
13011#ifdef __cplusplus
13012extern "C"
13013#endif
13014/* We use char because int might match the return type of a gcc2
13015 builtin and then its argument prototype would still apply. */
13016char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013017int
13018main ()
13019{
13020inet_aton ();
13021 ;
13022 return 0;
13023}
13024_ACEOF
13025rm -f conftest.$ac_objext conftest$ac_exeext
13026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13027 (eval $ac_link) 2>&5
13028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); } &&
13031 { ac_try='test -s conftest$ac_exeext'
13032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13033 (eval $ac_try) 2>&5
13034 ac_status=$?
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); }; }; then
13037 ac_cv_lib_c_inet_aton=yes
13038else
13039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013040sed 's/^/| /' conftest.$ac_ext >&5
13041
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013042ac_cv_lib_c_inet_aton=no
13043fi
13044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13045LIBS=$ac_check_lib_save_LIBS
13046fi
13047echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13048echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13049if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013050 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013051else
13052
13053echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13054echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13055if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13056 echo $ECHO_N "(cached) $ECHO_C" >&6
13057else
13058 ac_check_lib_save_LIBS=$LIBS
13059LIBS="-lresolv $LIBS"
13060cat >conftest.$ac_ext <<_ACEOF
13061#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013062/* confdefs.h. */
13063_ACEOF
13064cat confdefs.h >>conftest.$ac_ext
13065cat >>conftest.$ac_ext <<_ACEOF
13066/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013067
13068/* Override any gcc2 internal prototype to avoid an error. */
13069#ifdef __cplusplus
13070extern "C"
13071#endif
13072/* We use char because int might match the return type of a gcc2
13073 builtin and then its argument prototype would still apply. */
13074char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013075int
13076main ()
13077{
13078inet_aton ();
13079 ;
13080 return 0;
13081}
13082_ACEOF
13083rm -f conftest.$ac_objext conftest$ac_exeext
13084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13085 (eval $ac_link) 2>&5
13086 ac_status=$?
13087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13088 (exit $ac_status); } &&
13089 { ac_try='test -s conftest$ac_exeext'
13090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13091 (eval $ac_try) 2>&5
13092 ac_status=$?
13093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13094 (exit $ac_status); }; }; then
13095 ac_cv_lib_resolv_inet_aton=yes
13096else
13097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013098sed 's/^/| /' conftest.$ac_ext >&5
13099
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013100ac_cv_lib_resolv_inet_aton=no
13101fi
13102rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13103LIBS=$ac_check_lib_save_LIBS
13104fi
13105echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13106echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13107if test $ac_cv_lib_resolv_inet_aton = yes; then
13108 cat >>confdefs.h <<_ACEOF
13109#define HAVE_LIBRESOLV 1
13110_ACEOF
13111
13112 LIBS="-lresolv $LIBS"
13113
13114fi
13115
13116
13117fi
13118
13119
Martin v. Löwise9416172003-05-03 10:12:45 +000013120echo "$as_me:$LINENO: checking for hstrerror" >&5
13121echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13122cat >conftest.$ac_ext <<_ACEOF
13123#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* confdefs.h. */
13125_ACEOF
13126cat confdefs.h >>conftest.$ac_ext
13127cat >>conftest.$ac_ext <<_ACEOF
13128/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013129
13130#include "confdefs.h"
13131#include <netdb.h>
13132
Martin v. Löwise9416172003-05-03 10:12:45 +000013133int
13134main ()
13135{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013136void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013137 ;
13138 return 0;
13139}
13140_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013141rm -f conftest.$ac_objext conftest$ac_exeext
13142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13143 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013144 ac_status=$?
13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13146 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013147 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13149 (eval $ac_try) 2>&5
13150 ac_status=$?
13151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13152 (exit $ac_status); }; }; then
13153
13154cat >>confdefs.h <<\_ACEOF
13155#define HAVE_HSTRERROR 1
13156_ACEOF
13157
13158 echo "$as_me:$LINENO: result: yes" >&5
13159echo "${ECHO_T}yes" >&6
13160else
13161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013162sed 's/^/| /' conftest.$ac_ext >&5
13163
Martin v. Löwise9416172003-05-03 10:12:45 +000013164echo "$as_me:$LINENO: result: no" >&5
13165echo "${ECHO_T}no" >&6
13166
13167fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013169
13170echo "$as_me:$LINENO: checking for inet_aton" >&5
13171echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13172cat >conftest.$ac_ext <<_ACEOF
13173#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013174/* confdefs.h. */
13175_ACEOF
13176cat confdefs.h >>conftest.$ac_ext
13177cat >>conftest.$ac_ext <<_ACEOF
13178/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013179
13180#include "confdefs.h"
13181#include <sys/socket.h>
13182#include <netinet/in.h>
13183#include <arpa/inet.h>
13184
Martin v. Löwise9416172003-05-03 10:12:45 +000013185int
13186main ()
13187{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013188void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013189 ;
13190 return 0;
13191}
13192_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013193rm -f conftest.$ac_objext conftest$ac_exeext
13194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13195 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013196 ac_status=$?
13197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13198 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013199 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13201 (eval $ac_try) 2>&5
13202 ac_status=$?
13203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13204 (exit $ac_status); }; }; then
13205
13206cat >>confdefs.h <<\_ACEOF
13207#define HAVE_INET_ATON 1
13208_ACEOF
13209
13210 echo "$as_me:$LINENO: result: yes" >&5
13211echo "${ECHO_T}yes" >&6
13212else
13213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013214sed 's/^/| /' conftest.$ac_ext >&5
13215
Martin v. Löwise9416172003-05-03 10:12:45 +000013216echo "$as_me:$LINENO: result: no" >&5
13217echo "${ECHO_T}no" >&6
13218
13219fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013221
13222echo "$as_me:$LINENO: checking for inet_pton" >&5
13223echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13224cat >conftest.$ac_ext <<_ACEOF
13225#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* confdefs.h. */
13227_ACEOF
13228cat confdefs.h >>conftest.$ac_ext
13229cat >>conftest.$ac_ext <<_ACEOF
13230/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013231
13232#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013233#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013234#include <sys/socket.h>
13235#include <netinet/in.h>
13236#include <arpa/inet.h>
13237
Martin v. Löwise9416172003-05-03 10:12:45 +000013238int
13239main ()
13240{
13241void* p = inet_pton
13242 ;
13243 return 0;
13244}
13245_ACEOF
13246rm -f conftest.$ac_objext
13247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13248 (eval $ac_compile) 2>&5
13249 ac_status=$?
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); } &&
13252 { ac_try='test -s conftest.$ac_objext'
13253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13254 (eval $ac_try) 2>&5
13255 ac_status=$?
13256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257 (exit $ac_status); }; }; then
13258
13259cat >>confdefs.h <<\_ACEOF
13260#define HAVE_INET_PTON 1
13261_ACEOF
13262
13263 echo "$as_me:$LINENO: result: yes" >&5
13264echo "${ECHO_T}yes" >&6
13265else
13266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013267sed 's/^/| /' conftest.$ac_ext >&5
13268
Martin v. Löwise9416172003-05-03 10:12:45 +000013269echo "$as_me:$LINENO: result: no" >&5
13270echo "${ECHO_T}no" >&6
13271
13272fi
13273rm -f conftest.$ac_objext conftest.$ac_ext
13274
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013275# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013276echo "$as_me:$LINENO: checking for setgroups" >&5
13277echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13278cat >conftest.$ac_ext <<_ACEOF
13279#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013280/* confdefs.h. */
13281_ACEOF
13282cat confdefs.h >>conftest.$ac_ext
13283cat >>conftest.$ac_ext <<_ACEOF
13284/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013285
13286#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013287#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013288#ifdef HAVE_GRP_H
13289#include <grp.h>
13290#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013291
Martin v. Löwisd5843682002-11-21 20:41:28 +000013292int
13293main ()
13294{
13295void* p = setgroups
13296 ;
13297 return 0;
13298}
13299_ACEOF
13300rm -f conftest.$ac_objext
13301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13302 (eval $ac_compile) 2>&5
13303 ac_status=$?
13304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305 (exit $ac_status); } &&
13306 { ac_try='test -s conftest.$ac_objext'
13307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13308 (eval $ac_try) 2>&5
13309 ac_status=$?
13310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 (exit $ac_status); }; }; then
13312
13313cat >>confdefs.h <<\_ACEOF
13314#define HAVE_SETGROUPS 1
13315_ACEOF
13316
13317 echo "$as_me:$LINENO: result: yes" >&5
13318echo "${ECHO_T}yes" >&6
13319else
13320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013321sed 's/^/| /' conftest.$ac_ext >&5
13322
Martin v. Löwisd5843682002-11-21 20:41:28 +000013323echo "$as_me:$LINENO: result: no" >&5
13324echo "${ECHO_T}no" >&6
13325
13326fi
13327rm -f conftest.$ac_objext conftest.$ac_ext
13328
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013329# check for openpty and forkpty
13330
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013332for ac_func in openpty
13333do
Martin v. Löwis11437992002-04-12 09:54:03 +000013334as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13335echo "$as_me:$LINENO: checking for $ac_func" >&5
13336echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13337if eval "test \"\${$as_ac_var+set}\" = set"; then
13338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013339else
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 cat >conftest.$ac_ext <<_ACEOF
13341#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013342/* confdefs.h. */
13343_ACEOF
13344cat confdefs.h >>conftest.$ac_ext
13345cat >>conftest.$ac_ext <<_ACEOF
13346/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013347/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013348 which can conflict with char $ac_func (); below.
13349 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013350 <limits.h> exists even on freestanding compilers. Under hpux,
13351 including <limits.h> includes <sys/time.h> and causes problems
13352 checking for functions defined therein. */
13353#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013354# include <limits.h>
13355#else
13356# include <assert.h>
13357#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013358/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013359#ifdef __cplusplus
13360extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013361{
Martin v. Löwis11437992002-04-12 09:54:03 +000013362#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013363/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 builtin and then its argument prototype would still apply. */
13365char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013366/* The GNU C library defines this for functions which it implements
13367 to always fail with ENOSYS. Some functions are actually named
13368 something starting with __ and the normal name is an alias. */
13369#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13370choke me
13371#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013372char (*f) () = $ac_func;
13373#endif
13374#ifdef __cplusplus
13375}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013376#endif
13377
Skip Montanaro6dead952003-09-25 14:50:04 +000013378int
13379main ()
13380{
13381return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 ;
13383 return 0;
13384}
13385_ACEOF
13386rm -f conftest.$ac_objext conftest$ac_exeext
13387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13388 (eval $ac_link) 2>&5
13389 ac_status=$?
13390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13391 (exit $ac_status); } &&
13392 { ac_try='test -s conftest$ac_exeext'
13393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13394 (eval $ac_try) 2>&5
13395 ac_status=$?
13396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13397 (exit $ac_status); }; }; then
13398 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013399else
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013401sed 's/^/| /' conftest.$ac_ext >&5
13402
Martin v. Löwis11437992002-04-12 09:54:03 +000013403eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013404fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013405rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013407echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13408echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13409if test `eval echo '${'$as_ac_var'}'` = yes; then
13410 cat >>confdefs.h <<_ACEOF
13411#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13412_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013414else
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13416echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13417if test "${ac_cv_lib_util_openpty+set}" = set; then
13418 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013419else
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013421LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013422cat >conftest.$ac_ext <<_ACEOF
13423#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013424/* confdefs.h. */
13425_ACEOF
13426cat confdefs.h >>conftest.$ac_ext
13427cat >>conftest.$ac_ext <<_ACEOF
13428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Fred Drake8cef4cf2000-06-28 16:40:38 +000013430/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013431#ifdef __cplusplus
13432extern "C"
13433#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013434/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 builtin and then its argument prototype would still apply. */
13436char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013437int
13438main ()
13439{
13440openpty ();
13441 ;
13442 return 0;
13443}
13444_ACEOF
13445rm -f conftest.$ac_objext conftest$ac_exeext
13446if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13447 (eval $ac_link) 2>&5
13448 ac_status=$?
13449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450 (exit $ac_status); } &&
13451 { ac_try='test -s conftest$ac_exeext'
13452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13453 (eval $ac_try) 2>&5
13454 ac_status=$?
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456 (exit $ac_status); }; }; then
13457 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013458else
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013460sed 's/^/| /' conftest.$ac_ext >&5
13461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013463fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013464rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13465LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013467echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13468echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13469if test $ac_cv_lib_util_openpty = yes; then
13470 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013471#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013472_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013473 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013474fi
13475
13476fi
13477done
13478
Martin v. Löwis11437992002-04-12 09:54:03 +000013479
Fred Drake8cef4cf2000-06-28 16:40:38 +000013480for ac_func in forkpty
13481do
Martin v. Löwis11437992002-04-12 09:54:03 +000013482as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13483echo "$as_me:$LINENO: checking for $ac_func" >&5
13484echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13485if eval "test \"\${$as_ac_var+set}\" = set"; then
13486 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013487else
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 cat >conftest.$ac_ext <<_ACEOF
13489#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013495/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013496 which can conflict with char $ac_func (); below.
13497 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013498 <limits.h> exists even on freestanding compilers. Under hpux,
13499 including <limits.h> includes <sys/time.h> and causes problems
13500 checking for functions defined therein. */
13501#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013502# include <limits.h>
13503#else
13504# include <assert.h>
13505#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013506/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013507#ifdef __cplusplus
13508extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013509{
Martin v. Löwis11437992002-04-12 09:54:03 +000013510#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013511/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013512 builtin and then its argument prototype would still apply. */
13513char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013514/* The GNU C library defines this for functions which it implements
13515 to always fail with ENOSYS. Some functions are actually named
13516 something starting with __ and the normal name is an alias. */
13517#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13518choke me
13519#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013520char (*f) () = $ac_func;
13521#endif
13522#ifdef __cplusplus
13523}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013524#endif
13525
Skip Montanaro6dead952003-09-25 14:50:04 +000013526int
13527main ()
13528{
13529return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013530 ;
13531 return 0;
13532}
13533_ACEOF
13534rm -f conftest.$ac_objext conftest$ac_exeext
13535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13536 (eval $ac_link) 2>&5
13537 ac_status=$?
13538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13539 (exit $ac_status); } &&
13540 { ac_try='test -s conftest$ac_exeext'
13541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13542 (eval $ac_try) 2>&5
13543 ac_status=$?
13544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13545 (exit $ac_status); }; }; then
13546 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013547else
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013549sed 's/^/| /' conftest.$ac_ext >&5
13550
Martin v. Löwis11437992002-04-12 09:54:03 +000013551eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013552fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013553rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013554fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013555echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13556echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13557if test `eval echo '${'$as_ac_var'}'` = yes; then
13558 cat >>confdefs.h <<_ACEOF
13559#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13560_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013561
Fred Drake8cef4cf2000-06-28 16:40:38 +000013562else
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13564echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13565if test "${ac_cv_lib_util_forkpty+set}" = set; then
13566 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013567else
Martin v. Löwis11437992002-04-12 09:54:03 +000013568 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013569LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013570cat >conftest.$ac_ext <<_ACEOF
13571#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013572/* confdefs.h. */
13573_ACEOF
13574cat confdefs.h >>conftest.$ac_ext
13575cat >>conftest.$ac_ext <<_ACEOF
13576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013577
Fred Drake8cef4cf2000-06-28 16:40:38 +000013578/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013579#ifdef __cplusplus
13580extern "C"
13581#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013582/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 builtin and then its argument prototype would still apply. */
13584char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013585int
13586main ()
13587{
13588forkpty ();
13589 ;
13590 return 0;
13591}
13592_ACEOF
13593rm -f conftest.$ac_objext conftest$ac_exeext
13594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13595 (eval $ac_link) 2>&5
13596 ac_status=$?
13597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13598 (exit $ac_status); } &&
13599 { ac_try='test -s conftest$ac_exeext'
13600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13601 (eval $ac_try) 2>&5
13602 ac_status=$?
13603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13604 (exit $ac_status); }; }; then
13605 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013606else
Martin v. Löwis11437992002-04-12 09:54:03 +000013607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013608sed 's/^/| /' conftest.$ac_ext >&5
13609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013612rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13613LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013615echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13616echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13617if test $ac_cv_lib_util_forkpty = yes; then
13618 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013619#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013620_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013621 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013622fi
13623
13624fi
13625done
13626
Jack Jansendd19cf82001-12-06 22:36:17 +000013627
Michael W. Hudson54241132001-12-07 15:38:26 +000013628# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
13630
13631
13632
13633
13634
Fred Drake8cef4cf2000-06-28 16:40:38 +000013635for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13636do
Martin v. Löwis11437992002-04-12 09:54:03 +000013637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13638echo "$as_me:$LINENO: checking for $ac_func" >&5
13639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13640if eval "test \"\${$as_ac_var+set}\" = set"; then
13641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013642else
Martin v. Löwis11437992002-04-12 09:54:03 +000013643 cat >conftest.$ac_ext <<_ACEOF
13644#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013645/* confdefs.h. */
13646_ACEOF
13647cat confdefs.h >>conftest.$ac_ext
13648cat >>conftest.$ac_ext <<_ACEOF
13649/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013650/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013651 which can conflict with char $ac_func (); below.
13652 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013653 <limits.h> exists even on freestanding compilers. Under hpux,
13654 including <limits.h> includes <sys/time.h> and causes problems
13655 checking for functions defined therein. */
13656#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013657# include <limits.h>
13658#else
13659# include <assert.h>
13660#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013661/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013662#ifdef __cplusplus
13663extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013664{
Martin v. Löwis11437992002-04-12 09:54:03 +000013665#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013666/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 builtin and then its argument prototype would still apply. */
13668char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013669/* The GNU C library defines this for functions which it implements
13670 to always fail with ENOSYS. Some functions are actually named
13671 something starting with __ and the normal name is an alias. */
13672#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13673choke me
13674#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013675char (*f) () = $ac_func;
13676#endif
13677#ifdef __cplusplus
13678}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013679#endif
13680
Skip Montanaro6dead952003-09-25 14:50:04 +000013681int
13682main ()
13683{
13684return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 ;
13686 return 0;
13687}
13688_ACEOF
13689rm -f conftest.$ac_objext conftest$ac_exeext
13690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13691 (eval $ac_link) 2>&5
13692 ac_status=$?
13693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13694 (exit $ac_status); } &&
13695 { ac_try='test -s conftest$ac_exeext'
13696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13697 (eval $ac_try) 2>&5
13698 ac_status=$?
13699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13700 (exit $ac_status); }; }; then
13701 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702else
Martin v. Löwis11437992002-04-12 09:54:03 +000013703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013704sed 's/^/| /' conftest.$ac_ext >&5
13705
Martin v. Löwis11437992002-04-12 09:54:03 +000013706eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013707fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013708rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013710echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13711echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13712if test `eval echo '${'$as_ac_var'}'` = yes; then
13713 cat >>confdefs.h <<_ACEOF
13714#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13715_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013716
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013718done
13719
Michael W. Hudson54241132001-12-07 15:38:26 +000013720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721
13722
13723
13724
13725
Martin v. Löwis1142de32002-03-29 16:28:31 +000013726for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013727do
Martin v. Löwis11437992002-04-12 09:54:03 +000013728as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13729echo "$as_me:$LINENO: checking for $ac_func" >&5
13730echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13731if eval "test \"\${$as_ac_var+set}\" = set"; then
13732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733else
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 cat >conftest.$ac_ext <<_ACEOF
13735#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013736/* confdefs.h. */
13737_ACEOF
13738cat confdefs.h >>conftest.$ac_ext
13739cat >>conftest.$ac_ext <<_ACEOF
13740/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013741/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013742 which can conflict with char $ac_func (); below.
13743 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013744 <limits.h> exists even on freestanding compilers. Under hpux,
13745 including <limits.h> includes <sys/time.h> and causes problems
13746 checking for functions defined therein. */
13747#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013748# include <limits.h>
13749#else
13750# include <assert.h>
13751#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013752/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013753#ifdef __cplusplus
13754extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013755{
Martin v. Löwis11437992002-04-12 09:54:03 +000013756#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013757/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 builtin and then its argument prototype would still apply. */
13759char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013760/* The GNU C library defines this for functions which it implements
13761 to always fail with ENOSYS. Some functions are actually named
13762 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013764choke me
13765#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013766char (*f) () = $ac_func;
13767#endif
13768#ifdef __cplusplus
13769}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013770#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013771
Skip Montanaro6dead952003-09-25 14:50:04 +000013772int
13773main ()
13774{
13775return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 ;
13777 return 0;
13778}
13779_ACEOF
13780rm -f conftest.$ac_objext conftest$ac_exeext
13781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13782 (eval $ac_link) 2>&5
13783 ac_status=$?
13784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785 (exit $ac_status); } &&
13786 { ac_try='test -s conftest$ac_exeext'
13787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13788 (eval $ac_try) 2>&5
13789 ac_status=$?
13790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13791 (exit $ac_status); }; }; then
13792 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013793else
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013795sed 's/^/| /' conftest.$ac_ext >&5
13796
Martin v. Löwis11437992002-04-12 09:54:03 +000013797eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013801echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13802echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13803if test `eval echo '${'$as_ac_var'}'` = yes; then
13804 cat >>confdefs.h <<_ACEOF
13805#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13806_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013807
Martin v. Löwis1142de32002-03-29 16:28:31 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013810fi
13811done
13812
13813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
Martin v. Löwis1142de32002-03-29 16:28:31 +000013815for ac_func in getpgrp
13816do
Martin v. Löwis11437992002-04-12 09:54:03 +000013817as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13818echo "$as_me:$LINENO: checking for $ac_func" >&5
13819echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13820if eval "test \"\${$as_ac_var+set}\" = set"; then
13821 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013822else
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 cat >conftest.$ac_ext <<_ACEOF
13824#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013825/* confdefs.h. */
13826_ACEOF
13827cat confdefs.h >>conftest.$ac_ext
13828cat >>conftest.$ac_ext <<_ACEOF
13829/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013830/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013831 which can conflict with char $ac_func (); below.
13832 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013833 <limits.h> exists even on freestanding compilers. Under hpux,
13834 including <limits.h> includes <sys/time.h> and causes problems
13835 checking for functions defined therein. */
13836#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013837# include <limits.h>
13838#else
13839# include <assert.h>
13840#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013841/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013842#ifdef __cplusplus
13843extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013844{
Martin v. Löwis11437992002-04-12 09:54:03 +000013845#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013846/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 builtin and then its argument prototype would still apply. */
13848char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013849/* The GNU C library defines this for functions which it implements
13850 to always fail with ENOSYS. Some functions are actually named
13851 something starting with __ and the normal name is an alias. */
13852#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13853choke me
13854#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013855char (*f) () = $ac_func;
13856#endif
13857#ifdef __cplusplus
13858}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013859#endif
13860
Skip Montanaro6dead952003-09-25 14:50:04 +000013861int
13862main ()
13863{
13864return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 ;
13866 return 0;
13867}
13868_ACEOF
13869rm -f conftest.$ac_objext conftest$ac_exeext
13870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13871 (eval $ac_link) 2>&5
13872 ac_status=$?
13873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13874 (exit $ac_status); } &&
13875 { ac_try='test -s conftest$ac_exeext'
13876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13877 (eval $ac_try) 2>&5
13878 ac_status=$?
13879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13880 (exit $ac_status); }; }; then
13881 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013882else
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013884sed 's/^/| /' conftest.$ac_ext >&5
13885
Martin v. Löwis11437992002-04-12 09:54:03 +000013886eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013887fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013888rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013890echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13891echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13892if test `eval echo '${'$as_ac_var'}'` = yes; then
13893 cat >>confdefs.h <<_ACEOF
13894#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13895_ACEOF
13896 cat >conftest.$ac_ext <<_ACEOF
13897#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013898/* confdefs.h. */
13899_ACEOF
13900cat confdefs.h >>conftest.$ac_ext
13901cat >>conftest.$ac_ext <<_ACEOF
13902/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013904int
13905main ()
13906{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ;
13909 return 0;
13910}
13911_ACEOF
13912rm -f conftest.$ac_objext
13913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13914 (eval $ac_compile) 2>&5
13915 ac_status=$?
13916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13917 (exit $ac_status); } &&
13918 { ac_try='test -s conftest.$ac_objext'
13919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13920 (eval $ac_try) 2>&5
13921 ac_status=$?
13922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923 (exit $ac_status); }; }; then
13924
13925cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013926#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013927_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
Guido van Rossumf78abae1997-01-21 22:02:36 +000013930else
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013932sed 's/^/| /' conftest.$ac_ext >&5
13933
Guido van Rossum627b2d71993-12-24 10:39:16 +000013934fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013935rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013936
Guido van Rossum627b2d71993-12-24 10:39:16 +000013937fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013938done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013939
Jack Jansen150753c2003-03-29 22:07:47 +000013940
13941for ac_func in setpgrp
13942do
13943as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13944echo "$as_me:$LINENO: checking for $ac_func" >&5
13945echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13946if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013948else
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 cat >conftest.$ac_ext <<_ACEOF
13950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013951/* confdefs.h. */
13952_ACEOF
13953cat confdefs.h >>conftest.$ac_ext
13954cat >>conftest.$ac_ext <<_ACEOF
13955/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013956/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013957 which can conflict with char $ac_func (); below.
13958 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013959 <limits.h> exists even on freestanding compilers. Under hpux,
13960 including <limits.h> includes <sys/time.h> and causes problems
13961 checking for functions defined therein. */
13962#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013963# include <limits.h>
13964#else
13965# include <assert.h>
13966#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013967/* Override any gcc2 internal prototype to avoid an error. */
13968#ifdef __cplusplus
13969extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013970{
Martin v. Löwis11437992002-04-12 09:54:03 +000013971#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013972/* We use char because int might match the return type of a gcc2
13973 builtin and then its argument prototype would still apply. */
13974char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013975/* The GNU C library defines this for functions which it implements
13976 to always fail with ENOSYS. Some functions are actually named
13977 something starting with __ and the normal name is an alias. */
13978#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13979choke me
13980#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013981char (*f) () = $ac_func;
13982#endif
13983#ifdef __cplusplus
13984}
Jack Jansen150753c2003-03-29 22:07:47 +000013985#endif
13986
Skip Montanaro6dead952003-09-25 14:50:04 +000013987int
13988main ()
13989{
13990return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 ;
13992 return 0;
13993}
13994_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013995rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13997 (eval $ac_link) 2>&5
13998 ac_status=$?
13999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014000 (exit $ac_status); } &&
14001 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14003 (eval $ac_try) 2>&5
14004 ac_status=$?
14005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14006 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014007 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014008else
Jack Jansen150753c2003-03-29 22:07:47 +000014009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014010sed 's/^/| /' conftest.$ac_ext >&5
14011
Jack Jansen150753c2003-03-29 22:07:47 +000014012eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014013fi
Jack Jansen150753c2003-03-29 22:07:47 +000014014rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014015fi
Jack Jansen150753c2003-03-29 22:07:47 +000014016echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14017echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14018if test `eval echo '${'$as_ac_var'}'` = yes; then
14019 cat >>confdefs.h <<_ACEOF
14020#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14021_ACEOF
14022 cat >conftest.$ac_ext <<_ACEOF
14023#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000014029#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000014030int
14031main ()
14032{
14033setpgrp(0,0);
14034 ;
14035 return 0;
14036}
14037_ACEOF
14038rm -f conftest.$ac_objext
14039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14040 (eval $ac_compile) 2>&5
14041 ac_status=$?
14042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14043 (exit $ac_status); } &&
14044 { ac_try='test -s conftest.$ac_objext'
14045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14046 (eval $ac_try) 2>&5
14047 ac_status=$?
14048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14049 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
14051cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014052#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014053_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014054
Jack Jansen150753c2003-03-29 22:07:47 +000014055
14056else
14057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014058sed 's/^/| /' conftest.$ac_ext >&5
14059
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014060fi
Jack Jansen150753c2003-03-29 22:07:47 +000014061rm -f conftest.$ac_objext conftest.$ac_ext
14062
14063fi
14064done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014065
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Thomas Wouters3a584202000-08-05 23:28:51 +000014067for ac_func in gettimeofday
14068do
Martin v. Löwis11437992002-04-12 09:54:03 +000014069as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14070echo "$as_me:$LINENO: checking for $ac_func" >&5
14071echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14072if eval "test \"\${$as_ac_var+set}\" = set"; then
14073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014074else
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 cat >conftest.$ac_ext <<_ACEOF
14076#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014077/* confdefs.h. */
14078_ACEOF
14079cat confdefs.h >>conftest.$ac_ext
14080cat >>conftest.$ac_ext <<_ACEOF
14081/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014082/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014083 which can conflict with char $ac_func (); below.
14084 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014085 <limits.h> exists even on freestanding compilers. Under hpux,
14086 including <limits.h> includes <sys/time.h> and causes problems
14087 checking for functions defined therein. */
14088#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014089# include <limits.h>
14090#else
14091# include <assert.h>
14092#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014093/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014094#ifdef __cplusplus
14095extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014096{
Martin v. Löwis11437992002-04-12 09:54:03 +000014097#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014098/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 builtin and then its argument prototype would still apply. */
14100char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101/* The GNU C library defines this for functions which it implements
14102 to always fail with ENOSYS. Some functions are actually named
14103 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014104#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105choke me
14106#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014107char (*f) () = $ac_func;
14108#endif
14109#ifdef __cplusplus
14110}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111#endif
14112
Skip Montanaro6dead952003-09-25 14:50:04 +000014113int
14114main ()
14115{
14116return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 ;
14118 return 0;
14119}
14120_ACEOF
14121rm -f conftest.$ac_objext conftest$ac_exeext
14122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14123 (eval $ac_link) 2>&5
14124 ac_status=$?
14125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14126 (exit $ac_status); } &&
14127 { ac_try='test -s conftest$ac_exeext'
14128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14129 (eval $ac_try) 2>&5
14130 ac_status=$?
14131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14132 (exit $ac_status); }; }; then
14133 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014134else
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014136sed 's/^/| /' conftest.$ac_ext >&5
14137
Martin v. Löwis11437992002-04-12 09:54:03 +000014138eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014140rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014142echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14143echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14144if test `eval echo '${'$as_ac_var'}'` = yes; then
14145 cat >>confdefs.h <<_ACEOF
14146#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14147_ACEOF
14148 cat >conftest.$ac_ext <<_ACEOF
14149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014150/* confdefs.h. */
14151_ACEOF
14152cat confdefs.h >>conftest.$ac_ext
14153cat >>conftest.$ac_ext <<_ACEOF
14154/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014155#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014156int
14157main ()
14158{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014159gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 ;
14161 return 0;
14162}
14163_ACEOF
14164rm -f conftest.$ac_objext
14165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14166 (eval $ac_compile) 2>&5
14167 ac_status=$?
14168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14169 (exit $ac_status); } &&
14170 { ac_try='test -s conftest.$ac_objext'
14171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14172 (eval $ac_try) 2>&5
14173 ac_status=$?
14174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14175 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014176 :
14177else
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014179sed 's/^/| /' conftest.$ac_ext >&5
14180
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
14182cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014183#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014184_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014185
Martin v. Löwis11437992002-04-12 09:54:03 +000014186
Guido van Rossum627b2d71993-12-24 10:39:16 +000014187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014188rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014190fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014191done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014192
Michael W. Hudson54241132001-12-07 15:38:26 +000014193
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014194echo "$as_me:$LINENO: checking for major" >&5
14195echo $ECHO_N "checking for major... $ECHO_C" >&6
14196cat >conftest.$ac_ext <<_ACEOF
14197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014198/* confdefs.h. */
14199_ACEOF
14200cat confdefs.h >>conftest.$ac_ext
14201cat >>conftest.$ac_ext <<_ACEOF
14202/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014203
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014204#if defined(MAJOR_IN_MKDEV)
14205#include <sys/mkdev.h>
14206#elif defined(MAJOR_IN_SYSMACROS)
14207#include <sys/sysmacros.h>
14208#else
14209#include <sys/types.h>
14210#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014211
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014212int
14213main ()
14214{
14215
14216 makedev(major(0),minor(0));
14217
14218 ;
14219 return 0;
14220}
14221_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014222rm -f conftest.$ac_objext conftest$ac_exeext
14223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14224 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014225 ac_status=$?
14226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014228 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230 (eval $ac_try) 2>&5
14231 ac_status=$?
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); }; }; then
14234
14235
14236cat >>confdefs.h <<\_ACEOF
14237#define HAVE_DEVICE_MACROS 1
14238_ACEOF
14239
14240 echo "$as_me:$LINENO: result: yes" >&5
14241echo "${ECHO_T}yes" >&6
14242
14243else
14244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014245sed 's/^/| /' conftest.$ac_ext >&5
14246
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014247
14248 echo "$as_me:$LINENO: result: no" >&5
14249echo "${ECHO_T}no" >&6
14250
14251fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014253
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014254# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014255# for [no]getaddrinfo in netdb.h.
14256echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14257echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14258cat >conftest.$ac_ext <<_ACEOF
14259#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014260/* confdefs.h. */
14261_ACEOF
14262cat confdefs.h >>conftest.$ac_ext
14263cat >>conftest.$ac_ext <<_ACEOF
14264/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014265
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014266#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014267#include <sys/socket.h>
14268#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014269#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014270
Martin v. Löwis11437992002-04-12 09:54:03 +000014271int
14272main ()
14273{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014274
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014275getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014276
Martin v. Löwis11437992002-04-12 09:54:03 +000014277 ;
14278 return 0;
14279}
14280_ACEOF
14281rm -f conftest.$ac_objext conftest$ac_exeext
14282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14283 (eval $ac_link) 2>&5
14284 ac_status=$?
14285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286 (exit $ac_status); } &&
14287 { ac_try='test -s conftest$ac_exeext'
14288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14289 (eval $ac_try) 2>&5
14290 ac_status=$?
14291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14292 (exit $ac_status); }; }; then
14293
14294echo "$as_me:$LINENO: result: yes" >&5
14295echo "${ECHO_T}yes" >&6
14296echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14297echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014298if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 echo "$as_me:$LINENO: result: buggy" >&5
14300echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014301buggygetaddrinfo=yes
14302else
Martin v. Löwis11437992002-04-12 09:54:03 +000014303 cat >conftest.$ac_ext <<_ACEOF
14304#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014305/* confdefs.h. */
14306_ACEOF
14307cat confdefs.h >>conftest.$ac_ext
14308cat >>conftest.$ac_ext <<_ACEOF
14309/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014310
14311#include <sys/types.h>
14312#include <netdb.h>
14313#include <string.h>
14314#include <sys/socket.h>
14315#include <netinet/in.h>
14316
14317main()
14318{
14319 int passive, gaierr, inet4 = 0, inet6 = 0;
14320 struct addrinfo hints, *ai, *aitop;
14321 char straddr[INET6_ADDRSTRLEN], strport[16];
14322
14323 for (passive = 0; passive <= 1; passive++) {
14324 memset(&hints, 0, sizeof(hints));
14325 hints.ai_family = AF_UNSPEC;
14326 hints.ai_flags = passive ? AI_PASSIVE : 0;
14327 hints.ai_socktype = SOCK_STREAM;
14328 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14329 (void)gai_strerror(gaierr);
14330 goto bad;
14331 }
14332 for (ai = aitop; ai; ai = ai->ai_next) {
14333 if (ai->ai_addr == NULL ||
14334 ai->ai_addrlen == 0 ||
14335 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14336 straddr, sizeof(straddr), strport, sizeof(strport),
14337 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14338 goto bad;
14339 }
14340 switch (ai->ai_family) {
14341 case AF_INET:
14342 if (strcmp(strport, "54321") != 0) {
14343 goto bad;
14344 }
14345 if (passive) {
14346 if (strcmp(straddr, "0.0.0.0") != 0) {
14347 goto bad;
14348 }
14349 } else {
14350 if (strcmp(straddr, "127.0.0.1") != 0) {
14351 goto bad;
14352 }
14353 }
14354 inet4++;
14355 break;
14356 case AF_INET6:
14357 if (strcmp(strport, "54321") != 0) {
14358 goto bad;
14359 }
14360 if (passive) {
14361 if (strcmp(straddr, "::") != 0) {
14362 goto bad;
14363 }
14364 } else {
14365 if (strcmp(straddr, "::1") != 0) {
14366 goto bad;
14367 }
14368 }
14369 inet6++;
14370 break;
14371 case AF_UNSPEC:
14372 goto bad;
14373 break;
14374 default:
14375 /* another family support? */
14376 break;
14377 }
14378 }
14379 }
14380
14381 if (!(inet4 == 0 || inet4 == 2))
14382 goto bad;
14383 if (!(inet6 == 0 || inet6 == 2))
14384 goto bad;
14385
14386 if (aitop)
14387 freeaddrinfo(aitop);
14388 exit(0);
14389
14390 bad:
14391 if (aitop)
14392 freeaddrinfo(aitop);
14393 exit(1);
14394}
14395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396_ACEOF
14397rm -f conftest$ac_exeext
14398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14399 (eval $ac_link) 2>&5
14400 ac_status=$?
14401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14404 (eval $ac_try) 2>&5
14405 ac_status=$?
14406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14407 (exit $ac_status); }; }; then
14408 echo "$as_me:$LINENO: result: good" >&5
14409echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014410buggygetaddrinfo=no
14411else
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 echo "$as_me: program exited with status $ac_status" >&5
14413echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014414sed 's/^/| /' conftest.$ac_ext >&5
14415
Martin v. Löwis11437992002-04-12 09:54:03 +000014416( exit $ac_status )
14417echo "$as_me:$LINENO: result: buggy" >&5
14418echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014419buggygetaddrinfo=yes
14420fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014421rm -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 +000014422fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014423else
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014425sed 's/^/| /' conftest.$ac_ext >&5
14426
Martin v. Löwis11437992002-04-12 09:54:03 +000014427
14428echo "$as_me:$LINENO: result: no" >&5
14429echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014430buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014431
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014434
14435if test "$buggygetaddrinfo" = "yes"; then
14436 if test "$ipv6" = "yes"; then
14437 echo 'Fatal: You must get working getaddrinfo() function.'
14438 echo ' or you can specify "--disable-ipv6"'.
14439 exit 1
14440 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014441else
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
14443cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014444#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014445_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014446
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014449for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014450do
Martin v. Löwis11437992002-04-12 09:54:03 +000014451as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14452echo "$as_me:$LINENO: checking for $ac_func" >&5
14453echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14454if eval "test \"\${$as_ac_var+set}\" = set"; then
14455 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014456else
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 cat >conftest.$ac_ext <<_ACEOF
14458#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* confdefs.h. */
14460_ACEOF
14461cat confdefs.h >>conftest.$ac_ext
14462cat >>conftest.$ac_ext <<_ACEOF
14463/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014464/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014465 which can conflict with char $ac_func (); below.
14466 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014467 <limits.h> exists even on freestanding compilers. Under hpux,
14468 including <limits.h> includes <sys/time.h> and causes problems
14469 checking for functions defined therein. */
14470#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014471# include <limits.h>
14472#else
14473# include <assert.h>
14474#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014475/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014476#ifdef __cplusplus
14477extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014478{
Martin v. Löwis11437992002-04-12 09:54:03 +000014479#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014480/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014481 builtin and then its argument prototype would still apply. */
14482char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014483/* The GNU C library defines this for functions which it implements
14484 to always fail with ENOSYS. Some functions are actually named
14485 something starting with __ and the normal name is an alias. */
14486#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14487choke me
14488#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014489char (*f) () = $ac_func;
14490#endif
14491#ifdef __cplusplus
14492}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014493#endif
14494
Skip Montanaro6dead952003-09-25 14:50:04 +000014495int
14496main ()
14497{
14498return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 ;
14500 return 0;
14501}
14502_ACEOF
14503rm -f conftest.$ac_objext conftest$ac_exeext
14504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14505 (eval $ac_link) 2>&5
14506 ac_status=$?
14507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14508 (exit $ac_status); } &&
14509 { ac_try='test -s conftest$ac_exeext'
14510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14511 (eval $ac_try) 2>&5
14512 ac_status=$?
14513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14514 (exit $ac_status); }; }; then
14515 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014516else
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014518sed 's/^/| /' conftest.$ac_ext >&5
14519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014524echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14525echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14526if test `eval echo '${'$as_ac_var'}'` = yes; then
14527 cat >>confdefs.h <<_ACEOF
14528#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14529_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014530
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014531fi
14532done
14533
Michael W. Hudson54241132001-12-07 15:38:26 +000014534
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014535# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014536echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14537echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14538if test "${ac_cv_header_time+set}" = set; then
14539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014540else
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 cat >conftest.$ac_ext <<_ACEOF
14542#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014543/* confdefs.h. */
14544_ACEOF
14545cat confdefs.h >>conftest.$ac_ext
14546cat >>conftest.$ac_ext <<_ACEOF
14547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014548#include <sys/types.h>
14549#include <sys/time.h>
14550#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014551
Martin v. Löwis11437992002-04-12 09:54:03 +000014552int
14553main ()
14554{
14555if ((struct tm *) 0)
14556return 0;
14557 ;
14558 return 0;
14559}
14560_ACEOF
14561rm -f conftest.$ac_objext
14562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14563 (eval $ac_compile) 2>&5
14564 ac_status=$?
14565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14566 (exit $ac_status); } &&
14567 { ac_try='test -s conftest.$ac_objext'
14568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14569 (eval $ac_try) 2>&5
14570 ac_status=$?
14571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14572 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014573 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014574else
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014576sed 's/^/| /' conftest.$ac_ext >&5
14577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014580rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014582echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14583echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014584if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
14586cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014587#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014588_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014589
14590fi
14591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14593echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14594if test "${ac_cv_struct_tm+set}" = set; then
14595 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014596else
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 cat >conftest.$ac_ext <<_ACEOF
14598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014599/* confdefs.h. */
14600_ACEOF
14601cat confdefs.h >>conftest.$ac_ext
14602cat >>conftest.$ac_ext <<_ACEOF
14603/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014604#include <sys/types.h>
14605#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
Martin v. Löwis11437992002-04-12 09:54:03 +000014607int
14608main ()
14609{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014610struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 ;
14612 return 0;
14613}
14614_ACEOF
14615rm -f conftest.$ac_objext
14616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14617 (eval $ac_compile) 2>&5
14618 ac_status=$?
14619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14620 (exit $ac_status); } &&
14621 { ac_try='test -s conftest.$ac_objext'
14622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14623 (eval $ac_try) 2>&5
14624 ac_status=$?
14625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14626 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014627 ac_cv_struct_tm=time.h
14628else
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014630sed 's/^/| /' conftest.$ac_ext >&5
14631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014634rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014636echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14637echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014638if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014639
14640cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014641#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014642_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014643
14644fi
14645
Martin v. Löwis11437992002-04-12 09:54:03 +000014646echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14647echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14648if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14649 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014650else
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 cat >conftest.$ac_ext <<_ACEOF
14652#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014653/* confdefs.h. */
14654_ACEOF
14655cat confdefs.h >>conftest.$ac_ext
14656cat >>conftest.$ac_ext <<_ACEOF
14657/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658#include <sys/types.h>
14659#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014660
14661
Martin v. Löwis11437992002-04-12 09:54:03 +000014662int
14663main ()
14664{
14665static struct tm ac_aggr;
14666if (ac_aggr.tm_zone)
14667return 0;
14668 ;
14669 return 0;
14670}
14671_ACEOF
14672rm -f conftest.$ac_objext
14673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14674 (eval $ac_compile) 2>&5
14675 ac_status=$?
14676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14677 (exit $ac_status); } &&
14678 { ac_try='test -s conftest.$ac_objext'
14679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14680 (eval $ac_try) 2>&5
14681 ac_status=$?
14682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14683 (exit $ac_status); }; }; then
14684 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014685else
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014687sed 's/^/| /' conftest.$ac_ext >&5
14688
14689cat >conftest.$ac_ext <<_ACEOF
14690#line $LINENO "configure"
14691/* confdefs.h. */
14692_ACEOF
14693cat confdefs.h >>conftest.$ac_ext
14694cat >>conftest.$ac_ext <<_ACEOF
14695/* end confdefs.h. */
14696#include <sys/types.h>
14697#include <$ac_cv_struct_tm>
14698
14699
14700int
14701main ()
14702{
14703static struct tm ac_aggr;
14704if (sizeof ac_aggr.tm_zone)
14705return 0;
14706 ;
14707 return 0;
14708}
14709_ACEOF
14710rm -f conftest.$ac_objext
14711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14712 (eval $ac_compile) 2>&5
14713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); } &&
14716 { ac_try='test -s conftest.$ac_objext'
14717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14718 (eval $ac_try) 2>&5
14719 ac_status=$?
14720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721 (exit $ac_status); }; }; then
14722 ac_cv_member_struct_tm_tm_zone=yes
14723else
14724 echo "$as_me: failed program was:" >&5
14725sed 's/^/| /' conftest.$ac_ext >&5
14726
Martin v. Löwis11437992002-04-12 09:54:03 +000014727ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014729rm -f conftest.$ac_objext conftest.$ac_ext
14730fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014731rm -f conftest.$ac_objext conftest.$ac_ext
14732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014733echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14734echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14735if test $ac_cv_member_struct_tm_tm_zone = yes; then
14736
14737cat >>confdefs.h <<_ACEOF
14738#define HAVE_STRUCT_TM_TM_ZONE 1
14739_ACEOF
14740
14741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014742fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014743
Martin v. Löwis11437992002-04-12 09:54:03 +000014744if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14745
14746cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014747#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014748_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014749
14750else
Martin v. Löwis11437992002-04-12 09:54:03 +000014751 echo "$as_me:$LINENO: checking for tzname" >&5
14752echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14753if test "${ac_cv_var_tzname+set}" = set; then
14754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014755else
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 cat >conftest.$ac_ext <<_ACEOF
14757#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014758/* confdefs.h. */
14759_ACEOF
14760cat confdefs.h >>conftest.$ac_ext
14761cat >>conftest.$ac_ext <<_ACEOF
14762/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014763#include <time.h>
14764#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014765extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014767
Martin v. Löwis11437992002-04-12 09:54:03 +000014768int
14769main ()
14770{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014771atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014772 ;
14773 return 0;
14774}
14775_ACEOF
14776rm -f conftest.$ac_objext conftest$ac_exeext
14777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14778 (eval $ac_link) 2>&5
14779 ac_status=$?
14780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14781 (exit $ac_status); } &&
14782 { ac_try='test -s conftest$ac_exeext'
14783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14784 (eval $ac_try) 2>&5
14785 ac_status=$?
14786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14787 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014788 ac_cv_var_tzname=yes
14789else
Martin v. Löwis11437992002-04-12 09:54:03 +000014790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014791sed 's/^/| /' conftest.$ac_ext >&5
14792
Martin v. Löwis11437992002-04-12 09:54:03 +000014793ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014796fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014797echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14798echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014799 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
14801cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014802#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014803_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014805 fi
14806fi
14807
Martin v. Löwis11437992002-04-12 09:54:03 +000014808echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14809echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14810if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14811 echo $ECHO_N "(cached) $ECHO_C" >&6
14812else
14813 cat >conftest.$ac_ext <<_ACEOF
14814#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014815/* confdefs.h. */
14816_ACEOF
14817cat confdefs.h >>conftest.$ac_ext
14818cat >>conftest.$ac_ext <<_ACEOF
14819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014820$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014821int
14822main ()
14823{
14824static struct stat ac_aggr;
14825if (ac_aggr.st_rdev)
14826return 0;
14827 ;
14828 return 0;
14829}
14830_ACEOF
14831rm -f conftest.$ac_objext
14832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14833 (eval $ac_compile) 2>&5
14834 ac_status=$?
14835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14836 (exit $ac_status); } &&
14837 { ac_try='test -s conftest.$ac_objext'
14838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14839 (eval $ac_try) 2>&5
14840 ac_status=$?
14841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14842 (exit $ac_status); }; }; then
14843 ac_cv_member_struct_stat_st_rdev=yes
14844else
14845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014846sed 's/^/| /' conftest.$ac_ext >&5
14847
14848cat >conftest.$ac_ext <<_ACEOF
14849#line $LINENO "configure"
14850/* confdefs.h. */
14851_ACEOF
14852cat confdefs.h >>conftest.$ac_ext
14853cat >>conftest.$ac_ext <<_ACEOF
14854/* end confdefs.h. */
14855$ac_includes_default
14856int
14857main ()
14858{
14859static struct stat ac_aggr;
14860if (sizeof ac_aggr.st_rdev)
14861return 0;
14862 ;
14863 return 0;
14864}
14865_ACEOF
14866rm -f conftest.$ac_objext
14867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14868 (eval $ac_compile) 2>&5
14869 ac_status=$?
14870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14871 (exit $ac_status); } &&
14872 { ac_try='test -s conftest.$ac_objext'
14873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14874 (eval $ac_try) 2>&5
14875 ac_status=$?
14876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14877 (exit $ac_status); }; }; then
14878 ac_cv_member_struct_stat_st_rdev=yes
14879else
14880 echo "$as_me: failed program was:" >&5
14881sed 's/^/| /' conftest.$ac_ext >&5
14882
Martin v. Löwis11437992002-04-12 09:54:03 +000014883ac_cv_member_struct_stat_st_rdev=no
14884fi
14885rm -f conftest.$ac_objext conftest.$ac_ext
14886fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014887rm -f conftest.$ac_objext conftest.$ac_ext
14888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014889echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14890echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14891if test $ac_cv_member_struct_stat_st_rdev = yes; then
14892
14893cat >>confdefs.h <<_ACEOF
14894#define HAVE_STRUCT_STAT_ST_RDEV 1
14895_ACEOF
14896
14897
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014898fi
14899
Martin v. Löwis11437992002-04-12 09:54:03 +000014900echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14901echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14902if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14903 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014904else
Martin v. Löwis11437992002-04-12 09:54:03 +000014905 cat >conftest.$ac_ext <<_ACEOF
14906#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014907/* confdefs.h. */
14908_ACEOF
14909cat confdefs.h >>conftest.$ac_ext
14910cat >>conftest.$ac_ext <<_ACEOF
14911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014912$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014913int
14914main ()
14915{
14916static struct stat ac_aggr;
14917if (ac_aggr.st_blksize)
14918return 0;
14919 ;
14920 return 0;
14921}
14922_ACEOF
14923rm -f conftest.$ac_objext
14924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14925 (eval $ac_compile) 2>&5
14926 ac_status=$?
14927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14928 (exit $ac_status); } &&
14929 { ac_try='test -s conftest.$ac_objext'
14930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); }; }; then
14935 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014936else
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014938sed 's/^/| /' conftest.$ac_ext >&5
14939
14940cat >conftest.$ac_ext <<_ACEOF
14941#line $LINENO "configure"
14942/* confdefs.h. */
14943_ACEOF
14944cat confdefs.h >>conftest.$ac_ext
14945cat >>conftest.$ac_ext <<_ACEOF
14946/* end confdefs.h. */
14947$ac_includes_default
14948int
14949main ()
14950{
14951static struct stat ac_aggr;
14952if (sizeof ac_aggr.st_blksize)
14953return 0;
14954 ;
14955 return 0;
14956}
14957_ACEOF
14958rm -f conftest.$ac_objext
14959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14960 (eval $ac_compile) 2>&5
14961 ac_status=$?
14962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14963 (exit $ac_status); } &&
14964 { ac_try='test -s conftest.$ac_objext'
14965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14966 (eval $ac_try) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); }; }; then
14970 ac_cv_member_struct_stat_st_blksize=yes
14971else
14972 echo "$as_me: failed program was:" >&5
14973sed 's/^/| /' conftest.$ac_ext >&5
14974
Martin v. Löwis11437992002-04-12 09:54:03 +000014975ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014977rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014978fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014979rm -f conftest.$ac_objext conftest.$ac_ext
14980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014981echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14982echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14983if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014984
Martin v. Löwis11437992002-04-12 09:54:03 +000014985cat >>confdefs.h <<_ACEOF
14986#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14987_ACEOF
14988
14989
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014990fi
14991
Martin v. Löwis11437992002-04-12 09:54:03 +000014992echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14993echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14994if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014996else
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 cat >conftest.$ac_ext <<_ACEOF
14998#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014999/* confdefs.h. */
15000_ACEOF
15001cat confdefs.h >>conftest.$ac_ext
15002cat >>conftest.$ac_ext <<_ACEOF
15003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015004$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015005int
15006main ()
15007{
15008static struct stat ac_aggr;
15009if (ac_aggr.st_blocks)
15010return 0;
15011 ;
15012 return 0;
15013}
15014_ACEOF
15015rm -f conftest.$ac_objext
15016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15017 (eval $ac_compile) 2>&5
15018 ac_status=$?
15019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15020 (exit $ac_status); } &&
15021 { ac_try='test -s conftest.$ac_objext'
15022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15023 (eval $ac_try) 2>&5
15024 ac_status=$?
15025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); }; }; then
15027 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015028else
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015030sed 's/^/| /' conftest.$ac_ext >&5
15031
15032cat >conftest.$ac_ext <<_ACEOF
15033#line $LINENO "configure"
15034/* confdefs.h. */
15035_ACEOF
15036cat confdefs.h >>conftest.$ac_ext
15037cat >>conftest.$ac_ext <<_ACEOF
15038/* end confdefs.h. */
15039$ac_includes_default
15040int
15041main ()
15042{
15043static struct stat ac_aggr;
15044if (sizeof ac_aggr.st_blocks)
15045return 0;
15046 ;
15047 return 0;
15048}
15049_ACEOF
15050rm -f conftest.$ac_objext
15051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15052 (eval $ac_compile) 2>&5
15053 ac_status=$?
15054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15055 (exit $ac_status); } &&
15056 { ac_try='test -s conftest.$ac_objext'
15057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15058 (eval $ac_try) 2>&5
15059 ac_status=$?
15060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15061 (exit $ac_status); }; }; then
15062 ac_cv_member_struct_stat_st_blocks=yes
15063else
15064 echo "$as_me: failed program was:" >&5
15065sed 's/^/| /' conftest.$ac_ext >&5
15066
Martin v. Löwis11437992002-04-12 09:54:03 +000015067ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015069rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015070fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015071rm -f conftest.$ac_objext conftest.$ac_ext
15072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015073echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15074echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15075if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015076
Martin v. Löwis11437992002-04-12 09:54:03 +000015077cat >>confdefs.h <<_ACEOF
15078#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15079_ACEOF
15080
15081
15082cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015083#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015084_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015085
15086else
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015088fi
15089
Michael W. Hudson54241132001-12-07 15:38:26 +000015090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091
15092echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15093echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15094if test "${ac_cv_header_time_altzone+set}" = set; then
15095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096else
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 cat >conftest.$ac_ext <<_ACEOF
15098#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015099/* confdefs.h. */
15100_ACEOF
15101cat confdefs.h >>conftest.$ac_ext
15102cat >>conftest.$ac_ext <<_ACEOF
15103/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015104#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015105int
15106main ()
15107{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015108return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ;
15110 return 0;
15111}
15112_ACEOF
15113rm -f conftest.$ac_objext
15114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15115 (eval $ac_compile) 2>&5
15116 ac_status=$?
15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118 (exit $ac_status); } &&
15119 { ac_try='test -s conftest.$ac_objext'
15120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15121 (eval $ac_try) 2>&5
15122 ac_status=$?
15123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015125 ac_cv_header_time_altzone=yes
15126else
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015128sed 's/^/| /' conftest.$ac_ext >&5
15129
Martin v. Löwis11437992002-04-12 09:54:03 +000015130ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015132rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015133fi
15134
Martin v. Löwis11437992002-04-12 09:54:03 +000015135echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15136echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015137if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
15139cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015140#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015141_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015142
15143fi
15144
Guido van Rossumda88dad1995-01-26 00:46:29 +000015145was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015146echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15147echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15148cat >conftest.$ac_ext <<_ACEOF
15149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015150/* confdefs.h. */
15151_ACEOF
15152cat confdefs.h >>conftest.$ac_ext
15153cat >>conftest.$ac_ext <<_ACEOF
15154/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015155
15156#include <sys/types.h>
15157#include <sys/select.h>
15158#include <sys/time.h>
15159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160int
15161main ()
15162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015163;
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ;
15165 return 0;
15166}
15167_ACEOF
15168rm -f conftest.$ac_objext
15169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15170 (eval $ac_compile) 2>&5
15171 ac_status=$?
15172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173 (exit $ac_status); } &&
15174 { ac_try='test -s conftest.$ac_objext'
15175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15176 (eval $ac_try) 2>&5
15177 ac_status=$?
15178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179 (exit $ac_status); }; }; then
15180
15181
15182cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015183#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015184_ACEOF
15185
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015186 was_it_defined=yes
15187
Guido van Rossumf78abae1997-01-21 22:02:36 +000015188else
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015190sed 's/^/| /' conftest.$ac_ext >&5
15191
Guido van Rossum7f43da71994-08-01 12:15:30 +000015192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015193rm -f conftest.$ac_objext conftest.$ac_ext
15194echo "$as_me:$LINENO: result: $was_it_defined" >&5
15195echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015196
Martin v. Löwis11437992002-04-12 09:54:03 +000015197echo "$as_me:$LINENO: checking for addrinfo" >&5
15198echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15199if test "${ac_cv_struct_addrinfo+set}" = set; then
15200 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015201else
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 cat >conftest.$ac_ext <<_ACEOF
15203#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015204/* confdefs.h. */
15205_ACEOF
15206cat confdefs.h >>conftest.$ac_ext
15207cat >>conftest.$ac_ext <<_ACEOF
15208/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015209
15210# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015211int
15212main ()
15213{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015214struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 ;
15216 return 0;
15217}
15218_ACEOF
15219rm -f conftest.$ac_objext
15220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15221 (eval $ac_compile) 2>&5
15222 ac_status=$?
15223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224 (exit $ac_status); } &&
15225 { ac_try='test -s conftest.$ac_objext'
15226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15227 (eval $ac_try) 2>&5
15228 ac_status=$?
15229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15230 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015231 ac_cv_struct_addrinfo=yes
15232else
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015234sed 's/^/| /' conftest.$ac_ext >&5
15235
Martin v. Löwis11437992002-04-12 09:54:03 +000015236ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015237fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015238rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015239fi
15240
Martin v. Löwis11437992002-04-12 09:54:03 +000015241echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15242echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015243if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015244
15245cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015246#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015247_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015248
15249fi
15250
Martin v. Löwis11437992002-04-12 09:54:03 +000015251echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15252echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15253if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15254 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015255else
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 cat >conftest.$ac_ext <<_ACEOF
15257#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015258/* confdefs.h. */
15259_ACEOF
15260cat confdefs.h >>conftest.$ac_ext
15261cat >>conftest.$ac_ext <<_ACEOF
15262/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015263
15264# include <sys/types.h>
15265# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015266int
15267main ()
15268{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015269struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ;
15271 return 0;
15272}
15273_ACEOF
15274rm -f conftest.$ac_objext
15275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15276 (eval $ac_compile) 2>&5
15277 ac_status=$?
15278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279 (exit $ac_status); } &&
15280 { ac_try='test -s conftest.$ac_objext'
15281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282 (eval $ac_try) 2>&5
15283 ac_status=$?
15284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015286 ac_cv_struct_sockaddr_storage=yes
15287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015289sed 's/^/| /' conftest.$ac_ext >&5
15290
Martin v. Löwis11437992002-04-12 09:54:03 +000015291ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015293rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015294fi
15295
Martin v. Löwis11437992002-04-12 09:54:03 +000015296echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15297echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015298if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015299
15300cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015301#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015302_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015303
15304fi
15305
Guido van Rossum627b2d71993-12-24 10:39:16 +000015306# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015307
Michael W. Hudson54241132001-12-07 15:38:26 +000015308
Martin v. Löwis11437992002-04-12 09:54:03 +000015309echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15310echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15311if test "${ac_cv_c_char_unsigned+set}" = set; then
15312 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015313else
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 cat >conftest.$ac_ext <<_ACEOF
15315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015316/* confdefs.h. */
15317_ACEOF
15318cat confdefs.h >>conftest.$ac_ext
15319cat >>conftest.$ac_ext <<_ACEOF
15320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015321$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015322int
15323main ()
15324{
15325static int test_array [1 - 2 * !(((char) -1) < 0)];
15326test_array [0] = 0
15327
15328 ;
15329 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015330}
Martin v. Löwis11437992002-04-12 09:54:03 +000015331_ACEOF
15332rm -f conftest.$ac_objext
15333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15334 (eval $ac_compile) 2>&5
15335 ac_status=$?
15336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337 (exit $ac_status); } &&
15338 { ac_try='test -s conftest.$ac_objext'
15339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15340 (eval $ac_try) 2>&5
15341 ac_status=$?
15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15343 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015344 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015345else
15346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015347sed 's/^/| /' conftest.$ac_ext >&5
15348
Martin v. Löwis11437992002-04-12 09:54:03 +000015349ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015351rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015353echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15354echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015355if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015357#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015358_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015359
15360fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015361
Martin v. Löwis11437992002-04-12 09:54:03 +000015362echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15363echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15364if test "${ac_cv_c_const+set}" = set; then
15365 echo $ECHO_N "(cached) $ECHO_C" >&6
15366else
15367 cat >conftest.$ac_ext <<_ACEOF
15368#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015369/* confdefs.h. */
15370_ACEOF
15371cat confdefs.h >>conftest.$ac_ext
15372cat >>conftest.$ac_ext <<_ACEOF
15373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015374
Martin v. Löwis11437992002-04-12 09:54:03 +000015375int
15376main ()
15377{
15378/* FIXME: Include the comments suggested by Paul. */
15379#ifndef __cplusplus
15380 /* Ultrix mips cc rejects this. */
15381 typedef int charset[2];
15382 const charset x;
15383 /* SunOS 4.1.1 cc rejects this. */
15384 char const *const *ccp;
15385 char **p;
15386 /* NEC SVR4.0.2 mips cc rejects this. */
15387 struct point {int x, y;};
15388 static struct point const zero = {0,0};
15389 /* AIX XL C 1.02.0.0 rejects this.
15390 It does not let you subtract one const X* pointer from another in
15391 an arm of an if-expression whose if-part is not a constant
15392 expression */
15393 const char *g = "string";
15394 ccp = &g + (g ? g-g : 0);
15395 /* HPUX 7.0 cc rejects these. */
15396 ++ccp;
15397 p = (char**) ccp;
15398 ccp = (char const *const *) p;
15399 { /* SCO 3.2v4 cc rejects this. */
15400 char *t;
15401 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015402
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 *t++ = 0;
15404 }
15405 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15406 int x[] = {25, 17};
15407 const int *foo = &x[0];
15408 ++foo;
15409 }
15410 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15411 typedef const int *iptr;
15412 iptr p = 0;
15413 ++p;
15414 }
15415 { /* AIX XL C 1.02.0.0 rejects this saying
15416 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15417 struct s { int j; const int *ap[3]; };
15418 struct s *b; b->j = 5;
15419 }
15420 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15421 const int foo = 10;
15422 }
15423#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015424
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 ;
15426 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015427}
Martin v. Löwis11437992002-04-12 09:54:03 +000015428_ACEOF
15429rm -f conftest.$ac_objext
15430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15431 (eval $ac_compile) 2>&5
15432 ac_status=$?
15433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15434 (exit $ac_status); } &&
15435 { ac_try='test -s conftest.$ac_objext'
15436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15437 (eval $ac_try) 2>&5
15438 ac_status=$?
15439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15440 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015441 ac_cv_c_const=yes
15442else
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015444sed 's/^/| /' conftest.$ac_ext >&5
15445
Martin v. Löwis11437992002-04-12 09:54:03 +000015446ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015448rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015450echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15451echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015452if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
15454cat >>confdefs.h <<\_ACEOF
15455#define const
15456_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015457
15458fi
15459
Michael W. Hudson54241132001-12-07 15:38:26 +000015460
Guido van Rossumda88dad1995-01-26 00:46:29 +000015461works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015462echo "$as_me:$LINENO: checking for working volatile" >&5
15463echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15464cat >conftest.$ac_ext <<_ACEOF
15465#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015466/* confdefs.h. */
15467_ACEOF
15468cat confdefs.h >>conftest.$ac_ext
15469cat >>conftest.$ac_ext <<_ACEOF
15470/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015471
Martin v. Löwis11437992002-04-12 09:54:03 +000015472int
15473main ()
15474{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015475volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 ;
15477 return 0;
15478}
15479_ACEOF
15480rm -f conftest.$ac_objext
15481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15482 (eval $ac_compile) 2>&5
15483 ac_status=$?
15484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15485 (exit $ac_status); } &&
15486 { ac_try='test -s conftest.$ac_objext'
15487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15488 (eval $ac_try) 2>&5
15489 ac_status=$?
15490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15491 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015492 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015493else
Martin v. Löwis11437992002-04-12 09:54:03 +000015494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015495sed 's/^/| /' conftest.$ac_ext >&5
15496
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
15498cat >>confdefs.h <<\_ACEOF
15499#define volatile
15500_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015501
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015502
Guido van Rossum627b2d71993-12-24 10:39:16 +000015503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015504rm -f conftest.$ac_objext conftest.$ac_ext
15505echo "$as_me:$LINENO: result: $works" >&5
15506echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015507
Guido van Rossumda88dad1995-01-26 00:46:29 +000015508works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015509echo "$as_me:$LINENO: checking for working signed char" >&5
15510echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15511cat >conftest.$ac_ext <<_ACEOF
15512#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015513/* confdefs.h. */
15514_ACEOF
15515cat confdefs.h >>conftest.$ac_ext
15516cat >>conftest.$ac_ext <<_ACEOF
15517/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015518
Martin v. Löwis11437992002-04-12 09:54:03 +000015519int
15520main ()
15521{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015522signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 ;
15524 return 0;
15525}
15526_ACEOF
15527rm -f conftest.$ac_objext
15528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15529 (eval $ac_compile) 2>&5
15530 ac_status=$?
15531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15532 (exit $ac_status); } &&
15533 { ac_try='test -s conftest.$ac_objext'
15534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15535 (eval $ac_try) 2>&5
15536 ac_status=$?
15537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15538 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015539 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015540else
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015542sed 's/^/| /' conftest.$ac_ext >&5
15543
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
15545cat >>confdefs.h <<\_ACEOF
15546#define signed
15547_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015548
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015549
Guido van Rossum7f43da71994-08-01 12:15:30 +000015550fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015551rm -f conftest.$ac_objext conftest.$ac_ext
15552echo "$as_me:$LINENO: result: $works" >&5
15553echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015554
Guido van Rossumda88dad1995-01-26 00:46:29 +000015555have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015556echo "$as_me:$LINENO: checking for prototypes" >&5
15557echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15558cat >conftest.$ac_ext <<_ACEOF
15559#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015560/* confdefs.h. */
15561_ACEOF
15562cat confdefs.h >>conftest.$ac_ext
15563cat >>conftest.$ac_ext <<_ACEOF
15564/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015565int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015566int
15567main ()
15568{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015569return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ;
15571 return 0;
15572}
15573_ACEOF
15574rm -f conftest.$ac_objext
15575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15576 (eval $ac_compile) 2>&5
15577 ac_status=$?
15578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579 (exit $ac_status); } &&
15580 { ac_try='test -s conftest.$ac_objext'
15581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15582 (eval $ac_try) 2>&5
15583 ac_status=$?
15584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585 (exit $ac_status); }; }; then
15586
15587
15588cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015589#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015590_ACEOF
15591
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015592 have_prototypes=yes
15593
Guido van Rossumf78abae1997-01-21 22:02:36 +000015594else
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015596sed 's/^/| /' conftest.$ac_ext >&5
15597
Guido van Rossum7f43da71994-08-01 12:15:30 +000015598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015599rm -f conftest.$ac_objext conftest.$ac_ext
15600echo "$as_me:$LINENO: result: $have_prototypes" >&5
15601echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015602
Guido van Rossumda88dad1995-01-26 00:46:29 +000015603works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015604echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15605echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15606cat >conftest.$ac_ext <<_ACEOF
15607#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015608/* confdefs.h. */
15609_ACEOF
15610cat confdefs.h >>conftest.$ac_ext
15611cat >>conftest.$ac_ext <<_ACEOF
15612/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015613
15614#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015615int foo(int x, ...) {
15616 va_list va;
15617 va_start(va, x);
15618 va_arg(va, int);
15619 va_arg(va, char *);
15620 va_arg(va, double);
15621 return 0;
15622}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624int
15625main ()
15626{
Guido van Rossum90eea071996-08-30 20:58:57 +000015627return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 ;
15629 return 0;
15630}
15631_ACEOF
15632rm -f conftest.$ac_objext
15633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15634 (eval $ac_compile) 2>&5
15635 ac_status=$?
15636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637 (exit $ac_status); } &&
15638 { ac_try='test -s conftest.$ac_objext'
15639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); }; }; then
15644
15645
15646cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015647#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
15649
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015650 works=yes
15651
Guido van Rossumf78abae1997-01-21 22:02:36 +000015652else
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015654sed 's/^/| /' conftest.$ac_ext >&5
15655
Guido van Rossum627b2d71993-12-24 10:39:16 +000015656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015657rm -f conftest.$ac_objext conftest.$ac_ext
15658echo "$as_me:$LINENO: result: $works" >&5
15659echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015660
Guido van Rossumda88dad1995-01-26 00:46:29 +000015661if test "$have_prototypes" = yes; then
15662bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015663echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15664echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15665cat >conftest.$ac_ext <<_ACEOF
15666#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015667/* confdefs.h. */
15668_ACEOF
15669cat confdefs.h >>conftest.$ac_ext
15670cat >>conftest.$ac_ext <<_ACEOF
15671/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015672#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015673int
15674main ()
15675{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015676char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 ;
15678 return 0;
15679}
15680_ACEOF
15681rm -f conftest.$ac_objext
15682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15683 (eval $ac_compile) 2>&5
15684 ac_status=$?
15685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686 (exit $ac_status); } &&
15687 { ac_try='test -s conftest.$ac_objext'
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
Guido van Rossum627b2d71993-12-24 10:39:16 +000015693 :
15694else
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 +000015698
15699cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015700#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015701_ACEOF
15702
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015703 bad_prototypes=yes
15704
Guido van Rossum627b2d71993-12-24 10:39:16 +000015705fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015706rm -f conftest.$ac_objext conftest.$ac_ext
15707echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15708echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015709fi
15710
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015711# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015712echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15713echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15714cat >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. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015721#include <sys/types.h>
15722#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015723int
15724main ()
15725{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015726struct sockaddr x;
15727x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 ;
15729 return 0;
15730}
15731_ACEOF
15732rm -f conftest.$ac_objext
15733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15734 (eval $ac_compile) 2>&5
15735 ac_status=$?
15736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15737 (exit $ac_status); } &&
15738 { ac_try='test -s conftest.$ac_objext'
15739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15740 (eval $ac_try) 2>&5
15741 ac_status=$?
15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15743 (exit $ac_status); }; }; then
15744 echo "$as_me:$LINENO: result: yes" >&5
15745echo "${ECHO_T}yes" >&6
15746
15747cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015748#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015750
15751else
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015753sed 's/^/| /' conftest.$ac_ext >&5
15754
Martin v. Löwis11437992002-04-12 09:54:03 +000015755echo "$as_me:$LINENO: result: no" >&5
15756echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015758rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015759
Guido van Rossumda88dad1995-01-26 00:46:29 +000015760va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015761echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15762echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15763cat >conftest.$ac_ext <<_ACEOF
15764#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015765/* confdefs.h. */
15766_ACEOF
15767cat confdefs.h >>conftest.$ac_ext
15768cat >>conftest.$ac_ext <<_ACEOF
15769/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015770
15771#ifdef HAVE_STDARG_PROTOTYPES
15772#include <stdarg.h>
15773#else
15774#include <varargs.h>
15775#endif
15776
Martin v. Löwis11437992002-04-12 09:54:03 +000015777int
15778main ()
15779{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015780va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 ;
15782 return 0;
15783}
15784_ACEOF
15785rm -f conftest.$ac_objext
15786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15787 (eval $ac_compile) 2>&5
15788 ac_status=$?
15789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15790 (exit $ac_status); } &&
15791 { ac_try='test -s conftest.$ac_objext'
15792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15793 (eval $ac_try) 2>&5
15794 ac_status=$?
15795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15796 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015797 :
15798else
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015800sed 's/^/| /' conftest.$ac_ext >&5
15801
Martin v. Löwis11437992002-04-12 09:54:03 +000015802
15803
15804cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015805#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015806_ACEOF
15807
Guido van Rossumda88dad1995-01-26 00:46:29 +000015808 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015809
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015811rm -f conftest.$ac_objext conftest.$ac_ext
15812echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15813echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015814
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015815# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
15817
15818
15819echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15820echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15821if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015823else
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 cat >conftest.$ac_ext <<_ACEOF
15825#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015826/* confdefs.h. */
15827_ACEOF
15828cat confdefs.h >>conftest.$ac_ext
15829cat >>conftest.$ac_ext <<_ACEOF
15830/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015831/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015832 which can conflict with char gethostbyname_r (); below.
15833 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015834 <limits.h> exists even on freestanding compilers. Under hpux,
15835 including <limits.h> includes <sys/time.h> and causes problems
15836 checking for functions defined therein. */
15837#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015838# include <limits.h>
15839#else
15840# include <assert.h>
15841#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015842/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015843#ifdef __cplusplus
15844extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015845{
Martin v. Löwis11437992002-04-12 09:54:03 +000015846#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015847/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 builtin and then its argument prototype would still apply. */
15849char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015850/* The GNU C library defines this for functions which it implements
15851 to always fail with ENOSYS. Some functions are actually named
15852 something starting with __ and the normal name is an alias. */
15853#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15854choke me
15855#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015856char (*f) () = gethostbyname_r;
15857#endif
15858#ifdef __cplusplus
15859}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015860#endif
15861
Skip Montanaro6dead952003-09-25 14:50:04 +000015862int
15863main ()
15864{
15865return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 ;
15867 return 0;
15868}
15869_ACEOF
15870rm -f conftest.$ac_objext conftest$ac_exeext
15871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15872 (eval $ac_link) 2>&5
15873 ac_status=$?
15874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15875 (exit $ac_status); } &&
15876 { ac_try='test -s conftest$ac_exeext'
15877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15878 (eval $ac_try) 2>&5
15879 ac_status=$?
15880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15881 (exit $ac_status); }; }; then
15882 ac_cv_func_gethostbyname_r=yes
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 +000015887ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015889rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015890fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015891echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15892echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15893if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015894
Martin v. Löwis11437992002-04-12 09:54:03 +000015895 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015896#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015897_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015898
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15900echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015901 OLD_CFLAGS=$CFLAGS
15902 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015903 cat >conftest.$ac_ext <<_ACEOF
15904#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015905/* confdefs.h. */
15906_ACEOF
15907cat confdefs.h >>conftest.$ac_ext
15908cat >>conftest.$ac_ext <<_ACEOF
15909/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015910
15911# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913int
15914main ()
15915{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015916
15917 char *name;
15918 struct hostent *he, *res;
15919 char buffer[2048];
15920 int buflen = 2048;
15921 int h_errnop;
15922
15923 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
15925 ;
15926 return 0;
15927}
15928_ACEOF
15929rm -f conftest.$ac_objext
15930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15931 (eval $ac_compile) 2>&5
15932 ac_status=$?
15933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15934 (exit $ac_status); } &&
15935 { ac_try='test -s conftest.$ac_objext'
15936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15937 (eval $ac_try) 2>&5
15938 ac_status=$?
15939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15940 (exit $ac_status); }; }; then
15941
15942 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015943#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015944_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015945
Martin v. Löwis11437992002-04-12 09:54:03 +000015946
15947cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015948#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015949_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015950
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 echo "$as_me:$LINENO: result: yes" >&5
15952echo "${ECHO_T}yes" >&6
15953
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015954else
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015956sed 's/^/| /' conftest.$ac_ext >&5
15957
Martin v. Löwis11437992002-04-12 09:54:03 +000015958
15959 echo "$as_me:$LINENO: result: no" >&5
15960echo "${ECHO_T}no" >&6
15961 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15962echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15963 cat >conftest.$ac_ext <<_ACEOF
15964#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015965/* confdefs.h. */
15966_ACEOF
15967cat confdefs.h >>conftest.$ac_ext
15968cat >>conftest.$ac_ext <<_ACEOF
15969/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015970
15971# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973int
15974main ()
15975{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015976
15977 char *name;
15978 struct hostent *he;
15979 char buffer[2048];
15980 int buflen = 2048;
15981 int h_errnop;
15982
15983 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015984
15985 ;
15986 return 0;
15987}
15988_ACEOF
15989rm -f conftest.$ac_objext
15990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15991 (eval $ac_compile) 2>&5
15992 ac_status=$?
15993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15994 (exit $ac_status); } &&
15995 { ac_try='test -s conftest.$ac_objext'
15996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15997 (eval $ac_try) 2>&5
15998 ac_status=$?
15999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16000 (exit $ac_status); }; }; then
16001
16002 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016003#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016004_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016005
Martin v. Löwis11437992002-04-12 09:54:03 +000016006
16007cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016008#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016009_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016010
Martin v. Löwis11437992002-04-12 09:54:03 +000016011 echo "$as_me:$LINENO: result: yes" >&5
16012echo "${ECHO_T}yes" >&6
16013
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016014else
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016016sed 's/^/| /' conftest.$ac_ext >&5
16017
Martin v. Löwis11437992002-04-12 09:54:03 +000016018
16019 echo "$as_me:$LINENO: result: no" >&5
16020echo "${ECHO_T}no" >&6
16021 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
16022echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
16023 cat >conftest.$ac_ext <<_ACEOF
16024#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016025/* confdefs.h. */
16026_ACEOF
16027cat confdefs.h >>conftest.$ac_ext
16028cat >>conftest.$ac_ext <<_ACEOF
16029/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016030
16031# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033int
16034main ()
16035{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016036
16037 char *name;
16038 struct hostent *he;
16039 struct hostent_data data;
16040
16041 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000016042
16043 ;
16044 return 0;
16045}
16046_ACEOF
16047rm -f conftest.$ac_objext
16048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16049 (eval $ac_compile) 2>&5
16050 ac_status=$?
16051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052 (exit $ac_status); } &&
16053 { ac_try='test -s conftest.$ac_objext'
16054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16055 (eval $ac_try) 2>&5
16056 ac_status=$?
16057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16058 (exit $ac_status); }; }; then
16059
16060 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016061#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016062_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016063
Martin v. Löwis11437992002-04-12 09:54:03 +000016064
16065cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016066#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016067_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016068
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 echo "$as_me:$LINENO: result: yes" >&5
16070echo "${ECHO_T}yes" >&6
16071
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016072else
Martin v. Löwis11437992002-04-12 09:54:03 +000016073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016074sed 's/^/| /' conftest.$ac_ext >&5
16075
Martin v. Löwis11437992002-04-12 09:54:03 +000016076
16077 echo "$as_me:$LINENO: result: no" >&5
16078echo "${ECHO_T}no" >&6
16079
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016081rm -f conftest.$ac_objext conftest.$ac_ext
16082
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016084rm -f conftest.$ac_objext conftest.$ac_ext
16085
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016087rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016088 CFLAGS=$OLD_CFLAGS
16089
16090else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
16093for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016094do
Martin v. Löwis11437992002-04-12 09:54:03 +000016095as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16096echo "$as_me:$LINENO: checking for $ac_func" >&5
16097echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16098if eval "test \"\${$as_ac_var+set}\" = set"; then
16099 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016100else
Martin v. Löwis11437992002-04-12 09:54:03 +000016101 cat >conftest.$ac_ext <<_ACEOF
16102#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016103/* confdefs.h. */
16104_ACEOF
16105cat confdefs.h >>conftest.$ac_ext
16106cat >>conftest.$ac_ext <<_ACEOF
16107/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016108/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016109 which can conflict with char $ac_func (); below.
16110 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016111 <limits.h> exists even on freestanding compilers. Under hpux,
16112 including <limits.h> includes <sys/time.h> and causes problems
16113 checking for functions defined therein. */
16114#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016115# include <limits.h>
16116#else
16117# include <assert.h>
16118#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016119/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016120#ifdef __cplusplus
16121extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016122{
Martin v. Löwis11437992002-04-12 09:54:03 +000016123#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016124/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 builtin and then its argument prototype would still apply. */
16126char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016127/* The GNU C library defines this for functions which it implements
16128 to always fail with ENOSYS. Some functions are actually named
16129 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016130#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016131choke me
16132#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016133char (*f) () = $ac_func;
16134#endif
16135#ifdef __cplusplus
16136}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016137#endif
16138
Skip Montanaro6dead952003-09-25 14:50:04 +000016139int
16140main ()
16141{
16142return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 ;
16144 return 0;
16145}
16146_ACEOF
16147rm -f conftest.$ac_objext conftest$ac_exeext
16148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16149 (eval $ac_link) 2>&5
16150 ac_status=$?
16151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16152 (exit $ac_status); } &&
16153 { ac_try='test -s conftest$ac_exeext'
16154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16155 (eval $ac_try) 2>&5
16156 ac_status=$?
16157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16158 (exit $ac_status); }; }; then
16159 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016160else
Martin v. Löwis11437992002-04-12 09:54:03 +000016161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016162sed 's/^/| /' conftest.$ac_ext >&5
16163
Martin v. Löwis11437992002-04-12 09:54:03 +000016164eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016168echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16169echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16170if test `eval echo '${'$as_ac_var'}'` = yes; then
16171 cat >>confdefs.h <<_ACEOF
16172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16173_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016174
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016175fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016176done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016177
Michael W. Hudson54241132001-12-07 15:38:26 +000016178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016179fi
16180
Michael W. Hudson54241132001-12-07 15:38:26 +000016181
16182
16183
16184
16185
16186
Guido van Rossum627b2d71993-12-24 10:39:16 +000016187# checks for system services
16188# (none yet)
16189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016190# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016191echo "$as_me:$LINENO: checking for __fpu_control" >&5
16192echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16193if test "${ac_cv_func___fpu_control+set}" = set; then
16194 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016195else
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 cat >conftest.$ac_ext <<_ACEOF
16197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016198/* confdefs.h. */
16199_ACEOF
16200cat confdefs.h >>conftest.$ac_ext
16201cat >>conftest.$ac_ext <<_ACEOF
16202/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016203/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016204 which can conflict with char __fpu_control (); below.
16205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016206 <limits.h> exists even on freestanding compilers. Under hpux,
16207 including <limits.h> includes <sys/time.h> and causes problems
16208 checking for functions defined therein. */
16209#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016210# include <limits.h>
16211#else
16212# include <assert.h>
16213#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016214/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016215#ifdef __cplusplus
16216extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016217{
Martin v. Löwis11437992002-04-12 09:54:03 +000016218#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016219/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 builtin and then its argument prototype would still apply. */
16221char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016222/* The GNU C library defines this for functions which it implements
16223 to always fail with ENOSYS. Some functions are actually named
16224 something starting with __ and the normal name is an alias. */
16225#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16226choke me
16227#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016228char (*f) () = __fpu_control;
16229#endif
16230#ifdef __cplusplus
16231}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016232#endif
16233
Skip Montanaro6dead952003-09-25 14:50:04 +000016234int
16235main ()
16236{
16237return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016238 ;
16239 return 0;
16240}
16241_ACEOF
16242rm -f conftest.$ac_objext conftest$ac_exeext
16243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16244 (eval $ac_link) 2>&5
16245 ac_status=$?
16246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16247 (exit $ac_status); } &&
16248 { ac_try='test -s conftest$ac_exeext'
16249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16250 (eval $ac_try) 2>&5
16251 ac_status=$?
16252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253 (exit $ac_status); }; }; then
16254 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016255else
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016257sed 's/^/| /' conftest.$ac_ext >&5
16258
Martin v. Löwis11437992002-04-12 09:54:03 +000016259ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016263echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16264echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16265if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016266 :
16267else
Martin v. Löwis11437992002-04-12 09:54:03 +000016268
16269echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16270echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16271if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16272 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016273else
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016275LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016276cat >conftest.$ac_ext <<_ACEOF
16277#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016278/* confdefs.h. */
16279_ACEOF
16280cat confdefs.h >>conftest.$ac_ext
16281cat >>conftest.$ac_ext <<_ACEOF
16282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016283
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016284/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016285#ifdef __cplusplus
16286extern "C"
16287#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016288/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 builtin and then its argument prototype would still apply. */
16290char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016291int
16292main ()
16293{
16294__fpu_control ();
16295 ;
16296 return 0;
16297}
16298_ACEOF
16299rm -f conftest.$ac_objext conftest$ac_exeext
16300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16301 (eval $ac_link) 2>&5
16302 ac_status=$?
16303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16304 (exit $ac_status); } &&
16305 { ac_try='test -s conftest$ac_exeext'
16306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16307 (eval $ac_try) 2>&5
16308 ac_status=$?
16309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16310 (exit $ac_status); }; }; then
16311 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016312else
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016314sed 's/^/| /' conftest.$ac_ext >&5
16315
Martin v. Löwis11437992002-04-12 09:54:03 +000016316ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016318rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16319LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016321echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16322echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16323if test $ac_cv_lib_ieee___fpu_control = yes; then
16324 cat >>confdefs.h <<_ACEOF
16325#define HAVE_LIBIEEE 1
16326_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016327
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016328 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016329
Guido van Rossum627b2d71993-12-24 10:39:16 +000016330fi
16331
Michael W. Hudson54241132001-12-07 15:38:26 +000016332
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016333fi
16334
Michael W. Hudson54241132001-12-07 15:38:26 +000016335
Guido van Rossum7f253911997-05-09 02:42:48 +000016336# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016337echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16338echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16339
Guido van Rossum7f253911997-05-09 02:42:48 +000016340# Check whether --with-fpectl or --without-fpectl was given.
16341if test "${with_fpectl+set}" = set; then
16342 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016343
Guido van Rossum7f253911997-05-09 02:42:48 +000016344if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016345then
16346
16347cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016348#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016349_ACEOF
16350
16351 echo "$as_me:$LINENO: result: yes" >&5
16352echo "${ECHO_T}yes" >&6
16353else echo "$as_me:$LINENO: result: no" >&5
16354echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016355fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016356else
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 echo "$as_me:$LINENO: result: no" >&5
16358echo "${ECHO_T}no" >&6
16359fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016360
Guido van Rossum7f43da71994-08-01 12:15:30 +000016361# check for --with-libm=...
16362
Guido van Rossum563e7081996-09-10 18:20:48 +000016363case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016364Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016365BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016366*) LIBM=-lm
16367esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016368echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16369echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016371# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016372if test "${with_libm+set}" = set; then
16373 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016374
Guido van Rossum7f253911997-05-09 02:42:48 +000016375if test "$withval" = no
16376then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16378echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016379elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016380then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16382echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16383else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16384echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16385 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016386fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016387else
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16389echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16390fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016391
16392# check for --with-libc=...
16393
Martin v. Löwis11437992002-04-12 09:54:03 +000016394echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16395echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016397# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016398if test "${with_libc+set}" = set; then
16399 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016400
Guido van Rossum7f253911997-05-09 02:42:48 +000016401if test "$withval" = no
16402then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16404echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016405elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016406then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16408echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16409else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16410echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16411 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016412fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016413else
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16415echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16416fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016417
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016418# check for hypot() in math library
16419LIBS_SAVE=$LIBS
16420LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016421
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016422for ac_func in hypot
16423do
Martin v. Löwis11437992002-04-12 09:54:03 +000016424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16425echo "$as_me:$LINENO: checking for $ac_func" >&5
16426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16427if eval "test \"\${$as_ac_var+set}\" = set"; then
16428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016429else
Martin v. Löwis11437992002-04-12 09:54:03 +000016430 cat >conftest.$ac_ext <<_ACEOF
16431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016432/* confdefs.h. */
16433_ACEOF
16434cat confdefs.h >>conftest.$ac_ext
16435cat >>conftest.$ac_ext <<_ACEOF
16436/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016437/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016438 which can conflict with char $ac_func (); below.
16439 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016440 <limits.h> exists even on freestanding compilers. Under hpux,
16441 including <limits.h> includes <sys/time.h> and causes problems
16442 checking for functions defined therein. */
16443#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016444# include <limits.h>
16445#else
16446# include <assert.h>
16447#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016448/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016449#ifdef __cplusplus
16450extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016451{
Martin v. Löwis11437992002-04-12 09:54:03 +000016452#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016453/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016454 builtin and then its argument prototype would still apply. */
16455char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016456/* The GNU C library defines this for functions which it implements
16457 to always fail with ENOSYS. Some functions are actually named
16458 something starting with __ and the normal name is an alias. */
16459#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16460choke me
16461#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016462char (*f) () = $ac_func;
16463#endif
16464#ifdef __cplusplus
16465}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016466#endif
16467
Skip Montanaro6dead952003-09-25 14:50:04 +000016468int
16469main ()
16470{
16471return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016472 ;
16473 return 0;
16474}
16475_ACEOF
16476rm -f conftest.$ac_objext conftest$ac_exeext
16477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16478 (eval $ac_link) 2>&5
16479 ac_status=$?
16480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16481 (exit $ac_status); } &&
16482 { ac_try='test -s conftest$ac_exeext'
16483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16484 (eval $ac_try) 2>&5
16485 ac_status=$?
16486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487 (exit $ac_status); }; }; then
16488 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016489else
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016491sed 's/^/| /' conftest.$ac_ext >&5
16492
Martin v. Löwis11437992002-04-12 09:54:03 +000016493eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016496fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016497echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16498echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16499if test `eval echo '${'$as_ac_var'}'` = yes; then
16500 cat >>confdefs.h <<_ACEOF
16501#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16502_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016503
Michael W. Hudson54241132001-12-07 15:38:26 +000016504else
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016506fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016507done
16508
Michael W. Hudson54241132001-12-07 15:38:26 +000016509
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016510LIBS=$LIBS_SAVE
16511
Guido van Rossumef2255b2000-03-10 22:30:29 +000016512# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016513if test "${ac_cv_header_wchar_h+set}" = set; then
16514 echo "$as_me:$LINENO: checking for wchar.h" >&5
16515echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16516if test "${ac_cv_header_wchar_h+set}" = set; then
16517 echo $ECHO_N "(cached) $ECHO_C" >&6
16518fi
16519echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16520echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016521else
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 # Is the header compilable?
16523echo "$as_me:$LINENO: checking wchar.h usability" >&5
16524echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16525cat >conftest.$ac_ext <<_ACEOF
16526#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016527/* confdefs.h. */
16528_ACEOF
16529cat confdefs.h >>conftest.$ac_ext
16530cat >>conftest.$ac_ext <<_ACEOF
16531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016532$ac_includes_default
16533#include <wchar.h>
16534_ACEOF
16535rm -f conftest.$ac_objext
16536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16537 (eval $ac_compile) 2>&5
16538 ac_status=$?
16539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16540 (exit $ac_status); } &&
16541 { ac_try='test -s conftest.$ac_objext'
16542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16543 (eval $ac_try) 2>&5
16544 ac_status=$?
16545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16546 (exit $ac_status); }; }; then
16547 ac_header_compiler=yes
16548else
16549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016550sed 's/^/| /' conftest.$ac_ext >&5
16551
Martin v. Löwis11437992002-04-12 09:54:03 +000016552ac_header_compiler=no
16553fi
16554rm -f conftest.$ac_objext conftest.$ac_ext
16555echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16556echo "${ECHO_T}$ac_header_compiler" >&6
16557
16558# Is the header present?
16559echo "$as_me:$LINENO: checking wchar.h presence" >&5
16560echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16561cat >conftest.$ac_ext <<_ACEOF
16562#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016563/* confdefs.h. */
16564_ACEOF
16565cat confdefs.h >>conftest.$ac_ext
16566cat >>conftest.$ac_ext <<_ACEOF
16567/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016568#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016569_ACEOF
16570if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16571 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16572 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016573 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 rm -f conftest.er1
16575 cat conftest.err >&5
16576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16577 (exit $ac_status); } >/dev/null; then
16578 if test -s conftest.err; then
16579 ac_cpp_err=$ac_c_preproc_warn_flag
16580 else
16581 ac_cpp_err=
16582 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016583else
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 ac_cpp_err=yes
16585fi
16586if test -z "$ac_cpp_err"; then
16587 ac_header_preproc=yes
16588else
16589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016590sed 's/^/| /' conftest.$ac_ext >&5
16591
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016594rm -f conftest.err conftest.$ac_ext
16595echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16596echo "${ECHO_T}$ac_header_preproc" >&6
16597
16598# So? What about this header?
16599case $ac_header_compiler:$ac_header_preproc in
16600 yes:no )
16601 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16602echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16603 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016604echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16605 (
16606 cat <<\_ASBOX
16607## ------------------------------------ ##
16608## Report this to bug-autoconf@gnu.org. ##
16609## ------------------------------------ ##
16610_ASBOX
16611 ) |
16612 sed "s/^/$as_me: WARNING: /" >&2
16613 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 no:yes )
16615 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16616echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16617 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16618echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16619 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016620echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16621 (
16622 cat <<\_ASBOX
16623## ------------------------------------ ##
16624## Report this to bug-autoconf@gnu.org. ##
16625## ------------------------------------ ##
16626_ASBOX
16627 ) |
16628 sed "s/^/$as_me: WARNING: /" >&2
16629 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016630esac
16631echo "$as_me:$LINENO: checking for wchar.h" >&5
16632echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16633if test "${ac_cv_header_wchar_h+set}" = set; then
16634 echo $ECHO_N "(cached) $ECHO_C" >&6
16635else
16636 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016638echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16639echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16640
16641fi
16642if test $ac_cv_header_wchar_h = yes; then
16643
16644
16645cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016646#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016647_ACEOF
16648
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016649 wchar_h="yes"
16650
Guido van Rossumef2255b2000-03-10 22:30:29 +000016651else
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016653
16654fi
16655
Michael W. Hudson54241132001-12-07 15:38:26 +000016656
Martin v. Löwis11437992002-04-12 09:54:03 +000016657
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016658# determine wchar_t size
16659if test "$wchar_h" = yes
16660then
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 echo "$as_me:$LINENO: checking for wchar_t" >&5
16662echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16663if test "${ac_cv_type_wchar_t+set}" = set; then
16664 echo $ECHO_N "(cached) $ECHO_C" >&6
16665else
16666 cat >conftest.$ac_ext <<_ACEOF
16667#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016668/* confdefs.h. */
16669_ACEOF
16670cat confdefs.h >>conftest.$ac_ext
16671cat >>conftest.$ac_ext <<_ACEOF
16672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016673#include <wchar.h>
16674
Martin v. Löwis11437992002-04-12 09:54:03 +000016675int
16676main ()
16677{
16678if ((wchar_t *) 0)
16679 return 0;
16680if (sizeof (wchar_t))
16681 return 0;
16682 ;
16683 return 0;
16684}
16685_ACEOF
16686rm -f conftest.$ac_objext
16687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16688 (eval $ac_compile) 2>&5
16689 ac_status=$?
16690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16691 (exit $ac_status); } &&
16692 { ac_try='test -s conftest.$ac_objext'
16693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16694 (eval $ac_try) 2>&5
16695 ac_status=$?
16696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16697 (exit $ac_status); }; }; then
16698 ac_cv_type_wchar_t=yes
16699else
16700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016701sed 's/^/| /' conftest.$ac_ext >&5
16702
Martin v. Löwis11437992002-04-12 09:54:03 +000016703ac_cv_type_wchar_t=no
16704fi
16705rm -f conftest.$ac_objext conftest.$ac_ext
16706fi
16707echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16708echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16709
16710echo "$as_me:$LINENO: checking size of wchar_t" >&5
16711echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16712if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16713 echo $ECHO_N "(cached) $ECHO_C" >&6
16714else
16715 if test "$ac_cv_type_wchar_t" = yes; then
16716 # The cast to unsigned long works around a bug in the HP C Compiler
16717 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16718 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16719 # This bug is HP SR number 8606223364.
16720 if test "$cross_compiling" = yes; then
16721 # Depending upon the size, compute the lo and hi bounds.
16722cat >conftest.$ac_ext <<_ACEOF
16723#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016724/* confdefs.h. */
16725_ACEOF
16726cat confdefs.h >>conftest.$ac_ext
16727cat >>conftest.$ac_ext <<_ACEOF
16728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016729#include <wchar.h>
16730
Martin v. Löwis11437992002-04-12 09:54:03 +000016731int
16732main ()
16733{
16734static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16735test_array [0] = 0
16736
16737 ;
16738 return 0;
16739}
16740_ACEOF
16741rm -f conftest.$ac_objext
16742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16743 (eval $ac_compile) 2>&5
16744 ac_status=$?
16745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16746 (exit $ac_status); } &&
16747 { ac_try='test -s conftest.$ac_objext'
16748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16749 (eval $ac_try) 2>&5
16750 ac_status=$?
16751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16752 (exit $ac_status); }; }; then
16753 ac_lo=0 ac_mid=0
16754 while :; do
16755 cat >conftest.$ac_ext <<_ACEOF
16756#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016757/* confdefs.h. */
16758_ACEOF
16759cat confdefs.h >>conftest.$ac_ext
16760cat >>conftest.$ac_ext <<_ACEOF
16761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016762#include <wchar.h>
16763
Martin v. Löwis11437992002-04-12 09:54:03 +000016764int
16765main ()
16766{
16767static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16768test_array [0] = 0
16769
16770 ;
16771 return 0;
16772}
16773_ACEOF
16774rm -f conftest.$ac_objext
16775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16776 (eval $ac_compile) 2>&5
16777 ac_status=$?
16778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16779 (exit $ac_status); } &&
16780 { ac_try='test -s conftest.$ac_objext'
16781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16782 (eval $ac_try) 2>&5
16783 ac_status=$?
16784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785 (exit $ac_status); }; }; then
16786 ac_hi=$ac_mid; break
16787else
16788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016789sed 's/^/| /' conftest.$ac_ext >&5
16790
Martin v. Löwis11437992002-04-12 09:54:03 +000016791ac_lo=`expr $ac_mid + 1`
16792 if test $ac_lo -le $ac_mid; then
16793 ac_lo= ac_hi=
16794 break
16795 fi
16796 ac_mid=`expr 2 '*' $ac_mid + 1`
16797fi
16798rm -f conftest.$ac_objext conftest.$ac_ext
16799 done
16800else
16801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016802sed 's/^/| /' conftest.$ac_ext >&5
16803
Martin v. Löwis11437992002-04-12 09:54:03 +000016804cat >conftest.$ac_ext <<_ACEOF
16805#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016806/* confdefs.h. */
16807_ACEOF
16808cat confdefs.h >>conftest.$ac_ext
16809cat >>conftest.$ac_ext <<_ACEOF
16810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016811#include <wchar.h>
16812
Martin v. Löwis11437992002-04-12 09:54:03 +000016813int
16814main ()
16815{
16816static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16817test_array [0] = 0
16818
16819 ;
16820 return 0;
16821}
16822_ACEOF
16823rm -f conftest.$ac_objext
16824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16825 (eval $ac_compile) 2>&5
16826 ac_status=$?
16827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828 (exit $ac_status); } &&
16829 { ac_try='test -s conftest.$ac_objext'
16830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16831 (eval $ac_try) 2>&5
16832 ac_status=$?
16833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16834 (exit $ac_status); }; }; then
16835 ac_hi=-1 ac_mid=-1
16836 while :; do
16837 cat >conftest.$ac_ext <<_ACEOF
16838#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016839/* confdefs.h. */
16840_ACEOF
16841cat confdefs.h >>conftest.$ac_ext
16842cat >>conftest.$ac_ext <<_ACEOF
16843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016844#include <wchar.h>
16845
Martin v. Löwis11437992002-04-12 09:54:03 +000016846int
16847main ()
16848{
16849static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16850test_array [0] = 0
16851
16852 ;
16853 return 0;
16854}
16855_ACEOF
16856rm -f conftest.$ac_objext
16857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16858 (eval $ac_compile) 2>&5
16859 ac_status=$?
16860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16861 (exit $ac_status); } &&
16862 { ac_try='test -s conftest.$ac_objext'
16863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16864 (eval $ac_try) 2>&5
16865 ac_status=$?
16866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16867 (exit $ac_status); }; }; then
16868 ac_lo=$ac_mid; break
16869else
16870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016871sed 's/^/| /' conftest.$ac_ext >&5
16872
Martin v. Löwis11437992002-04-12 09:54:03 +000016873ac_hi=`expr '(' $ac_mid ')' - 1`
16874 if test $ac_mid -le $ac_hi; then
16875 ac_lo= ac_hi=
16876 break
16877 fi
16878 ac_mid=`expr 2 '*' $ac_mid`
16879fi
16880rm -f conftest.$ac_objext conftest.$ac_ext
16881 done
16882else
16883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016884sed 's/^/| /' conftest.$ac_ext >&5
16885
Martin v. Löwis11437992002-04-12 09:54:03 +000016886ac_lo= ac_hi=
16887fi
16888rm -f conftest.$ac_objext conftest.$ac_ext
16889fi
16890rm -f conftest.$ac_objext conftest.$ac_ext
16891# Binary search between lo and hi bounds.
16892while test "x$ac_lo" != "x$ac_hi"; do
16893 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16894 cat >conftest.$ac_ext <<_ACEOF
16895#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016896/* confdefs.h. */
16897_ACEOF
16898cat confdefs.h >>conftest.$ac_ext
16899cat >>conftest.$ac_ext <<_ACEOF
16900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016901#include <wchar.h>
16902
Martin v. Löwis11437992002-04-12 09:54:03 +000016903int
16904main ()
16905{
16906static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16907test_array [0] = 0
16908
16909 ;
16910 return 0;
16911}
16912_ACEOF
16913rm -f conftest.$ac_objext
16914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16915 (eval $ac_compile) 2>&5
16916 ac_status=$?
16917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16918 (exit $ac_status); } &&
16919 { ac_try='test -s conftest.$ac_objext'
16920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16921 (eval $ac_try) 2>&5
16922 ac_status=$?
16923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16924 (exit $ac_status); }; }; then
16925 ac_hi=$ac_mid
16926else
16927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016928sed 's/^/| /' conftest.$ac_ext >&5
16929
Martin v. Löwis11437992002-04-12 09:54:03 +000016930ac_lo=`expr '(' $ac_mid ')' + 1`
16931fi
16932rm -f conftest.$ac_objext conftest.$ac_ext
16933done
16934case $ac_lo in
16935?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016936'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16937See \`config.log' for more details." >&5
16938echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16939See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 { (exit 1); exit 1; }; } ;;
16941esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016942else
16943 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016944 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16945See \`config.log' for more details." >&5
16946echo "$as_me: error: cannot run test program while cross compiling
16947See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016948 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016949else
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 cat >conftest.$ac_ext <<_ACEOF
16951#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016952/* confdefs.h. */
16953_ACEOF
16954cat confdefs.h >>conftest.$ac_ext
16955cat >>conftest.$ac_ext <<_ACEOF
16956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016957#include <wchar.h>
16958
16959long longval () { return (long) (sizeof (wchar_t)); }
16960unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016961#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016962#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016963int
16964main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016965{
Martin v. Löwis11437992002-04-12 09:54:03 +000016966
16967 FILE *f = fopen ("conftest.val", "w");
16968 if (! f)
16969 exit (1);
16970 if (((long) (sizeof (wchar_t))) < 0)
16971 {
16972 long i = longval ();
16973 if (i != ((long) (sizeof (wchar_t))))
16974 exit (1);
16975 fprintf (f, "%ld\n", i);
16976 }
16977 else
16978 {
16979 unsigned long i = ulongval ();
16980 if (i != ((long) (sizeof (wchar_t))))
16981 exit (1);
16982 fprintf (f, "%lu\n", i);
16983 }
16984 exit (ferror (f) || fclose (f) != 0);
16985
16986 ;
16987 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016988}
Martin v. Löwis11437992002-04-12 09:54:03 +000016989_ACEOF
16990rm -f conftest$ac_exeext
16991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16992 (eval $ac_link) 2>&5
16993 ac_status=$?
16994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16997 (eval $ac_try) 2>&5
16998 ac_status=$?
16999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17000 (exit $ac_status); }; }; then
17001 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000017002else
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 echo "$as_me: program exited with status $ac_status" >&5
17004echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017005sed 's/^/| /' conftest.$ac_ext >&5
17006
Martin v. Löwis11437992002-04-12 09:54:03 +000017007( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000017008{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
17009See \`config.log' for more details." >&5
17010echo "$as_me: error: cannot compute sizeof (wchar_t), 77
17011See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 { (exit 1); exit 1; }; }
17013fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017014rm -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 +000017015fi
17016fi
17017rm -f conftest.val
17018else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017019 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000017020fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017022echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
17023echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
17024cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017025#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017026_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017027
Michael W. Hudson54241132001-12-07 15:38:26 +000017028
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017029fi
17030
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017031echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
17032echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
17033have_ucs4_tcl=no
17034cat >conftest.$ac_ext <<_ACEOF
17035#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017036/* confdefs.h. */
17037_ACEOF
17038cat confdefs.h >>conftest.$ac_ext
17039cat >>conftest.$ac_ext <<_ACEOF
17040/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017041
17042#include <tcl.h>
17043#if TCL_UTF_MAX != 6
17044# error "NOT UCS4_TCL"
17045#endif
17046int
17047main ()
17048{
17049
17050 ;
17051 return 0;
17052}
17053_ACEOF
17054rm -f conftest.$ac_objext
17055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17056 (eval $ac_compile) 2>&5
17057 ac_status=$?
17058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17059 (exit $ac_status); } &&
17060 { ac_try='test -s conftest.$ac_objext'
17061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17062 (eval $ac_try) 2>&5
17063 ac_status=$?
17064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17065 (exit $ac_status); }; }; then
17066
17067
17068cat >>confdefs.h <<\_ACEOF
17069#define HAVE_UCS4_TCL 1
17070_ACEOF
17071
17072 have_ucs4_tcl=yes
17073
17074else
17075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017076sed 's/^/| /' conftest.$ac_ext >&5
17077
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017078fi
17079rm -f conftest.$ac_objext conftest.$ac_ext
17080echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17081echo "${ECHO_T}$have_ucs4_tcl" >&6
17082
Skip Montanaro6dead952003-09-25 14:50:04 +000017083# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017084if test "$wchar_h" = yes
17085then
17086 # check whether wchar_t is signed or not
17087 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17088echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17089 if test "${ac_cv_wchar_t_signed+set}" = set; then
17090 echo $ECHO_N "(cached) $ECHO_C" >&6
17091else
17092
17093 if test "$cross_compiling" = yes; then
17094 ac_cv_wchar_t_signed=yes
17095else
17096 cat >conftest.$ac_ext <<_ACEOF
17097#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017098/* confdefs.h. */
17099_ACEOF
17100cat confdefs.h >>conftest.$ac_ext
17101cat >>conftest.$ac_ext <<_ACEOF
17102/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017103
17104 #include <wchar.h>
17105 int main()
17106 {
17107 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17108 }
17109
17110_ACEOF
17111rm -f conftest$ac_exeext
17112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17113 (eval $ac_link) 2>&5
17114 ac_status=$?
17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17118 (eval $ac_try) 2>&5
17119 ac_status=$?
17120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17121 (exit $ac_status); }; }; then
17122 ac_cv_wchar_t_signed=yes
17123else
17124 echo "$as_me: program exited with status $ac_status" >&5
17125echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017126sed 's/^/| /' conftest.$ac_ext >&5
17127
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017128( exit $ac_status )
17129ac_cv_wchar_t_signed=no
17130fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017131rm -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 +000017132fi
17133fi
17134
17135 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17136echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17137fi
17138
Martin v. Löwis11437992002-04-12 09:54:03 +000017139echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17140echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017141# Check whether --enable-unicode or --disable-unicode was given.
17142if test "${enable_unicode+set}" = set; then
17143 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017144
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017145else
17146 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017147fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017148
17149if test $enable_unicode = yes
17150then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017151 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017152 case "$have_ucs4_tcl" in
17153 yes) enable_unicode="ucs4"
17154 ;;
17155 *) enable_unicode="ucs2"
17156 ;;
17157 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017158fi
17159
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017160
17161
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017162case "$enable_unicode" in
17163ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017164 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017165#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017166_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017167
17168 ;;
17169ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017170 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017171#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017172_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017173
17174 ;;
17175esac
17176
Michael W. Hudson54241132001-12-07 15:38:26 +000017177
Martin v. Löwis11437992002-04-12 09:54:03 +000017178
17179
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017180
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017181if test "$enable_unicode" = "no"
17182then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017183 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 echo "$as_me:$LINENO: result: not used" >&5
17185echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017186else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017187 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017188
17189cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017190#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017191_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017192
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017193
17194 # wchar_t is only usable if it maps to an unsigned type
17195 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17196 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017197 then
17198 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017199
Martin v. Löwis11437992002-04-12 09:54:03 +000017200cat >>confdefs.h <<\_ACEOF
17201#define HAVE_USABLE_WCHAR_T 1
17202_ACEOF
17203
17204 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017205#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017206_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017207
17208 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17209 then
17210 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017212#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017213_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017214
17215 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17216 then
17217 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017218 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017219#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017220_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017221
17222 else
17223 PY_UNICODE_TYPE="no type found"
17224 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017225 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17226echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017227fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017228
17229# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017230echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17231echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17232if test "${ac_cv_c_bigendian+set}" = set; then
17233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017234else
Martin v. Löwis11437992002-04-12 09:54:03 +000017235 # See if sys/param.h defines the BYTE_ORDER macro.
17236cat >conftest.$ac_ext <<_ACEOF
17237#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017238/* confdefs.h. */
17239_ACEOF
17240cat confdefs.h >>conftest.$ac_ext
17241cat >>conftest.$ac_ext <<_ACEOF
17242/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017243#include <sys/types.h>
17244#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017245
Martin v. Löwis11437992002-04-12 09:54:03 +000017246int
17247main ()
17248{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017249#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17250 bogus endian macros
17251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017252
17253 ;
17254 return 0;
17255}
17256_ACEOF
17257rm -f conftest.$ac_objext
17258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17259 (eval $ac_compile) 2>&5
17260 ac_status=$?
17261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17262 (exit $ac_status); } &&
17263 { ac_try='test -s conftest.$ac_objext'
17264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17265 (eval $ac_try) 2>&5
17266 ac_status=$?
17267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17268 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017269 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017270cat >conftest.$ac_ext <<_ACEOF
17271#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017272/* confdefs.h. */
17273_ACEOF
17274cat confdefs.h >>conftest.$ac_ext
17275cat >>conftest.$ac_ext <<_ACEOF
17276/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017277#include <sys/types.h>
17278#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017279
Martin v. Löwis11437992002-04-12 09:54:03 +000017280int
17281main ()
17282{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017283#if BYTE_ORDER != BIG_ENDIAN
17284 not big endian
17285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017286
17287 ;
17288 return 0;
17289}
17290_ACEOF
17291rm -f conftest.$ac_objext
17292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17293 (eval $ac_compile) 2>&5
17294 ac_status=$?
17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296 (exit $ac_status); } &&
17297 { ac_try='test -s conftest.$ac_objext'
17298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17299 (eval $ac_try) 2>&5
17300 ac_status=$?
17301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17302 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017303 ac_cv_c_bigendian=yes
17304else
Martin v. Löwis11437992002-04-12 09:54:03 +000017305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017306sed 's/^/| /' conftest.$ac_ext >&5
17307
Martin v. Löwis11437992002-04-12 09:54:03 +000017308ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017310rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017311else
Martin v. Löwis11437992002-04-12 09:54:03 +000017312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017313sed 's/^/| /' conftest.$ac_ext >&5
17314
Martin v. Löwis11437992002-04-12 09:54:03 +000017315# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017316if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017317 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 ac_cv_c_bigendian=unknown
17319 cat >conftest.$ac_ext <<_ACEOF
17320#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017321/* confdefs.h. */
17322_ACEOF
17323cat confdefs.h >>conftest.$ac_ext
17324cat >>conftest.$ac_ext <<_ACEOF
17325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017326short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17327short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17328void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17329short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17330short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17331void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017332int
17333main ()
17334{
17335 _ascii (); _ebcdic ();
17336 ;
17337 return 0;
17338}
17339_ACEOF
17340rm -f conftest.$ac_objext
17341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17342 (eval $ac_compile) 2>&5
17343 ac_status=$?
17344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17345 (exit $ac_status); } &&
17346 { ac_try='test -s conftest.$ac_objext'
17347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17348 (eval $ac_try) 2>&5
17349 ac_status=$?
17350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17351 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017352 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017353 ac_cv_c_bigendian=yes
17354fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017355if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017356 if test "$ac_cv_c_bigendian" = unknown; then
17357 ac_cv_c_bigendian=no
17358 else
17359 # finding both strings is unlikely to happen, but who knows?
17360 ac_cv_c_bigendian=unknown
17361 fi
17362fi
17363else
17364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017365sed 's/^/| /' conftest.$ac_ext >&5
17366
Martin v. Löwis11437992002-04-12 09:54:03 +000017367fi
17368rm -f conftest.$ac_objext conftest.$ac_ext
17369else
17370 cat >conftest.$ac_ext <<_ACEOF
17371#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017372/* confdefs.h. */
17373_ACEOF
17374cat confdefs.h >>conftest.$ac_ext
17375cat >>conftest.$ac_ext <<_ACEOF
17376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017377int
17378main ()
17379{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017380 /* Are we little or big endian? From Harbison&Steele. */
17381 union
17382 {
17383 long l;
17384 char c[sizeof (long)];
17385 } u;
17386 u.l = 1;
17387 exit (u.c[sizeof (long) - 1] == 1);
17388}
Martin v. Löwis11437992002-04-12 09:54:03 +000017389_ACEOF
17390rm -f conftest$ac_exeext
17391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17392 (eval $ac_link) 2>&5
17393 ac_status=$?
17394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17397 (eval $ac_try) 2>&5
17398 ac_status=$?
17399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17400 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017401 ac_cv_c_bigendian=no
17402else
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 echo "$as_me: program exited with status $ac_status" >&5
17404echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017405sed 's/^/| /' conftest.$ac_ext >&5
17406
Martin v. Löwis11437992002-04-12 09:54:03 +000017407( exit $ac_status )
17408ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017409fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017410rm -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 +000017411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017412fi
17413rm -f conftest.$ac_objext conftest.$ac_ext
17414fi
17415echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17416echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17417case $ac_cv_c_bigendian in
17418 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017419
Martin v. Löwis11437992002-04-12 09:54:03 +000017420cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017421#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017422_ACEOF
17423 ;;
17424 no)
17425 ;;
17426 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017427 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017428presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017429echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017430presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17431 { (exit 1); exit 1; }; } ;;
17432esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017433
Michael W. Hudson54241132001-12-07 15:38:26 +000017434
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017435# Check whether right shifting a negative integer extends the sign bit
17436# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017437echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17438echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17439if test "${ac_cv_rshift_extends_sign+set}" = set; then
17440 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017441else
Martin v. Löwis11437992002-04-12 09:54:03 +000017442
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017443if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017444 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017445else
Martin v. Löwis11437992002-04-12 09:54:03 +000017446 cat >conftest.$ac_ext <<_ACEOF
17447#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017448/* confdefs.h. */
17449_ACEOF
17450cat confdefs.h >>conftest.$ac_ext
17451cat >>conftest.$ac_ext <<_ACEOF
17452/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017453
17454int main()
17455{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017456 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017457}
17458
Martin v. Löwis11437992002-04-12 09:54:03 +000017459_ACEOF
17460rm -f conftest$ac_exeext
17461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17462 (eval $ac_link) 2>&5
17463 ac_status=$?
17464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17467 (eval $ac_try) 2>&5
17468 ac_status=$?
17469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17470 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017471 ac_cv_rshift_extends_sign=yes
17472else
Martin v. Löwis11437992002-04-12 09:54:03 +000017473 echo "$as_me: program exited with status $ac_status" >&5
17474echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017475sed 's/^/| /' conftest.$ac_ext >&5
17476
Martin v. Löwis11437992002-04-12 09:54:03 +000017477( exit $ac_status )
17478ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017479fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017480rm -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 +000017481fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017482fi
17483
Martin v. Löwis11437992002-04-12 09:54:03 +000017484echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17485echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017486if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017487then
Martin v. Löwis11437992002-04-12 09:54:03 +000017488
17489cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017490#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017491_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017492
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017493fi
17494
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017495# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017496echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17497echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17498if test "${ac_cv_have_getc_unlocked+set}" = set; then
17499 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017500else
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
17502cat >conftest.$ac_ext <<_ACEOF
17503#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017504/* confdefs.h. */
17505_ACEOF
17506cat confdefs.h >>conftest.$ac_ext
17507cat >>conftest.$ac_ext <<_ACEOF
17508/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017509#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017510int
17511main ()
17512{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017513
17514 FILE *f = fopen("/dev/null", "r");
17515 flockfile(f);
17516 getc_unlocked(f);
17517 funlockfile(f);
17518
Martin v. Löwis11437992002-04-12 09:54:03 +000017519 ;
17520 return 0;
17521}
17522_ACEOF
17523rm -f conftest.$ac_objext conftest$ac_exeext
17524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17525 (eval $ac_link) 2>&5
17526 ac_status=$?
17527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17528 (exit $ac_status); } &&
17529 { ac_try='test -s conftest$ac_exeext'
17530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17531 (eval $ac_try) 2>&5
17532 ac_status=$?
17533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17534 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017535 ac_cv_have_getc_unlocked=yes
17536else
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017538sed 's/^/| /' conftest.$ac_ext >&5
17539
Martin v. Löwis11437992002-04-12 09:54:03 +000017540ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017542rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017543fi
17544
Martin v. Löwis11437992002-04-12 09:54:03 +000017545echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17546echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017547if test "$ac_cv_have_getc_unlocked" = yes
17548then
Martin v. Löwis11437992002-04-12 09:54:03 +000017549
17550cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017551#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017552_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017553
17554fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017555
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017556# check for readline 2.2
17557cat >conftest.$ac_ext <<_ACEOF
17558#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017559/* confdefs.h. */
17560_ACEOF
17561cat confdefs.h >>conftest.$ac_ext
17562cat >>conftest.$ac_ext <<_ACEOF
17563/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017564#include <readline/readline.h>
17565_ACEOF
17566if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17567 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17568 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017569 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017570 rm -f conftest.er1
17571 cat conftest.err >&5
17572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17573 (exit $ac_status); } >/dev/null; then
17574 if test -s conftest.err; then
17575 ac_cpp_err=$ac_c_preproc_warn_flag
17576 else
17577 ac_cpp_err=
17578 fi
17579else
17580 ac_cpp_err=yes
17581fi
17582if test -z "$ac_cpp_err"; then
17583 have_readline=yes
17584else
17585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017586sed 's/^/| /' conftest.$ac_ext >&5
17587
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017588 have_readline=no
17589fi
17590rm -f conftest.err conftest.$ac_ext
17591if test $have_readline = yes
17592then
17593 cat >conftest.$ac_ext <<_ACEOF
17594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017595/* confdefs.h. */
17596_ACEOF
17597cat confdefs.h >>conftest.$ac_ext
17598cat >>conftest.$ac_ext <<_ACEOF
17599/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017600#include <readline/readline.h>
17601
17602_ACEOF
17603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017604 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017605
17606cat >>confdefs.h <<\_ACEOF
17607#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17608_ACEOF
17609
17610fi
17611rm -f conftest*
17612
17613fi
17614
Martin v. Löwis0daad592001-09-30 21:09:59 +000017615# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017616echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17617echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17618if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017620else
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017622LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017623cat >conftest.$ac_ext <<_ACEOF
17624#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017625/* confdefs.h. */
17626_ACEOF
17627cat confdefs.h >>conftest.$ac_ext
17628cat >>conftest.$ac_ext <<_ACEOF
17629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017630
Guido van Rossum353ae582001-07-10 16:45:32 +000017631/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017632#ifdef __cplusplus
17633extern "C"
17634#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017635/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017636 builtin and then its argument prototype would still apply. */
17637char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017638int
17639main ()
17640{
17641rl_pre_input_hook ();
17642 ;
17643 return 0;
17644}
17645_ACEOF
17646rm -f conftest.$ac_objext conftest$ac_exeext
17647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17648 (eval $ac_link) 2>&5
17649 ac_status=$?
17650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17651 (exit $ac_status); } &&
17652 { ac_try='test -s conftest$ac_exeext'
17653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17654 (eval $ac_try) 2>&5
17655 ac_status=$?
17656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17657 (exit $ac_status); }; }; then
17658 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017659else
Martin v. Löwis11437992002-04-12 09:54:03 +000017660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017661sed 's/^/| /' conftest.$ac_ext >&5
17662
Martin v. Löwis11437992002-04-12 09:54:03 +000017663ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017664fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017665rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17666LIBS=$ac_check_lib_save_LIBS
17667fi
17668echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17669echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17670if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017671
Martin v. Löwis11437992002-04-12 09:54:03 +000017672cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017673#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017674_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017675
Martin v. Löwis0daad592001-09-30 21:09:59 +000017676fi
17677
Michael W. Hudson54241132001-12-07 15:38:26 +000017678
Martin v. Löwis0daad592001-09-30 21:09:59 +000017679# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017680echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17681echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17682if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17683 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017684else
Martin v. Löwis11437992002-04-12 09:54:03 +000017685 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017686LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017687cat >conftest.$ac_ext <<_ACEOF
17688#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017689/* confdefs.h. */
17690_ACEOF
17691cat confdefs.h >>conftest.$ac_ext
17692cat >>conftest.$ac_ext <<_ACEOF
17693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017694
Martin v. Löwis0daad592001-09-30 21:09:59 +000017695/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017696#ifdef __cplusplus
17697extern "C"
17698#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017699/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017700 builtin and then its argument prototype would still apply. */
17701char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017702int
17703main ()
17704{
17705rl_completion_matches ();
17706 ;
17707 return 0;
17708}
17709_ACEOF
17710rm -f conftest.$ac_objext conftest$ac_exeext
17711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17712 (eval $ac_link) 2>&5
17713 ac_status=$?
17714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17715 (exit $ac_status); } &&
17716 { ac_try='test -s conftest$ac_exeext'
17717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17718 (eval $ac_try) 2>&5
17719 ac_status=$?
17720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17721 (exit $ac_status); }; }; then
17722 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017723else
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017725sed 's/^/| /' conftest.$ac_ext >&5
17726
Martin v. Löwis11437992002-04-12 09:54:03 +000017727ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017729rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17730LIBS=$ac_check_lib_save_LIBS
17731fi
17732echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17733echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17734if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017735
Martin v. Löwis11437992002-04-12 09:54:03 +000017736cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017737#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017738_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017739
Guido van Rossum353ae582001-07-10 16:45:32 +000017740fi
17741
Jack Jansendd19cf82001-12-06 22:36:17 +000017742
Martin v. Löwis11437992002-04-12 09:54:03 +000017743echo "$as_me:$LINENO: checking for broken nice()" >&5
17744echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17745if test "${ac_cv_broken_nice+set}" = set; then
17746 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017747else
Martin v. Löwis11437992002-04-12 09:54:03 +000017748
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017749if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017750 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017751else
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 cat >conftest.$ac_ext <<_ACEOF
17753#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017754/* confdefs.h. */
17755_ACEOF
17756cat confdefs.h >>conftest.$ac_ext
17757cat >>conftest.$ac_ext <<_ACEOF
17758/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017759
17760int main()
17761{
17762 int val1 = nice(1);
17763 if (val1 != -1 && val1 == nice(2))
17764 exit(0);
17765 exit(1);
17766}
17767
Martin v. Löwis11437992002-04-12 09:54:03 +000017768_ACEOF
17769rm -f conftest$ac_exeext
17770if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17771 (eval $ac_link) 2>&5
17772 ac_status=$?
17773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17774 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17776 (eval $ac_try) 2>&5
17777 ac_status=$?
17778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17779 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017780 ac_cv_broken_nice=yes
17781else
Martin v. Löwis11437992002-04-12 09:54:03 +000017782 echo "$as_me: program exited with status $ac_status" >&5
17783echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017784sed 's/^/| /' conftest.$ac_ext >&5
17785
Martin v. Löwis11437992002-04-12 09:54:03 +000017786( exit $ac_status )
17787ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017788fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017789rm -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 +000017790fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017791fi
17792
Martin v. Löwis11437992002-04-12 09:54:03 +000017793echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17794echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017795if test "$ac_cv_broken_nice" = yes
17796then
Martin v. Löwis11437992002-04-12 09:54:03 +000017797
17798cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017799#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017800_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017801
17802fi
17803
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017804# tzset(3) exists and works like we expect it to
17805echo "$as_me:$LINENO: checking for working tzset()" >&5
17806echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17807if test "${ac_cv_working_tzset+set}" = set; then
17808 echo $ECHO_N "(cached) $ECHO_C" >&6
17809else
17810
17811if test "$cross_compiling" = yes; then
17812 ac_cv_working_tzset=no
17813else
17814 cat >conftest.$ac_ext <<_ACEOF
17815#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017816/* confdefs.h. */
17817_ACEOF
17818cat confdefs.h >>conftest.$ac_ext
17819cat >>conftest.$ac_ext <<_ACEOF
17820/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017821
17822#include <stdlib.h>
17823#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017824#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017825int main()
17826{
Brett Cannon18367812003-09-19 00:59:16 +000017827 /* Note that we need to ensure that not only does tzset(3)
17828 do 'something' with localtime, but it works as documented
17829 in the library reference and as expected by the test suite.
17830
17831 Red Hat 6.2 doesn't understand the southern hemisphere
17832 after New Year's Day; it thinks swaps on that day.
17833 */
17834
17835 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17836 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17837
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017838 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017839 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017840 if (localtime(&groundhogday)->tm_hour != 0)
17841 exit(1);
17842
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017843 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017844 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017845 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017846 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017847
17848 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17849 tzset();
17850 if (localtime(&groundhogday)->tm_hour != 11)
17851 exit(1);
17852 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17853 exit(1);
17854 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17855 exit(1);
17856
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017857 exit(0);
17858}
17859
17860_ACEOF
17861rm -f conftest$ac_exeext
17862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17863 (eval $ac_link) 2>&5
17864 ac_status=$?
17865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17868 (eval $ac_try) 2>&5
17869 ac_status=$?
17870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17871 (exit $ac_status); }; }; then
17872 ac_cv_working_tzset=yes
17873else
17874 echo "$as_me: program exited with status $ac_status" >&5
17875echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017876sed 's/^/| /' conftest.$ac_ext >&5
17877
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017878( exit $ac_status )
17879ac_cv_working_tzset=no
17880fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017881rm -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 +000017882fi
17883fi
17884
17885echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17886echo "${ECHO_T}$ac_cv_working_tzset" >&6
17887if test "$ac_cv_working_tzset" = yes
17888then
17889
17890cat >>confdefs.h <<\_ACEOF
17891#define HAVE_WORKING_TZSET 1
17892_ACEOF
17893
17894fi
17895
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017896# Look for subsecond timestamps in struct stat
17897echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17898echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17899if test "${ac_cv_stat_tv_nsec+set}" = set; then
17900 echo $ECHO_N "(cached) $ECHO_C" >&6
17901else
17902 cat >conftest.$ac_ext <<_ACEOF
17903#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017904/* confdefs.h. */
17905_ACEOF
17906cat confdefs.h >>conftest.$ac_ext
17907cat >>conftest.$ac_ext <<_ACEOF
17908/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017909#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017910int
17911main ()
17912{
17913
17914struct stat st;
17915st.st_mtim.tv_nsec = 1;
17916
17917 ;
17918 return 0;
17919}
17920_ACEOF
17921rm -f conftest.$ac_objext
17922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17923 (eval $ac_compile) 2>&5
17924 ac_status=$?
17925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17926 (exit $ac_status); } &&
17927 { ac_try='test -s conftest.$ac_objext'
17928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17929 (eval $ac_try) 2>&5
17930 ac_status=$?
17931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17932 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017933 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017934else
17935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017936sed 's/^/| /' conftest.$ac_ext >&5
17937
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017938ac_cv_stat_tv_nsec=no
17939fi
17940rm -f conftest.$ac_objext conftest.$ac_ext
17941fi
17942
17943echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17944echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17945if test "$ac_cv_stat_tv_nsec" = yes
17946then
17947
17948cat >>confdefs.h <<\_ACEOF
17949#define HAVE_STAT_TV_NSEC 1
17950_ACEOF
17951
17952fi
17953
Jack Jansen666b1e72001-10-31 12:11:48 +000017954# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017955echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17956echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17957if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17958 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017959else
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 cat >conftest.$ac_ext <<_ACEOF
17961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017962/* confdefs.h. */
17963_ACEOF
17964cat confdefs.h >>conftest.$ac_ext
17965cat >>conftest.$ac_ext <<_ACEOF
17966/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017967#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017968int
17969main ()
17970{
Jack Jansen666b1e72001-10-31 12:11:48 +000017971
17972 int rtn;
17973 rtn = mvwdelch(0,0,0);
17974
Martin v. Löwis11437992002-04-12 09:54:03 +000017975 ;
17976 return 0;
17977}
17978_ACEOF
17979rm -f conftest.$ac_objext
17980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17981 (eval $ac_compile) 2>&5
17982 ac_status=$?
17983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17984 (exit $ac_status); } &&
17985 { ac_try='test -s conftest.$ac_objext'
17986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17987 (eval $ac_try) 2>&5
17988 ac_status=$?
17989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17990 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017991 ac_cv_mvwdelch_is_expression=yes
17992else
Martin v. Löwis11437992002-04-12 09:54:03 +000017993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017994sed 's/^/| /' conftest.$ac_ext >&5
17995
Martin v. Löwis11437992002-04-12 09:54:03 +000017996ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017998rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017999fi
18000
Martin v. Löwis11437992002-04-12 09:54:03 +000018001echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18002echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018003
18004if test "$ac_cv_mvwdelch_is_expression" = yes
18005then
Martin v. Löwis11437992002-04-12 09:54:03 +000018006
18007cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018008#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018009_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018010
18011fi
18012
Martin v. Löwis11437992002-04-12 09:54:03 +000018013echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18014echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18015if test "${ac_cv_window_has_flags+set}" = set; then
18016 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018017else
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 cat >conftest.$ac_ext <<_ACEOF
18019#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018020/* confdefs.h. */
18021_ACEOF
18022cat confdefs.h >>conftest.$ac_ext
18023cat >>conftest.$ac_ext <<_ACEOF
18024/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018025#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018026int
18027main ()
18028{
Jack Jansen666b1e72001-10-31 12:11:48 +000018029
18030 WINDOW *w;
18031 w->_flags = 0;
18032
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 ;
18034 return 0;
18035}
18036_ACEOF
18037rm -f conftest.$ac_objext
18038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18039 (eval $ac_compile) 2>&5
18040 ac_status=$?
18041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18042 (exit $ac_status); } &&
18043 { ac_try='test -s conftest.$ac_objext'
18044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18045 (eval $ac_try) 2>&5
18046 ac_status=$?
18047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018049 ac_cv_window_has_flags=yes
18050else
Martin v. Löwis11437992002-04-12 09:54:03 +000018051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018052sed 's/^/| /' conftest.$ac_ext >&5
18053
Martin v. Löwis11437992002-04-12 09:54:03 +000018054ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018056rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018057fi
18058
Martin v. Löwis11437992002-04-12 09:54:03 +000018059echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18060echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018061
Jack Jansen666b1e72001-10-31 12:11:48 +000018062
18063if test "$ac_cv_window_has_flags" = yes
18064then
Martin v. Löwis11437992002-04-12 09:54:03 +000018065
18066cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018067#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018068_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018069
18070fi
18071
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018072echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18073echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18074
18075if test -e /dev/ptmx
18076then
18077 echo "$as_me:$LINENO: result: yes" >&5
18078echo "${ECHO_T}yes" >&6
18079
18080cat >>confdefs.h <<\_ACEOF
18081#define HAVE_DEV_PTMX 1
18082_ACEOF
18083
18084else
18085 echo "$as_me:$LINENO: result: no" >&5
18086echo "${ECHO_T}no" >&6
18087fi
18088
Neal Norwitz865400f2003-03-21 01:42:58 +000018089echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18090echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18091
18092if test -e /dev/ptc
18093then
18094 echo "$as_me:$LINENO: result: yes" >&5
18095echo "${ECHO_T}yes" >&6
18096
18097cat >>confdefs.h <<\_ACEOF
18098#define HAVE_DEV_PTC 1
18099_ACEOF
18100
18101else
18102 echo "$as_me:$LINENO: result: no" >&5
18103echo "${ECHO_T}no" >&6
18104fi
18105
Martin v. Löwis11437992002-04-12 09:54:03 +000018106echo "$as_me:$LINENO: checking for socklen_t" >&5
18107echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18108if test "${ac_cv_type_socklen_t+set}" = set; then
18109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018110else
Martin v. Löwis11437992002-04-12 09:54:03 +000018111 cat >conftest.$ac_ext <<_ACEOF
18112#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018113/* confdefs.h. */
18114_ACEOF
18115cat confdefs.h >>conftest.$ac_ext
18116cat >>conftest.$ac_ext <<_ACEOF
18117/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018118
18119#ifdef HAVE_SYS_TYPES_H
18120#include <sys/types.h>
18121#endif
18122#ifdef HAVE_SYS_SOCKET_H
18123#include <sys/socket.h>
18124#endif
18125
18126
Martin v. Löwis11437992002-04-12 09:54:03 +000018127int
18128main ()
18129{
18130if ((socklen_t *) 0)
18131 return 0;
18132if (sizeof (socklen_t))
18133 return 0;
18134 ;
18135 return 0;
18136}
18137_ACEOF
18138rm -f conftest.$ac_objext
18139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18140 (eval $ac_compile) 2>&5
18141 ac_status=$?
18142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18143 (exit $ac_status); } &&
18144 { ac_try='test -s conftest.$ac_objext'
18145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18146 (eval $ac_try) 2>&5
18147 ac_status=$?
18148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18149 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018150 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018151else
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018153sed 's/^/| /' conftest.$ac_ext >&5
18154
Martin v. Löwis11437992002-04-12 09:54:03 +000018155ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018157rm -f conftest.$ac_objext conftest.$ac_ext
18158fi
18159echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18160echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18161if test $ac_cv_type_socklen_t = yes; then
18162 :
18163else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018164
Martin v. Löwis01c04012002-11-11 14:58:44 +000018165cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018166#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018167_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018168
18169fi
18170
Michael W. Hudson54241132001-12-07 15:38:26 +000018171
Michael W. Hudson54241132001-12-07 15:38:26 +000018172
18173
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018174for h in `(cd $srcdir;echo Python/thread_*.h)`
18175do
18176 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18177done
18178
Michael W. Hudson54241132001-12-07 15:38:26 +000018179
Jack Jansen0b06be72002-06-21 14:48:38 +000018180SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018181echo "$as_me:$LINENO: checking for build directories" >&5
18182echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018183for dir in $SRCDIRS; do
18184 if test ! -d $dir; then
18185 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018186 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018187done
Martin v. Löwis11437992002-04-12 09:54:03 +000018188echo "$as_me:$LINENO: result: done" >&5
18189echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018190
Guido van Rossum627b2d71993-12-24 10:39:16 +000018191# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018192 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018193
Martin v. Löwis11437992002-04-12 09:54:03 +000018194cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018195# This file is a shell script that caches the results of configure
18196# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018197# scripts and configure runs, see configure's option --config-cache.
18198# It is not useful on other systems. If it contains results you don't
18199# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018200#
Martin v. Löwis11437992002-04-12 09:54:03 +000018201# config.status only pays attention to the cache file if you give it
18202# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018203#
Skip Montanaro6dead952003-09-25 14:50:04 +000018204# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018205# loading this file, other *unset* `ac_cv_foo' will be assigned the
18206# following values.
18207
18208_ACEOF
18209
Guido van Rossumf78abae1997-01-21 22:02:36 +000018210# The following way of writing the cache mishandles newlines in values,
18211# but we know of no workaround that is simple, portable, and efficient.
18212# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018213# Ultrix sh set writes to stderr and can't be redirected directly,
18214# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018215{
18216 (set) 2>&1 |
18217 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18218 *ac_space=\ *)
18219 # `set' does not quote correctly, so add quotes (double-quote
18220 # substitution turns \\\\ into \\, and sed turns \\ into \).
18221 sed -n \
18222 "s/'/'\\\\''/g;
18223 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18224 ;;
18225 *)
18226 # `set' quotes correctly as required by POSIX, so do not add quotes.
18227 sed -n \
18228 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18229 ;;
18230 esac;
18231} |
18232 sed '
18233 t clear
18234 : clear
18235 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18236 t end
18237 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18238 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018239if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018240 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018241 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18242 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018243 else
18244 echo "not updating unwritable cache $cache_file"
18245 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018246fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018247rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018249test "x$prefix" = xNONE && prefix=$ac_default_prefix
18250# Let make expand exec_prefix.
18251test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018252
Martin v. Löwis11437992002-04-12 09:54:03 +000018253# VPATH may cause trouble with some makes, so we remove $(srcdir),
18254# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18255# trailing colons and then remove the whole line if VPATH becomes empty
18256# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018257if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18259s/:*\$(srcdir):*/:/;
18260s/:*\${srcdir}:*/:/;
18261s/:*@srcdir@:*/:/;
18262s/^\([^=]*=[ ]*\):*/\1/;
18263s/:*$//;
18264s/^[^=]*=[ ]*$//;
18265}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018266fi
18267
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018268DEFS=-DHAVE_CONFIG_H
18269
Skip Montanaro6dead952003-09-25 14:50:04 +000018270ac_libobjs=
18271ac_ltlibobjs=
18272for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18273 # 1. Remove the extension, and $U if already installed.
18274 ac_i=`echo "$ac_i" |
18275 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18276 # 2. Add them.
18277 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18278 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18279done
18280LIBOBJS=$ac_libobjs
18281
18282LTLIBOBJS=$ac_ltlibobjs
18283
18284
Martin v. Löwis11437992002-04-12 09:54:03 +000018285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018286: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018287ac_clean_files_save=$ac_clean_files
18288ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18289{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18290echo "$as_me: creating $CONFIG_STATUS" >&6;}
18291cat >$CONFIG_STATUS <<_ACEOF
18292#! $SHELL
18293# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018294# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018295# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018296# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018297
Martin v. Löwis11437992002-04-12 09:54:03 +000018298debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018299ac_cs_recheck=false
18300ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018301SHELL=\${CONFIG_SHELL-$SHELL}
18302_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018303
Martin v. Löwis11437992002-04-12 09:54:03 +000018304cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018305## --------------------- ##
18306## M4sh Initialization. ##
18307## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018308
Martin v. Löwis11437992002-04-12 09:54:03 +000018309# Be Bourne compatible
18310if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18311 emulate sh
18312 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018313 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18314 # is contrary to our usage. Disable this feature.
18315 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018316elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18317 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018318fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018319
Martin v. Löwis11437992002-04-12 09:54:03 +000018320# Support unset when possible.
18321if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18322 as_unset=unset
18323else
18324 as_unset=false
18325fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018326
Skip Montanaro6dead952003-09-25 14:50:04 +000018327
18328# Work around bugs in pre-3.0 UWIN ksh.
18329$as_unset ENV MAIL MAILPATH
18330PS1='$ '
18331PS2='> '
18332PS4='+ '
18333
18334# NLS nuisances.
18335for as_var in \
18336 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18337 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18338 LC_TELEPHONE LC_TIME
18339do
18340 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18341 eval $as_var=C; export $as_var
18342 else
18343 $as_unset $as_var
18344 fi
18345done
18346
18347# Required to use basename.
18348if expr a : '\(a\)' >/dev/null 2>&1; then
18349 as_expr=expr
18350else
18351 as_expr=false
18352fi
18353
18354if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18355 as_basename=basename
18356else
18357 as_basename=false
18358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018359
18360
18361# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018362as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018363$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18364 X"$0" : 'X\(//\)$' \| \
18365 X"$0" : 'X\(/\)$' \| \
18366 . : '\(.\)' 2>/dev/null ||
18367echo X/"$0" |
18368 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18369 /^X\/\(\/\/\)$/{ s//\1/; q; }
18370 /^X\/\(\/\).*/{ s//\1/; q; }
18371 s/.*/./; q'`
18372
Skip Montanaro6dead952003-09-25 14:50:04 +000018373
Martin v. Löwis11437992002-04-12 09:54:03 +000018374# PATH needs CR, and LINENO needs CR and PATH.
18375# Avoid depending upon Character Ranges.
18376as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18377as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18378as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18379as_cr_digits='0123456789'
18380as_cr_alnum=$as_cr_Letters$as_cr_digits
18381
18382# The user is always right.
18383if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018384 echo "#! /bin/sh" >conf$$.sh
18385 echo "exit 0" >>conf$$.sh
18386 chmod +x conf$$.sh
18387 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 PATH_SEPARATOR=';'
18389 else
18390 PATH_SEPARATOR=:
18391 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018392 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018393fi
18394
18395
18396 as_lineno_1=$LINENO
18397 as_lineno_2=$LINENO
18398 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18399 test "x$as_lineno_1" != "x$as_lineno_2" &&
18400 test "x$as_lineno_3" = "x$as_lineno_2" || {
18401 # Find who we are. Look in the path if we contain no path at all
18402 # relative or not.
18403 case $0 in
18404 *[\\/]* ) as_myself=$0 ;;
18405 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18406for as_dir in $PATH
18407do
18408 IFS=$as_save_IFS
18409 test -z "$as_dir" && as_dir=.
18410 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18411done
18412
18413 ;;
18414 esac
18415 # We did not find ourselves, most probably we were run as `sh COMMAND'
18416 # in which case we are not to be found in the path.
18417 if test "x$as_myself" = x; then
18418 as_myself=$0
18419 fi
18420 if test ! -f "$as_myself"; then
18421 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18422echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18423 { (exit 1); exit 1; }; }
18424 fi
18425 case $CONFIG_SHELL in
18426 '')
18427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18428for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18429do
18430 IFS=$as_save_IFS
18431 test -z "$as_dir" && as_dir=.
18432 for as_base in sh bash ksh sh5; do
18433 case $as_dir in
18434 /*)
18435 if ("$as_dir/$as_base" -c '
18436 as_lineno_1=$LINENO
18437 as_lineno_2=$LINENO
18438 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18439 test "x$as_lineno_1" != "x$as_lineno_2" &&
18440 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018441 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18442 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018443 CONFIG_SHELL=$as_dir/$as_base
18444 export CONFIG_SHELL
18445 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18446 fi;;
18447 esac
18448 done
18449done
18450;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018451 esac
18452
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18454 # uniformly replaced by the line number. The first 'sed' inserts a
18455 # line-number line before each line; the second 'sed' does the real
18456 # work. The second script uses 'N' to pair each line-number line
18457 # with the numbered line, and appends trailing '-' during
18458 # substitution so that $LINENO is not a special case at line end.
18459 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18460 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18461 sed '=' <$as_myself |
18462 sed '
18463 N
18464 s,$,-,
18465 : loop
18466 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18467 t loop
18468 s,-$,,
18469 s,^['$as_cr_digits']*\n,,
18470 ' >$as_me.lineno &&
18471 chmod +x $as_me.lineno ||
18472 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18473echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18474 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018475
Martin v. Löwis11437992002-04-12 09:54:03 +000018476 # Don't try to exec as it changes $[0], causing all sort of problems
18477 # (the dirname of $[0] is not the place where we might find the
18478 # original and so on. Autoconf is especially sensible to this).
18479 . ./$as_me.lineno
18480 # Exit status is that of the last command.
18481 exit
18482}
18483
18484
18485case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18486 *c*,-n*) ECHO_N= ECHO_C='
18487' ECHO_T=' ' ;;
18488 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18489 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18490esac
18491
18492if expr a : '\(a\)' >/dev/null 2>&1; then
18493 as_expr=expr
18494else
18495 as_expr=false
18496fi
18497
18498rm -f conf$$ conf$$.exe conf$$.file
18499echo >conf$$.file
18500if ln -s conf$$.file conf$$ 2>/dev/null; then
18501 # We could just check for DJGPP; but this test a) works b) is more generic
18502 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18503 if test -f conf$$.exe; then
18504 # Don't use ln at all; we don't have any links
18505 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018506 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018507 as_ln_s='ln -s'
18508 fi
18509elif ln conf$$.file conf$$ 2>/dev/null; then
18510 as_ln_s=ln
18511else
18512 as_ln_s='cp -p'
18513fi
18514rm -f conf$$ conf$$.exe conf$$.file
18515
Skip Montanaro6dead952003-09-25 14:50:04 +000018516if mkdir -p . 2>/dev/null; then
18517 as_mkdir_p=:
18518else
18519 as_mkdir_p=false
18520fi
18521
Martin v. Löwis11437992002-04-12 09:54:03 +000018522as_executable_p="test -f"
18523
18524# Sed expression to map a string onto a valid CPP name.
18525as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18526
18527# Sed expression to map a string onto a valid variable name.
18528as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18529
18530
18531# IFS
18532# We need space, tab and new line, in precisely that order.
18533as_nl='
18534'
18535IFS=" $as_nl"
18536
18537# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018538$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018539
18540exec 6>&1
18541
18542# Open the log real soon, to keep \$[0] and so on meaningful, and to
18543# report actual input values of CONFIG_FILES etc. instead of their
18544# values after options handling. Logging --version etc. is OK.
18545exec 5>>config.log
18546{
18547 echo
18548 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18549## Running $as_me. ##
18550_ASBOX
18551} >&5
18552cat >&5 <<_CSEOF
18553
Fred Drake9bd44622003-07-30 17:39:48 +000018554This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018555generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018556
18557 CONFIG_FILES = $CONFIG_FILES
18558 CONFIG_HEADERS = $CONFIG_HEADERS
18559 CONFIG_LINKS = $CONFIG_LINKS
18560 CONFIG_COMMANDS = $CONFIG_COMMANDS
18561 $ $0 $@
18562
18563_CSEOF
18564echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18565echo >&5
18566_ACEOF
18567
18568# Files that config.status was made for.
18569if test -n "$ac_config_files"; then
18570 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18571fi
18572
18573if test -n "$ac_config_headers"; then
18574 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18575fi
18576
18577if test -n "$ac_config_links"; then
18578 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18579fi
18580
18581if test -n "$ac_config_commands"; then
18582 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18583fi
18584
18585cat >>$CONFIG_STATUS <<\_ACEOF
18586
18587ac_cs_usage="\
18588\`$as_me' instantiates files from templates according to the
18589current configuration.
18590
18591Usage: $0 [OPTIONS] [FILE]...
18592
18593 -h, --help print this help, then exit
18594 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018595 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018596 -d, --debug don't remove temporary files
18597 --recheck update $as_me by reconfiguring in the same conditions
18598 --file=FILE[:TEMPLATE]
18599 instantiate the configuration file FILE
18600 --header=FILE[:TEMPLATE]
18601 instantiate the configuration header FILE
18602
18603Configuration files:
18604$config_files
18605
18606Configuration headers:
18607$config_headers
18608
18609Report bugs to <bug-autoconf@gnu.org>."
18610_ACEOF
18611
18612cat >>$CONFIG_STATUS <<_ACEOF
18613ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018614python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018615configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18617
18618Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18619Free Software Foundation, Inc.
18620This config.status script is free software; the Free Software Foundation
18621gives unlimited permission to copy, distribute and modify it."
18622srcdir=$srcdir
18623INSTALL="$INSTALL"
18624_ACEOF
18625
18626cat >>$CONFIG_STATUS <<\_ACEOF
18627# If no file are specified by the user, then we need to provide default
18628# value. By we need to know if files were specified by the user.
18629ac_need_defaults=:
18630while test $# != 0
18631do
18632 case $1 in
18633 --*=*)
18634 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18635 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018636 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018637 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018638 -*)
18639 ac_option=$1
18640 ac_optarg=$2
18641 ac_shift=shift
18642 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 *) # This is not an option, so the user has probably given explicit
18644 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018645 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 ac_need_defaults=false;;
18647 esac
18648
Skip Montanaro6dead952003-09-25 14:50:04 +000018649 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 # Handling of the options.
18651_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018652cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018653 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18654 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018655 --version | --vers* | -V )
18656 echo "$ac_cs_version"; exit 0 ;;
18657 --he | --h)
18658 # Conflict between --help and --header
18659 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18660Try \`$0 --help' for more information." >&5
18661echo "$as_me: error: ambiguous option: $1
18662Try \`$0 --help' for more information." >&2;}
18663 { (exit 1); exit 1; }; };;
18664 --help | --hel | -h )
18665 echo "$ac_cs_usage"; exit 0 ;;
18666 --debug | --d* | -d )
18667 debug=: ;;
18668 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018669 $ac_shift
18670 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018671 ac_need_defaults=false;;
18672 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018673 $ac_shift
18674 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018675 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018676 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18677 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18678 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018679
18680 # This is an error.
18681 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18682Try \`$0 --help' for more information." >&5
18683echo "$as_me: error: unrecognized option: $1
18684Try \`$0 --help' for more information." >&2;}
18685 { (exit 1); exit 1; }; } ;;
18686
18687 *) ac_config_targets="$ac_config_targets $1" ;;
18688
18689 esac
18690 shift
18691done
18692
Skip Montanaro6dead952003-09-25 14:50:04 +000018693ac_configure_extra_args=
18694
18695if $ac_cs_silent; then
18696 exec 6>/dev/null
18697 ac_configure_extra_args="$ac_configure_extra_args --silent"
18698fi
18699
18700_ACEOF
18701cat >>$CONFIG_STATUS <<_ACEOF
18702if \$ac_cs_recheck; then
18703 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18704 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18705fi
18706
Martin v. Löwis11437992002-04-12 09:54:03 +000018707_ACEOF
18708
18709
18710
18711
18712
18713cat >>$CONFIG_STATUS <<\_ACEOF
18714for ac_config_target in $ac_config_targets
18715do
18716 case "$ac_config_target" in
18717 # Handling of arguments.
18718 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18719 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18720 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18721 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18722echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18723 { (exit 1); exit 1; }; };;
18724 esac
18725done
18726
18727# If the user did not use the arguments to specify the items to instantiate,
18728# then the envvar interface is used. Set only those that are not.
18729# We use the long form for the default assignment because of an extremely
18730# bizarre bug on SunOS 4.1.3.
18731if $ac_need_defaults; then
18732 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18733 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18734fi
18735
Skip Montanaro6dead952003-09-25 14:50:04 +000018736# Have a temporary directory for convenience. Make it in the build tree
18737# simply because there is no reason to put it here, and in addition,
18738# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018739# Create a temporary directory, and hook for its removal unless debugging.
18740$debug ||
18741{
18742 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18743 trap '{ (exit 1); exit 1; }' 1 2 13 15
18744}
18745
18746# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018747
Martin v. Löwis11437992002-04-12 09:54:03 +000018748{
Skip Montanaro6dead952003-09-25 14:50:04 +000018749 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018750 test -n "$tmp" && test -d "$tmp"
18751} ||
18752{
Skip Montanaro6dead952003-09-25 14:50:04 +000018753 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018754 (umask 077 && mkdir $tmp)
18755} ||
18756{
Skip Montanaro6dead952003-09-25 14:50:04 +000018757 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018758 { (exit 1); exit 1; }
18759}
18760
18761_ACEOF
18762
18763cat >>$CONFIG_STATUS <<_ACEOF
18764
18765#
18766# CONFIG_FILES section.
18767#
18768
18769# No need to generate the scripts if there are no CONFIG_FILES.
18770# This happens for instance when ./config.status config.h
18771if test -n "\$CONFIG_FILES"; then
18772 # Protect against being on the right side of a sed subst in config.status.
18773 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18774 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18775s,@SHELL@,$SHELL,;t t
18776s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18777s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18778s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18779s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18780s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18781s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18782s,@exec_prefix@,$exec_prefix,;t t
18783s,@prefix@,$prefix,;t t
18784s,@program_transform_name@,$program_transform_name,;t t
18785s,@bindir@,$bindir,;t t
18786s,@sbindir@,$sbindir,;t t
18787s,@libexecdir@,$libexecdir,;t t
18788s,@datadir@,$datadir,;t t
18789s,@sysconfdir@,$sysconfdir,;t t
18790s,@sharedstatedir@,$sharedstatedir,;t t
18791s,@localstatedir@,$localstatedir,;t t
18792s,@libdir@,$libdir,;t t
18793s,@includedir@,$includedir,;t t
18794s,@oldincludedir@,$oldincludedir,;t t
18795s,@infodir@,$infodir,;t t
18796s,@mandir@,$mandir,;t t
18797s,@build_alias@,$build_alias,;t t
18798s,@host_alias@,$host_alias,;t t
18799s,@target_alias@,$target_alias,;t t
18800s,@DEFS@,$DEFS,;t t
18801s,@ECHO_C@,$ECHO_C,;t t
18802s,@ECHO_N@,$ECHO_N,;t t
18803s,@ECHO_T@,$ECHO_T,;t t
18804s,@LIBS@,$LIBS,;t t
18805s,@VERSION@,$VERSION,;t t
18806s,@SOVERSION@,$SOVERSION,;t t
18807s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18808s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18809s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18810s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18811s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18812s,@MACHDEP@,$MACHDEP,;t t
18813s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018814s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018815s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018816s,@CXX@,$CXX,;t t
18817s,@MAINOBJ@,$MAINOBJ,;t t
18818s,@EXEEXT@,$EXEEXT,;t t
18819s,@CC@,$CC,;t t
18820s,@CFLAGS@,$CFLAGS,;t t
18821s,@LDFLAGS@,$LDFLAGS,;t t
18822s,@CPPFLAGS@,$CPPFLAGS,;t t
18823s,@ac_ct_CC@,$ac_ct_CC,;t t
18824s,@OBJEXT@,$OBJEXT,;t t
18825s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018826s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018827s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18828s,@LIBRARY@,$LIBRARY,;t t
18829s,@LDLIBRARY@,$LDLIBRARY,;t t
18830s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18831s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18832s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18833s,@INSTSONAME@,$INSTSONAME,;t t
18834s,@RUNSHARED@,$RUNSHARED,;t t
18835s,@LINKCC@,$LINKCC,;t t
18836s,@RANLIB@,$RANLIB,;t t
18837s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18838s,@AR@,$AR,;t t
18839s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18840s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18841s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18842s,@LN@,$LN,;t t
18843s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018844s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018845s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18846s,@SO@,$SO,;t t
18847s,@LDSHARED@,$LDSHARED,;t t
18848s,@BLDSHARED@,$BLDSHARED,;t t
18849s,@CCSHARED@,$CCSHARED,;t t
18850s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18851s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018852s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018853s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18854s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18855s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18856s,@LDLAST@,$LDLAST,;t t
18857s,@THREADOBJ@,$THREADOBJ,;t t
18858s,@DLINCLDIR@,$DLINCLDIR,;t t
18859s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18860s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018861s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018862s,@LIBOBJS@,$LIBOBJS,;t t
18863s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18864s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18865s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18866s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18867s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18868s,@LIBM@,$LIBM,;t t
18869s,@LIBC@,$LIBC,;t t
18870s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18871s,@THREADHEADERS@,$THREADHEADERS,;t t
18872s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018873s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018874CEOF
18875
18876_ACEOF
18877
18878 cat >>$CONFIG_STATUS <<\_ACEOF
18879 # Split the substitutions into bite-sized pieces for seds with
18880 # small command number limits, like on Digital OSF/1 and HP-UX.
18881 ac_max_sed_lines=48
18882 ac_sed_frag=1 # Number of current file.
18883 ac_beg=1 # First line for current file.
18884 ac_end=$ac_max_sed_lines # Line after last line for current file.
18885 ac_more_lines=:
18886 ac_sed_cmds=
18887 while $ac_more_lines; do
18888 if test $ac_beg -gt 1; then
18889 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18890 else
18891 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18892 fi
18893 if test ! -s $tmp/subs.frag; then
18894 ac_more_lines=false
18895 else
18896 # The purpose of the label and of the branching condition is to
18897 # speed up the sed processing (if there are no `@' at all, there
18898 # is no need to browse any of the substitutions).
18899 # These are the two extra sed commands mentioned above.
18900 (echo ':t
18901 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18902 if test -z "$ac_sed_cmds"; then
18903 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18904 else
18905 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18906 fi
18907 ac_sed_frag=`expr $ac_sed_frag + 1`
18908 ac_beg=$ac_end
18909 ac_end=`expr $ac_end + $ac_max_sed_lines`
18910 fi
18911 done
18912 if test -z "$ac_sed_cmds"; then
18913 ac_sed_cmds=cat
18914 fi
18915fi # test -n "$CONFIG_FILES"
18916
18917_ACEOF
18918cat >>$CONFIG_STATUS <<\_ACEOF
18919for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18920 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18921 case $ac_file in
18922 - | *:- | *:-:* ) # input from stdin
18923 cat >$tmp/stdin
18924 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18925 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18926 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18927 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18928 * ) ac_file_in=$ac_file.in ;;
18929 esac
18930
18931 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18932 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18933$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18934 X"$ac_file" : 'X\(//\)[^/]' \| \
18935 X"$ac_file" : 'X\(//\)$' \| \
18936 X"$ac_file" : 'X\(/\)' \| \
18937 . : '\(.\)' 2>/dev/null ||
18938echo X"$ac_file" |
18939 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18940 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18941 /^X\(\/\/\)$/{ s//\1/; q; }
18942 /^X\(\/\).*/{ s//\1/; q; }
18943 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018944 { if $as_mkdir_p; then
18945 mkdir -p "$ac_dir"
18946 else
18947 as_dir="$ac_dir"
18948 as_dirs=
18949 while test ! -d "$as_dir"; do
18950 as_dirs="$as_dir $as_dirs"
18951 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18952$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18953 X"$as_dir" : 'X\(//\)[^/]' \| \
18954 X"$as_dir" : 'X\(//\)$' \| \
18955 X"$as_dir" : 'X\(/\)' \| \
18956 . : '\(.\)' 2>/dev/null ||
18957echo X"$as_dir" |
18958 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18959 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18960 /^X\(\/\/\)$/{ s//\1/; q; }
18961 /^X\(\/\).*/{ s//\1/; q; }
18962 s/.*/./; q'`
18963 done
18964 test ! -n "$as_dirs" || mkdir $as_dirs
18965 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18966echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18967 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018968
18969 ac_builddir=.
18970
18971if test "$ac_dir" != .; then
18972 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18973 # A "../" for each directory in $ac_dir_suffix.
18974 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18975else
18976 ac_dir_suffix= ac_top_builddir=
18977fi
18978
18979case $srcdir in
18980 .) # No --srcdir option. We are building in place.
18981 ac_srcdir=.
18982 if test -z "$ac_top_builddir"; then
18983 ac_top_srcdir=.
18984 else
18985 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18986 fi ;;
18987 [\\/]* | ?:[\\/]* ) # Absolute path.
18988 ac_srcdir=$srcdir$ac_dir_suffix;
18989 ac_top_srcdir=$srcdir ;;
18990 *) # Relative path.
18991 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18992 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18993esac
18994# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18995# absolute.
18996ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018997ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018998ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18999ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19000
19001
19002 case $INSTALL in
19003 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19004 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19005 esac
19006
19007 if test x"$ac_file" != x-; then
19008 { echo "$as_me:$LINENO: creating $ac_file" >&5
19009echo "$as_me: creating $ac_file" >&6;}
19010 rm -f "$ac_file"
19011 fi
19012 # Let's still pretend it is `configure' which instantiates (i.e., don't
19013 # use $as_me), people would be surprised to read:
19014 # /* config.h. Generated by config.status. */
19015 if test x"$ac_file" = x-; then
19016 configure_input=
19017 else
19018 configure_input="$ac_file. "
19019 fi
19020 configure_input=$configure_input"Generated from `echo $ac_file_in |
19021 sed 's,.*/,,'` by configure."
19022
19023 # First look for the input files in the build tree, otherwise in the
19024 # src tree.
19025 ac_file_inputs=`IFS=:
19026 for f in $ac_file_in; do
19027 case $f in
19028 -) echo $tmp/stdin ;;
19029 [\\/$]*)
19030 # Absolute (can't be DOS-style, as IFS=:)
19031 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19032echo "$as_me: error: cannot find input file: $f" >&2;}
19033 { (exit 1); exit 1; }; }
19034 echo $f;;
19035 *) # Relative
19036 if test -f "$f"; then
19037 # Build tree
19038 echo $f
19039 elif test -f "$srcdir/$f"; then
19040 # Source tree
19041 echo $srcdir/$f
19042 else
19043 # /dev/null tree
19044 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19045echo "$as_me: error: cannot find input file: $f" >&2;}
19046 { (exit 1); exit 1; }; }
19047 fi;;
19048 esac
19049 done` || { (exit 1); exit 1; }
19050_ACEOF
19051cat >>$CONFIG_STATUS <<_ACEOF
19052 sed "$ac_vpsub
19053$extrasub
19054_ACEOF
19055cat >>$CONFIG_STATUS <<\_ACEOF
19056:t
19057/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19058s,@configure_input@,$configure_input,;t t
19059s,@srcdir@,$ac_srcdir,;t t
19060s,@abs_srcdir@,$ac_abs_srcdir,;t t
19061s,@top_srcdir@,$ac_top_srcdir,;t t
19062s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19063s,@builddir@,$ac_builddir,;t t
19064s,@abs_builddir@,$ac_abs_builddir,;t t
19065s,@top_builddir@,$ac_top_builddir,;t t
19066s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19067s,@INSTALL@,$ac_INSTALL,;t t
19068" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19069 rm -f $tmp/stdin
19070 if test x"$ac_file" != x-; then
19071 mv $tmp/out $ac_file
19072 else
19073 cat $tmp/out
19074 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019075 fi
19076
Martin v. Löwis11437992002-04-12 09:54:03 +000019077done
19078_ACEOF
19079cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019080
Martin v. Löwis11437992002-04-12 09:54:03 +000019081#
19082# CONFIG_HEADER section.
19083#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019085# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19086# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019087#
19088# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019089ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19090ac_dB='[ ].*$,\1#\2'
19091ac_dC=' '
19092ac_dD=',;t'
19093# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19094ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19095ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019096ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019097ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019098
Martin v. Löwis11437992002-04-12 09:54:03 +000019099for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019100 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019101 case $ac_file in
19102 - | *:- | *:-:* ) # input from stdin
19103 cat >$tmp/stdin
19104 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19105 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19106 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19107 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19108 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019109 esac
19110
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19112echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019113
Martin v. Löwis11437992002-04-12 09:54:03 +000019114 # First look for the input files in the build tree, otherwise in the
19115 # src tree.
19116 ac_file_inputs=`IFS=:
19117 for f in $ac_file_in; do
19118 case $f in
19119 -) echo $tmp/stdin ;;
19120 [\\/$]*)
19121 # Absolute (can't be DOS-style, as IFS=:)
19122 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19123echo "$as_me: error: cannot find input file: $f" >&2;}
19124 { (exit 1); exit 1; }; }
19125 echo $f;;
19126 *) # Relative
19127 if test -f "$f"; then
19128 # Build tree
19129 echo $f
19130 elif test -f "$srcdir/$f"; then
19131 # Source tree
19132 echo $srcdir/$f
19133 else
19134 # /dev/null tree
19135 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19136echo "$as_me: error: cannot find input file: $f" >&2;}
19137 { (exit 1); exit 1; }; }
19138 fi;;
19139 esac
19140 done` || { (exit 1); exit 1; }
19141 # Remove the trailing spaces.
19142 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019143
Martin v. Löwis11437992002-04-12 09:54:03 +000019144_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019145
Martin v. Löwis11437992002-04-12 09:54:03 +000019146# Transform confdefs.h into two sed scripts, `conftest.defines' and
19147# `conftest.undefs', that substitutes the proper values into
19148# config.h.in to produce config.h. The first handles `#define'
19149# templates, and the second `#undef' templates.
19150# And first: Protect against being on the right side of a sed subst in
19151# config.status. Protect against being in an unquoted here document
19152# in config.status.
19153rm -f conftest.defines conftest.undefs
19154# Using a here document instead of a string reduces the quoting nightmare.
19155# Putting comments in sed scripts is not portable.
19156#
19157# `end' is used to avoid that the second main sed command (meant for
19158# 0-ary CPP macros) applies to n-ary macro definitions.
19159# See the Autoconf documentation for `clear'.
19160cat >confdef2sed.sed <<\_ACEOF
19161s/[\\&,]/\\&/g
19162s,[\\$`],\\&,g
19163t clear
19164: clear
19165s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19166t end
19167s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19168: end
19169_ACEOF
19170# If some macros were called several times there might be several times
19171# the same #defines, which is useless. Nevertheless, we may not want to
19172# sort them, since we want the *last* AC-DEFINE to be honored.
19173uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19174sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19175rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019176
19177# This sed command replaces #undef with comments. This is necessary, for
19178# example, in the case of _POSIX_SOURCE, which is predefined and required
19179# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019180cat >>conftest.undefs <<\_ACEOF
19181s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19182_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019183
Martin v. Löwis11437992002-04-12 09:54:03 +000019184# Break up conftest.defines because some shells have a limit on the size
19185# of here documents, and old seds have small limits too (100 cmds).
19186echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019187echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019188echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19189echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019190rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019191while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019192do
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 # Write a limited-size here document to $tmp/defines.sed.
19194 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19195 # Speed up: don't consider the non `#define' lines.
19196 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19197 # Work around the forget-to-reset-the-flag bug.
19198 echo 't clr' >>$CONFIG_STATUS
19199 echo ': clr' >>$CONFIG_STATUS
19200 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019201 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019202 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19203 rm -f $tmp/in
19204 mv $tmp/out $tmp/in
19205' >>$CONFIG_STATUS
19206 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19207 rm -f conftest.defines
19208 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019209done
Martin v. Löwis11437992002-04-12 09:54:03 +000019210rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019211echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019212echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019213
Martin v. Löwis11437992002-04-12 09:54:03 +000019214# Break up conftest.undefs because some shells have a limit on the size
19215# of here documents, and old seds have small limits too (100 cmds).
19216echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19217rm -f conftest.tail
19218while grep . conftest.undefs >/dev/null
19219do
19220 # Write a limited-size here document to $tmp/undefs.sed.
19221 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19222 # Speed up: don't consider the non `#undef'
19223 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19224 # Work around the forget-to-reset-the-flag bug.
19225 echo 't clr' >>$CONFIG_STATUS
19226 echo ': clr' >>$CONFIG_STATUS
19227 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19228 echo 'CEOF
19229 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19230 rm -f $tmp/in
19231 mv $tmp/out $tmp/in
19232' >>$CONFIG_STATUS
19233 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19234 rm -f conftest.undefs
19235 mv conftest.tail conftest.undefs
19236done
19237rm -f conftest.undefs
19238
19239cat >>$CONFIG_STATUS <<\_ACEOF
19240 # Let's still pretend it is `configure' which instantiates (i.e., don't
19241 # use $as_me), people would be surprised to read:
19242 # /* config.h. Generated by config.status. */
19243 if test x"$ac_file" = x-; then
19244 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019245 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019246 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019247 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019248 cat $tmp/in >>$tmp/config.h
19249 rm -f $tmp/in
19250 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019251 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019252 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19253echo "$as_me: $ac_file is unchanged" >&6;}
19254 else
19255 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19256$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19257 X"$ac_file" : 'X\(//\)[^/]' \| \
19258 X"$ac_file" : 'X\(//\)$' \| \
19259 X"$ac_file" : 'X\(/\)' \| \
19260 . : '\(.\)' 2>/dev/null ||
19261echo X"$ac_file" |
19262 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19263 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19264 /^X\(\/\/\)$/{ s//\1/; q; }
19265 /^X\(\/\).*/{ s//\1/; q; }
19266 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019267 { if $as_mkdir_p; then
19268 mkdir -p "$ac_dir"
19269 else
19270 as_dir="$ac_dir"
19271 as_dirs=
19272 while test ! -d "$as_dir"; do
19273 as_dirs="$as_dir $as_dirs"
19274 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19275$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19276 X"$as_dir" : 'X\(//\)[^/]' \| \
19277 X"$as_dir" : 'X\(//\)$' \| \
19278 X"$as_dir" : 'X\(/\)' \| \
19279 . : '\(.\)' 2>/dev/null ||
19280echo X"$as_dir" |
19281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19282 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19283 /^X\(\/\/\)$/{ s//\1/; q; }
19284 /^X\(\/\).*/{ s//\1/; q; }
19285 s/.*/./; q'`
19286 done
19287 test ! -n "$as_dirs" || mkdir $as_dirs
19288 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19289echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19290 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019291
Martin v. Löwis11437992002-04-12 09:54:03 +000019292 rm -f $ac_file
19293 mv $tmp/config.h $ac_file
19294 fi
19295 else
19296 cat $tmp/config.h
19297 rm -f $tmp/config.h
19298 fi
19299done
19300_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019301
Martin v. Löwis11437992002-04-12 09:54:03 +000019302cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019303
Martin v. Löwis11437992002-04-12 09:54:03 +000019304{ (exit 0); exit 0; }
19305_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019306chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019307ac_clean_files=$ac_clean_files_save
19308
19309
19310# configure is writing to config.log, and then calls config.status.
19311# config.status does its own redirection, appending to config.log.
19312# Unfortunately, on DOS this fails, as config.log is still kept open
19313# by configure, so config.status won't be able to write to it; its
19314# output is simply discarded. So we exec the FD to /dev/null,
19315# effectively closing config.log, so it can be properly (re)opened and
19316# appended to by config.status. When coming back to configure, we
19317# need to make the FD available again.
19318if test "$no_create" != yes; then
19319 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019320 ac_config_status_args=
19321 test "$silent" = yes &&
19322 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019323 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019324 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019325 exec 5>>config.log
19326 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19327 # would make configure fail if this is the last instruction.
19328 $ac_cs_success || { (exit 1); exit 1; }
19329fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019330
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019331
19332echo "creating Setup"
19333if test ! -f Modules/Setup
19334then
19335 cp $srcdir/Modules/Setup.dist Modules/Setup
19336fi
19337
19338echo "creating Setup.local"
19339if test ! -f Modules/Setup.local
19340then
19341 echo "# Edit this file for local setup changes" >Modules/Setup.local
19342fi
19343
19344echo "creating Makefile"
19345$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19346 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019347 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019348mv config.c Modules