blob: 33eacdecdfb51b1884183923ca73c14a195f6f5e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanarof8712e52004-01-17 03:04:46 +00002# From configure.in Revision: 1.444 .
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 __pthread_create_system in -lpthread" >&5
11168echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11169if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011171else
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011173LIBS="-lpthread $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 Rossum8d6e8af2000-10-30 17:45:07 +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 Rossum8d6e8af2000-10-30 17:45:07 +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 __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011189int
11190main ()
11191{
11192__pthread_create_system ();
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_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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 Rossum8d6e8af2000-10-30 17:45:07 +000011218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011219echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11220echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11221if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11222 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011223#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011224_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011225
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011226 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011227 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011228 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011229else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011230
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11232echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11233if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11234 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011235else
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011237LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011238cat >conftest.$ac_ext <<_ACEOF
11239#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* confdefs.h. */
11241_ACEOF
11242cat confdefs.h >>conftest.$ac_ext
11243cat >>conftest.$ac_ext <<_ACEOF
11244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011245
Guido van Rossumb93a8621998-05-07 13:27:32 +000011246/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011247#ifdef __cplusplus
11248extern "C"
11249#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011250/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 builtin and then its argument prototype would still apply. */
11252char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011253int
11254main ()
11255{
11256pthread_create ();
11257 ;
11258 return 0;
11259}
11260_ACEOF
11261rm -f conftest.$ac_objext conftest$ac_exeext
11262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11263 (eval $ac_link) 2>&5
11264 ac_status=$?
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); } &&
11267 { ac_try='test -s conftest$ac_exeext'
11268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11269 (eval $ac_try) 2>&5
11270 ac_status=$?
11271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11272 (exit $ac_status); }; }; then
11273 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011274else
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011276sed 's/^/| /' conftest.$ac_ext >&5
11277
Martin v. Löwis11437992002-04-12 09:54:03 +000011278ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11281LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011283echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11284echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11285if test $ac_cv_lib_cma_pthread_create = yes; then
11286 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011287#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011288_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011289
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011290 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011291 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011292 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011293else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011294
Martin v. Löwis130fb172001-07-19 11:00:41 +000011295 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011296fi
11297
Guido van Rossum627b2d71993-12-24 10:39:16 +000011298
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011299fi
11300
Guido van Rossum0be3e491997-05-22 20:33:33 +000011301fi
11302
Guido van Rossum49545951997-12-02 19:28:29 +000011303fi
11304
Guido van Rossumb93a8621998-05-07 13:27:32 +000011305fi
11306
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011307
Michael W. Hudson54241132001-12-07 15:38:26 +000011308fi
11309
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011310
11311fi
11312
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011314rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11315fi;
11316fi
11317
11318
11319fi
11320
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011321
Michael W. Hudson54241132001-12-07 15:38:26 +000011322
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11324echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11325if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011327else
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011329LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011330cat >conftest.$ac_ext <<_ACEOF
11331#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* confdefs.h. */
11333_ACEOF
11334cat confdefs.h >>conftest.$ac_ext
11335cat >>conftest.$ac_ext <<_ACEOF
11336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011338/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011339#ifdef __cplusplus
11340extern "C"
11341#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011342/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 builtin and then its argument prototype would still apply. */
11344char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011345int
11346main ()
11347{
11348usconfig ();
11349 ;
11350 return 0;
11351}
11352_ACEOF
11353rm -f conftest.$ac_objext conftest$ac_exeext
11354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11355 (eval $ac_link) 2>&5
11356 ac_status=$?
11357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11358 (exit $ac_status); } &&
11359 { ac_try='test -s conftest$ac_exeext'
11360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11361 (eval $ac_try) 2>&5
11362 ac_status=$?
11363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11364 (exit $ac_status); }; }; then
11365 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011366else
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011368sed 's/^/| /' conftest.$ac_ext >&5
11369
Martin v. Löwis11437992002-04-12 09:54:03 +000011370ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011372rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11373LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011375echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11376echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11377if test $ac_cv_lib_mpc_usconfig = yes; then
11378 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011380_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011381
Martin v. Löwis130fb172001-07-19 11:00:41 +000011382 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011383 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011384 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011385fi
11386
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011387
Neal Norwitza978ab02002-11-02 16:58:05 +000011388 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11390echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11391if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11392 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011393else
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011395LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011396cat >conftest.$ac_ext <<_ACEOF
11397#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011398/* confdefs.h. */
11399_ACEOF
11400cat confdefs.h >>conftest.$ac_ext
11401cat >>conftest.$ac_ext <<_ACEOF
11402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011403
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011404/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011405#ifdef __cplusplus
11406extern "C"
11407#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011408/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 builtin and then its argument prototype would still apply. */
11410char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011411int
11412main ()
11413{
11414thr_create ();
11415 ;
11416 return 0;
11417}
11418_ACEOF
11419rm -f conftest.$ac_objext conftest$ac_exeext
11420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11421 (eval $ac_link) 2>&5
11422 ac_status=$?
11423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424 (exit $ac_status); } &&
11425 { ac_try='test -s conftest$ac_exeext'
11426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11427 (eval $ac_try) 2>&5
11428 ac_status=$?
11429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11430 (exit $ac_status); }; }; then
11431 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432else
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011434sed 's/^/| /' conftest.$ac_ext >&5
11435
Martin v. Löwis11437992002-04-12 09:54:03 +000011436ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11439LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011441echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11442echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11443if test $ac_cv_lib_thread_thr_create = yes; then
11444 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011447
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011448 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011449 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011450 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011451fi
11452
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011453 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011454
Martin v. Löwis130fb172001-07-19 11:00:41 +000011455 if test "$USE_THREAD_MODULE" != "#"
11456 then
11457 # If the above checks didn't disable threads, (at least) OSF1
11458 # needs this '-threads' argument during linking.
11459 case $ac_sys_system in
11460 OSF1) LDLAST=-threads;;
11461 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011462 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011463fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011464
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011465if test "$posix_threads" = "yes"; then
11466 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011467
11468cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011469#define _POSIX_THREADS 1
11470_ACEOF
11471
11472 fi
11473
11474 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11475 case $ac_sys_system/$ac_sys_release in
11476 SunOS/5.6)
11477cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011478#define HAVE_PTHREAD_DESTRUCTOR 1
11479_ACEOF
11480
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011481 ;;
11482 SunOS/5.8)
11483cat >>confdefs.h <<\_ACEOF
11484#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11485_ACEOF
11486
11487 ;;
11488 esac
11489
11490 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11491echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11492 if test "${ac_cv_pthread_system_supported+set}" = set; then
11493 echo $ECHO_N "(cached) $ECHO_C" >&6
11494else
11495 if test "$cross_compiling" = yes; then
11496 ac_cv_pthread_system_supported=no
11497else
11498 cat >conftest.$ac_ext <<_ACEOF
11499#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* confdefs.h. */
11501_ACEOF
11502cat confdefs.h >>conftest.$ac_ext
11503cat >>conftest.$ac_ext <<_ACEOF
11504/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011505#include <pthread.h>
11506 void *foo(void *parm) {
11507 return NULL;
11508 }
11509 main() {
11510 pthread_attr_t attr;
11511 pthread_t id;
11512 if (pthread_attr_init(&attr)) exit(-1);
11513 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11514 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11515 exit(0);
11516 }
11517_ACEOF
11518rm -f conftest$ac_exeext
11519if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11520 (eval $ac_link) 2>&5
11521 ac_status=$?
11522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11523 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11525 (eval $ac_try) 2>&5
11526 ac_status=$?
11527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11528 (exit $ac_status); }; }; then
11529 ac_cv_pthread_system_supported=yes
11530else
11531 echo "$as_me: program exited with status $ac_status" >&5
11532echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011533sed 's/^/| /' conftest.$ac_ext >&5
11534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011535( exit $ac_status )
11536ac_cv_pthread_system_supported=no
11537fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011538rm -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 +000011539fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011540
Guido van Rossum627b2d71993-12-24 10:39:16 +000011541fi
11542
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011543 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11544echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11545 if test "$ac_cv_pthread_system_supported" = "yes"; then
11546
11547cat >>confdefs.h <<\_ACEOF
11548#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11549_ACEOF
11550
11551 fi
11552
11553for ac_func in pthread_sigmask
11554do
11555as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11556echo "$as_me:$LINENO: checking for $ac_func" >&5
11557echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11558if eval "test \"\${$as_ac_var+set}\" = set"; then
11559 echo $ECHO_N "(cached) $ECHO_C" >&6
11560else
11561 cat >conftest.$ac_ext <<_ACEOF
11562#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011563/* confdefs.h. */
11564_ACEOF
11565cat confdefs.h >>conftest.$ac_ext
11566cat >>conftest.$ac_ext <<_ACEOF
11567/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011568/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011569 which can conflict with char $ac_func (); below.
11570 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011571 <limits.h> exists even on freestanding compilers. Under hpux,
11572 including <limits.h> includes <sys/time.h> and causes problems
11573 checking for functions defined therein. */
11574#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011575# include <limits.h>
11576#else
11577# include <assert.h>
11578#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011579/* Override any gcc2 internal prototype to avoid an error. */
11580#ifdef __cplusplus
11581extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011582{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011583#endif
11584/* We use char because int might match the return type of a gcc2
11585 builtin and then its argument prototype would still apply. */
11586char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011587/* The GNU C library defines this for functions which it implements
11588 to always fail with ENOSYS. Some functions are actually named
11589 something starting with __ and the normal name is an alias. */
11590#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11591choke me
11592#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011593char (*f) () = $ac_func;
11594#endif
11595#ifdef __cplusplus
11596}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011597#endif
11598
Skip Montanaro6dead952003-09-25 14:50:04 +000011599int
11600main ()
11601{
11602return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011603 ;
11604 return 0;
11605}
11606_ACEOF
11607rm -f conftest.$ac_objext conftest$ac_exeext
11608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11609 (eval $ac_link) 2>&5
11610 ac_status=$?
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); } &&
11613 { ac_try='test -s conftest$ac_exeext'
11614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11615 (eval $ac_try) 2>&5
11616 ac_status=$?
11617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11618 (exit $ac_status); }; }; then
11619 eval "$as_ac_var=yes"
11620else
11621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011622sed 's/^/| /' conftest.$ac_ext >&5
11623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011624eval "$as_ac_var=no"
11625fi
11626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11627fi
11628echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11629echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11630if test `eval echo '${'$as_ac_var'}'` = yes; then
11631 cat >>confdefs.h <<_ACEOF
11632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11633_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011634 case $ac_sys_system in
11635 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011636
Jason Tishlerfac083d2003-07-22 15:20:49 +000011637cat >>confdefs.h <<\_ACEOF
11638#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11639_ACEOF
11640
11641 ;;
11642 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011643fi
11644done
11645
11646fi
11647
11648
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011649# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011650
11651
11652echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11653echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011654# Check whether --enable-ipv6 or --disable-ipv6 was given.
11655if test "${enable_ipv6+set}" = set; then
11656 enableval="$enable_ipv6"
11657 case "$enableval" in
11658 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 echo "$as_me:$LINENO: result: no" >&5
11660echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011661 ipv6=no
11662 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 *) echo "$as_me:$LINENO: result: yes" >&5
11664echo "${ECHO_T}yes" >&6
11665 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011666#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011668
11669 ipv6=yes
11670 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011672else
Martin v. Löwis11437992002-04-12 09:54:03 +000011673
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011674 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 echo "$as_me:$LINENO: result: no" >&5
11676echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011677 ipv6=no
11678
11679else
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 cat >conftest.$ac_ext <<_ACEOF
11681#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011682/* confdefs.h. */
11683_ACEOF
11684cat confdefs.h >>conftest.$ac_ext
11685cat >>conftest.$ac_ext <<_ACEOF
11686/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011687 /* AF_INET6 available check */
11688#include <sys/types.h>
11689#include <sys/socket.h>
11690main()
11691{
11692 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11693 exit(1);
11694 else
11695 exit(0);
11696}
11697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
11699rm -f conftest$ac_exeext
11700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11701 (eval $ac_link) 2>&5
11702 ac_status=$?
11703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11706 (eval $ac_try) 2>&5
11707 ac_status=$?
11708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11709 (exit $ac_status); }; }; then
11710 echo "$as_me:$LINENO: result: yes" >&5
11711echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011712 ipv6=yes
11713else
Martin v. Löwis11437992002-04-12 09:54:03 +000011714 echo "$as_me: program exited with status $ac_status" >&5
11715echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011716sed 's/^/| /' conftest.$ac_ext >&5
11717
Martin v. Löwis11437992002-04-12 09:54:03 +000011718( exit $ac_status )
11719echo "$as_me:$LINENO: result: no" >&5
11720echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011721 ipv6=no
11722fi
Skip Montanaro6dead952003-09-25 14:50:04 +000011723rm -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 +000011724fi
11725
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011726if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11728echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11729 cat >conftest.$ac_ext <<_ACEOF
11730#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011731/* confdefs.h. */
11732_ACEOF
11733cat confdefs.h >>conftest.$ac_ext
11734cat >>conftest.$ac_ext <<_ACEOF
11735/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011736#include <sys/types.h>
11737#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011738int
11739main ()
11740{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011741struct sockaddr_in6 x;
11742x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 ;
11744 return 0;
11745}
11746_ACEOF
11747rm -f conftest.$ac_objext
11748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11749 (eval $ac_compile) 2>&5
11750 ac_status=$?
11751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752 (exit $ac_status); } &&
11753 { ac_try='test -s conftest.$ac_objext'
11754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11755 (eval $ac_try) 2>&5
11756 ac_status=$?
11757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11758 (exit $ac_status); }; }; then
11759 echo "$as_me:$LINENO: result: yes" >&5
11760echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011761 ipv6=yes
11762else
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011764sed 's/^/| /' conftest.$ac_ext >&5
11765
Martin v. Löwis11437992002-04-12 09:54:03 +000011766echo "$as_me:$LINENO: result: no" >&5
11767echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011768 ipv6=no
11769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011770rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011771fi
11772
11773if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011775#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011776_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011777
11778fi
11779
Martin v. Löwis11437992002-04-12 09:54:03 +000011780fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011781
11782ipv6type=unknown
11783ipv6lib=none
11784ipv6trylibc=no
11785
11786if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11788echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011789 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11790 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011791 case $i in
11792 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 cat >conftest.$ac_ext <<_ACEOF
11794#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011795/* confdefs.h. */
11796_ACEOF
11797cat confdefs.h >>conftest.$ac_ext
11798cat >>conftest.$ac_ext <<_ACEOF
11799/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011800
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801#include <netinet/in.h>
11802#ifdef IPV6_INRIA_VERSION
11803yes
11804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011805_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011807 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011808 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011809fi
11810rm -f conftest*
11811
11812 ;;
11813 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 cat >conftest.$ac_ext <<_ACEOF
11815#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011816/* confdefs.h. */
11817_ACEOF
11818cat confdefs.h >>conftest.$ac_ext
11819cat >>conftest.$ac_ext <<_ACEOF
11820/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011822#include <netinet/in.h>
11823#ifdef __KAME__
11824yes
11825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011826_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011828 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011829 ipv6type=$i;
11830 ipv6lib=inet6
11831 ipv6libdir=/usr/local/v6/lib
11832 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011833fi
11834rm -f conftest*
11835
11836 ;;
11837 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011838 cat >conftest.$ac_ext <<_ACEOF
11839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011840/* confdefs.h. */
11841_ACEOF
11842cat confdefs.h >>conftest.$ac_ext
11843cat >>conftest.$ac_ext <<_ACEOF
11844/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011846#include <features.h>
11847#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11848yes
11849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011850_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011852 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011853 ipv6type=$i;
11854 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011855fi
11856rm -f conftest*
11857
11858 ;;
11859 linux-inet6)
11860 if test -d /usr/inet6; then
11861 ipv6type=$i
11862 ipv6lib=inet6
11863 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011864 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011865 fi
11866 ;;
11867 solaris)
11868 if test -f /etc/netconfig; then
11869 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11870 ipv6type=$i
11871 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011872 fi
11873 fi
11874 ;;
11875 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011876 cat >conftest.$ac_ext <<_ACEOF
11877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011878/* confdefs.h. */
11879_ACEOF
11880cat confdefs.h >>conftest.$ac_ext
11881cat >>conftest.$ac_ext <<_ACEOF
11882/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011883
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011884#include <sys/param.h>
11885#ifdef _TOSHIBA_INET6
11886yes
11887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011890 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011891 ipv6type=$i;
11892 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011893 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011894fi
11895rm -f conftest*
11896
11897 ;;
11898 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011899 cat >conftest.$ac_ext <<_ACEOF
11900#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011901/* confdefs.h. */
11902_ACEOF
11903cat confdefs.h >>conftest.$ac_ext
11904cat >>conftest.$ac_ext <<_ACEOF
11905/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011907#include </usr/local/v6/include/sys/v6config.h>
11908#ifdef __V6D__
11909yes
11910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011911_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011913 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011914 ipv6type=$i;
11915 ipv6lib=v6;
11916 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011917 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011918fi
11919rm -f conftest*
11920
11921 ;;
11922 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011923 cat >conftest.$ac_ext <<_ACEOF
11924#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011925/* confdefs.h. */
11926_ACEOF
11927cat confdefs.h >>conftest.$ac_ext
11928cat >>conftest.$ac_ext <<_ACEOF
11929/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011931#include <sys/param.h>
11932#ifdef _ZETA_MINAMI_INET6
11933yes
11934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011935_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011937 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011938 ipv6type=$i;
11939 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011940 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011941fi
11942rm -f conftest*
11943
11944 ;;
11945 esac
11946 if test "$ipv6type" != "unknown"; then
11947 break
11948 fi
11949 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011950 echo "$as_me:$LINENO: result: $ipv6type" >&5
11951echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011952fi
11953
11954if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11955 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11956 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11957 echo "using lib$ipv6lib"
11958 else
11959 if test $ipv6trylibc = "yes"; then
11960 echo "using libc"
11961 else
11962 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11963 echo "You need to fetch lib$ipv6lib.a from appropriate"
11964 echo 'ipv6 kit and compile beforehand.'
11965 exit 1
11966 fi
11967 fi
11968fi
11969
Jack Jansen7b8c7542002-04-14 20:12:41 +000011970# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011971echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11972echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011973
11974# Check whether --with-universal-newlines or --without-universal-newlines was given.
11975if test "${with_universal_newlines+set}" = set; then
11976 withval="$with_universal_newlines"
11977
11978fi;
11979
11980if test -z "$with_universal_newlines"
11981then with_universal_newlines="yes"
11982fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011983if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011984then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011985 echo --without-universal-newlines is unsupported, see README
11986 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011987else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011988
11989cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011990#define WITH_UNIVERSAL_NEWLINES 1
11991_ACEOF
11992
11993fi
11994echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11995echo "${ECHO_T}$with_universal_newlines" >&6
11996
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011997# Check for --with-doc-strings
11998echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11999echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12000
12001# Check whether --with-doc-strings or --without-doc-strings was given.
12002if test "${with_doc_strings+set}" = set; then
12003 withval="$with_doc_strings"
12004
12005fi;
12006
12007if test -z "$with_doc_strings"
12008then with_doc_strings="yes"
12009fi
12010if test "$with_doc_strings" != "no"
12011then
12012
12013cat >>confdefs.h <<\_ACEOF
12014#define WITH_DOC_STRINGS 1
12015_ACEOF
12016
12017fi
12018echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12019echo "${ECHO_T}$with_doc_strings" >&6
12020
Neil Schemenauera35c6882001-02-27 04:45:05 +000012021# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012022echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12023echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12024
Neil Schemenauera35c6882001-02-27 04:45:05 +000012025# Check whether --with-pymalloc or --without-pymalloc was given.
12026if test "${with_pymalloc+set}" = set; then
12027 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012028
Martin v. Löwis11437992002-04-12 09:54:03 +000012029fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012030
Neil Schemenauer16c22972002-03-22 15:34:49 +000012031if test -z "$with_pymalloc"
12032then with_pymalloc="yes"
12033fi
12034if test "$with_pymalloc" != "no"
12035then
Martin v. Löwis11437992002-04-12 09:54:03 +000012036
12037cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012038#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012039_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012040
12041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012042echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12043echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012044
Barry Warsawef82cd72000-06-30 16:21:01 +000012045# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012046echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12047echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12048
Barry Warsawef82cd72000-06-30 16:21:01 +000012049# Check whether --with-wctype-functions or --without-wctype-functions was given.
12050if test "${with_wctype_functions+set}" = set; then
12051 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Barry Warsawef82cd72000-06-30 16:21:01 +000012053if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012054then
12055
12056cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012057#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012058_ACEOF
12059
12060 echo "$as_me:$LINENO: result: yes" >&5
12061echo "${ECHO_T}yes" >&6
12062else echo "$as_me:$LINENO: result: no" >&5
12063echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012064fi
12065else
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 echo "$as_me:$LINENO: result: no" >&5
12067echo "${ECHO_T}no" >&6
12068fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012070# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012071
Guido van Rossum98935bf2001-09-05 19:13:16 +000012072DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012073
Martin v. Löwis11437992002-04-12 09:54:03 +000012074echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12075echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012078if test "${with_sgi_dl+set}" = set; then
12079 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
12081echo "$as_me:$LINENO: result: $withval" >&5
12082echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012083echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012084exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
12086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012088_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012089
Guido van Rossume97ee181999-12-20 21:27:22 +000012090DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012091dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012092if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012093then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012094else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12095echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12096 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012097fi
12098DLINCLDIR=${dldir}
12099LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012100else
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 echo "$as_me:$LINENO: result: no" >&5
12102echo "${ECHO_T}no" >&6
12103fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012104
Martin v. Löwis11437992002-04-12 09:54:03 +000012105echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12106echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012107
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012109if test "${with_dl_dld+set}" = set; then
12110 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
12112echo "$as_me:$LINENO: result: $withval" >&5
12113echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012114echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012115exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012116
12117cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012118#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012119_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012120
Guido van Rossume97ee181999-12-20 21:27:22 +000012121DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012122dldir=`echo "$withval" | sed 's/,.*//'`
12123dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012124if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012125then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012126else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12127echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12128 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012129fi
12130DLINCLDIR=${dldir}
12131LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012132else
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 echo "$as_me:$LINENO: result: no" >&5
12134echo "${ECHO_T}no" >&6
12135fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012136
Guido van Rossume97ee181999-12-20 21:27:22 +000012137# the dlopen() function means we might want to use dynload_shlib.o. some
12138# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012139
Thomas Wouters3a584202000-08-05 23:28:51 +000012140for ac_func in dlopen
12141do
Martin v. Löwis11437992002-04-12 09:54:03 +000012142as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12143echo "$as_me:$LINENO: checking for $ac_func" >&5
12144echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12145if eval "test \"\${$as_ac_var+set}\" = set"; then
12146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012147else
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 cat >conftest.$ac_ext <<_ACEOF
12149#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012150/* confdefs.h. */
12151_ACEOF
12152cat confdefs.h >>conftest.$ac_ext
12153cat >>conftest.$ac_ext <<_ACEOF
12154/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012155/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012156 which can conflict with char $ac_func (); below.
12157 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012158 <limits.h> exists even on freestanding compilers. Under hpux,
12159 including <limits.h> includes <sys/time.h> and causes problems
12160 checking for functions defined therein. */
12161#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012162# include <limits.h>
12163#else
12164# include <assert.h>
12165#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012166/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012167#ifdef __cplusplus
12168extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012169{
Martin v. Löwis11437992002-04-12 09:54:03 +000012170#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012171/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 builtin and then its argument prototype would still apply. */
12173char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012174/* The GNU C library defines this for functions which it implements
12175 to always fail with ENOSYS. Some functions are actually named
12176 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012177#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012178choke me
12179#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012180char (*f) () = $ac_func;
12181#endif
12182#ifdef __cplusplus
12183}
Guido van Rossume97ee181999-12-20 21:27:22 +000012184#endif
12185
Skip Montanaro6dead952003-09-25 14:50:04 +000012186int
12187main ()
12188{
12189return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 ;
12191 return 0;
12192}
12193_ACEOF
12194rm -f conftest.$ac_objext conftest$ac_exeext
12195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12196 (eval $ac_link) 2>&5
12197 ac_status=$?
12198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199 (exit $ac_status); } &&
12200 { ac_try='test -s conftest$ac_exeext'
12201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12202 (eval $ac_try) 2>&5
12203 ac_status=$?
12204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205 (exit $ac_status); }; }; then
12206 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012207else
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012209sed 's/^/| /' conftest.$ac_ext >&5
12210
Martin v. Löwis11437992002-04-12 09:54:03 +000012211eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012215echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12216echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12217if test `eval echo '${'$as_ac_var'}'` = yes; then
12218 cat >>confdefs.h <<_ACEOF
12219#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12220_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012221
Guido van Rossume97ee181999-12-20 21:27:22 +000012222fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012223done
Guido van Rossume97ee181999-12-20 21:27:22 +000012224
Michael W. Hudson54241132001-12-07 15:38:26 +000012225
Guido van Rossume97ee181999-12-20 21:27:22 +000012226# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12227# loading of modules.
12228
Martin v. Löwis11437992002-04-12 09:54:03 +000012229echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12230echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012231if test -z "$DYNLOADFILE"
12232then
12233 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012234 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12235 if test "$ac_cv_func_dlopen" = yes
12236 then DYNLOADFILE="dynload_shlib.o"
12237 else DYNLOADFILE="dynload_aix.o"
12238 fi
12239 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012240 BeOS*) DYNLOADFILE="dynload_beos.o";;
12241 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012242 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012243 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012244 *)
12245 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12246 # out any dynamic loading
12247 if test "$ac_cv_func_dlopen" = yes
12248 then DYNLOADFILE="dynload_shlib.o"
12249 else DYNLOADFILE="dynload_stub.o"
12250 fi
12251 ;;
12252 esac
12253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012254echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12255echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012256if test "$DYNLOADFILE" != "dynload_stub.o"
12257then
Martin v. Löwis11437992002-04-12 09:54:03 +000012258
12259cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012260#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012261_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012262
12263fi
12264
Neil Schemenauer4e425612001-06-19 15:44:15 +000012265# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12266
Michael W. Hudson54241132001-12-07 15:38:26 +000012267
Martin v. Löwis11437992002-04-12 09:54:03 +000012268echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12269echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012270if test -z "$MACHDEP_OBJS"
12271then
Jack Jansene578a632001-08-15 01:27:14 +000012272 MACHDEP_OBJS=$extra_machdep_objs
12273else
12274 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012276echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12277echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012278
Guido van Rossum627b2d71993-12-24 10:39:16 +000012279# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012351
Martin v. Löwisd5843682002-11-21 20:41:28 +000012352for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012353 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012354 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012355 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012356 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012357 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012358 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012359 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012360 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012361 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012362 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012363 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012364do
Martin v. Löwis11437992002-04-12 09:54:03 +000012365as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12366echo "$as_me:$LINENO: checking for $ac_func" >&5
12367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12368if eval "test \"\${$as_ac_var+set}\" = set"; then
12369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012370else
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 cat >conftest.$ac_ext <<_ACEOF
12372#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012373/* confdefs.h. */
12374_ACEOF
12375cat confdefs.h >>conftest.$ac_ext
12376cat >>conftest.$ac_ext <<_ACEOF
12377/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012378/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012379 which can conflict with char $ac_func (); below.
12380 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012381 <limits.h> exists even on freestanding compilers. Under hpux,
12382 including <limits.h> includes <sys/time.h> and causes problems
12383 checking for functions defined therein. */
12384#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012385# include <limits.h>
12386#else
12387# include <assert.h>
12388#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012389/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012390#ifdef __cplusplus
12391extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012392{
Martin v. Löwis11437992002-04-12 09:54:03 +000012393#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012394/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 builtin and then its argument prototype would still apply. */
12396char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012397/* The GNU C library defines this for functions which it implements
12398 to always fail with ENOSYS. Some functions are actually named
12399 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012400#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012401choke me
12402#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012403char (*f) () = $ac_func;
12404#endif
12405#ifdef __cplusplus
12406}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408
Skip Montanaro6dead952003-09-25 14:50:04 +000012409int
12410main ()
12411{
12412return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 ;
12414 return 0;
12415}
12416_ACEOF
12417rm -f conftest.$ac_objext conftest$ac_exeext
12418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12419 (eval $ac_link) 2>&5
12420 ac_status=$?
12421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12422 (exit $ac_status); } &&
12423 { ac_try='test -s conftest$ac_exeext'
12424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12425 (eval $ac_try) 2>&5
12426 ac_status=$?
12427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12428 (exit $ac_status); }; }; then
12429 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012430else
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012432sed 's/^/| /' conftest.$ac_ext >&5
12433
Martin v. Löwis11437992002-04-12 09:54:03 +000012434eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012436rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012438echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12439echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12440if test `eval echo '${'$as_ac_var'}'` = yes; then
12441 cat >>confdefs.h <<_ACEOF
12442#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12443_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012445fi
12446done
12447
Michael W. Hudson54241132001-12-07 15:38:26 +000012448
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012449# For some functions, having a definition is not sufficient, since
12450# we want to take their address.
12451echo "$as_me:$LINENO: checking for chroot" >&5
12452echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12453cat >conftest.$ac_ext <<_ACEOF
12454#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012455/* confdefs.h. */
12456_ACEOF
12457cat confdefs.h >>conftest.$ac_ext
12458cat >>conftest.$ac_ext <<_ACEOF
12459/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012460#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012461int
12462main ()
12463{
12464void *x=chroot
12465 ;
12466 return 0;
12467}
12468_ACEOF
12469rm -f conftest.$ac_objext
12470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12471 (eval $ac_compile) 2>&5
12472 ac_status=$?
12473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474 (exit $ac_status); } &&
12475 { ac_try='test -s conftest.$ac_objext'
12476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12477 (eval $ac_try) 2>&5
12478 ac_status=$?
12479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480 (exit $ac_status); }; }; then
12481
12482cat >>confdefs.h <<\_ACEOF
12483#define HAVE_CHROOT 1
12484_ACEOF
12485
12486 echo "$as_me:$LINENO: result: yes" >&5
12487echo "${ECHO_T}yes" >&6
12488else
12489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012490sed 's/^/| /' conftest.$ac_ext >&5
12491
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012492echo "$as_me:$LINENO: result: no" >&5
12493echo "${ECHO_T}no" >&6
12494
12495fi
12496rm -f conftest.$ac_objext conftest.$ac_ext
12497echo "$as_me:$LINENO: checking for link" >&5
12498echo $ECHO_N "checking for link... $ECHO_C" >&6
12499cat >conftest.$ac_ext <<_ACEOF
12500#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012501/* confdefs.h. */
12502_ACEOF
12503cat confdefs.h >>conftest.$ac_ext
12504cat >>conftest.$ac_ext <<_ACEOF
12505/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012506#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012507int
12508main ()
12509{
12510void *x=link
12511 ;
12512 return 0;
12513}
12514_ACEOF
12515rm -f conftest.$ac_objext
12516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12517 (eval $ac_compile) 2>&5
12518 ac_status=$?
12519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520 (exit $ac_status); } &&
12521 { ac_try='test -s conftest.$ac_objext'
12522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12523 (eval $ac_try) 2>&5
12524 ac_status=$?
12525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526 (exit $ac_status); }; }; then
12527
12528cat >>confdefs.h <<\_ACEOF
12529#define HAVE_LINK 1
12530_ACEOF
12531
12532 echo "$as_me:$LINENO: result: yes" >&5
12533echo "${ECHO_T}yes" >&6
12534else
12535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012536sed 's/^/| /' conftest.$ac_ext >&5
12537
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012538echo "$as_me:$LINENO: result: no" >&5
12539echo "${ECHO_T}no" >&6
12540
12541fi
12542rm -f conftest.$ac_objext conftest.$ac_ext
12543echo "$as_me:$LINENO: checking for symlink" >&5
12544echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12545cat >conftest.$ac_ext <<_ACEOF
12546#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* confdefs.h. */
12548_ACEOF
12549cat confdefs.h >>conftest.$ac_ext
12550cat >>conftest.$ac_ext <<_ACEOF
12551/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012552#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012553int
12554main ()
12555{
12556void *x=symlink
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561rm -f conftest.$ac_objext
12562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12563 (eval $ac_compile) 2>&5
12564 ac_status=$?
12565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12566 (exit $ac_status); } &&
12567 { ac_try='test -s conftest.$ac_objext'
12568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12569 (eval $ac_try) 2>&5
12570 ac_status=$?
12571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572 (exit $ac_status); }; }; then
12573
12574cat >>confdefs.h <<\_ACEOF
12575#define HAVE_SYMLINK 1
12576_ACEOF
12577
12578 echo "$as_me:$LINENO: result: yes" >&5
12579echo "${ECHO_T}yes" >&6
12580else
12581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012582sed 's/^/| /' conftest.$ac_ext >&5
12583
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012584echo "$as_me:$LINENO: result: no" >&5
12585echo "${ECHO_T}no" >&6
12586
12587fi
12588rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012589echo "$as_me:$LINENO: checking for fchdir" >&5
12590echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12591cat >conftest.$ac_ext <<_ACEOF
12592#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012593/* confdefs.h. */
12594_ACEOF
12595cat confdefs.h >>conftest.$ac_ext
12596cat >>conftest.$ac_ext <<_ACEOF
12597/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012598#include <unistd.h>
12599int
12600main ()
12601{
12602void *x=fchdir
12603 ;
12604 return 0;
12605}
12606_ACEOF
12607rm -f conftest.$ac_objext
12608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12609 (eval $ac_compile) 2>&5
12610 ac_status=$?
12611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12612 (exit $ac_status); } &&
12613 { ac_try='test -s conftest.$ac_objext'
12614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12615 (eval $ac_try) 2>&5
12616 ac_status=$?
12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); }; }; then
12619
12620cat >>confdefs.h <<\_ACEOF
12621#define HAVE_FCHDIR 1
12622_ACEOF
12623
12624 echo "$as_me:$LINENO: result: yes" >&5
12625echo "${ECHO_T}yes" >&6
12626else
12627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012628sed 's/^/| /' conftest.$ac_ext >&5
12629
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012630echo "$as_me:$LINENO: result: no" >&5
12631echo "${ECHO_T}no" >&6
12632
12633fi
12634rm -f conftest.$ac_objext conftest.$ac_ext
12635echo "$as_me:$LINENO: checking for fsync" >&5
12636echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12637cat >conftest.$ac_ext <<_ACEOF
12638#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012639/* confdefs.h. */
12640_ACEOF
12641cat confdefs.h >>conftest.$ac_ext
12642cat >>conftest.$ac_ext <<_ACEOF
12643/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012644#include <unistd.h>
12645int
12646main ()
12647{
12648void *x=fsync
12649 ;
12650 return 0;
12651}
12652_ACEOF
12653rm -f conftest.$ac_objext
12654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12655 (eval $ac_compile) 2>&5
12656 ac_status=$?
12657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12658 (exit $ac_status); } &&
12659 { ac_try='test -s conftest.$ac_objext'
12660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12661 (eval $ac_try) 2>&5
12662 ac_status=$?
12663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12664 (exit $ac_status); }; }; then
12665
12666cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012667#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012668_ACEOF
12669
12670 echo "$as_me:$LINENO: result: yes" >&5
12671echo "${ECHO_T}yes" >&6
12672else
12673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012674sed 's/^/| /' conftest.$ac_ext >&5
12675
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012676echo "$as_me:$LINENO: result: no" >&5
12677echo "${ECHO_T}no" >&6
12678
12679fi
12680rm -f conftest.$ac_objext conftest.$ac_ext
12681echo "$as_me:$LINENO: checking for fdatasync" >&5
12682echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12683cat >conftest.$ac_ext <<_ACEOF
12684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* confdefs.h. */
12686_ACEOF
12687cat confdefs.h >>conftest.$ac_ext
12688cat >>conftest.$ac_ext <<_ACEOF
12689/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012690#include <unistd.h>
12691int
12692main ()
12693{
12694void *x=fdatasync
12695 ;
12696 return 0;
12697}
12698_ACEOF
12699rm -f conftest.$ac_objext
12700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12701 (eval $ac_compile) 2>&5
12702 ac_status=$?
12703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704 (exit $ac_status); } &&
12705 { ac_try='test -s conftest.$ac_objext'
12706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12707 (eval $ac_try) 2>&5
12708 ac_status=$?
12709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710 (exit $ac_status); }; }; then
12711
12712cat >>confdefs.h <<\_ACEOF
12713#define HAVE_FDATASYNC 1
12714_ACEOF
12715
12716 echo "$as_me:$LINENO: result: yes" >&5
12717echo "${ECHO_T}yes" >&6
12718else
12719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012720sed 's/^/| /' conftest.$ac_ext >&5
12721
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012722echo "$as_me:$LINENO: result: no" >&5
12723echo "${ECHO_T}no" >&6
12724
12725fi
12726rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012727
Martin v. Löwisd5843682002-11-21 20:41:28 +000012728# On some systems (eg. FreeBSD 5), we would find a definition of the
12729# functions ctermid_r, setgroups in the library, but no prototype
12730# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12731# address to avoid compiler warnings and potential miscompilations
12732# because of the missing prototypes.
12733
12734echo "$as_me:$LINENO: checking for ctermid_r" >&5
12735echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12736cat >conftest.$ac_ext <<_ACEOF
12737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* confdefs.h. */
12739_ACEOF
12740cat confdefs.h >>conftest.$ac_ext
12741cat >>conftest.$ac_ext <<_ACEOF
12742/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012743
12744#include "confdefs.h"
12745#include <stdio.h>
12746
Martin v. Löwisd5843682002-11-21 20:41:28 +000012747int
12748main ()
12749{
12750void* p = ctermid_r
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext
12756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12757 (eval $ac_compile) 2>&5
12758 ac_status=$?
12759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12760 (exit $ac_status); } &&
12761 { ac_try='test -s conftest.$ac_objext'
12762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12763 (eval $ac_try) 2>&5
12764 ac_status=$?
12765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766 (exit $ac_status); }; }; then
12767
12768cat >>confdefs.h <<\_ACEOF
12769#define HAVE_CTERMID_R 1
12770_ACEOF
12771
12772 echo "$as_me:$LINENO: result: yes" >&5
12773echo "${ECHO_T}yes" >&6
12774else
12775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012776sed 's/^/| /' conftest.$ac_ext >&5
12777
Martin v. Löwisd5843682002-11-21 20:41:28 +000012778echo "$as_me:$LINENO: result: no" >&5
12779echo "${ECHO_T}no" >&6
12780
12781fi
12782rm -f conftest.$ac_objext conftest.$ac_ext
12783
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012784echo "$as_me:$LINENO: checking for flock" >&5
12785echo $ECHO_N "checking for flock... $ECHO_C" >&6
12786cat >conftest.$ac_ext <<_ACEOF
12787#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012788/* confdefs.h. */
12789_ACEOF
12790cat confdefs.h >>conftest.$ac_ext
12791cat >>conftest.$ac_ext <<_ACEOF
12792/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012793
12794#include "confdefs.h"
12795#include <sys/file.h>
12796
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012797int
12798main ()
12799{
12800void* p = flock
12801 ;
12802 return 0;
12803}
12804_ACEOF
12805rm -f conftest.$ac_objext
12806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12807 (eval $ac_compile) 2>&5
12808 ac_status=$?
12809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12810 (exit $ac_status); } &&
12811 { ac_try='test -s conftest.$ac_objext'
12812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12813 (eval $ac_try) 2>&5
12814 ac_status=$?
12815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12816 (exit $ac_status); }; }; then
12817
12818cat >>confdefs.h <<\_ACEOF
12819#define HAVE_FLOCK 1
12820_ACEOF
12821
12822 echo "$as_me:$LINENO: result: yes" >&5
12823echo "${ECHO_T}yes" >&6
12824else
12825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012826sed 's/^/| /' conftest.$ac_ext >&5
12827
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012828echo "$as_me:$LINENO: result: no" >&5
12829echo "${ECHO_T}no" >&6
12830
12831fi
12832rm -f conftest.$ac_objext conftest.$ac_ext
12833
12834echo "$as_me:$LINENO: checking for getpagesize" >&5
12835echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12836cat >conftest.$ac_ext <<_ACEOF
12837#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012838/* confdefs.h. */
12839_ACEOF
12840cat confdefs.h >>conftest.$ac_ext
12841cat >>conftest.$ac_ext <<_ACEOF
12842/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012843
12844#include "confdefs.h"
12845#include <unistd.h>
12846
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012847int
12848main ()
12849{
12850void* p = getpagesize
12851 ;
12852 return 0;
12853}
12854_ACEOF
12855rm -f conftest.$ac_objext
12856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12857 (eval $ac_compile) 2>&5
12858 ac_status=$?
12859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12860 (exit $ac_status); } &&
12861 { ac_try='test -s conftest.$ac_objext'
12862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12863 (eval $ac_try) 2>&5
12864 ac_status=$?
12865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12866 (exit $ac_status); }; }; then
12867
12868cat >>confdefs.h <<\_ACEOF
12869#define HAVE_GETPAGESIZE 1
12870_ACEOF
12871
12872 echo "$as_me:$LINENO: result: yes" >&5
12873echo "${ECHO_T}yes" >&6
12874else
12875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012876sed 's/^/| /' conftest.$ac_ext >&5
12877
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012878echo "$as_me:$LINENO: result: no" >&5
12879echo "${ECHO_T}no" >&6
12880
12881fi
12882rm -f conftest.$ac_objext conftest.$ac_ext
12883
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012884for ac_prog in true
12885do
12886 # Extract the first word of "$ac_prog", so it can be a program name with args.
12887set dummy $ac_prog; ac_word=$2
12888echo "$as_me:$LINENO: checking for $ac_word" >&5
12889echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12890if test "${ac_cv_prog_TRUE+set}" = set; then
12891 echo $ECHO_N "(cached) $ECHO_C" >&6
12892else
12893 if test -n "$TRUE"; then
12894 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12895else
12896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12897for as_dir in $PATH
12898do
12899 IFS=$as_save_IFS
12900 test -z "$as_dir" && as_dir=.
12901 for ac_exec_ext in '' $ac_executable_extensions; do
12902 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12903 ac_cv_prog_TRUE="$ac_prog"
12904 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12905 break 2
12906 fi
12907done
12908done
12909
12910fi
12911fi
12912TRUE=$ac_cv_prog_TRUE
12913if test -n "$TRUE"; then
12914 echo "$as_me:$LINENO: result: $TRUE" >&5
12915echo "${ECHO_T}$TRUE" >&6
12916else
12917 echo "$as_me:$LINENO: result: no" >&5
12918echo "${ECHO_T}no" >&6
12919fi
12920
12921 test -n "$TRUE" && break
12922done
12923test -n "$TRUE" || TRUE="/bin/true"
12924
12925
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012926echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12927echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12928if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12929 echo $ECHO_N "(cached) $ECHO_C" >&6
12930else
12931 ac_check_lib_save_LIBS=$LIBS
12932LIBS="-lc $LIBS"
12933cat >conftest.$ac_ext <<_ACEOF
12934#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012935/* confdefs.h. */
12936_ACEOF
12937cat confdefs.h >>conftest.$ac_ext
12938cat >>conftest.$ac_ext <<_ACEOF
12939/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012940
12941/* Override any gcc2 internal prototype to avoid an error. */
12942#ifdef __cplusplus
12943extern "C"
12944#endif
12945/* We use char because int might match the return type of a gcc2
12946 builtin and then its argument prototype would still apply. */
12947char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012948int
12949main ()
12950{
12951inet_aton ();
12952 ;
12953 return 0;
12954}
12955_ACEOF
12956rm -f conftest.$ac_objext conftest$ac_exeext
12957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12958 (eval $ac_link) 2>&5
12959 ac_status=$?
12960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12961 (exit $ac_status); } &&
12962 { ac_try='test -s conftest$ac_exeext'
12963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12964 (eval $ac_try) 2>&5
12965 ac_status=$?
12966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967 (exit $ac_status); }; }; then
12968 ac_cv_lib_c_inet_aton=yes
12969else
12970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012971sed 's/^/| /' conftest.$ac_ext >&5
12972
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012973ac_cv_lib_c_inet_aton=no
12974fi
12975rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12976LIBS=$ac_check_lib_save_LIBS
12977fi
12978echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12979echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12980if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012981 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012982else
12983
12984echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12985echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12986if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12987 echo $ECHO_N "(cached) $ECHO_C" >&6
12988else
12989 ac_check_lib_save_LIBS=$LIBS
12990LIBS="-lresolv $LIBS"
12991cat >conftest.$ac_ext <<_ACEOF
12992#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* confdefs.h. */
12994_ACEOF
12995cat confdefs.h >>conftest.$ac_ext
12996cat >>conftest.$ac_ext <<_ACEOF
12997/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012998
12999/* Override any gcc2 internal prototype to avoid an error. */
13000#ifdef __cplusplus
13001extern "C"
13002#endif
13003/* We use char because int might match the return type of a gcc2
13004 builtin and then its argument prototype would still apply. */
13005char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013006int
13007main ()
13008{
13009inet_aton ();
13010 ;
13011 return 0;
13012}
13013_ACEOF
13014rm -f conftest.$ac_objext conftest$ac_exeext
13015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13016 (eval $ac_link) 2>&5
13017 ac_status=$?
13018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019 (exit $ac_status); } &&
13020 { ac_try='test -s conftest$ac_exeext'
13021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13022 (eval $ac_try) 2>&5
13023 ac_status=$?
13024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025 (exit $ac_status); }; }; then
13026 ac_cv_lib_resolv_inet_aton=yes
13027else
13028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013029sed 's/^/| /' conftest.$ac_ext >&5
13030
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013031ac_cv_lib_resolv_inet_aton=no
13032fi
13033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13034LIBS=$ac_check_lib_save_LIBS
13035fi
13036echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13037echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13038if test $ac_cv_lib_resolv_inet_aton = yes; then
13039 cat >>confdefs.h <<_ACEOF
13040#define HAVE_LIBRESOLV 1
13041_ACEOF
13042
13043 LIBS="-lresolv $LIBS"
13044
13045fi
13046
13047
13048fi
13049
13050
Martin v. Löwise9416172003-05-03 10:12:45 +000013051echo "$as_me:$LINENO: checking for hstrerror" >&5
13052echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13053cat >conftest.$ac_ext <<_ACEOF
13054#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013055/* confdefs.h. */
13056_ACEOF
13057cat confdefs.h >>conftest.$ac_ext
13058cat >>conftest.$ac_ext <<_ACEOF
13059/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013060
13061#include "confdefs.h"
13062#include <netdb.h>
13063
Martin v. Löwise9416172003-05-03 10:12:45 +000013064int
13065main ()
13066{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013067void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013068 ;
13069 return 0;
13070}
13071_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013072rm -f conftest.$ac_objext conftest$ac_exeext
13073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13074 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013075 ac_status=$?
13076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13077 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013078 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080 (eval $ac_try) 2>&5
13081 ac_status=$?
13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083 (exit $ac_status); }; }; then
13084
13085cat >>confdefs.h <<\_ACEOF
13086#define HAVE_HSTRERROR 1
13087_ACEOF
13088
13089 echo "$as_me:$LINENO: result: yes" >&5
13090echo "${ECHO_T}yes" >&6
13091else
13092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013093sed 's/^/| /' conftest.$ac_ext >&5
13094
Martin v. Löwise9416172003-05-03 10:12:45 +000013095echo "$as_me:$LINENO: result: no" >&5
13096echo "${ECHO_T}no" >&6
13097
13098fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013099rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013100
13101echo "$as_me:$LINENO: checking for inet_aton" >&5
13102echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13103cat >conftest.$ac_ext <<_ACEOF
13104#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* confdefs.h. */
13106_ACEOF
13107cat confdefs.h >>conftest.$ac_ext
13108cat >>conftest.$ac_ext <<_ACEOF
13109/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013110
13111#include "confdefs.h"
13112#include <sys/socket.h>
13113#include <netinet/in.h>
13114#include <arpa/inet.h>
13115
Martin v. Löwise9416172003-05-03 10:12:45 +000013116int
13117main ()
13118{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013119void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013120 ;
13121 return 0;
13122}
13123_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013124rm -f conftest.$ac_objext conftest$ac_exeext
13125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13126 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013127 ac_status=$?
13128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013130 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13132 (eval $ac_try) 2>&5
13133 ac_status=$?
13134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13135 (exit $ac_status); }; }; then
13136
13137cat >>confdefs.h <<\_ACEOF
13138#define HAVE_INET_ATON 1
13139_ACEOF
13140
13141 echo "$as_me:$LINENO: result: yes" >&5
13142echo "${ECHO_T}yes" >&6
13143else
13144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013145sed 's/^/| /' conftest.$ac_ext >&5
13146
Martin v. Löwise9416172003-05-03 10:12:45 +000013147echo "$as_me:$LINENO: result: no" >&5
13148echo "${ECHO_T}no" >&6
13149
13150fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013151rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013152
13153echo "$as_me:$LINENO: checking for inet_pton" >&5
13154echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13155cat >conftest.$ac_ext <<_ACEOF
13156#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013157/* confdefs.h. */
13158_ACEOF
13159cat confdefs.h >>conftest.$ac_ext
13160cat >>conftest.$ac_ext <<_ACEOF
13161/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013162
13163#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013164#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013165#include <sys/socket.h>
13166#include <netinet/in.h>
13167#include <arpa/inet.h>
13168
Martin v. Löwise9416172003-05-03 10:12:45 +000013169int
13170main ()
13171{
13172void* p = inet_pton
13173 ;
13174 return 0;
13175}
13176_ACEOF
13177rm -f conftest.$ac_objext
13178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13179 (eval $ac_compile) 2>&5
13180 ac_status=$?
13181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13182 (exit $ac_status); } &&
13183 { ac_try='test -s conftest.$ac_objext'
13184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13185 (eval $ac_try) 2>&5
13186 ac_status=$?
13187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13188 (exit $ac_status); }; }; then
13189
13190cat >>confdefs.h <<\_ACEOF
13191#define HAVE_INET_PTON 1
13192_ACEOF
13193
13194 echo "$as_me:$LINENO: result: yes" >&5
13195echo "${ECHO_T}yes" >&6
13196else
13197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013198sed 's/^/| /' conftest.$ac_ext >&5
13199
Martin v. Löwise9416172003-05-03 10:12:45 +000013200echo "$as_me:$LINENO: result: no" >&5
13201echo "${ECHO_T}no" >&6
13202
13203fi
13204rm -f conftest.$ac_objext conftest.$ac_ext
13205
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013206# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013207echo "$as_me:$LINENO: checking for setgroups" >&5
13208echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13209cat >conftest.$ac_ext <<_ACEOF
13210#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013211/* confdefs.h. */
13212_ACEOF
13213cat confdefs.h >>conftest.$ac_ext
13214cat >>conftest.$ac_ext <<_ACEOF
13215/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013216
13217#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013218#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013219#ifdef HAVE_GRP_H
13220#include <grp.h>
13221#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013222
Martin v. Löwisd5843682002-11-21 20:41:28 +000013223int
13224main ()
13225{
13226void* p = setgroups
13227 ;
13228 return 0;
13229}
13230_ACEOF
13231rm -f conftest.$ac_objext
13232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13233 (eval $ac_compile) 2>&5
13234 ac_status=$?
13235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236 (exit $ac_status); } &&
13237 { ac_try='test -s conftest.$ac_objext'
13238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13239 (eval $ac_try) 2>&5
13240 ac_status=$?
13241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242 (exit $ac_status); }; }; then
13243
13244cat >>confdefs.h <<\_ACEOF
13245#define HAVE_SETGROUPS 1
13246_ACEOF
13247
13248 echo "$as_me:$LINENO: result: yes" >&5
13249echo "${ECHO_T}yes" >&6
13250else
13251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013252sed 's/^/| /' conftest.$ac_ext >&5
13253
Martin v. Löwisd5843682002-11-21 20:41:28 +000013254echo "$as_me:$LINENO: result: no" >&5
13255echo "${ECHO_T}no" >&6
13256
13257fi
13258rm -f conftest.$ac_objext conftest.$ac_ext
13259
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013260# check for openpty and forkpty
13261
Martin v. Löwis11437992002-04-12 09:54:03 +000013262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013263for ac_func in openpty
13264do
Martin v. Löwis11437992002-04-12 09:54:03 +000013265as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13266echo "$as_me:$LINENO: checking for $ac_func" >&5
13267echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13268if eval "test \"\${$as_ac_var+set}\" = set"; then
13269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013270else
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 cat >conftest.$ac_ext <<_ACEOF
13272#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013273/* confdefs.h. */
13274_ACEOF
13275cat confdefs.h >>conftest.$ac_ext
13276cat >>conftest.$ac_ext <<_ACEOF
13277/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013278/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013279 which can conflict with char $ac_func (); below.
13280 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013281 <limits.h> exists even on freestanding compilers. Under hpux,
13282 including <limits.h> includes <sys/time.h> and causes problems
13283 checking for functions defined therein. */
13284#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013285# include <limits.h>
13286#else
13287# include <assert.h>
13288#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013289/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013290#ifdef __cplusplus
13291extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013292{
Martin v. Löwis11437992002-04-12 09:54:03 +000013293#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013294/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 builtin and then its argument prototype would still apply. */
13296char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013297/* The GNU C library defines this for functions which it implements
13298 to always fail with ENOSYS. Some functions are actually named
13299 something starting with __ and the normal name is an alias. */
13300#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13301choke me
13302#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013303char (*f) () = $ac_func;
13304#endif
13305#ifdef __cplusplus
13306}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013307#endif
13308
Skip Montanaro6dead952003-09-25 14:50:04 +000013309int
13310main ()
13311{
13312return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 ;
13314 return 0;
13315}
13316_ACEOF
13317rm -f conftest.$ac_objext conftest$ac_exeext
13318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13319 (eval $ac_link) 2>&5
13320 ac_status=$?
13321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322 (exit $ac_status); } &&
13323 { ac_try='test -s conftest$ac_exeext'
13324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13325 (eval $ac_try) 2>&5
13326 ac_status=$?
13327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13328 (exit $ac_status); }; }; then
13329 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013330else
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013332sed 's/^/| /' conftest.$ac_ext >&5
13333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013338echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13339echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13340if test `eval echo '${'$as_ac_var'}'` = yes; then
13341 cat >>confdefs.h <<_ACEOF
13342#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13343_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013344
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013345else
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13347echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13348if test "${ac_cv_lib_util_openpty+set}" = set; then
13349 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013350else
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013352LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013353cat >conftest.$ac_ext <<_ACEOF
13354#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013355/* confdefs.h. */
13356_ACEOF
13357cat confdefs.h >>conftest.$ac_ext
13358cat >>conftest.$ac_ext <<_ACEOF
13359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Fred Drake8cef4cf2000-06-28 16:40:38 +000013361/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013362#ifdef __cplusplus
13363extern "C"
13364#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013365/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 builtin and then its argument prototype would still apply. */
13367char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013368int
13369main ()
13370{
13371openpty ();
13372 ;
13373 return 0;
13374}
13375_ACEOF
13376rm -f conftest.$ac_objext conftest$ac_exeext
13377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13378 (eval $ac_link) 2>&5
13379 ac_status=$?
13380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13381 (exit $ac_status); } &&
13382 { ac_try='test -s conftest$ac_exeext'
13383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13384 (eval $ac_try) 2>&5
13385 ac_status=$?
13386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13387 (exit $ac_status); }; }; then
13388 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013389else
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013391sed 's/^/| /' conftest.$ac_ext >&5
13392
Martin v. Löwis11437992002-04-12 09:54:03 +000013393ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13396LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013398echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13399echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13400if test $ac_cv_lib_util_openpty = yes; then
13401 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013402#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013403_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013404 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013405fi
13406
13407fi
13408done
13409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
Fred Drake8cef4cf2000-06-28 16:40:38 +000013411for ac_func in forkpty
13412do
Martin v. Löwis11437992002-04-12 09:54:03 +000013413as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13414echo "$as_me:$LINENO: checking for $ac_func" >&5
13415echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13416if eval "test \"\${$as_ac_var+set}\" = set"; then
13417 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013418else
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 cat >conftest.$ac_ext <<_ACEOF
13420#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013421/* confdefs.h. */
13422_ACEOF
13423cat confdefs.h >>conftest.$ac_ext
13424cat >>conftest.$ac_ext <<_ACEOF
13425/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013426/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013427 which can conflict with char $ac_func (); below.
13428 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013429 <limits.h> exists even on freestanding compilers. Under hpux,
13430 including <limits.h> includes <sys/time.h> and causes problems
13431 checking for functions defined therein. */
13432#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013433# include <limits.h>
13434#else
13435# include <assert.h>
13436#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013437/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013438#ifdef __cplusplus
13439extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013440{
Martin v. Löwis11437992002-04-12 09:54:03 +000013441#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013442/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 builtin and then its argument prototype would still apply. */
13444char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013445/* The GNU C library defines this for functions which it implements
13446 to always fail with ENOSYS. Some functions are actually named
13447 something starting with __ and the normal name is an alias. */
13448#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13449choke me
13450#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013451char (*f) () = $ac_func;
13452#endif
13453#ifdef __cplusplus
13454}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013455#endif
13456
Skip Montanaro6dead952003-09-25 14:50:04 +000013457int
13458main ()
13459{
13460return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 ;
13462 return 0;
13463}
13464_ACEOF
13465rm -f conftest.$ac_objext conftest$ac_exeext
13466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13467 (eval $ac_link) 2>&5
13468 ac_status=$?
13469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13470 (exit $ac_status); } &&
13471 { ac_try='test -s conftest$ac_exeext'
13472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13473 (eval $ac_try) 2>&5
13474 ac_status=$?
13475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476 (exit $ac_status); }; }; then
13477 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013478else
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013480sed 's/^/| /' conftest.$ac_ext >&5
13481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013486echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13487echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13488if test `eval echo '${'$as_ac_var'}'` = yes; then
13489 cat >>confdefs.h <<_ACEOF
13490#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13491_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013492
Fred Drake8cef4cf2000-06-28 16:40:38 +000013493else
Martin v. Löwis11437992002-04-12 09:54:03 +000013494 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13495echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13496if test "${ac_cv_lib_util_forkpty+set}" = set; then
13497 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013498else
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013500LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013501cat >conftest.$ac_ext <<_ACEOF
13502#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013503/* confdefs.h. */
13504_ACEOF
13505cat confdefs.h >>conftest.$ac_ext
13506cat >>conftest.$ac_ext <<_ACEOF
13507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Fred Drake8cef4cf2000-06-28 16:40:38 +000013509/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013510#ifdef __cplusplus
13511extern "C"
13512#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013513/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 builtin and then its argument prototype would still apply. */
13515char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013516int
13517main ()
13518{
13519forkpty ();
13520 ;
13521 return 0;
13522}
13523_ACEOF
13524rm -f conftest.$ac_objext conftest$ac_exeext
13525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13526 (eval $ac_link) 2>&5
13527 ac_status=$?
13528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13529 (exit $ac_status); } &&
13530 { ac_try='test -s conftest$ac_exeext'
13531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13532 (eval $ac_try) 2>&5
13533 ac_status=$?
13534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13535 (exit $ac_status); }; }; then
13536 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013537else
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013539sed 's/^/| /' conftest.$ac_ext >&5
13540
Martin v. Löwis11437992002-04-12 09:54:03 +000013541ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013542fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013543rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13544LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013545fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013546echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13547echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13548if test $ac_cv_lib_util_forkpty = yes; then
13549 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013550#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013551_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013552 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013553fi
13554
13555fi
13556done
13557
Jack Jansendd19cf82001-12-06 22:36:17 +000013558
Michael W. Hudson54241132001-12-07 15:38:26 +000013559# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013560
13561
13562
13563
13564
13565
Fred Drake8cef4cf2000-06-28 16:40:38 +000013566for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13567do
Martin v. Löwis11437992002-04-12 09:54:03 +000013568as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13569echo "$as_me:$LINENO: checking for $ac_func" >&5
13570echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13571if eval "test \"\${$as_ac_var+set}\" = set"; then
13572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013573else
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 cat >conftest.$ac_ext <<_ACEOF
13575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013576/* confdefs.h. */
13577_ACEOF
13578cat confdefs.h >>conftest.$ac_ext
13579cat >>conftest.$ac_ext <<_ACEOF
13580/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013581/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013582 which can conflict with char $ac_func (); below.
13583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013584 <limits.h> exists even on freestanding compilers. Under hpux,
13585 including <limits.h> includes <sys/time.h> and causes problems
13586 checking for functions defined therein. */
13587#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013588# include <limits.h>
13589#else
13590# include <assert.h>
13591#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013592/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013593#ifdef __cplusplus
13594extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013595{
Martin v. Löwis11437992002-04-12 09:54:03 +000013596#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013597/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 builtin and then its argument prototype would still apply. */
13599char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013600/* The GNU C library defines this for functions which it implements
13601 to always fail with ENOSYS. Some functions are actually named
13602 something starting with __ and the normal name is an alias. */
13603#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13604choke me
13605#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013606char (*f) () = $ac_func;
13607#endif
13608#ifdef __cplusplus
13609}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013610#endif
13611
Skip Montanaro6dead952003-09-25 14:50:04 +000013612int
13613main ()
13614{
13615return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 ;
13617 return 0;
13618}
13619_ACEOF
13620rm -f conftest.$ac_objext conftest$ac_exeext
13621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13622 (eval $ac_link) 2>&5
13623 ac_status=$?
13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625 (exit $ac_status); } &&
13626 { ac_try='test -s conftest$ac_exeext'
13627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13628 (eval $ac_try) 2>&5
13629 ac_status=$?
13630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13631 (exit $ac_status); }; }; then
13632 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633else
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013635sed 's/^/| /' conftest.$ac_ext >&5
13636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013641echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13642echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13643if test `eval echo '${'$as_ac_var'}'` = yes; then
13644 cat >>confdefs.h <<_ACEOF
13645#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13646_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013647
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013648fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013649done
13650
Michael W. Hudson54241132001-12-07 15:38:26 +000013651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
13653
13654
13655
13656
Martin v. Löwis1142de32002-03-29 16:28:31 +000013657for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013658do
Martin v. Löwis11437992002-04-12 09:54:03 +000013659as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13660echo "$as_me:$LINENO: checking for $ac_func" >&5
13661echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13662if eval "test \"\${$as_ac_var+set}\" = set"; then
13663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013664else
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 cat >conftest.$ac_ext <<_ACEOF
13666#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* confdefs.h. */
13668_ACEOF
13669cat confdefs.h >>conftest.$ac_ext
13670cat >>conftest.$ac_ext <<_ACEOF
13671/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013672/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013673 which can conflict with char $ac_func (); below.
13674 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013675 <limits.h> exists even on freestanding compilers. Under hpux,
13676 including <limits.h> includes <sys/time.h> and causes problems
13677 checking for functions defined therein. */
13678#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013679# include <limits.h>
13680#else
13681# include <assert.h>
13682#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013683/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013684#ifdef __cplusplus
13685extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013686{
Martin v. Löwis11437992002-04-12 09:54:03 +000013687#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013688/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 builtin and then its argument prototype would still apply. */
13690char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013691/* The GNU C library defines this for functions which it implements
13692 to always fail with ENOSYS. Some functions are actually named
13693 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013694#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013695choke me
13696#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013697char (*f) () = $ac_func;
13698#endif
13699#ifdef __cplusplus
13700}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013701#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702
Skip Montanaro6dead952003-09-25 14:50:04 +000013703int
13704main ()
13705{
13706return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
13711rm -f conftest.$ac_objext conftest$ac_exeext
13712if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13713 (eval $ac_link) 2>&5
13714 ac_status=$?
13715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13716 (exit $ac_status); } &&
13717 { ac_try='test -s conftest$ac_exeext'
13718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13719 (eval $ac_try) 2>&5
13720 ac_status=$?
13721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13722 (exit $ac_status); }; }; then
13723 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013724else
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013726sed 's/^/| /' conftest.$ac_ext >&5
13727
Martin v. Löwis11437992002-04-12 09:54:03 +000013728eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013730rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013732echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13733echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13734if test `eval echo '${'$as_ac_var'}'` = yes; then
13735 cat >>confdefs.h <<_ACEOF
13736#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13737_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013738
Martin v. Löwis1142de32002-03-29 16:28:31 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013741fi
13742done
13743
13744
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
Martin v. Löwis1142de32002-03-29 16:28:31 +000013746for ac_func in getpgrp
13747do
Martin v. Löwis11437992002-04-12 09:54:03 +000013748as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13749echo "$as_me:$LINENO: checking for $ac_func" >&5
13750echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13751if eval "test \"\${$as_ac_var+set}\" = set"; then
13752 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013753else
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 cat >conftest.$ac_ext <<_ACEOF
13755#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013756/* confdefs.h. */
13757_ACEOF
13758cat confdefs.h >>conftest.$ac_ext
13759cat >>conftest.$ac_ext <<_ACEOF
13760/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013761/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013762 which can conflict with char $ac_func (); below.
13763 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013764 <limits.h> exists even on freestanding compilers. Under hpux,
13765 including <limits.h> includes <sys/time.h> and causes problems
13766 checking for functions defined therein. */
13767#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013768# include <limits.h>
13769#else
13770# include <assert.h>
13771#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013772/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013773#ifdef __cplusplus
13774extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013775{
Martin v. Löwis11437992002-04-12 09:54:03 +000013776#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013777/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 builtin and then its argument prototype would still apply. */
13779char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013780/* The GNU C library defines this for functions which it implements
13781 to always fail with ENOSYS. Some functions are actually named
13782 something starting with __ and the normal name is an alias. */
13783#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13784choke me
13785#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013786char (*f) () = $ac_func;
13787#endif
13788#ifdef __cplusplus
13789}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013790#endif
13791
Skip Montanaro6dead952003-09-25 14:50:04 +000013792int
13793main ()
13794{
13795return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 ;
13797 return 0;
13798}
13799_ACEOF
13800rm -f conftest.$ac_objext conftest$ac_exeext
13801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13802 (eval $ac_link) 2>&5
13803 ac_status=$?
13804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13805 (exit $ac_status); } &&
13806 { ac_try='test -s conftest$ac_exeext'
13807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13808 (eval $ac_try) 2>&5
13809 ac_status=$?
13810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13811 (exit $ac_status); }; }; then
13812 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013813else
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013815sed 's/^/| /' conftest.$ac_ext >&5
13816
Martin v. Löwis11437992002-04-12 09:54:03 +000013817eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013819rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013820fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013821echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13822echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13823if test `eval echo '${'$as_ac_var'}'` = yes; then
13824 cat >>confdefs.h <<_ACEOF
13825#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13826_ACEOF
13827 cat >conftest.$ac_ext <<_ACEOF
13828#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013829/* confdefs.h. */
13830_ACEOF
13831cat confdefs.h >>conftest.$ac_ext
13832cat >>conftest.$ac_ext <<_ACEOF
13833/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013835int
13836main ()
13837{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 ;
13840 return 0;
13841}
13842_ACEOF
13843rm -f conftest.$ac_objext
13844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13845 (eval $ac_compile) 2>&5
13846 ac_status=$?
13847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13848 (exit $ac_status); } &&
13849 { ac_try='test -s conftest.$ac_objext'
13850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13851 (eval $ac_try) 2>&5
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854 (exit $ac_status); }; }; then
13855
13856cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013858_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013859
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Guido van Rossumf78abae1997-01-21 22:02:36 +000013861else
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013863sed 's/^/| /' conftest.$ac_ext >&5
13864
Guido van Rossum627b2d71993-12-24 10:39:16 +000013865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013866rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013867
Guido van Rossum627b2d71993-12-24 10:39:16 +000013868fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013869done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013870
Jack Jansen150753c2003-03-29 22:07:47 +000013871
13872for ac_func in setpgrp
13873do
13874as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13875echo "$as_me:$LINENO: checking for $ac_func" >&5
13876echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13877if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013879else
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 cat >conftest.$ac_ext <<_ACEOF
13881#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013882/* confdefs.h. */
13883_ACEOF
13884cat confdefs.h >>conftest.$ac_ext
13885cat >>conftest.$ac_ext <<_ACEOF
13886/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013887/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013888 which can conflict with char $ac_func (); below.
13889 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013890 <limits.h> exists even on freestanding compilers. Under hpux,
13891 including <limits.h> includes <sys/time.h> and causes problems
13892 checking for functions defined therein. */
13893#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013894# include <limits.h>
13895#else
13896# include <assert.h>
13897#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013898/* Override any gcc2 internal prototype to avoid an error. */
13899#ifdef __cplusplus
13900extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013901{
Martin v. Löwis11437992002-04-12 09:54:03 +000013902#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013903/* We use char because int might match the return type of a gcc2
13904 builtin and then its argument prototype would still apply. */
13905char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013906/* The GNU C library defines this for functions which it implements
13907 to always fail with ENOSYS. Some functions are actually named
13908 something starting with __ and the normal name is an alias. */
13909#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13910choke me
13911#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013912char (*f) () = $ac_func;
13913#endif
13914#ifdef __cplusplus
13915}
Jack Jansen150753c2003-03-29 22:07:47 +000013916#endif
13917
Skip Montanaro6dead952003-09-25 14:50:04 +000013918int
13919main ()
13920{
13921return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 ;
13923 return 0;
13924}
13925_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013926rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13928 (eval $ac_link) 2>&5
13929 ac_status=$?
13930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013931 (exit $ac_status); } &&
13932 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13934 (eval $ac_try) 2>&5
13935 ac_status=$?
13936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013938 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013939else
Jack Jansen150753c2003-03-29 22:07:47 +000013940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013941sed 's/^/| /' conftest.$ac_ext >&5
13942
Jack Jansen150753c2003-03-29 22:07:47 +000013943eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013944fi
Jack Jansen150753c2003-03-29 22:07:47 +000013945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013946fi
Jack Jansen150753c2003-03-29 22:07:47 +000013947echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13948echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13949if test `eval echo '${'$as_ac_var'}'` = yes; then
13950 cat >>confdefs.h <<_ACEOF
13951#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13952_ACEOF
13953 cat >conftest.$ac_ext <<_ACEOF
13954#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013955/* confdefs.h. */
13956_ACEOF
13957cat confdefs.h >>conftest.$ac_ext
13958cat >>conftest.$ac_ext <<_ACEOF
13959/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013960#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013961int
13962main ()
13963{
13964setpgrp(0,0);
13965 ;
13966 return 0;
13967}
13968_ACEOF
13969rm -f conftest.$ac_objext
13970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13971 (eval $ac_compile) 2>&5
13972 ac_status=$?
13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974 (exit $ac_status); } &&
13975 { ac_try='test -s conftest.$ac_objext'
13976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13977 (eval $ac_try) 2>&5
13978 ac_status=$?
13979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
13982cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013983#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013984_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013985
Jack Jansen150753c2003-03-29 22:07:47 +000013986
13987else
13988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013989sed 's/^/| /' conftest.$ac_ext >&5
13990
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013991fi
Jack Jansen150753c2003-03-29 22:07:47 +000013992rm -f conftest.$ac_objext conftest.$ac_ext
13993
13994fi
13995done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013996
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
Thomas Wouters3a584202000-08-05 23:28:51 +000013998for ac_func in gettimeofday
13999do
Martin v. Löwis11437992002-04-12 09:54:03 +000014000as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14001echo "$as_me:$LINENO: checking for $ac_func" >&5
14002echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14003if eval "test \"\${$as_ac_var+set}\" = set"; then
14004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014005else
Martin v. Löwis11437992002-04-12 09:54:03 +000014006 cat >conftest.$ac_ext <<_ACEOF
14007#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014013/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014014 which can conflict with char $ac_func (); below.
14015 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014016 <limits.h> exists even on freestanding compilers. Under hpux,
14017 including <limits.h> includes <sys/time.h> and causes problems
14018 checking for functions defined therein. */
14019#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014020# include <limits.h>
14021#else
14022# include <assert.h>
14023#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014024/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014025#ifdef __cplusplus
14026extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014027{
Martin v. Löwis11437992002-04-12 09:54:03 +000014028#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014029/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 builtin and then its argument prototype would still apply. */
14031char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014032/* The GNU C library defines this for functions which it implements
14033 to always fail with ENOSYS. Some functions are actually named
14034 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014035#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014036choke me
14037#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014038char (*f) () = $ac_func;
14039#endif
14040#ifdef __cplusplus
14041}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014042#endif
14043
Skip Montanaro6dead952003-09-25 14:50:04 +000014044int
14045main ()
14046{
14047return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 ;
14049 return 0;
14050}
14051_ACEOF
14052rm -f conftest.$ac_objext conftest$ac_exeext
14053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14054 (eval $ac_link) 2>&5
14055 ac_status=$?
14056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14057 (exit $ac_status); } &&
14058 { ac_try='test -s conftest$ac_exeext'
14059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14060 (eval $ac_try) 2>&5
14061 ac_status=$?
14062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14063 (exit $ac_status); }; }; then
14064 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014065else
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014067sed 's/^/| /' conftest.$ac_ext >&5
14068
Martin v. Löwis11437992002-04-12 09:54:03 +000014069eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014071rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014073echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14074echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14075if test `eval echo '${'$as_ac_var'}'` = yes; then
14076 cat >>confdefs.h <<_ACEOF
14077#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14078_ACEOF
14079 cat >conftest.$ac_ext <<_ACEOF
14080#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014081/* confdefs.h. */
14082_ACEOF
14083cat confdefs.h >>conftest.$ac_ext
14084cat >>conftest.$ac_ext <<_ACEOF
14085/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014086#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014087int
14088main ()
14089{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014090gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 ;
14092 return 0;
14093}
14094_ACEOF
14095rm -f conftest.$ac_objext
14096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14097 (eval $ac_compile) 2>&5
14098 ac_status=$?
14099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14100 (exit $ac_status); } &&
14101 { ac_try='test -s conftest.$ac_objext'
14102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14103 (eval $ac_try) 2>&5
14104 ac_status=$?
14105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14106 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014107 :
14108else
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014110sed 's/^/| /' conftest.$ac_ext >&5
14111
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
14113cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014114#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014115_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014116
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
Guido van Rossum627b2d71993-12-24 10:39:16 +000014118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014119rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014120
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014121fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014122done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123
Michael W. Hudson54241132001-12-07 15:38:26 +000014124
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014125echo "$as_me:$LINENO: checking for major" >&5
14126echo $ECHO_N "checking for major... $ECHO_C" >&6
14127cat >conftest.$ac_ext <<_ACEOF
14128#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014129/* confdefs.h. */
14130_ACEOF
14131cat confdefs.h >>conftest.$ac_ext
14132cat >>conftest.$ac_ext <<_ACEOF
14133/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014134
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014135#if defined(MAJOR_IN_MKDEV)
14136#include <sys/mkdev.h>
14137#elif defined(MAJOR_IN_SYSMACROS)
14138#include <sys/sysmacros.h>
14139#else
14140#include <sys/types.h>
14141#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014142
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014143int
14144main ()
14145{
14146
14147 makedev(major(0),minor(0));
14148
14149 ;
14150 return 0;
14151}
14152_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014153rm -f conftest.$ac_objext conftest$ac_exeext
14154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14155 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014156 ac_status=$?
14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014159 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14161 (eval $ac_try) 2>&5
14162 ac_status=$?
14163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14164 (exit $ac_status); }; }; then
14165
14166
14167cat >>confdefs.h <<\_ACEOF
14168#define HAVE_DEVICE_MACROS 1
14169_ACEOF
14170
14171 echo "$as_me:$LINENO: result: yes" >&5
14172echo "${ECHO_T}yes" >&6
14173
14174else
14175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014176sed 's/^/| /' conftest.$ac_ext >&5
14177
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014178
14179 echo "$as_me:$LINENO: result: no" >&5
14180echo "${ECHO_T}no" >&6
14181
14182fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014183rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014184
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014185# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014186# for [no]getaddrinfo in netdb.h.
14187echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14188echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14189cat >conftest.$ac_ext <<_ACEOF
14190#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014191/* confdefs.h. */
14192_ACEOF
14193cat confdefs.h >>conftest.$ac_ext
14194cat >>conftest.$ac_ext <<_ACEOF
14195/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014196
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014197#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014198#include <sys/socket.h>
14199#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014200#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014201
Martin v. Löwis11437992002-04-12 09:54:03 +000014202int
14203main ()
14204{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014205
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014206getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 ;
14209 return 0;
14210}
14211_ACEOF
14212rm -f conftest.$ac_objext conftest$ac_exeext
14213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14214 (eval $ac_link) 2>&5
14215 ac_status=$?
14216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217 (exit $ac_status); } &&
14218 { ac_try='test -s conftest$ac_exeext'
14219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14220 (eval $ac_try) 2>&5
14221 ac_status=$?
14222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14223 (exit $ac_status); }; }; then
14224
14225echo "$as_me:$LINENO: result: yes" >&5
14226echo "${ECHO_T}yes" >&6
14227echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14228echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014229if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014230 echo "$as_me:$LINENO: result: buggy" >&5
14231echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014232buggygetaddrinfo=yes
14233else
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 cat >conftest.$ac_ext <<_ACEOF
14235#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014236/* confdefs.h. */
14237_ACEOF
14238cat confdefs.h >>conftest.$ac_ext
14239cat >>conftest.$ac_ext <<_ACEOF
14240/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014241
14242#include <sys/types.h>
14243#include <netdb.h>
14244#include <string.h>
14245#include <sys/socket.h>
14246#include <netinet/in.h>
14247
14248main()
14249{
14250 int passive, gaierr, inet4 = 0, inet6 = 0;
14251 struct addrinfo hints, *ai, *aitop;
14252 char straddr[INET6_ADDRSTRLEN], strport[16];
14253
14254 for (passive = 0; passive <= 1; passive++) {
14255 memset(&hints, 0, sizeof(hints));
14256 hints.ai_family = AF_UNSPEC;
14257 hints.ai_flags = passive ? AI_PASSIVE : 0;
14258 hints.ai_socktype = SOCK_STREAM;
14259 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14260 (void)gai_strerror(gaierr);
14261 goto bad;
14262 }
14263 for (ai = aitop; ai; ai = ai->ai_next) {
14264 if (ai->ai_addr == NULL ||
14265 ai->ai_addrlen == 0 ||
14266 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14267 straddr, sizeof(straddr), strport, sizeof(strport),
14268 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14269 goto bad;
14270 }
14271 switch (ai->ai_family) {
14272 case AF_INET:
14273 if (strcmp(strport, "54321") != 0) {
14274 goto bad;
14275 }
14276 if (passive) {
14277 if (strcmp(straddr, "0.0.0.0") != 0) {
14278 goto bad;
14279 }
14280 } else {
14281 if (strcmp(straddr, "127.0.0.1") != 0) {
14282 goto bad;
14283 }
14284 }
14285 inet4++;
14286 break;
14287 case AF_INET6:
14288 if (strcmp(strport, "54321") != 0) {
14289 goto bad;
14290 }
14291 if (passive) {
14292 if (strcmp(straddr, "::") != 0) {
14293 goto bad;
14294 }
14295 } else {
14296 if (strcmp(straddr, "::1") != 0) {
14297 goto bad;
14298 }
14299 }
14300 inet6++;
14301 break;
14302 case AF_UNSPEC:
14303 goto bad;
14304 break;
14305 default:
14306 /* another family support? */
14307 break;
14308 }
14309 }
14310 }
14311
14312 if (!(inet4 == 0 || inet4 == 2))
14313 goto bad;
14314 if (!(inet6 == 0 || inet6 == 2))
14315 goto bad;
14316
14317 if (aitop)
14318 freeaddrinfo(aitop);
14319 exit(0);
14320
14321 bad:
14322 if (aitop)
14323 freeaddrinfo(aitop);
14324 exit(1);
14325}
14326
Martin v. Löwis11437992002-04-12 09:54:03 +000014327_ACEOF
14328rm -f conftest$ac_exeext
14329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14330 (eval $ac_link) 2>&5
14331 ac_status=$?
14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14335 (eval $ac_try) 2>&5
14336 ac_status=$?
14337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14338 (exit $ac_status); }; }; then
14339 echo "$as_me:$LINENO: result: good" >&5
14340echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014341buggygetaddrinfo=no
14342else
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 echo "$as_me: program exited with status $ac_status" >&5
14344echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014345sed 's/^/| /' conftest.$ac_ext >&5
14346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347( exit $ac_status )
14348echo "$as_me:$LINENO: result: buggy" >&5
14349echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014350buggygetaddrinfo=yes
14351fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014352rm -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 +000014353fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014354else
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014356sed 's/^/| /' conftest.$ac_ext >&5
14357
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
14359echo "$as_me:$LINENO: result: no" >&5
14360echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014361buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014362
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014364rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014365
14366if test "$buggygetaddrinfo" = "yes"; then
14367 if test "$ipv6" = "yes"; then
14368 echo 'Fatal: You must get working getaddrinfo() function.'
14369 echo ' or you can specify "--disable-ipv6"'.
14370 exit 1
14371 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014372else
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
14374cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014375#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014376_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014377
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014380for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014381do
Martin v. Löwis11437992002-04-12 09:54:03 +000014382as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14383echo "$as_me:$LINENO: checking for $ac_func" >&5
14384echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14385if eval "test \"\${$as_ac_var+set}\" = set"; then
14386 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014387else
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 cat >conftest.$ac_ext <<_ACEOF
14389#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014390/* confdefs.h. */
14391_ACEOF
14392cat confdefs.h >>conftest.$ac_ext
14393cat >>conftest.$ac_ext <<_ACEOF
14394/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014395/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014396 which can conflict with char $ac_func (); below.
14397 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014398 <limits.h> exists even on freestanding compilers. Under hpux,
14399 including <limits.h> includes <sys/time.h> and causes problems
14400 checking for functions defined therein. */
14401#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014402# include <limits.h>
14403#else
14404# include <assert.h>
14405#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014406/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014407#ifdef __cplusplus
14408extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014409{
Martin v. Löwis11437992002-04-12 09:54:03 +000014410#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014411/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 builtin and then its argument prototype would still apply. */
14413char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014414/* The GNU C library defines this for functions which it implements
14415 to always fail with ENOSYS. Some functions are actually named
14416 something starting with __ and the normal name is an alias. */
14417#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14418choke me
14419#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014420char (*f) () = $ac_func;
14421#endif
14422#ifdef __cplusplus
14423}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014424#endif
14425
Skip Montanaro6dead952003-09-25 14:50:04 +000014426int
14427main ()
14428{
14429return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 ;
14431 return 0;
14432}
14433_ACEOF
14434rm -f conftest.$ac_objext conftest$ac_exeext
14435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14436 (eval $ac_link) 2>&5
14437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); } &&
14440 { ac_try='test -s conftest$ac_exeext'
14441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14442 (eval $ac_try) 2>&5
14443 ac_status=$?
14444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14445 (exit $ac_status); }; }; then
14446 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014447else
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014449sed 's/^/| /' conftest.$ac_ext >&5
14450
Martin v. Löwis11437992002-04-12 09:54:03 +000014451eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014453rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014455echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14456echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14457if test `eval echo '${'$as_ac_var'}'` = yes; then
14458 cat >>confdefs.h <<_ACEOF
14459#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14460_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014461
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014462fi
14463done
14464
Michael W. Hudson54241132001-12-07 15:38:26 +000014465
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014466# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014467echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14468echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14469if test "${ac_cv_header_time+set}" = set; then
14470 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014471else
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 cat >conftest.$ac_ext <<_ACEOF
14473#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014474/* confdefs.h. */
14475_ACEOF
14476cat confdefs.h >>conftest.$ac_ext
14477cat >>conftest.$ac_ext <<_ACEOF
14478/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014479#include <sys/types.h>
14480#include <sys/time.h>
14481#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014482
Martin v. Löwis11437992002-04-12 09:54:03 +000014483int
14484main ()
14485{
14486if ((struct tm *) 0)
14487return 0;
14488 ;
14489 return 0;
14490}
14491_ACEOF
14492rm -f conftest.$ac_objext
14493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14494 (eval $ac_compile) 2>&5
14495 ac_status=$?
14496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14497 (exit $ac_status); } &&
14498 { ac_try='test -s conftest.$ac_objext'
14499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14500 (eval $ac_try) 2>&5
14501 ac_status=$?
14502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14503 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014504 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014507sed 's/^/| /' conftest.$ac_ext >&5
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014512fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014513echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14514echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014515if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
14517cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014518#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014519_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014520
14521fi
14522
Martin v. Löwis11437992002-04-12 09:54:03 +000014523echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14524echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14525if test "${ac_cv_struct_tm+set}" = set; then
14526 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014527else
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 cat >conftest.$ac_ext <<_ACEOF
14529#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014530/* confdefs.h. */
14531_ACEOF
14532cat confdefs.h >>conftest.$ac_ext
14533cat >>conftest.$ac_ext <<_ACEOF
14534/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014535#include <sys/types.h>
14536#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
Martin v. Löwis11437992002-04-12 09:54:03 +000014538int
14539main ()
14540{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014541struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014542 ;
14543 return 0;
14544}
14545_ACEOF
14546rm -f conftest.$ac_objext
14547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14548 (eval $ac_compile) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); } &&
14552 { ac_try='test -s conftest.$ac_objext'
14553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14554 (eval $ac_try) 2>&5
14555 ac_status=$?
14556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14557 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014558 ac_cv_struct_tm=time.h
14559else
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014561sed 's/^/| /' conftest.$ac_ext >&5
14562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014565rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014567echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14568echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014569if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014570
14571cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014572#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014573_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014574
14575fi
14576
Martin v. Löwis11437992002-04-12 09:54:03 +000014577echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14578echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14579if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014581else
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 cat >conftest.$ac_ext <<_ACEOF
14583#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014584/* confdefs.h. */
14585_ACEOF
14586cat confdefs.h >>conftest.$ac_ext
14587cat >>conftest.$ac_ext <<_ACEOF
14588/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014589#include <sys/types.h>
14590#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
14592
Martin v. Löwis11437992002-04-12 09:54:03 +000014593int
14594main ()
14595{
14596static struct tm ac_aggr;
14597if (ac_aggr.tm_zone)
14598return 0;
14599 ;
14600 return 0;
14601}
14602_ACEOF
14603rm -f conftest.$ac_objext
14604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14605 (eval $ac_compile) 2>&5
14606 ac_status=$?
14607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608 (exit $ac_status); } &&
14609 { ac_try='test -s conftest.$ac_objext'
14610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14611 (eval $ac_try) 2>&5
14612 ac_status=$?
14613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14614 (exit $ac_status); }; }; then
14615 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014616else
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014618sed 's/^/| /' conftest.$ac_ext >&5
14619
14620cat >conftest.$ac_ext <<_ACEOF
14621#line $LINENO "configure"
14622/* confdefs.h. */
14623_ACEOF
14624cat confdefs.h >>conftest.$ac_ext
14625cat >>conftest.$ac_ext <<_ACEOF
14626/* end confdefs.h. */
14627#include <sys/types.h>
14628#include <$ac_cv_struct_tm>
14629
14630
14631int
14632main ()
14633{
14634static struct tm ac_aggr;
14635if (sizeof ac_aggr.tm_zone)
14636return 0;
14637 ;
14638 return 0;
14639}
14640_ACEOF
14641rm -f conftest.$ac_objext
14642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14643 (eval $ac_compile) 2>&5
14644 ac_status=$?
14645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646 (exit $ac_status); } &&
14647 { ac_try='test -s conftest.$ac_objext'
14648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14649 (eval $ac_try) 2>&5
14650 ac_status=$?
14651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14652 (exit $ac_status); }; }; then
14653 ac_cv_member_struct_tm_tm_zone=yes
14654else
14655 echo "$as_me: failed program was:" >&5
14656sed 's/^/| /' conftest.$ac_ext >&5
14657
Martin v. Löwis11437992002-04-12 09:54:03 +000014658ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014660rm -f conftest.$ac_objext conftest.$ac_ext
14661fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014662rm -f conftest.$ac_objext conftest.$ac_ext
14663fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014664echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14665echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14666if test $ac_cv_member_struct_tm_tm_zone = yes; then
14667
14668cat >>confdefs.h <<_ACEOF
14669#define HAVE_STRUCT_TM_TM_ZONE 1
14670_ACEOF
14671
14672
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014673fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014674
Martin v. Löwis11437992002-04-12 09:54:03 +000014675if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14676
14677cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014678#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014679_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014680
14681else
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 echo "$as_me:$LINENO: checking for tzname" >&5
14683echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14684if test "${ac_cv_var_tzname+set}" = set; then
14685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014686else
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 cat >conftest.$ac_ext <<_ACEOF
14688#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014689/* confdefs.h. */
14690_ACEOF
14691cat confdefs.h >>conftest.$ac_ext
14692cat >>conftest.$ac_ext <<_ACEOF
14693/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014694#include <time.h>
14695#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014696extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014698
Martin v. Löwis11437992002-04-12 09:54:03 +000014699int
14700main ()
14701{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014702atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014703 ;
14704 return 0;
14705}
14706_ACEOF
14707rm -f conftest.$ac_objext conftest$ac_exeext
14708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14709 (eval $ac_link) 2>&5
14710 ac_status=$?
14711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); } &&
14713 { ac_try='test -s conftest$ac_exeext'
14714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14715 (eval $ac_try) 2>&5
14716 ac_status=$?
14717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14718 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014719 ac_cv_var_tzname=yes
14720else
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014722sed 's/^/| /' conftest.$ac_ext >&5
14723
Martin v. Löwis11437992002-04-12 09:54:03 +000014724ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014725fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014728echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14729echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014730 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014731
14732cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014733#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014734_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014735
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014736 fi
14737fi
14738
Martin v. Löwis11437992002-04-12 09:54:03 +000014739echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14740echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14741if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14742 echo $ECHO_N "(cached) $ECHO_C" >&6
14743else
14744 cat >conftest.$ac_ext <<_ACEOF
14745#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014746/* confdefs.h. */
14747_ACEOF
14748cat confdefs.h >>conftest.$ac_ext
14749cat >>conftest.$ac_ext <<_ACEOF
14750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014751$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014752int
14753main ()
14754{
14755static struct stat ac_aggr;
14756if (ac_aggr.st_rdev)
14757return 0;
14758 ;
14759 return 0;
14760}
14761_ACEOF
14762rm -f conftest.$ac_objext
14763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14764 (eval $ac_compile) 2>&5
14765 ac_status=$?
14766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767 (exit $ac_status); } &&
14768 { ac_try='test -s conftest.$ac_objext'
14769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14770 (eval $ac_try) 2>&5
14771 ac_status=$?
14772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14773 (exit $ac_status); }; }; then
14774 ac_cv_member_struct_stat_st_rdev=yes
14775else
14776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014777sed 's/^/| /' conftest.$ac_ext >&5
14778
14779cat >conftest.$ac_ext <<_ACEOF
14780#line $LINENO "configure"
14781/* confdefs.h. */
14782_ACEOF
14783cat confdefs.h >>conftest.$ac_ext
14784cat >>conftest.$ac_ext <<_ACEOF
14785/* end confdefs.h. */
14786$ac_includes_default
14787int
14788main ()
14789{
14790static struct stat ac_aggr;
14791if (sizeof ac_aggr.st_rdev)
14792return 0;
14793 ;
14794 return 0;
14795}
14796_ACEOF
14797rm -f conftest.$ac_objext
14798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14799 (eval $ac_compile) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); } &&
14803 { ac_try='test -s conftest.$ac_objext'
14804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14805 (eval $ac_try) 2>&5
14806 ac_status=$?
14807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); }; }; then
14809 ac_cv_member_struct_stat_st_rdev=yes
14810else
14811 echo "$as_me: failed program was:" >&5
14812sed 's/^/| /' conftest.$ac_ext >&5
14813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814ac_cv_member_struct_stat_st_rdev=no
14815fi
14816rm -f conftest.$ac_objext conftest.$ac_ext
14817fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014818rm -f conftest.$ac_objext conftest.$ac_ext
14819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014820echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14821echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14822if test $ac_cv_member_struct_stat_st_rdev = yes; then
14823
14824cat >>confdefs.h <<_ACEOF
14825#define HAVE_STRUCT_STAT_ST_RDEV 1
14826_ACEOF
14827
14828
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014829fi
14830
Martin v. Löwis11437992002-04-12 09:54:03 +000014831echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14832echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14833if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14834 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014835else
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 cat >conftest.$ac_ext <<_ACEOF
14837#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* confdefs.h. */
14839_ACEOF
14840cat confdefs.h >>conftest.$ac_ext
14841cat >>conftest.$ac_ext <<_ACEOF
14842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014843$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014844int
14845main ()
14846{
14847static struct stat ac_aggr;
14848if (ac_aggr.st_blksize)
14849return 0;
14850 ;
14851 return 0;
14852}
14853_ACEOF
14854rm -f conftest.$ac_objext
14855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14856 (eval $ac_compile) 2>&5
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); } &&
14860 { ac_try='test -s conftest.$ac_objext'
14861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14862 (eval $ac_try) 2>&5
14863 ac_status=$?
14864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865 (exit $ac_status); }; }; then
14866 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014867else
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014869sed 's/^/| /' conftest.$ac_ext >&5
14870
14871cat >conftest.$ac_ext <<_ACEOF
14872#line $LINENO "configure"
14873/* confdefs.h. */
14874_ACEOF
14875cat confdefs.h >>conftest.$ac_ext
14876cat >>conftest.$ac_ext <<_ACEOF
14877/* end confdefs.h. */
14878$ac_includes_default
14879int
14880main ()
14881{
14882static struct stat ac_aggr;
14883if (sizeof ac_aggr.st_blksize)
14884return 0;
14885 ;
14886 return 0;
14887}
14888_ACEOF
14889rm -f conftest.$ac_objext
14890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14891 (eval $ac_compile) 2>&5
14892 ac_status=$?
14893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14894 (exit $ac_status); } &&
14895 { ac_try='test -s conftest.$ac_objext'
14896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14897 (eval $ac_try) 2>&5
14898 ac_status=$?
14899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14900 (exit $ac_status); }; }; then
14901 ac_cv_member_struct_stat_st_blksize=yes
14902else
14903 echo "$as_me: failed program was:" >&5
14904sed 's/^/| /' conftest.$ac_ext >&5
14905
Martin v. Löwis11437992002-04-12 09:54:03 +000014906ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014907fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014908rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014909fi
Skip Montanaro6dead952003-09-25 14:50:04 +000014910rm -f conftest.$ac_objext conftest.$ac_ext
14911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014912echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14913echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14914if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014915
Martin v. Löwis11437992002-04-12 09:54:03 +000014916cat >>confdefs.h <<_ACEOF
14917#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14918_ACEOF
14919
14920
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014921fi
14922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14924echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14925if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14926 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014927else
Martin v. Löwis11437992002-04-12 09:54:03 +000014928 cat >conftest.$ac_ext <<_ACEOF
14929#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014930/* confdefs.h. */
14931_ACEOF
14932cat confdefs.h >>conftest.$ac_ext
14933cat >>conftest.$ac_ext <<_ACEOF
14934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014935$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014936int
14937main ()
14938{
14939static struct stat ac_aggr;
14940if (ac_aggr.st_blocks)
14941return 0;
14942 ;
14943 return 0;
14944}
14945_ACEOF
14946rm -f conftest.$ac_objext
14947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14948 (eval $ac_compile) 2>&5
14949 ac_status=$?
14950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951 (exit $ac_status); } &&
14952 { ac_try='test -s conftest.$ac_objext'
14953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14954 (eval $ac_try) 2>&5
14955 ac_status=$?
14956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14957 (exit $ac_status); }; }; then
14958 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014959else
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014961sed 's/^/| /' conftest.$ac_ext >&5
14962
14963cat >conftest.$ac_ext <<_ACEOF
14964#line $LINENO "configure"
14965/* confdefs.h. */
14966_ACEOF
14967cat confdefs.h >>conftest.$ac_ext
14968cat >>conftest.$ac_ext <<_ACEOF
14969/* end confdefs.h. */
14970$ac_includes_default
14971int
14972main ()
14973{
14974static struct stat ac_aggr;
14975if (sizeof ac_aggr.st_blocks)
14976return 0;
14977 ;
14978 return 0;
14979}
14980_ACEOF
14981rm -f conftest.$ac_objext
14982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14983 (eval $ac_compile) 2>&5
14984 ac_status=$?
14985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14986 (exit $ac_status); } &&
14987 { ac_try='test -s conftest.$ac_objext'
14988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14989 (eval $ac_try) 2>&5
14990 ac_status=$?
14991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14992 (exit $ac_status); }; }; then
14993 ac_cv_member_struct_stat_st_blocks=yes
14994else
14995 echo "$as_me: failed program was:" >&5
14996sed 's/^/| /' conftest.$ac_ext >&5
14997
Martin v. Löwis11437992002-04-12 09:54:03 +000014998ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015000rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015001fi
Skip Montanaro6dead952003-09-25 14:50:04 +000015002rm -f conftest.$ac_objext conftest.$ac_ext
15003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015004echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15005echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15006if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015007
Martin v. Löwis11437992002-04-12 09:54:03 +000015008cat >>confdefs.h <<_ACEOF
15009#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15010_ACEOF
15011
15012
15013cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015014#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015015_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015016
15017else
Martin v. Löwis11437992002-04-12 09:54:03 +000015018 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015019fi
15020
Michael W. Hudson54241132001-12-07 15:38:26 +000015021
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
15023echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15024echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15025if test "${ac_cv_header_time_altzone+set}" = set; then
15026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 cat >conftest.$ac_ext <<_ACEOF
15029#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015030/* confdefs.h. */
15031_ACEOF
15032cat confdefs.h >>conftest.$ac_ext
15033cat >>conftest.$ac_ext <<_ACEOF
15034/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015035#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015036int
15037main ()
15038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015039return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ;
15041 return 0;
15042}
15043_ACEOF
15044rm -f conftest.$ac_objext
15045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15046 (eval $ac_compile) 2>&5
15047 ac_status=$?
15048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15049 (exit $ac_status); } &&
15050 { ac_try='test -s conftest.$ac_objext'
15051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15052 (eval $ac_try) 2>&5
15053 ac_status=$?
15054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15055 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015056 ac_cv_header_time_altzone=yes
15057else
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015059sed 's/^/| /' conftest.$ac_ext >&5
15060
Martin v. Löwis11437992002-04-12 09:54:03 +000015061ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015063rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015064fi
15065
Martin v. Löwis11437992002-04-12 09:54:03 +000015066echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15067echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015068if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015069
15070cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015071#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015072_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015073
15074fi
15075
Guido van Rossumda88dad1995-01-26 00:46:29 +000015076was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015077echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15078echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15079cat >conftest.$ac_ext <<_ACEOF
15080#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* confdefs.h. */
15082_ACEOF
15083cat confdefs.h >>conftest.$ac_ext
15084cat >>conftest.$ac_ext <<_ACEOF
15085/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015086
15087#include <sys/types.h>
15088#include <sys/select.h>
15089#include <sys/time.h>
15090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091int
15092main ()
15093{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015094;
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 ;
15096 return 0;
15097}
15098_ACEOF
15099rm -f conftest.$ac_objext
15100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15101 (eval $ac_compile) 2>&5
15102 ac_status=$?
15103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15104 (exit $ac_status); } &&
15105 { ac_try='test -s conftest.$ac_objext'
15106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15107 (eval $ac_try) 2>&5
15108 ac_status=$?
15109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15110 (exit $ac_status); }; }; then
15111
15112
15113cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015114#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015115_ACEOF
15116
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015117 was_it_defined=yes
15118
Guido van Rossumf78abae1997-01-21 22:02:36 +000015119else
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015121sed 's/^/| /' conftest.$ac_ext >&5
15122
Guido van Rossum7f43da71994-08-01 12:15:30 +000015123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015124rm -f conftest.$ac_objext conftest.$ac_ext
15125echo "$as_me:$LINENO: result: $was_it_defined" >&5
15126echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015127
Martin v. Löwis11437992002-04-12 09:54:03 +000015128echo "$as_me:$LINENO: checking for addrinfo" >&5
15129echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15130if test "${ac_cv_struct_addrinfo+set}" = set; then
15131 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015132else
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 cat >conftest.$ac_ext <<_ACEOF
15134#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015135/* confdefs.h. */
15136_ACEOF
15137cat confdefs.h >>conftest.$ac_ext
15138cat >>conftest.$ac_ext <<_ACEOF
15139/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015140
15141# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015142int
15143main ()
15144{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015145struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 ;
15147 return 0;
15148}
15149_ACEOF
15150rm -f conftest.$ac_objext
15151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15152 (eval $ac_compile) 2>&5
15153 ac_status=$?
15154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15155 (exit $ac_status); } &&
15156 { ac_try='test -s conftest.$ac_objext'
15157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15158 (eval $ac_try) 2>&5
15159 ac_status=$?
15160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15161 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015162 ac_cv_struct_addrinfo=yes
15163else
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015165sed 's/^/| /' conftest.$ac_ext >&5
15166
Martin v. Löwis11437992002-04-12 09:54:03 +000015167ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015169rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015170fi
15171
Martin v. Löwis11437992002-04-12 09:54:03 +000015172echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15173echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015174if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015175
15176cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015177#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015178_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015179
15180fi
15181
Martin v. Löwis11437992002-04-12 09:54:03 +000015182echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15183echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15184if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15185 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015186else
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 cat >conftest.$ac_ext <<_ACEOF
15188#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015189/* confdefs.h. */
15190_ACEOF
15191cat confdefs.h >>conftest.$ac_ext
15192cat >>conftest.$ac_ext <<_ACEOF
15193/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015194
15195# include <sys/types.h>
15196# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015197int
15198main ()
15199{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015200struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;
15202 return 0;
15203}
15204_ACEOF
15205rm -f conftest.$ac_objext
15206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15207 (eval $ac_compile) 2>&5
15208 ac_status=$?
15209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15210 (exit $ac_status); } &&
15211 { ac_try='test -s conftest.$ac_objext'
15212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15213 (eval $ac_try) 2>&5
15214 ac_status=$?
15215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15216 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015217 ac_cv_struct_sockaddr_storage=yes
15218else
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015220sed 's/^/| /' conftest.$ac_ext >&5
15221
Martin v. Löwis11437992002-04-12 09:54:03 +000015222ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015224rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015225fi
15226
Martin v. Löwis11437992002-04-12 09:54:03 +000015227echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15228echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015229if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
15231cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015232#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015233_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015234
15235fi
15236
Guido van Rossum627b2d71993-12-24 10:39:16 +000015237# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015238
Michael W. Hudson54241132001-12-07 15:38:26 +000015239
Martin v. Löwis11437992002-04-12 09:54:03 +000015240echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15241echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15242if test "${ac_cv_c_char_unsigned+set}" = set; then
15243 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015244else
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 cat >conftest.$ac_ext <<_ACEOF
15246#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015247/* confdefs.h. */
15248_ACEOF
15249cat confdefs.h >>conftest.$ac_ext
15250cat >>conftest.$ac_ext <<_ACEOF
15251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015252$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015253int
15254main ()
15255{
15256static int test_array [1 - 2 * !(((char) -1) < 0)];
15257test_array [0] = 0
15258
15259 ;
15260 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015261}
Martin v. Löwis11437992002-04-12 09:54:03 +000015262_ACEOF
15263rm -f conftest.$ac_objext
15264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15265 (eval $ac_compile) 2>&5
15266 ac_status=$?
15267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15268 (exit $ac_status); } &&
15269 { ac_try='test -s conftest.$ac_objext'
15270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15271 (eval $ac_try) 2>&5
15272 ac_status=$?
15273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15274 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015275 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015276else
15277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015278sed 's/^/| /' conftest.$ac_ext >&5
15279
Martin v. Löwis11437992002-04-12 09:54:03 +000015280ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015282rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015284echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15285echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015286if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015288#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015289_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015290
15291fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015292
Martin v. Löwis11437992002-04-12 09:54:03 +000015293echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15294echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15295if test "${ac_cv_c_const+set}" = set; then
15296 echo $ECHO_N "(cached) $ECHO_C" >&6
15297else
15298 cat >conftest.$ac_ext <<_ACEOF
15299#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015300/* confdefs.h. */
15301_ACEOF
15302cat confdefs.h >>conftest.$ac_ext
15303cat >>conftest.$ac_ext <<_ACEOF
15304/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015305
Martin v. Löwis11437992002-04-12 09:54:03 +000015306int
15307main ()
15308{
15309/* FIXME: Include the comments suggested by Paul. */
15310#ifndef __cplusplus
15311 /* Ultrix mips cc rejects this. */
15312 typedef int charset[2];
15313 const charset x;
15314 /* SunOS 4.1.1 cc rejects this. */
15315 char const *const *ccp;
15316 char **p;
15317 /* NEC SVR4.0.2 mips cc rejects this. */
15318 struct point {int x, y;};
15319 static struct point const zero = {0,0};
15320 /* AIX XL C 1.02.0.0 rejects this.
15321 It does not let you subtract one const X* pointer from another in
15322 an arm of an if-expression whose if-part is not a constant
15323 expression */
15324 const char *g = "string";
15325 ccp = &g + (g ? g-g : 0);
15326 /* HPUX 7.0 cc rejects these. */
15327 ++ccp;
15328 p = (char**) ccp;
15329 ccp = (char const *const *) p;
15330 { /* SCO 3.2v4 cc rejects this. */
15331 char *t;
15332 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015333
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 *t++ = 0;
15335 }
15336 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15337 int x[] = {25, 17};
15338 const int *foo = &x[0];
15339 ++foo;
15340 }
15341 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15342 typedef const int *iptr;
15343 iptr p = 0;
15344 ++p;
15345 }
15346 { /* AIX XL C 1.02.0.0 rejects this saying
15347 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15348 struct s { int j; const int *ap[3]; };
15349 struct s *b; b->j = 5;
15350 }
15351 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15352 const int foo = 10;
15353 }
15354#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015355
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 ;
15357 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015358}
Martin v. Löwis11437992002-04-12 09:54:03 +000015359_ACEOF
15360rm -f conftest.$ac_objext
15361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15362 (eval $ac_compile) 2>&5
15363 ac_status=$?
15364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15365 (exit $ac_status); } &&
15366 { ac_try='test -s conftest.$ac_objext'
15367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15368 (eval $ac_try) 2>&5
15369 ac_status=$?
15370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15371 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015372 ac_cv_c_const=yes
15373else
Martin v. Löwis11437992002-04-12 09:54:03 +000015374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015375sed 's/^/| /' conftest.$ac_ext >&5
15376
Martin v. Löwis11437992002-04-12 09:54:03 +000015377ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015379rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015381echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15382echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015383if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015384
15385cat >>confdefs.h <<\_ACEOF
15386#define const
15387_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015388
15389fi
15390
Michael W. Hudson54241132001-12-07 15:38:26 +000015391
Guido van Rossumda88dad1995-01-26 00:46:29 +000015392works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015393echo "$as_me:$LINENO: checking for working volatile" >&5
15394echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15395cat >conftest.$ac_ext <<_ACEOF
15396#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015397/* confdefs.h. */
15398_ACEOF
15399cat confdefs.h >>conftest.$ac_ext
15400cat >>conftest.$ac_ext <<_ACEOF
15401/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015402
Martin v. Löwis11437992002-04-12 09:54:03 +000015403int
15404main ()
15405{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015406volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 ;
15408 return 0;
15409}
15410_ACEOF
15411rm -f conftest.$ac_objext
15412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15413 (eval $ac_compile) 2>&5
15414 ac_status=$?
15415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15416 (exit $ac_status); } &&
15417 { ac_try='test -s conftest.$ac_objext'
15418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15419 (eval $ac_try) 2>&5
15420 ac_status=$?
15421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15422 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015423 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015424else
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015426sed 's/^/| /' conftest.$ac_ext >&5
15427
Martin v. Löwis11437992002-04-12 09:54:03 +000015428
15429cat >>confdefs.h <<\_ACEOF
15430#define volatile
15431_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015432
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015433
Guido van Rossum627b2d71993-12-24 10:39:16 +000015434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015435rm -f conftest.$ac_objext conftest.$ac_ext
15436echo "$as_me:$LINENO: result: $works" >&5
15437echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015438
Guido van Rossumda88dad1995-01-26 00:46:29 +000015439works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015440echo "$as_me:$LINENO: checking for working signed char" >&5
15441echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15442cat >conftest.$ac_ext <<_ACEOF
15443#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015444/* confdefs.h. */
15445_ACEOF
15446cat confdefs.h >>conftest.$ac_ext
15447cat >>conftest.$ac_ext <<_ACEOF
15448/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015449
Martin v. Löwis11437992002-04-12 09:54:03 +000015450int
15451main ()
15452{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015453signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 ;
15455 return 0;
15456}
15457_ACEOF
15458rm -f conftest.$ac_objext
15459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15460 (eval $ac_compile) 2>&5
15461 ac_status=$?
15462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463 (exit $ac_status); } &&
15464 { ac_try='test -s conftest.$ac_objext'
15465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15466 (eval $ac_try) 2>&5
15467 ac_status=$?
15468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015470 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015471else
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015473sed 's/^/| /' conftest.$ac_ext >&5
15474
Martin v. Löwis11437992002-04-12 09:54:03 +000015475
15476cat >>confdefs.h <<\_ACEOF
15477#define signed
15478_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015479
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015480
Guido van Rossum7f43da71994-08-01 12:15:30 +000015481fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015482rm -f conftest.$ac_objext conftest.$ac_ext
15483echo "$as_me:$LINENO: result: $works" >&5
15484echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015485
Guido van Rossumda88dad1995-01-26 00:46:29 +000015486have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015487echo "$as_me:$LINENO: checking for prototypes" >&5
15488echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15489cat >conftest.$ac_ext <<_ACEOF
15490#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015491/* confdefs.h. */
15492_ACEOF
15493cat confdefs.h >>conftest.$ac_ext
15494cat >>conftest.$ac_ext <<_ACEOF
15495/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015496int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015497int
15498main ()
15499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015500return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015501 ;
15502 return 0;
15503}
15504_ACEOF
15505rm -f conftest.$ac_objext
15506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15507 (eval $ac_compile) 2>&5
15508 ac_status=$?
15509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510 (exit $ac_status); } &&
15511 { ac_try='test -s conftest.$ac_objext'
15512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15513 (eval $ac_try) 2>&5
15514 ac_status=$?
15515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516 (exit $ac_status); }; }; then
15517
15518
15519cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015520#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015521_ACEOF
15522
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015523 have_prototypes=yes
15524
Guido van Rossumf78abae1997-01-21 22:02:36 +000015525else
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015527sed 's/^/| /' conftest.$ac_ext >&5
15528
Guido van Rossum7f43da71994-08-01 12:15:30 +000015529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015530rm -f conftest.$ac_objext conftest.$ac_ext
15531echo "$as_me:$LINENO: result: $have_prototypes" >&5
15532echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015533
Guido van Rossumda88dad1995-01-26 00:46:29 +000015534works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015535echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15536echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15537cat >conftest.$ac_ext <<_ACEOF
15538#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015539/* confdefs.h. */
15540_ACEOF
15541cat confdefs.h >>conftest.$ac_ext
15542cat >>conftest.$ac_ext <<_ACEOF
15543/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015544
15545#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015546int foo(int x, ...) {
15547 va_list va;
15548 va_start(va, x);
15549 va_arg(va, int);
15550 va_arg(va, char *);
15551 va_arg(va, double);
15552 return 0;
15553}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015554
Martin v. Löwis11437992002-04-12 09:54:03 +000015555int
15556main ()
15557{
Guido van Rossum90eea071996-08-30 20:58:57 +000015558return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015559 ;
15560 return 0;
15561}
15562_ACEOF
15563rm -f conftest.$ac_objext
15564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15565 (eval $ac_compile) 2>&5
15566 ac_status=$?
15567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15568 (exit $ac_status); } &&
15569 { ac_try='test -s conftest.$ac_objext'
15570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15571 (eval $ac_try) 2>&5
15572 ac_status=$?
15573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15574 (exit $ac_status); }; }; then
15575
15576
15577cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015578#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015579_ACEOF
15580
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015581 works=yes
15582
Guido van Rossumf78abae1997-01-21 22:02:36 +000015583else
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015585sed 's/^/| /' conftest.$ac_ext >&5
15586
Guido van Rossum627b2d71993-12-24 10:39:16 +000015587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015588rm -f conftest.$ac_objext conftest.$ac_ext
15589echo "$as_me:$LINENO: result: $works" >&5
15590echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015591
Guido van Rossumda88dad1995-01-26 00:46:29 +000015592if test "$have_prototypes" = yes; then
15593bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015594echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15595echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15596cat >conftest.$ac_ext <<_ACEOF
15597#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015598/* confdefs.h. */
15599_ACEOF
15600cat confdefs.h >>conftest.$ac_ext
15601cat >>conftest.$ac_ext <<_ACEOF
15602/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015603#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015604int
15605main ()
15606{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015607char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 ;
15609 return 0;
15610}
15611_ACEOF
15612rm -f conftest.$ac_objext
15613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15614 (eval $ac_compile) 2>&5
15615 ac_status=$?
15616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15617 (exit $ac_status); } &&
15618 { ac_try='test -s conftest.$ac_objext'
15619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15620 (eval $ac_try) 2>&5
15621 ac_status=$?
15622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15623 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015624 :
15625else
Martin v. Löwis11437992002-04-12 09:54:03 +000015626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015627sed 's/^/| /' conftest.$ac_ext >&5
15628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015631#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015632_ACEOF
15633
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015634 bad_prototypes=yes
15635
Guido van Rossum627b2d71993-12-24 10:39:16 +000015636fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015637rm -f conftest.$ac_objext conftest.$ac_ext
15638echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15639echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015640fi
15641
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015642# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015643echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15644echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15645cat >conftest.$ac_ext <<_ACEOF
15646#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015647/* confdefs.h. */
15648_ACEOF
15649cat confdefs.h >>conftest.$ac_ext
15650cat >>conftest.$ac_ext <<_ACEOF
15651/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015652#include <sys/types.h>
15653#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015654int
15655main ()
15656{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015657struct sockaddr x;
15658x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 ;
15660 return 0;
15661}
15662_ACEOF
15663rm -f conftest.$ac_objext
15664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15665 (eval $ac_compile) 2>&5
15666 ac_status=$?
15667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15668 (exit $ac_status); } &&
15669 { ac_try='test -s conftest.$ac_objext'
15670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15671 (eval $ac_try) 2>&5
15672 ac_status=$?
15673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15674 (exit $ac_status); }; }; then
15675 echo "$as_me:$LINENO: result: yes" >&5
15676echo "${ECHO_T}yes" >&6
15677
15678cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015679#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015680_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015681
15682else
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015684sed 's/^/| /' conftest.$ac_ext >&5
15685
Martin v. Löwis11437992002-04-12 09:54:03 +000015686echo "$as_me:$LINENO: result: no" >&5
15687echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015689rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015690
Guido van Rossumda88dad1995-01-26 00:46:29 +000015691va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015692echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15693echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15694cat >conftest.$ac_ext <<_ACEOF
15695#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015696/* confdefs.h. */
15697_ACEOF
15698cat confdefs.h >>conftest.$ac_ext
15699cat >>conftest.$ac_ext <<_ACEOF
15700/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015701
15702#ifdef HAVE_STDARG_PROTOTYPES
15703#include <stdarg.h>
15704#else
15705#include <varargs.h>
15706#endif
15707
Martin v. Löwis11437992002-04-12 09:54:03 +000015708int
15709main ()
15710{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015711va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015712 ;
15713 return 0;
15714}
15715_ACEOF
15716rm -f conftest.$ac_objext
15717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15718 (eval $ac_compile) 2>&5
15719 ac_status=$?
15720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15721 (exit $ac_status); } &&
15722 { ac_try='test -s conftest.$ac_objext'
15723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15724 (eval $ac_try) 2>&5
15725 ac_status=$?
15726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15727 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015728 :
15729else
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015731sed 's/^/| /' conftest.$ac_ext >&5
15732
Martin v. Löwis11437992002-04-12 09:54:03 +000015733
15734
15735cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015736#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737_ACEOF
15738
Guido van Rossumda88dad1995-01-26 00:46:29 +000015739 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015742rm -f conftest.$ac_objext conftest.$ac_ext
15743echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15744echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015745
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015746# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015747
15748
15749
15750echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15751echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15752if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015754else
Martin v. Löwis11437992002-04-12 09:54:03 +000015755 cat >conftest.$ac_ext <<_ACEOF
15756#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015757/* confdefs.h. */
15758_ACEOF
15759cat confdefs.h >>conftest.$ac_ext
15760cat >>conftest.$ac_ext <<_ACEOF
15761/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015762/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015763 which can conflict with char gethostbyname_r (); below.
15764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015765 <limits.h> exists even on freestanding compilers. Under hpux,
15766 including <limits.h> includes <sys/time.h> and causes problems
15767 checking for functions defined therein. */
15768#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015769# include <limits.h>
15770#else
15771# include <assert.h>
15772#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015773/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015774#ifdef __cplusplus
15775extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015776{
Martin v. Löwis11437992002-04-12 09:54:03 +000015777#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015778/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 builtin and then its argument prototype would still apply. */
15780char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015781/* The GNU C library defines this for functions which it implements
15782 to always fail with ENOSYS. Some functions are actually named
15783 something starting with __ and the normal name is an alias. */
15784#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15785choke me
15786#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015787char (*f) () = gethostbyname_r;
15788#endif
15789#ifdef __cplusplus
15790}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015791#endif
15792
Skip Montanaro6dead952003-09-25 14:50:04 +000015793int
15794main ()
15795{
15796return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015797 ;
15798 return 0;
15799}
15800_ACEOF
15801rm -f conftest.$ac_objext conftest$ac_exeext
15802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15803 (eval $ac_link) 2>&5
15804 ac_status=$?
15805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15806 (exit $ac_status); } &&
15807 { ac_try='test -s conftest$ac_exeext'
15808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15809 (eval $ac_try) 2>&5
15810 ac_status=$?
15811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15812 (exit $ac_status); }; }; then
15813 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015814else
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015816sed 's/^/| /' conftest.$ac_ext >&5
15817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015820rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015822echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15823echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15824if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015825
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015827#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015828_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015829
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15831echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015832 OLD_CFLAGS=$CFLAGS
15833 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 cat >conftest.$ac_ext <<_ACEOF
15835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015836/* confdefs.h. */
15837_ACEOF
15838cat confdefs.h >>conftest.$ac_ext
15839cat >>conftest.$ac_ext <<_ACEOF
15840/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015841
15842# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844int
15845main ()
15846{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015847
15848 char *name;
15849 struct hostent *he, *res;
15850 char buffer[2048];
15851 int buflen = 2048;
15852 int h_errnop;
15853
15854 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015855
15856 ;
15857 return 0;
15858}
15859_ACEOF
15860rm -f conftest.$ac_objext
15861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15862 (eval $ac_compile) 2>&5
15863 ac_status=$?
15864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15865 (exit $ac_status); } &&
15866 { ac_try='test -s conftest.$ac_objext'
15867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15868 (eval $ac_try) 2>&5
15869 ac_status=$?
15870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15871 (exit $ac_status); }; }; then
15872
15873 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015874#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015875_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015876
Martin v. Löwis11437992002-04-12 09:54:03 +000015877
15878cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015879#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015880_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 echo "$as_me:$LINENO: result: yes" >&5
15883echo "${ECHO_T}yes" >&6
15884
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015885else
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015887sed 's/^/| /' conftest.$ac_ext >&5
15888
Martin v. Löwis11437992002-04-12 09:54:03 +000015889
15890 echo "$as_me:$LINENO: result: no" >&5
15891echo "${ECHO_T}no" >&6
15892 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15893echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15894 cat >conftest.$ac_ext <<_ACEOF
15895#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015896/* confdefs.h. */
15897_ACEOF
15898cat confdefs.h >>conftest.$ac_ext
15899cat >>conftest.$ac_ext <<_ACEOF
15900/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015901
15902# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904int
15905main ()
15906{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015907
15908 char *name;
15909 struct hostent *he;
15910 char buffer[2048];
15911 int buflen = 2048;
15912 int h_errnop;
15913
15914 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015915
15916 ;
15917 return 0;
15918}
15919_ACEOF
15920rm -f conftest.$ac_objext
15921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15922 (eval $ac_compile) 2>&5
15923 ac_status=$?
15924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15925 (exit $ac_status); } &&
15926 { ac_try='test -s conftest.$ac_objext'
15927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15928 (eval $ac_try) 2>&5
15929 ac_status=$?
15930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15931 (exit $ac_status); }; }; then
15932
15933 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015934#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015935_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015936
Martin v. Löwis11437992002-04-12 09:54:03 +000015937
15938cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015939#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015940_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015941
Martin v. Löwis11437992002-04-12 09:54:03 +000015942 echo "$as_me:$LINENO: result: yes" >&5
15943echo "${ECHO_T}yes" >&6
15944
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015945else
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015947sed 's/^/| /' conftest.$ac_ext >&5
15948
Martin v. Löwis11437992002-04-12 09:54:03 +000015949
15950 echo "$as_me:$LINENO: result: no" >&5
15951echo "${ECHO_T}no" >&6
15952 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15953echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15954 cat >conftest.$ac_ext <<_ACEOF
15955#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015956/* confdefs.h. */
15957_ACEOF
15958cat confdefs.h >>conftest.$ac_ext
15959cat >>conftest.$ac_ext <<_ACEOF
15960/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015961
15962# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964int
15965main ()
15966{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015967
15968 char *name;
15969 struct hostent *he;
15970 struct hostent_data data;
15971
15972 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015973
15974 ;
15975 return 0;
15976}
15977_ACEOF
15978rm -f conftest.$ac_objext
15979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15980 (eval $ac_compile) 2>&5
15981 ac_status=$?
15982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15983 (exit $ac_status); } &&
15984 { ac_try='test -s conftest.$ac_objext'
15985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15986 (eval $ac_try) 2>&5
15987 ac_status=$?
15988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15989 (exit $ac_status); }; }; then
15990
15991 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015992#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015993_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015994
Martin v. Löwis11437992002-04-12 09:54:03 +000015995
15996cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015997#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015998_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015999
Martin v. Löwis11437992002-04-12 09:54:03 +000016000 echo "$as_me:$LINENO: result: yes" >&5
16001echo "${ECHO_T}yes" >&6
16002
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016003else
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016005sed 's/^/| /' conftest.$ac_ext >&5
16006
Martin v. Löwis11437992002-04-12 09:54:03 +000016007
16008 echo "$as_me:$LINENO: result: no" >&5
16009echo "${ECHO_T}no" >&6
16010
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016012rm -f conftest.$ac_objext conftest.$ac_ext
16013
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016015rm -f conftest.$ac_objext conftest.$ac_ext
16016
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016018rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016019 CFLAGS=$OLD_CFLAGS
16020
16021else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023
16024for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016025do
Martin v. Löwis11437992002-04-12 09:54:03 +000016026as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16027echo "$as_me:$LINENO: checking for $ac_func" >&5
16028echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16029if eval "test \"\${$as_ac_var+set}\" = set"; then
16030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016031else
Martin v. Löwis11437992002-04-12 09:54:03 +000016032 cat >conftest.$ac_ext <<_ACEOF
16033#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016034/* confdefs.h. */
16035_ACEOF
16036cat confdefs.h >>conftest.$ac_ext
16037cat >>conftest.$ac_ext <<_ACEOF
16038/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016039/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016040 which can conflict with char $ac_func (); below.
16041 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016042 <limits.h> exists even on freestanding compilers. Under hpux,
16043 including <limits.h> includes <sys/time.h> and causes problems
16044 checking for functions defined therein. */
16045#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016046# include <limits.h>
16047#else
16048# include <assert.h>
16049#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016050/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016051#ifdef __cplusplus
16052extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016053{
Martin v. Löwis11437992002-04-12 09:54:03 +000016054#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016055/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 builtin and then its argument prototype would still apply. */
16057char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016058/* The GNU C library defines this for functions which it implements
16059 to always fail with ENOSYS. Some functions are actually named
16060 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016061#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016062choke me
16063#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016064char (*f) () = $ac_func;
16065#endif
16066#ifdef __cplusplus
16067}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016068#endif
16069
Skip Montanaro6dead952003-09-25 14:50:04 +000016070int
16071main ()
16072{
16073return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 ;
16075 return 0;
16076}
16077_ACEOF
16078rm -f conftest.$ac_objext conftest$ac_exeext
16079if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16080 (eval $ac_link) 2>&5
16081 ac_status=$?
16082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16083 (exit $ac_status); } &&
16084 { ac_try='test -s conftest$ac_exeext'
16085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16086 (eval $ac_try) 2>&5
16087 ac_status=$?
16088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16089 (exit $ac_status); }; }; then
16090 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016091else
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016093sed 's/^/| /' conftest.$ac_ext >&5
16094
Martin v. Löwis11437992002-04-12 09:54:03 +000016095eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016097rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016098fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016099echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16100echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16101if test `eval echo '${'$as_ac_var'}'` = yes; then
16102 cat >>confdefs.h <<_ACEOF
16103#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16104_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016105
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016106fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016107done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016108
Michael W. Hudson54241132001-12-07 15:38:26 +000016109
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016110fi
16111
Michael W. Hudson54241132001-12-07 15:38:26 +000016112
16113
16114
16115
16116
16117
Guido van Rossum627b2d71993-12-24 10:39:16 +000016118# checks for system services
16119# (none yet)
16120
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016121# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016122echo "$as_me:$LINENO: checking for __fpu_control" >&5
16123echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16124if test "${ac_cv_func___fpu_control+set}" = set; then
16125 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016126else
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 cat >conftest.$ac_ext <<_ACEOF
16128#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016129/* confdefs.h. */
16130_ACEOF
16131cat confdefs.h >>conftest.$ac_ext
16132cat >>conftest.$ac_ext <<_ACEOF
16133/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016134/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016135 which can conflict with char __fpu_control (); below.
16136 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016137 <limits.h> exists even on freestanding compilers. Under hpux,
16138 including <limits.h> includes <sys/time.h> and causes problems
16139 checking for functions defined therein. */
16140#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016141# include <limits.h>
16142#else
16143# include <assert.h>
16144#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016145/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016146#ifdef __cplusplus
16147extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016148{
Martin v. Löwis11437992002-04-12 09:54:03 +000016149#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016150/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 builtin and then its argument prototype would still apply. */
16152char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016153/* The GNU C library defines this for functions which it implements
16154 to always fail with ENOSYS. Some functions are actually named
16155 something starting with __ and the normal name is an alias. */
16156#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16157choke me
16158#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016159char (*f) () = __fpu_control;
16160#endif
16161#ifdef __cplusplus
16162}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016163#endif
16164
Skip Montanaro6dead952003-09-25 14:50:04 +000016165int
16166main ()
16167{
16168return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 ;
16170 return 0;
16171}
16172_ACEOF
16173rm -f conftest.$ac_objext conftest$ac_exeext
16174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16175 (eval $ac_link) 2>&5
16176 ac_status=$?
16177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16178 (exit $ac_status); } &&
16179 { ac_try='test -s conftest$ac_exeext'
16180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16181 (eval $ac_try) 2>&5
16182 ac_status=$?
16183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16184 (exit $ac_status); }; }; then
16185 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016186else
Martin v. Löwis11437992002-04-12 09:54:03 +000016187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016188sed 's/^/| /' conftest.$ac_ext >&5
16189
Martin v. Löwis11437992002-04-12 09:54:03 +000016190ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016192rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016194echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16195echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16196if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016197 :
16198else
Martin v. Löwis11437992002-04-12 09:54:03 +000016199
16200echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16201echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16202if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16203 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016204else
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016206LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016207cat >conftest.$ac_ext <<_ACEOF
16208#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016209/* confdefs.h. */
16210_ACEOF
16211cat confdefs.h >>conftest.$ac_ext
16212cat >>conftest.$ac_ext <<_ACEOF
16213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016214
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016215/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016216#ifdef __cplusplus
16217extern "C"
16218#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +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 ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016222int
16223main ()
16224{
16225__fpu_control ();
16226 ;
16227 return 0;
16228}
16229_ACEOF
16230rm -f conftest.$ac_objext conftest$ac_exeext
16231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16232 (eval $ac_link) 2>&5
16233 ac_status=$?
16234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16235 (exit $ac_status); } &&
16236 { ac_try='test -s conftest$ac_exeext'
16237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16238 (eval $ac_try) 2>&5
16239 ac_status=$?
16240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16241 (exit $ac_status); }; }; then
16242 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016243else
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016245sed 's/^/| /' conftest.$ac_ext >&5
16246
Martin v. Löwis11437992002-04-12 09:54:03 +000016247ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016248fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016249rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16250LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016252echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16253echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16254if test $ac_cv_lib_ieee___fpu_control = yes; then
16255 cat >>confdefs.h <<_ACEOF
16256#define HAVE_LIBIEEE 1
16257_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016258
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016259 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016260
Guido van Rossum627b2d71993-12-24 10:39:16 +000016261fi
16262
Michael W. Hudson54241132001-12-07 15:38:26 +000016263
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016264fi
16265
Michael W. Hudson54241132001-12-07 15:38:26 +000016266
Guido van Rossum7f253911997-05-09 02:42:48 +000016267# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016268echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16269echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16270
Guido van Rossum7f253911997-05-09 02:42:48 +000016271# Check whether --with-fpectl or --without-fpectl was given.
16272if test "${with_fpectl+set}" = set; then
16273 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016274
Guido van Rossum7f253911997-05-09 02:42:48 +000016275if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016276then
16277
16278cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016279#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016280_ACEOF
16281
16282 echo "$as_me:$LINENO: result: yes" >&5
16283echo "${ECHO_T}yes" >&6
16284else echo "$as_me:$LINENO: result: no" >&5
16285echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016286fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016287else
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 echo "$as_me:$LINENO: result: no" >&5
16289echo "${ECHO_T}no" >&6
16290fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016291
Guido van Rossum7f43da71994-08-01 12:15:30 +000016292# check for --with-libm=...
16293
Guido van Rossum563e7081996-09-10 18:20:48 +000016294case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016295Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016296BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016297*) LIBM=-lm
16298esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016299echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16300echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16301
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016302# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016303if test "${with_libm+set}" = set; then
16304 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016305
Guido van Rossum7f253911997-05-09 02:42:48 +000016306if test "$withval" = no
16307then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016308 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16309echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016310elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016311then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16313echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16314else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16315echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16316 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016317fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016318else
Martin v. Löwis11437992002-04-12 09:54:03 +000016319 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16320echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16321fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016322
16323# check for --with-libc=...
16324
Martin v. Löwis11437992002-04-12 09:54:03 +000016325echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16326echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16327
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016328# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016329if test "${with_libc+set}" = set; then
16330 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016331
Guido van Rossum7f253911997-05-09 02:42:48 +000016332if test "$withval" = no
16333then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016334 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16335echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016336elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016337then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16339echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16340else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16341echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16342 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016343fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016344else
Martin v. Löwis11437992002-04-12 09:54:03 +000016345 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16346echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16347fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016348
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016349# check for hypot() in math library
16350LIBS_SAVE=$LIBS
16351LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016352
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016353for ac_func in hypot
16354do
Martin v. Löwis11437992002-04-12 09:54:03 +000016355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16356echo "$as_me:$LINENO: checking for $ac_func" >&5
16357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16358if eval "test \"\${$as_ac_var+set}\" = set"; then
16359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016360else
Martin v. Löwis11437992002-04-12 09:54:03 +000016361 cat >conftest.$ac_ext <<_ACEOF
16362#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016363/* confdefs.h. */
16364_ACEOF
16365cat confdefs.h >>conftest.$ac_ext
16366cat >>conftest.$ac_ext <<_ACEOF
16367/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016368/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016369 which can conflict with char $ac_func (); below.
16370 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016371 <limits.h> exists even on freestanding compilers. Under hpux,
16372 including <limits.h> includes <sys/time.h> and causes problems
16373 checking for functions defined therein. */
16374#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016375# include <limits.h>
16376#else
16377# include <assert.h>
16378#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016379/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016380#ifdef __cplusplus
16381extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016382{
Martin v. Löwis11437992002-04-12 09:54:03 +000016383#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016384/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 builtin and then its argument prototype would still apply. */
16386char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016387/* The GNU C library defines this for functions which it implements
16388 to always fail with ENOSYS. Some functions are actually named
16389 something starting with __ and the normal name is an alias. */
16390#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16391choke me
16392#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016393char (*f) () = $ac_func;
16394#endif
16395#ifdef __cplusplus
16396}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016397#endif
16398
Skip Montanaro6dead952003-09-25 14:50:04 +000016399int
16400main ()
16401{
16402return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 ;
16404 return 0;
16405}
16406_ACEOF
16407rm -f conftest.$ac_objext conftest$ac_exeext
16408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16409 (eval $ac_link) 2>&5
16410 ac_status=$?
16411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16412 (exit $ac_status); } &&
16413 { ac_try='test -s conftest$ac_exeext'
16414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16415 (eval $ac_try) 2>&5
16416 ac_status=$?
16417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16418 (exit $ac_status); }; }; then
16419 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016420else
Martin v. Löwis11437992002-04-12 09:54:03 +000016421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016422sed 's/^/| /' conftest.$ac_ext >&5
16423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016428echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16429echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16430if test `eval echo '${'$as_ac_var'}'` = yes; then
16431 cat >>confdefs.h <<_ACEOF
16432#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16433_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016434
Michael W. Hudson54241132001-12-07 15:38:26 +000016435else
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016437fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016438done
16439
Michael W. Hudson54241132001-12-07 15:38:26 +000016440
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016441LIBS=$LIBS_SAVE
16442
Guido van Rossumef2255b2000-03-10 22:30:29 +000016443# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016444if test "${ac_cv_header_wchar_h+set}" = set; then
16445 echo "$as_me:$LINENO: checking for wchar.h" >&5
16446echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16447if test "${ac_cv_header_wchar_h+set}" = set; then
16448 echo $ECHO_N "(cached) $ECHO_C" >&6
16449fi
16450echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16451echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016452else
Martin v. Löwis11437992002-04-12 09:54:03 +000016453 # Is the header compilable?
16454echo "$as_me:$LINENO: checking wchar.h usability" >&5
16455echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16456cat >conftest.$ac_ext <<_ACEOF
16457#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016458/* confdefs.h. */
16459_ACEOF
16460cat confdefs.h >>conftest.$ac_ext
16461cat >>conftest.$ac_ext <<_ACEOF
16462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016463$ac_includes_default
16464#include <wchar.h>
16465_ACEOF
16466rm -f conftest.$ac_objext
16467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16468 (eval $ac_compile) 2>&5
16469 ac_status=$?
16470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16471 (exit $ac_status); } &&
16472 { ac_try='test -s conftest.$ac_objext'
16473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16474 (eval $ac_try) 2>&5
16475 ac_status=$?
16476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16477 (exit $ac_status); }; }; then
16478 ac_header_compiler=yes
16479else
16480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016481sed 's/^/| /' conftest.$ac_ext >&5
16482
Martin v. Löwis11437992002-04-12 09:54:03 +000016483ac_header_compiler=no
16484fi
16485rm -f conftest.$ac_objext conftest.$ac_ext
16486echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16487echo "${ECHO_T}$ac_header_compiler" >&6
16488
16489# Is the header present?
16490echo "$as_me:$LINENO: checking wchar.h presence" >&5
16491echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16492cat >conftest.$ac_ext <<_ACEOF
16493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016494/* confdefs.h. */
16495_ACEOF
16496cat confdefs.h >>conftest.$ac_ext
16497cat >>conftest.$ac_ext <<_ACEOF
16498/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016499#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016500_ACEOF
16501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16503 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016504 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 rm -f conftest.er1
16506 cat conftest.err >&5
16507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16508 (exit $ac_status); } >/dev/null; then
16509 if test -s conftest.err; then
16510 ac_cpp_err=$ac_c_preproc_warn_flag
16511 else
16512 ac_cpp_err=
16513 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016514else
Martin v. Löwis11437992002-04-12 09:54:03 +000016515 ac_cpp_err=yes
16516fi
16517if test -z "$ac_cpp_err"; then
16518 ac_header_preproc=yes
16519else
16520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016521sed 's/^/| /' conftest.$ac_ext >&5
16522
Martin v. Löwis11437992002-04-12 09:54:03 +000016523 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016525rm -f conftest.err conftest.$ac_ext
16526echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16527echo "${ECHO_T}$ac_header_preproc" >&6
16528
16529# So? What about this header?
16530case $ac_header_compiler:$ac_header_preproc in
16531 yes:no )
16532 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16533echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16534 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016535echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16536 (
16537 cat <<\_ASBOX
16538## ------------------------------------ ##
16539## Report this to bug-autoconf@gnu.org. ##
16540## ------------------------------------ ##
16541_ASBOX
16542 ) |
16543 sed "s/^/$as_me: WARNING: /" >&2
16544 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 no:yes )
16546 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16547echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16548 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16549echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16550 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016551echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16552 (
16553 cat <<\_ASBOX
16554## ------------------------------------ ##
16555## Report this to bug-autoconf@gnu.org. ##
16556## ------------------------------------ ##
16557_ASBOX
16558 ) |
16559 sed "s/^/$as_me: WARNING: /" >&2
16560 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016561esac
16562echo "$as_me:$LINENO: checking for wchar.h" >&5
16563echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16564if test "${ac_cv_header_wchar_h+set}" = set; then
16565 echo $ECHO_N "(cached) $ECHO_C" >&6
16566else
16567 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016569echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16570echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16571
16572fi
16573if test $ac_cv_header_wchar_h = yes; then
16574
16575
16576cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016577#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016578_ACEOF
16579
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016580 wchar_h="yes"
16581
Guido van Rossumef2255b2000-03-10 22:30:29 +000016582else
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016584
16585fi
16586
Michael W. Hudson54241132001-12-07 15:38:26 +000016587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016589# determine wchar_t size
16590if test "$wchar_h" = yes
16591then
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 echo "$as_me:$LINENO: checking for wchar_t" >&5
16593echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16594if test "${ac_cv_type_wchar_t+set}" = set; then
16595 echo $ECHO_N "(cached) $ECHO_C" >&6
16596else
16597 cat >conftest.$ac_ext <<_ACEOF
16598#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016599/* confdefs.h. */
16600_ACEOF
16601cat confdefs.h >>conftest.$ac_ext
16602cat >>conftest.$ac_ext <<_ACEOF
16603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016604#include <wchar.h>
16605
Martin v. Löwis11437992002-04-12 09:54:03 +000016606int
16607main ()
16608{
16609if ((wchar_t *) 0)
16610 return 0;
16611if (sizeof (wchar_t))
16612 return 0;
16613 ;
16614 return 0;
16615}
16616_ACEOF
16617rm -f conftest.$ac_objext
16618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16619 (eval $ac_compile) 2>&5
16620 ac_status=$?
16621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16622 (exit $ac_status); } &&
16623 { ac_try='test -s conftest.$ac_objext'
16624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16625 (eval $ac_try) 2>&5
16626 ac_status=$?
16627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16628 (exit $ac_status); }; }; then
16629 ac_cv_type_wchar_t=yes
16630else
16631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016632sed 's/^/| /' conftest.$ac_ext >&5
16633
Martin v. Löwis11437992002-04-12 09:54:03 +000016634ac_cv_type_wchar_t=no
16635fi
16636rm -f conftest.$ac_objext conftest.$ac_ext
16637fi
16638echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16639echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16640
16641echo "$as_me:$LINENO: checking size of wchar_t" >&5
16642echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16643if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16644 echo $ECHO_N "(cached) $ECHO_C" >&6
16645else
16646 if test "$ac_cv_type_wchar_t" = yes; then
16647 # The cast to unsigned long works around a bug in the HP C Compiler
16648 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16649 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16650 # This bug is HP SR number 8606223364.
16651 if test "$cross_compiling" = yes; then
16652 # Depending upon the size, compute the lo and hi bounds.
16653cat >conftest.$ac_ext <<_ACEOF
16654#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016655/* confdefs.h. */
16656_ACEOF
16657cat confdefs.h >>conftest.$ac_ext
16658cat >>conftest.$ac_ext <<_ACEOF
16659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016660#include <wchar.h>
16661
Martin v. Löwis11437992002-04-12 09:54:03 +000016662int
16663main ()
16664{
16665static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16666test_array [0] = 0
16667
16668 ;
16669 return 0;
16670}
16671_ACEOF
16672rm -f conftest.$ac_objext
16673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16674 (eval $ac_compile) 2>&5
16675 ac_status=$?
16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16677 (exit $ac_status); } &&
16678 { ac_try='test -s conftest.$ac_objext'
16679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16680 (eval $ac_try) 2>&5
16681 ac_status=$?
16682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16683 (exit $ac_status); }; }; then
16684 ac_lo=0 ac_mid=0
16685 while :; do
16686 cat >conftest.$ac_ext <<_ACEOF
16687#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016688/* confdefs.h. */
16689_ACEOF
16690cat confdefs.h >>conftest.$ac_ext
16691cat >>conftest.$ac_ext <<_ACEOF
16692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016693#include <wchar.h>
16694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695int
16696main ()
16697{
16698static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16699test_array [0] = 0
16700
16701 ;
16702 return 0;
16703}
16704_ACEOF
16705rm -f conftest.$ac_objext
16706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16707 (eval $ac_compile) 2>&5
16708 ac_status=$?
16709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16710 (exit $ac_status); } &&
16711 { ac_try='test -s conftest.$ac_objext'
16712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16713 (eval $ac_try) 2>&5
16714 ac_status=$?
16715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16716 (exit $ac_status); }; }; then
16717 ac_hi=$ac_mid; break
16718else
16719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016720sed 's/^/| /' conftest.$ac_ext >&5
16721
Martin v. Löwis11437992002-04-12 09:54:03 +000016722ac_lo=`expr $ac_mid + 1`
16723 if test $ac_lo -le $ac_mid; then
16724 ac_lo= ac_hi=
16725 break
16726 fi
16727 ac_mid=`expr 2 '*' $ac_mid + 1`
16728fi
16729rm -f conftest.$ac_objext conftest.$ac_ext
16730 done
16731else
16732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016733sed 's/^/| /' conftest.$ac_ext >&5
16734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735cat >conftest.$ac_ext <<_ACEOF
16736#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016737/* confdefs.h. */
16738_ACEOF
16739cat confdefs.h >>conftest.$ac_ext
16740cat >>conftest.$ac_ext <<_ACEOF
16741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016742#include <wchar.h>
16743
Martin v. Löwis11437992002-04-12 09:54:03 +000016744int
16745main ()
16746{
16747static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16748test_array [0] = 0
16749
16750 ;
16751 return 0;
16752}
16753_ACEOF
16754rm -f conftest.$ac_objext
16755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16756 (eval $ac_compile) 2>&5
16757 ac_status=$?
16758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16759 (exit $ac_status); } &&
16760 { ac_try='test -s conftest.$ac_objext'
16761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16762 (eval $ac_try) 2>&5
16763 ac_status=$?
16764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16765 (exit $ac_status); }; }; then
16766 ac_hi=-1 ac_mid=-1
16767 while :; do
16768 cat >conftest.$ac_ext <<_ACEOF
16769#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016770/* confdefs.h. */
16771_ACEOF
16772cat confdefs.h >>conftest.$ac_ext
16773cat >>conftest.$ac_ext <<_ACEOF
16774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016775#include <wchar.h>
16776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777int
16778main ()
16779{
16780static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16781test_array [0] = 0
16782
16783 ;
16784 return 0;
16785}
16786_ACEOF
16787rm -f conftest.$ac_objext
16788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16789 (eval $ac_compile) 2>&5
16790 ac_status=$?
16791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16792 (exit $ac_status); } &&
16793 { ac_try='test -s conftest.$ac_objext'
16794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16795 (eval $ac_try) 2>&5
16796 ac_status=$?
16797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16798 (exit $ac_status); }; }; then
16799 ac_lo=$ac_mid; break
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 +000016804ac_hi=`expr '(' $ac_mid ')' - 1`
16805 if test $ac_mid -le $ac_hi; then
16806 ac_lo= ac_hi=
16807 break
16808 fi
16809 ac_mid=`expr 2 '*' $ac_mid`
16810fi
16811rm -f conftest.$ac_objext conftest.$ac_ext
16812 done
16813else
16814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016815sed 's/^/| /' conftest.$ac_ext >&5
16816
Martin v. Löwis11437992002-04-12 09:54:03 +000016817ac_lo= ac_hi=
16818fi
16819rm -f conftest.$ac_objext conftest.$ac_ext
16820fi
16821rm -f conftest.$ac_objext conftest.$ac_ext
16822# Binary search between lo and hi bounds.
16823while test "x$ac_lo" != "x$ac_hi"; do
16824 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16825 cat >conftest.$ac_ext <<_ACEOF
16826#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016827/* confdefs.h. */
16828_ACEOF
16829cat confdefs.h >>conftest.$ac_ext
16830cat >>conftest.$ac_ext <<_ACEOF
16831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016832#include <wchar.h>
16833
Martin v. Löwis11437992002-04-12 09:54:03 +000016834int
16835main ()
16836{
16837static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16838test_array [0] = 0
16839
16840 ;
16841 return 0;
16842}
16843_ACEOF
16844rm -f conftest.$ac_objext
16845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16846 (eval $ac_compile) 2>&5
16847 ac_status=$?
16848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16849 (exit $ac_status); } &&
16850 { ac_try='test -s conftest.$ac_objext'
16851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16852 (eval $ac_try) 2>&5
16853 ac_status=$?
16854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16855 (exit $ac_status); }; }; then
16856 ac_hi=$ac_mid
16857else
16858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016859sed 's/^/| /' conftest.$ac_ext >&5
16860
Martin v. Löwis11437992002-04-12 09:54:03 +000016861ac_lo=`expr '(' $ac_mid ')' + 1`
16862fi
16863rm -f conftest.$ac_objext conftest.$ac_ext
16864done
16865case $ac_lo in
16866?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016867'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16868See \`config.log' for more details." >&5
16869echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16870See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 { (exit 1); exit 1; }; } ;;
16872esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016873else
16874 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016875 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16876See \`config.log' for more details." >&5
16877echo "$as_me: error: cannot run test program while cross compiling
16878See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016879 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016880else
Martin v. Löwis11437992002-04-12 09:54:03 +000016881 cat >conftest.$ac_ext <<_ACEOF
16882#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016883/* confdefs.h. */
16884_ACEOF
16885cat confdefs.h >>conftest.$ac_ext
16886cat >>conftest.$ac_ext <<_ACEOF
16887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016888#include <wchar.h>
16889
16890long longval () { return (long) (sizeof (wchar_t)); }
16891unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016892#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016893#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016894int
16895main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016896{
Martin v. Löwis11437992002-04-12 09:54:03 +000016897
16898 FILE *f = fopen ("conftest.val", "w");
16899 if (! f)
16900 exit (1);
16901 if (((long) (sizeof (wchar_t))) < 0)
16902 {
16903 long i = longval ();
16904 if (i != ((long) (sizeof (wchar_t))))
16905 exit (1);
16906 fprintf (f, "%ld\n", i);
16907 }
16908 else
16909 {
16910 unsigned long i = ulongval ();
16911 if (i != ((long) (sizeof (wchar_t))))
16912 exit (1);
16913 fprintf (f, "%lu\n", i);
16914 }
16915 exit (ferror (f) || fclose (f) != 0);
16916
16917 ;
16918 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016919}
Martin v. Löwis11437992002-04-12 09:54:03 +000016920_ACEOF
16921rm -f conftest$ac_exeext
16922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16923 (eval $ac_link) 2>&5
16924 ac_status=$?
16925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16928 (eval $ac_try) 2>&5
16929 ac_status=$?
16930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16931 (exit $ac_status); }; }; then
16932 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016933else
Martin v. Löwis11437992002-04-12 09:54:03 +000016934 echo "$as_me: program exited with status $ac_status" >&5
16935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016936sed 's/^/| /' conftest.$ac_ext >&5
16937
Martin v. Löwis11437992002-04-12 09:54:03 +000016938( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016939{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16940See \`config.log' for more details." >&5
16941echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16942See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 { (exit 1); exit 1; }; }
16944fi
Skip Montanaro6dead952003-09-25 14:50:04 +000016945rm -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 +000016946fi
16947fi
16948rm -f conftest.val
16949else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016950 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016951fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016953echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16954echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16955cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016956#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016957_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016958
Michael W. Hudson54241132001-12-07 15:38:26 +000016959
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016960fi
16961
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016962echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16963echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16964have_ucs4_tcl=no
16965cat >conftest.$ac_ext <<_ACEOF
16966#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016967/* confdefs.h. */
16968_ACEOF
16969cat confdefs.h >>conftest.$ac_ext
16970cat >>conftest.$ac_ext <<_ACEOF
16971/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016972
16973#include <tcl.h>
16974#if TCL_UTF_MAX != 6
16975# error "NOT UCS4_TCL"
16976#endif
16977int
16978main ()
16979{
16980
16981 ;
16982 return 0;
16983}
16984_ACEOF
16985rm -f conftest.$ac_objext
16986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16987 (eval $ac_compile) 2>&5
16988 ac_status=$?
16989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16990 (exit $ac_status); } &&
16991 { ac_try='test -s conftest.$ac_objext'
16992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16993 (eval $ac_try) 2>&5
16994 ac_status=$?
16995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16996 (exit $ac_status); }; }; then
16997
16998
16999cat >>confdefs.h <<\_ACEOF
17000#define HAVE_UCS4_TCL 1
17001_ACEOF
17002
17003 have_ucs4_tcl=yes
17004
17005else
17006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017007sed 's/^/| /' conftest.$ac_ext >&5
17008
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017009fi
17010rm -f conftest.$ac_objext conftest.$ac_ext
17011echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17012echo "${ECHO_T}$have_ucs4_tcl" >&6
17013
Skip Montanaro6dead952003-09-25 14:50:04 +000017014# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017015if test "$wchar_h" = yes
17016then
17017 # check whether wchar_t is signed or not
17018 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17019echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17020 if test "${ac_cv_wchar_t_signed+set}" = set; then
17021 echo $ECHO_N "(cached) $ECHO_C" >&6
17022else
17023
17024 if test "$cross_compiling" = yes; then
17025 ac_cv_wchar_t_signed=yes
17026else
17027 cat >conftest.$ac_ext <<_ACEOF
17028#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017029/* confdefs.h. */
17030_ACEOF
17031cat confdefs.h >>conftest.$ac_ext
17032cat >>conftest.$ac_ext <<_ACEOF
17033/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017034
17035 #include <wchar.h>
17036 int main()
17037 {
17038 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17039 }
17040
17041_ACEOF
17042rm -f conftest$ac_exeext
17043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17044 (eval $ac_link) 2>&5
17045 ac_status=$?
17046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17049 (eval $ac_try) 2>&5
17050 ac_status=$?
17051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17052 (exit $ac_status); }; }; then
17053 ac_cv_wchar_t_signed=yes
17054else
17055 echo "$as_me: program exited with status $ac_status" >&5
17056echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017057sed 's/^/| /' conftest.$ac_ext >&5
17058
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017059( exit $ac_status )
17060ac_cv_wchar_t_signed=no
17061fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017062rm -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 +000017063fi
17064fi
17065
17066 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17067echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17068fi
17069
Martin v. Löwis11437992002-04-12 09:54:03 +000017070echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17071echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017072# Check whether --enable-unicode or --disable-unicode was given.
17073if test "${enable_unicode+set}" = set; then
17074 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017075
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017076else
17077 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017078fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017079
17080if test $enable_unicode = yes
17081then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017082 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017083 case "$have_ucs4_tcl" in
17084 yes) enable_unicode="ucs4"
17085 ;;
17086 *) enable_unicode="ucs2"
17087 ;;
17088 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017089fi
17090
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017091
17092
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017093case "$enable_unicode" in
17094ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017096#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017097_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017098
17099 ;;
17100ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017102#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017103_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017104
17105 ;;
17106esac
17107
Michael W. Hudson54241132001-12-07 15:38:26 +000017108
Martin v. Löwis11437992002-04-12 09:54:03 +000017109
17110
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017111
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017112if test "$enable_unicode" = "no"
17113then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017114 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017115 echo "$as_me:$LINENO: result: not used" >&5
17116echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017117else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017118 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017119
17120cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017121#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017122_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017123
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017124
17125 # wchar_t is only usable if it maps to an unsigned type
17126 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17127 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017128 then
17129 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017130
Martin v. Löwis11437992002-04-12 09:54:03 +000017131cat >>confdefs.h <<\_ACEOF
17132#define HAVE_USABLE_WCHAR_T 1
17133_ACEOF
17134
17135 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017136#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017137_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017138
17139 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17140 then
17141 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017143#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017144_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017145
17146 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17147 then
17148 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017150#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017151_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017152
17153 else
17154 PY_UNICODE_TYPE="no type found"
17155 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017156 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17157echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017158fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017159
17160# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017161echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17162echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17163if test "${ac_cv_c_bigendian+set}" = set; then
17164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017165else
Martin v. Löwis11437992002-04-12 09:54:03 +000017166 # See if sys/param.h defines the BYTE_ORDER macro.
17167cat >conftest.$ac_ext <<_ACEOF
17168#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017169/* confdefs.h. */
17170_ACEOF
17171cat confdefs.h >>conftest.$ac_ext
17172cat >>conftest.$ac_ext <<_ACEOF
17173/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017174#include <sys/types.h>
17175#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017176
Martin v. Löwis11437992002-04-12 09:54:03 +000017177int
17178main ()
17179{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017180#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17181 bogus endian macros
17182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
17184 ;
17185 return 0;
17186}
17187_ACEOF
17188rm -f conftest.$ac_objext
17189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17190 (eval $ac_compile) 2>&5
17191 ac_status=$?
17192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17193 (exit $ac_status); } &&
17194 { ac_try='test -s conftest.$ac_objext'
17195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17196 (eval $ac_try) 2>&5
17197 ac_status=$?
17198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17199 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017200 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017201cat >conftest.$ac_ext <<_ACEOF
17202#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017203/* confdefs.h. */
17204_ACEOF
17205cat confdefs.h >>conftest.$ac_ext
17206cat >>conftest.$ac_ext <<_ACEOF
17207/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017208#include <sys/types.h>
17209#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017210
Martin v. Löwis11437992002-04-12 09:54:03 +000017211int
17212main ()
17213{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017214#if BYTE_ORDER != BIG_ENDIAN
17215 not big endian
17216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017217
17218 ;
17219 return 0;
17220}
17221_ACEOF
17222rm -f conftest.$ac_objext
17223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17224 (eval $ac_compile) 2>&5
17225 ac_status=$?
17226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17227 (exit $ac_status); } &&
17228 { ac_try='test -s conftest.$ac_objext'
17229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17230 (eval $ac_try) 2>&5
17231 ac_status=$?
17232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17233 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017234 ac_cv_c_bigendian=yes
17235else
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017237sed 's/^/| /' conftest.$ac_ext >&5
17238
Martin v. Löwis11437992002-04-12 09:54:03 +000017239ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017241rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017242else
Martin v. Löwis11437992002-04-12 09:54:03 +000017243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017244sed 's/^/| /' conftest.$ac_ext >&5
17245
Martin v. Löwis11437992002-04-12 09:54:03 +000017246# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017247if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017248 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017249 ac_cv_c_bigendian=unknown
17250 cat >conftest.$ac_ext <<_ACEOF
17251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017252/* confdefs.h. */
17253_ACEOF
17254cat confdefs.h >>conftest.$ac_ext
17255cat >>conftest.$ac_ext <<_ACEOF
17256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017257short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17258short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17259void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17260short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17261short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17262void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017263int
17264main ()
17265{
17266 _ascii (); _ebcdic ();
17267 ;
17268 return 0;
17269}
17270_ACEOF
17271rm -f conftest.$ac_objext
17272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17273 (eval $ac_compile) 2>&5
17274 ac_status=$?
17275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17276 (exit $ac_status); } &&
17277 { ac_try='test -s conftest.$ac_objext'
17278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17279 (eval $ac_try) 2>&5
17280 ac_status=$?
17281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17282 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017283 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017284 ac_cv_c_bigendian=yes
17285fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017286if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 if test "$ac_cv_c_bigendian" = unknown; then
17288 ac_cv_c_bigendian=no
17289 else
17290 # finding both strings is unlikely to happen, but who knows?
17291 ac_cv_c_bigendian=unknown
17292 fi
17293fi
17294else
17295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017296sed 's/^/| /' conftest.$ac_ext >&5
17297
Martin v. Löwis11437992002-04-12 09:54:03 +000017298fi
17299rm -f conftest.$ac_objext conftest.$ac_ext
17300else
17301 cat >conftest.$ac_ext <<_ACEOF
17302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017303/* confdefs.h. */
17304_ACEOF
17305cat confdefs.h >>conftest.$ac_ext
17306cat >>conftest.$ac_ext <<_ACEOF
17307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017308int
17309main ()
17310{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017311 /* Are we little or big endian? From Harbison&Steele. */
17312 union
17313 {
17314 long l;
17315 char c[sizeof (long)];
17316 } u;
17317 u.l = 1;
17318 exit (u.c[sizeof (long) - 1] == 1);
17319}
Martin v. Löwis11437992002-04-12 09:54:03 +000017320_ACEOF
17321rm -f conftest$ac_exeext
17322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17323 (eval $ac_link) 2>&5
17324 ac_status=$?
17325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17326 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17328 (eval $ac_try) 2>&5
17329 ac_status=$?
17330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17331 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017332 ac_cv_c_bigendian=no
17333else
Martin v. Löwis11437992002-04-12 09:54:03 +000017334 echo "$as_me: program exited with status $ac_status" >&5
17335echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017336sed 's/^/| /' conftest.$ac_ext >&5
17337
Martin v. Löwis11437992002-04-12 09:54:03 +000017338( exit $ac_status )
17339ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017340fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017341rm -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 +000017342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017343fi
17344rm -f conftest.$ac_objext conftest.$ac_ext
17345fi
17346echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17347echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17348case $ac_cv_c_bigendian in
17349 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017350
Martin v. Löwis11437992002-04-12 09:54:03 +000017351cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017352#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017353_ACEOF
17354 ;;
17355 no)
17356 ;;
17357 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017358 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017359presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017360echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017361presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17362 { (exit 1); exit 1; }; } ;;
17363esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017364
Michael W. Hudson54241132001-12-07 15:38:26 +000017365
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017366# Check whether right shifting a negative integer extends the sign bit
17367# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017368echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17369echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17370if test "${ac_cv_rshift_extends_sign+set}" = set; then
17371 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017372else
Martin v. Löwis11437992002-04-12 09:54:03 +000017373
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017374if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017375 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017376else
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 cat >conftest.$ac_ext <<_ACEOF
17378#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017379/* confdefs.h. */
17380_ACEOF
17381cat confdefs.h >>conftest.$ac_ext
17382cat >>conftest.$ac_ext <<_ACEOF
17383/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017384
17385int main()
17386{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017387 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017388}
17389
Martin v. Löwis11437992002-04-12 09:54:03 +000017390_ACEOF
17391rm -f conftest$ac_exeext
17392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17393 (eval $ac_link) 2>&5
17394 ac_status=$?
17395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17398 (eval $ac_try) 2>&5
17399 ac_status=$?
17400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17401 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017402 ac_cv_rshift_extends_sign=yes
17403else
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 echo "$as_me: program exited with status $ac_status" >&5
17405echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017406sed 's/^/| /' conftest.$ac_ext >&5
17407
Martin v. Löwis11437992002-04-12 09:54:03 +000017408( exit $ac_status )
17409ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017410fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017411rm -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 +000017412fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017413fi
17414
Martin v. Löwis11437992002-04-12 09:54:03 +000017415echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17416echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017417if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017418then
Martin v. Löwis11437992002-04-12 09:54:03 +000017419
17420cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017421#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017422_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017423
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017424fi
17425
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017426# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017427echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17428echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17429if test "${ac_cv_have_getc_unlocked+set}" = set; then
17430 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017431else
Martin v. Löwis11437992002-04-12 09:54:03 +000017432
17433cat >conftest.$ac_ext <<_ACEOF
17434#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017440#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017441int
17442main ()
17443{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017444
17445 FILE *f = fopen("/dev/null", "r");
17446 flockfile(f);
17447 getc_unlocked(f);
17448 funlockfile(f);
17449
Martin v. Löwis11437992002-04-12 09:54:03 +000017450 ;
17451 return 0;
17452}
17453_ACEOF
17454rm -f conftest.$ac_objext conftest$ac_exeext
17455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17456 (eval $ac_link) 2>&5
17457 ac_status=$?
17458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17459 (exit $ac_status); } &&
17460 { ac_try='test -s conftest$ac_exeext'
17461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17462 (eval $ac_try) 2>&5
17463 ac_status=$?
17464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17465 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017466 ac_cv_have_getc_unlocked=yes
17467else
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017469sed 's/^/| /' conftest.$ac_ext >&5
17470
Martin v. Löwis11437992002-04-12 09:54:03 +000017471ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017474fi
17475
Martin v. Löwis11437992002-04-12 09:54:03 +000017476echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17477echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017478if test "$ac_cv_have_getc_unlocked" = yes
17479then
Martin v. Löwis11437992002-04-12 09:54:03 +000017480
17481cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017482#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017483_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017484
17485fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017486
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017487# check for readline 2.2
17488cat >conftest.$ac_ext <<_ACEOF
17489#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017490/* confdefs.h. */
17491_ACEOF
17492cat confdefs.h >>conftest.$ac_ext
17493cat >>conftest.$ac_ext <<_ACEOF
17494/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017495#include <readline/readline.h>
17496_ACEOF
17497if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17498 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17499 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017500 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017501 rm -f conftest.er1
17502 cat conftest.err >&5
17503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17504 (exit $ac_status); } >/dev/null; then
17505 if test -s conftest.err; then
17506 ac_cpp_err=$ac_c_preproc_warn_flag
17507 else
17508 ac_cpp_err=
17509 fi
17510else
17511 ac_cpp_err=yes
17512fi
17513if test -z "$ac_cpp_err"; then
17514 have_readline=yes
17515else
17516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017517sed 's/^/| /' conftest.$ac_ext >&5
17518
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017519 have_readline=no
17520fi
17521rm -f conftest.err conftest.$ac_ext
17522if test $have_readline = yes
17523then
17524 cat >conftest.$ac_ext <<_ACEOF
17525#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017526/* confdefs.h. */
17527_ACEOF
17528cat confdefs.h >>conftest.$ac_ext
17529cat >>conftest.$ac_ext <<_ACEOF
17530/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017531#include <readline/readline.h>
17532
17533_ACEOF
17534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017535 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017536
17537cat >>confdefs.h <<\_ACEOF
17538#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17539_ACEOF
17540
17541fi
17542rm -f conftest*
17543
17544fi
17545
Martin v. Löwis0daad592001-09-30 21:09:59 +000017546# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017547echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17548echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17549if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017551else
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017553LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017554cat >conftest.$ac_ext <<_ACEOF
17555#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017556/* confdefs.h. */
17557_ACEOF
17558cat confdefs.h >>conftest.$ac_ext
17559cat >>conftest.$ac_ext <<_ACEOF
17560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017561
Guido van Rossum353ae582001-07-10 16:45:32 +000017562/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017563#ifdef __cplusplus
17564extern "C"
17565#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017566/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017567 builtin and then its argument prototype would still apply. */
17568char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017569int
17570main ()
17571{
17572rl_pre_input_hook ();
17573 ;
17574 return 0;
17575}
17576_ACEOF
17577rm -f conftest.$ac_objext conftest$ac_exeext
17578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17579 (eval $ac_link) 2>&5
17580 ac_status=$?
17581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17582 (exit $ac_status); } &&
17583 { ac_try='test -s conftest$ac_exeext'
17584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17585 (eval $ac_try) 2>&5
17586 ac_status=$?
17587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17588 (exit $ac_status); }; }; then
17589 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017590else
Martin v. Löwis11437992002-04-12 09:54:03 +000017591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017592sed 's/^/| /' conftest.$ac_ext >&5
17593
Martin v. Löwis11437992002-04-12 09:54:03 +000017594ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017596rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17597LIBS=$ac_check_lib_save_LIBS
17598fi
17599echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17600echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17601if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017602
Martin v. Löwis11437992002-04-12 09:54:03 +000017603cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017604#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017605_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017606
Martin v. Löwis0daad592001-09-30 21:09:59 +000017607fi
17608
Michael W. Hudson54241132001-12-07 15:38:26 +000017609
Martin v. Löwis0daad592001-09-30 21:09:59 +000017610# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017611echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17612echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17613if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17614 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017615else
Martin v. Löwis11437992002-04-12 09:54:03 +000017616 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017617LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017618cat >conftest.$ac_ext <<_ACEOF
17619#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017620/* confdefs.h. */
17621_ACEOF
17622cat confdefs.h >>conftest.$ac_ext
17623cat >>conftest.$ac_ext <<_ACEOF
17624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017625
Martin v. Löwis0daad592001-09-30 21:09:59 +000017626/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017627#ifdef __cplusplus
17628extern "C"
17629#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017630/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017631 builtin and then its argument prototype would still apply. */
17632char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017633int
17634main ()
17635{
17636rl_completion_matches ();
17637 ;
17638 return 0;
17639}
17640_ACEOF
17641rm -f conftest.$ac_objext conftest$ac_exeext
17642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17643 (eval $ac_link) 2>&5
17644 ac_status=$?
17645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17646 (exit $ac_status); } &&
17647 { ac_try='test -s conftest$ac_exeext'
17648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17649 (eval $ac_try) 2>&5
17650 ac_status=$?
17651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17652 (exit $ac_status); }; }; then
17653 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017654else
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017656sed 's/^/| /' conftest.$ac_ext >&5
17657
Martin v. Löwis11437992002-04-12 09:54:03 +000017658ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17661LIBS=$ac_check_lib_save_LIBS
17662fi
17663echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17664echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17665if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017666
Martin v. Löwis11437992002-04-12 09:54:03 +000017667cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017668#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017669_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017670
Guido van Rossum353ae582001-07-10 16:45:32 +000017671fi
17672
Jack Jansendd19cf82001-12-06 22:36:17 +000017673
Martin v. Löwis11437992002-04-12 09:54:03 +000017674echo "$as_me:$LINENO: checking for broken nice()" >&5
17675echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17676if test "${ac_cv_broken_nice+set}" = set; then
17677 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017678else
Martin v. Löwis11437992002-04-12 09:54:03 +000017679
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017680if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017681 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017682else
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 cat >conftest.$ac_ext <<_ACEOF
17684#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017685/* confdefs.h. */
17686_ACEOF
17687cat confdefs.h >>conftest.$ac_ext
17688cat >>conftest.$ac_ext <<_ACEOF
17689/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017690
17691int main()
17692{
17693 int val1 = nice(1);
17694 if (val1 != -1 && val1 == nice(2))
17695 exit(0);
17696 exit(1);
17697}
17698
Martin v. Löwis11437992002-04-12 09:54:03 +000017699_ACEOF
17700rm -f conftest$ac_exeext
17701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17702 (eval $ac_link) 2>&5
17703 ac_status=$?
17704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17705 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17707 (eval $ac_try) 2>&5
17708 ac_status=$?
17709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17710 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017711 ac_cv_broken_nice=yes
17712else
Martin v. Löwis11437992002-04-12 09:54:03 +000017713 echo "$as_me: program exited with status $ac_status" >&5
17714echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017715sed 's/^/| /' conftest.$ac_ext >&5
17716
Martin v. Löwis11437992002-04-12 09:54:03 +000017717( exit $ac_status )
17718ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017719fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017720rm -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 +000017721fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017722fi
17723
Martin v. Löwis11437992002-04-12 09:54:03 +000017724echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17725echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017726if test "$ac_cv_broken_nice" = yes
17727then
Martin v. Löwis11437992002-04-12 09:54:03 +000017728
17729cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017730#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017731_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017732
17733fi
17734
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017735# tzset(3) exists and works like we expect it to
17736echo "$as_me:$LINENO: checking for working tzset()" >&5
17737echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17738if test "${ac_cv_working_tzset+set}" = set; then
17739 echo $ECHO_N "(cached) $ECHO_C" >&6
17740else
17741
17742if test "$cross_compiling" = yes; then
17743 ac_cv_working_tzset=no
17744else
17745 cat >conftest.$ac_ext <<_ACEOF
17746#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017747/* confdefs.h. */
17748_ACEOF
17749cat confdefs.h >>conftest.$ac_ext
17750cat >>conftest.$ac_ext <<_ACEOF
17751/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017752
17753#include <stdlib.h>
17754#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017755#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017756int main()
17757{
Brett Cannon18367812003-09-19 00:59:16 +000017758 /* Note that we need to ensure that not only does tzset(3)
17759 do 'something' with localtime, but it works as documented
17760 in the library reference and as expected by the test suite.
17761
17762 Red Hat 6.2 doesn't understand the southern hemisphere
17763 after New Year's Day; it thinks swaps on that day.
17764 */
17765
17766 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17767 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17768
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017769 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017770 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017771 if (localtime(&groundhogday)->tm_hour != 0)
17772 exit(1);
17773
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017774 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017775 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017776 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017777 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017778
17779 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17780 tzset();
17781 if (localtime(&groundhogday)->tm_hour != 11)
17782 exit(1);
17783 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17784 exit(1);
17785 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17786 exit(1);
17787
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017788 exit(0);
17789}
17790
17791_ACEOF
17792rm -f conftest$ac_exeext
17793if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17794 (eval $ac_link) 2>&5
17795 ac_status=$?
17796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17797 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17799 (eval $ac_try) 2>&5
17800 ac_status=$?
17801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17802 (exit $ac_status); }; }; then
17803 ac_cv_working_tzset=yes
17804else
17805 echo "$as_me: program exited with status $ac_status" >&5
17806echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017807sed 's/^/| /' conftest.$ac_ext >&5
17808
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017809( exit $ac_status )
17810ac_cv_working_tzset=no
17811fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017812rm -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 +000017813fi
17814fi
17815
17816echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17817echo "${ECHO_T}$ac_cv_working_tzset" >&6
17818if test "$ac_cv_working_tzset" = yes
17819then
17820
17821cat >>confdefs.h <<\_ACEOF
17822#define HAVE_WORKING_TZSET 1
17823_ACEOF
17824
17825fi
17826
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017827# Look for subsecond timestamps in struct stat
17828echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17829echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17830if test "${ac_cv_stat_tv_nsec+set}" = set; then
17831 echo $ECHO_N "(cached) $ECHO_C" >&6
17832else
17833 cat >conftest.$ac_ext <<_ACEOF
17834#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017835/* confdefs.h. */
17836_ACEOF
17837cat confdefs.h >>conftest.$ac_ext
17838cat >>conftest.$ac_ext <<_ACEOF
17839/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017840#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017841int
17842main ()
17843{
17844
17845struct stat st;
17846st.st_mtim.tv_nsec = 1;
17847
17848 ;
17849 return 0;
17850}
17851_ACEOF
17852rm -f conftest.$ac_objext
17853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17854 (eval $ac_compile) 2>&5
17855 ac_status=$?
17856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17857 (exit $ac_status); } &&
17858 { ac_try='test -s conftest.$ac_objext'
17859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17860 (eval $ac_try) 2>&5
17861 ac_status=$?
17862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17863 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017864 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017865else
17866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017867sed 's/^/| /' conftest.$ac_ext >&5
17868
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017869ac_cv_stat_tv_nsec=no
17870fi
17871rm -f conftest.$ac_objext conftest.$ac_ext
17872fi
17873
17874echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17875echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17876if test "$ac_cv_stat_tv_nsec" = yes
17877then
17878
17879cat >>confdefs.h <<\_ACEOF
17880#define HAVE_STAT_TV_NSEC 1
17881_ACEOF
17882
17883fi
17884
Jack Jansen666b1e72001-10-31 12:11:48 +000017885# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017886echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17887echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17888if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17889 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017890else
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 cat >conftest.$ac_ext <<_ACEOF
17892#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017893/* confdefs.h. */
17894_ACEOF
17895cat confdefs.h >>conftest.$ac_ext
17896cat >>conftest.$ac_ext <<_ACEOF
17897/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017898#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017899int
17900main ()
17901{
Jack Jansen666b1e72001-10-31 12:11:48 +000017902
17903 int rtn;
17904 rtn = mvwdelch(0,0,0);
17905
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 ;
17907 return 0;
17908}
17909_ACEOF
17910rm -f conftest.$ac_objext
17911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17912 (eval $ac_compile) 2>&5
17913 ac_status=$?
17914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17915 (exit $ac_status); } &&
17916 { ac_try='test -s conftest.$ac_objext'
17917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17918 (eval $ac_try) 2>&5
17919 ac_status=$?
17920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17921 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017922 ac_cv_mvwdelch_is_expression=yes
17923else
Martin v. Löwis11437992002-04-12 09:54:03 +000017924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017925sed 's/^/| /' conftest.$ac_ext >&5
17926
Martin v. Löwis11437992002-04-12 09:54:03 +000017927ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017928fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017929rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017930fi
17931
Martin v. Löwis11437992002-04-12 09:54:03 +000017932echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17933echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017934
17935if test "$ac_cv_mvwdelch_is_expression" = yes
17936then
Martin v. Löwis11437992002-04-12 09:54:03 +000017937
17938cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017939#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017940_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017941
17942fi
17943
Martin v. Löwis11437992002-04-12 09:54:03 +000017944echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17945echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17946if test "${ac_cv_window_has_flags+set}" = set; then
17947 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017948else
Martin v. Löwis11437992002-04-12 09:54:03 +000017949 cat >conftest.$ac_ext <<_ACEOF
17950#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017951/* confdefs.h. */
17952_ACEOF
17953cat confdefs.h >>conftest.$ac_ext
17954cat >>conftest.$ac_ext <<_ACEOF
17955/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000017956#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017957int
17958main ()
17959{
Jack Jansen666b1e72001-10-31 12:11:48 +000017960
17961 WINDOW *w;
17962 w->_flags = 0;
17963
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 ;
17965 return 0;
17966}
17967_ACEOF
17968rm -f conftest.$ac_objext
17969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17970 (eval $ac_compile) 2>&5
17971 ac_status=$?
17972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17973 (exit $ac_status); } &&
17974 { ac_try='test -s conftest.$ac_objext'
17975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17976 (eval $ac_try) 2>&5
17977 ac_status=$?
17978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17979 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017980 ac_cv_window_has_flags=yes
17981else
Martin v. Löwis11437992002-04-12 09:54:03 +000017982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017983sed 's/^/| /' conftest.$ac_ext >&5
17984
Martin v. Löwis11437992002-04-12 09:54:03 +000017985ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017987rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017988fi
17989
Martin v. Löwis11437992002-04-12 09:54:03 +000017990echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17991echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017992
Jack Jansen666b1e72001-10-31 12:11:48 +000017993
17994if test "$ac_cv_window_has_flags" = yes
17995then
Martin v. Löwis11437992002-04-12 09:54:03 +000017996
17997cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017998#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017999_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018000
18001fi
18002
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018003echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18004echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18005
18006if test -e /dev/ptmx
18007then
18008 echo "$as_me:$LINENO: result: yes" >&5
18009echo "${ECHO_T}yes" >&6
18010
18011cat >>confdefs.h <<\_ACEOF
18012#define HAVE_DEV_PTMX 1
18013_ACEOF
18014
18015else
18016 echo "$as_me:$LINENO: result: no" >&5
18017echo "${ECHO_T}no" >&6
18018fi
18019
Neal Norwitz865400f2003-03-21 01:42:58 +000018020echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18021echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18022
18023if test -e /dev/ptc
18024then
18025 echo "$as_me:$LINENO: result: yes" >&5
18026echo "${ECHO_T}yes" >&6
18027
18028cat >>confdefs.h <<\_ACEOF
18029#define HAVE_DEV_PTC 1
18030_ACEOF
18031
18032else
18033 echo "$as_me:$LINENO: result: no" >&5
18034echo "${ECHO_T}no" >&6
18035fi
18036
Martin v. Löwis11437992002-04-12 09:54:03 +000018037echo "$as_me:$LINENO: checking for socklen_t" >&5
18038echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18039if test "${ac_cv_type_socklen_t+set}" = set; then
18040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018041else
Martin v. Löwis11437992002-04-12 09:54:03 +000018042 cat >conftest.$ac_ext <<_ACEOF
18043#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018044/* confdefs.h. */
18045_ACEOF
18046cat confdefs.h >>conftest.$ac_ext
18047cat >>conftest.$ac_ext <<_ACEOF
18048/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018049
18050#ifdef HAVE_SYS_TYPES_H
18051#include <sys/types.h>
18052#endif
18053#ifdef HAVE_SYS_SOCKET_H
18054#include <sys/socket.h>
18055#endif
18056
18057
Martin v. Löwis11437992002-04-12 09:54:03 +000018058int
18059main ()
18060{
18061if ((socklen_t *) 0)
18062 return 0;
18063if (sizeof (socklen_t))
18064 return 0;
18065 ;
18066 return 0;
18067}
18068_ACEOF
18069rm -f conftest.$ac_objext
18070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18071 (eval $ac_compile) 2>&5
18072 ac_status=$?
18073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18074 (exit $ac_status); } &&
18075 { ac_try='test -s conftest.$ac_objext'
18076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18077 (eval $ac_try) 2>&5
18078 ac_status=$?
18079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18080 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018081 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018082else
Martin v. Löwis11437992002-04-12 09:54:03 +000018083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018084sed 's/^/| /' conftest.$ac_ext >&5
18085
Martin v. Löwis11437992002-04-12 09:54:03 +000018086ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018088rm -f conftest.$ac_objext conftest.$ac_ext
18089fi
18090echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18091echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18092if test $ac_cv_type_socklen_t = yes; then
18093 :
18094else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018095
Martin v. Löwis01c04012002-11-11 14:58:44 +000018096cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018097#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018098_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018099
18100fi
18101
Michael W. Hudson54241132001-12-07 15:38:26 +000018102
Michael W. Hudson54241132001-12-07 15:38:26 +000018103
18104
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018105for h in `(cd $srcdir;echo Python/thread_*.h)`
18106do
18107 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18108done
18109
Michael W. Hudson54241132001-12-07 15:38:26 +000018110
Jack Jansen0b06be72002-06-21 14:48:38 +000018111SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018112echo "$as_me:$LINENO: checking for build directories" >&5
18113echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018114for dir in $SRCDIRS; do
18115 if test ! -d $dir; then
18116 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018117 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018118done
Martin v. Löwis11437992002-04-12 09:54:03 +000018119echo "$as_me:$LINENO: result: done" >&5
18120echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018121
Guido van Rossum627b2d71993-12-24 10:39:16 +000018122# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018123 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018124
Martin v. Löwis11437992002-04-12 09:54:03 +000018125cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018126# This file is a shell script that caches the results of configure
18127# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018128# scripts and configure runs, see configure's option --config-cache.
18129# It is not useful on other systems. If it contains results you don't
18130# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018131#
Martin v. Löwis11437992002-04-12 09:54:03 +000018132# config.status only pays attention to the cache file if you give it
18133# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018134#
Skip Montanaro6dead952003-09-25 14:50:04 +000018135# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018136# loading this file, other *unset* `ac_cv_foo' will be assigned the
18137# following values.
18138
18139_ACEOF
18140
Guido van Rossumf78abae1997-01-21 22:02:36 +000018141# The following way of writing the cache mishandles newlines in values,
18142# but we know of no workaround that is simple, portable, and efficient.
18143# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018144# Ultrix sh set writes to stderr and can't be redirected directly,
18145# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018146{
18147 (set) 2>&1 |
18148 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18149 *ac_space=\ *)
18150 # `set' does not quote correctly, so add quotes (double-quote
18151 # substitution turns \\\\ into \\, and sed turns \\ into \).
18152 sed -n \
18153 "s/'/'\\\\''/g;
18154 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18155 ;;
18156 *)
18157 # `set' quotes correctly as required by POSIX, so do not add quotes.
18158 sed -n \
18159 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18160 ;;
18161 esac;
18162} |
18163 sed '
18164 t clear
18165 : clear
18166 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18167 t end
18168 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18169 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018170if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018171 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018172 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18173 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018174 else
18175 echo "not updating unwritable cache $cache_file"
18176 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018177fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018178rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018179
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018180test "x$prefix" = xNONE && prefix=$ac_default_prefix
18181# Let make expand exec_prefix.
18182test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018183
Martin v. Löwis11437992002-04-12 09:54:03 +000018184# VPATH may cause trouble with some makes, so we remove $(srcdir),
18185# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18186# trailing colons and then remove the whole line if VPATH becomes empty
18187# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018188if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018189 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18190s/:*\$(srcdir):*/:/;
18191s/:*\${srcdir}:*/:/;
18192s/:*@srcdir@:*/:/;
18193s/^\([^=]*=[ ]*\):*/\1/;
18194s/:*$//;
18195s/^[^=]*=[ ]*$//;
18196}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018197fi
18198
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018199DEFS=-DHAVE_CONFIG_H
18200
Skip Montanaro6dead952003-09-25 14:50:04 +000018201ac_libobjs=
18202ac_ltlibobjs=
18203for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18204 # 1. Remove the extension, and $U if already installed.
18205 ac_i=`echo "$ac_i" |
18206 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18207 # 2. Add them.
18208 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18209 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18210done
18211LIBOBJS=$ac_libobjs
18212
18213LTLIBOBJS=$ac_ltlibobjs
18214
18215
Martin v. Löwis11437992002-04-12 09:54:03 +000018216
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018217: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018218ac_clean_files_save=$ac_clean_files
18219ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18220{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18221echo "$as_me: creating $CONFIG_STATUS" >&6;}
18222cat >$CONFIG_STATUS <<_ACEOF
18223#! $SHELL
18224# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018225# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018226# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018227# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018228
Martin v. Löwis11437992002-04-12 09:54:03 +000018229debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018230ac_cs_recheck=false
18231ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018232SHELL=\${CONFIG_SHELL-$SHELL}
18233_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018234
Martin v. Löwis11437992002-04-12 09:54:03 +000018235cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018236## --------------------- ##
18237## M4sh Initialization. ##
18238## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018239
Martin v. Löwis11437992002-04-12 09:54:03 +000018240# Be Bourne compatible
18241if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18242 emulate sh
18243 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018244 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18245 # is contrary to our usage. Disable this feature.
18246 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018247elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18248 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018249fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018250
Martin v. Löwis11437992002-04-12 09:54:03 +000018251# Support unset when possible.
18252if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18253 as_unset=unset
18254else
18255 as_unset=false
18256fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018257
Skip Montanaro6dead952003-09-25 14:50:04 +000018258
18259# Work around bugs in pre-3.0 UWIN ksh.
18260$as_unset ENV MAIL MAILPATH
18261PS1='$ '
18262PS2='> '
18263PS4='+ '
18264
18265# NLS nuisances.
18266for as_var in \
18267 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18268 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18269 LC_TELEPHONE LC_TIME
18270do
18271 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18272 eval $as_var=C; export $as_var
18273 else
18274 $as_unset $as_var
18275 fi
18276done
18277
18278# Required to use basename.
18279if expr a : '\(a\)' >/dev/null 2>&1; then
18280 as_expr=expr
18281else
18282 as_expr=false
18283fi
18284
18285if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18286 as_basename=basename
18287else
18288 as_basename=false
18289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018290
18291
18292# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018293as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018294$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18295 X"$0" : 'X\(//\)$' \| \
18296 X"$0" : 'X\(/\)$' \| \
18297 . : '\(.\)' 2>/dev/null ||
18298echo X/"$0" |
18299 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18300 /^X\/\(\/\/\)$/{ s//\1/; q; }
18301 /^X\/\(\/\).*/{ s//\1/; q; }
18302 s/.*/./; q'`
18303
Skip Montanaro6dead952003-09-25 14:50:04 +000018304
Martin v. Löwis11437992002-04-12 09:54:03 +000018305# PATH needs CR, and LINENO needs CR and PATH.
18306# Avoid depending upon Character Ranges.
18307as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18308as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18309as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18310as_cr_digits='0123456789'
18311as_cr_alnum=$as_cr_Letters$as_cr_digits
18312
18313# The user is always right.
18314if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018315 echo "#! /bin/sh" >conf$$.sh
18316 echo "exit 0" >>conf$$.sh
18317 chmod +x conf$$.sh
18318 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018319 PATH_SEPARATOR=';'
18320 else
18321 PATH_SEPARATOR=:
18322 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018323 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018324fi
18325
18326
18327 as_lineno_1=$LINENO
18328 as_lineno_2=$LINENO
18329 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18330 test "x$as_lineno_1" != "x$as_lineno_2" &&
18331 test "x$as_lineno_3" = "x$as_lineno_2" || {
18332 # Find who we are. Look in the path if we contain no path at all
18333 # relative or not.
18334 case $0 in
18335 *[\\/]* ) as_myself=$0 ;;
18336 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337for as_dir in $PATH
18338do
18339 IFS=$as_save_IFS
18340 test -z "$as_dir" && as_dir=.
18341 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18342done
18343
18344 ;;
18345 esac
18346 # We did not find ourselves, most probably we were run as `sh COMMAND'
18347 # in which case we are not to be found in the path.
18348 if test "x$as_myself" = x; then
18349 as_myself=$0
18350 fi
18351 if test ! -f "$as_myself"; then
18352 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18353echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18354 { (exit 1); exit 1; }; }
18355 fi
18356 case $CONFIG_SHELL in
18357 '')
18358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18359for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18360do
18361 IFS=$as_save_IFS
18362 test -z "$as_dir" && as_dir=.
18363 for as_base in sh bash ksh sh5; do
18364 case $as_dir in
18365 /*)
18366 if ("$as_dir/$as_base" -c '
18367 as_lineno_1=$LINENO
18368 as_lineno_2=$LINENO
18369 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18370 test "x$as_lineno_1" != "x$as_lineno_2" &&
18371 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018372 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18373 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018374 CONFIG_SHELL=$as_dir/$as_base
18375 export CONFIG_SHELL
18376 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18377 fi;;
18378 esac
18379 done
18380done
18381;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018382 esac
18383
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18385 # uniformly replaced by the line number. The first 'sed' inserts a
18386 # line-number line before each line; the second 'sed' does the real
18387 # work. The second script uses 'N' to pair each line-number line
18388 # with the numbered line, and appends trailing '-' during
18389 # substitution so that $LINENO is not a special case at line end.
18390 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18391 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18392 sed '=' <$as_myself |
18393 sed '
18394 N
18395 s,$,-,
18396 : loop
18397 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18398 t loop
18399 s,-$,,
18400 s,^['$as_cr_digits']*\n,,
18401 ' >$as_me.lineno &&
18402 chmod +x $as_me.lineno ||
18403 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18404echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18405 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018406
Martin v. Löwis11437992002-04-12 09:54:03 +000018407 # Don't try to exec as it changes $[0], causing all sort of problems
18408 # (the dirname of $[0] is not the place where we might find the
18409 # original and so on. Autoconf is especially sensible to this).
18410 . ./$as_me.lineno
18411 # Exit status is that of the last command.
18412 exit
18413}
18414
18415
18416case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18417 *c*,-n*) ECHO_N= ECHO_C='
18418' ECHO_T=' ' ;;
18419 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18420 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18421esac
18422
18423if expr a : '\(a\)' >/dev/null 2>&1; then
18424 as_expr=expr
18425else
18426 as_expr=false
18427fi
18428
18429rm -f conf$$ conf$$.exe conf$$.file
18430echo >conf$$.file
18431if ln -s conf$$.file conf$$ 2>/dev/null; then
18432 # We could just check for DJGPP; but this test a) works b) is more generic
18433 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18434 if test -f conf$$.exe; then
18435 # Don't use ln at all; we don't have any links
18436 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018437 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018438 as_ln_s='ln -s'
18439 fi
18440elif ln conf$$.file conf$$ 2>/dev/null; then
18441 as_ln_s=ln
18442else
18443 as_ln_s='cp -p'
18444fi
18445rm -f conf$$ conf$$.exe conf$$.file
18446
Skip Montanaro6dead952003-09-25 14:50:04 +000018447if mkdir -p . 2>/dev/null; then
18448 as_mkdir_p=:
18449else
18450 as_mkdir_p=false
18451fi
18452
Martin v. Löwis11437992002-04-12 09:54:03 +000018453as_executable_p="test -f"
18454
18455# Sed expression to map a string onto a valid CPP name.
18456as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18457
18458# Sed expression to map a string onto a valid variable name.
18459as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18460
18461
18462# IFS
18463# We need space, tab and new line, in precisely that order.
18464as_nl='
18465'
18466IFS=" $as_nl"
18467
18468# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018469$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018470
18471exec 6>&1
18472
18473# Open the log real soon, to keep \$[0] and so on meaningful, and to
18474# report actual input values of CONFIG_FILES etc. instead of their
18475# values after options handling. Logging --version etc. is OK.
18476exec 5>>config.log
18477{
18478 echo
18479 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18480## Running $as_me. ##
18481_ASBOX
18482} >&5
18483cat >&5 <<_CSEOF
18484
Fred Drake9bd44622003-07-30 17:39:48 +000018485This file was extended by python $as_me 2.4, which was
Skip Montanaro6dead952003-09-25 14:50:04 +000018486generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018487
18488 CONFIG_FILES = $CONFIG_FILES
18489 CONFIG_HEADERS = $CONFIG_HEADERS
18490 CONFIG_LINKS = $CONFIG_LINKS
18491 CONFIG_COMMANDS = $CONFIG_COMMANDS
18492 $ $0 $@
18493
18494_CSEOF
18495echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18496echo >&5
18497_ACEOF
18498
18499# Files that config.status was made for.
18500if test -n "$ac_config_files"; then
18501 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18502fi
18503
18504if test -n "$ac_config_headers"; then
18505 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18506fi
18507
18508if test -n "$ac_config_links"; then
18509 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18510fi
18511
18512if test -n "$ac_config_commands"; then
18513 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18514fi
18515
18516cat >>$CONFIG_STATUS <<\_ACEOF
18517
18518ac_cs_usage="\
18519\`$as_me' instantiates files from templates according to the
18520current configuration.
18521
18522Usage: $0 [OPTIONS] [FILE]...
18523
18524 -h, --help print this help, then exit
18525 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018526 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 -d, --debug don't remove temporary files
18528 --recheck update $as_me by reconfiguring in the same conditions
18529 --file=FILE[:TEMPLATE]
18530 instantiate the configuration file FILE
18531 --header=FILE[:TEMPLATE]
18532 instantiate the configuration header FILE
18533
18534Configuration files:
18535$config_files
18536
18537Configuration headers:
18538$config_headers
18539
18540Report bugs to <bug-autoconf@gnu.org>."
18541_ACEOF
18542
18543cat >>$CONFIG_STATUS <<_ACEOF
18544ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018545python config.status 2.4
Skip Montanaro6dead952003-09-25 14:50:04 +000018546configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018547 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18548
18549Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18550Free Software Foundation, Inc.
18551This config.status script is free software; the Free Software Foundation
18552gives unlimited permission to copy, distribute and modify it."
18553srcdir=$srcdir
18554INSTALL="$INSTALL"
18555_ACEOF
18556
18557cat >>$CONFIG_STATUS <<\_ACEOF
18558# If no file are specified by the user, then we need to provide default
18559# value. By we need to know if files were specified by the user.
18560ac_need_defaults=:
18561while test $# != 0
18562do
18563 case $1 in
18564 --*=*)
18565 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18566 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018567 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018569 -*)
18570 ac_option=$1
18571 ac_optarg=$2
18572 ac_shift=shift
18573 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 *) # This is not an option, so the user has probably given explicit
18575 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018576 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 ac_need_defaults=false;;
18578 esac
18579
Skip Montanaro6dead952003-09-25 14:50:04 +000018580 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018581 # Handling of the options.
18582_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018583cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018584 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18585 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 --version | --vers* | -V )
18587 echo "$ac_cs_version"; exit 0 ;;
18588 --he | --h)
18589 # Conflict between --help and --header
18590 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18591Try \`$0 --help' for more information." >&5
18592echo "$as_me: error: ambiguous option: $1
18593Try \`$0 --help' for more information." >&2;}
18594 { (exit 1); exit 1; }; };;
18595 --help | --hel | -h )
18596 echo "$ac_cs_usage"; exit 0 ;;
18597 --debug | --d* | -d )
18598 debug=: ;;
18599 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018600 $ac_shift
18601 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018602 ac_need_defaults=false;;
18603 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018604 $ac_shift
18605 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018606 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018607 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18608 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18609 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018610
18611 # This is an error.
18612 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18613Try \`$0 --help' for more information." >&5
18614echo "$as_me: error: unrecognized option: $1
18615Try \`$0 --help' for more information." >&2;}
18616 { (exit 1); exit 1; }; } ;;
18617
18618 *) ac_config_targets="$ac_config_targets $1" ;;
18619
18620 esac
18621 shift
18622done
18623
Skip Montanaro6dead952003-09-25 14:50:04 +000018624ac_configure_extra_args=
18625
18626if $ac_cs_silent; then
18627 exec 6>/dev/null
18628 ac_configure_extra_args="$ac_configure_extra_args --silent"
18629fi
18630
18631_ACEOF
18632cat >>$CONFIG_STATUS <<_ACEOF
18633if \$ac_cs_recheck; then
18634 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18635 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18636fi
18637
Martin v. Löwis11437992002-04-12 09:54:03 +000018638_ACEOF
18639
18640
18641
18642
18643
18644cat >>$CONFIG_STATUS <<\_ACEOF
18645for ac_config_target in $ac_config_targets
18646do
18647 case "$ac_config_target" in
18648 # Handling of arguments.
18649 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18650 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18651 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18652 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18653echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18654 { (exit 1); exit 1; }; };;
18655 esac
18656done
18657
18658# If the user did not use the arguments to specify the items to instantiate,
18659# then the envvar interface is used. Set only those that are not.
18660# We use the long form for the default assignment because of an extremely
18661# bizarre bug on SunOS 4.1.3.
18662if $ac_need_defaults; then
18663 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18664 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18665fi
18666
Skip Montanaro6dead952003-09-25 14:50:04 +000018667# Have a temporary directory for convenience. Make it in the build tree
18668# simply because there is no reason to put it here, and in addition,
18669# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018670# Create a temporary directory, and hook for its removal unless debugging.
18671$debug ||
18672{
18673 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18674 trap '{ (exit 1); exit 1; }' 1 2 13 15
18675}
18676
18677# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018678
Martin v. Löwis11437992002-04-12 09:54:03 +000018679{
Skip Montanaro6dead952003-09-25 14:50:04 +000018680 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018681 test -n "$tmp" && test -d "$tmp"
18682} ||
18683{
Skip Montanaro6dead952003-09-25 14:50:04 +000018684 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018685 (umask 077 && mkdir $tmp)
18686} ||
18687{
Skip Montanaro6dead952003-09-25 14:50:04 +000018688 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 { (exit 1); exit 1; }
18690}
18691
18692_ACEOF
18693
18694cat >>$CONFIG_STATUS <<_ACEOF
18695
18696#
18697# CONFIG_FILES section.
18698#
18699
18700# No need to generate the scripts if there are no CONFIG_FILES.
18701# This happens for instance when ./config.status config.h
18702if test -n "\$CONFIG_FILES"; then
18703 # Protect against being on the right side of a sed subst in config.status.
18704 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18705 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18706s,@SHELL@,$SHELL,;t t
18707s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18708s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18709s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18710s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18711s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18712s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18713s,@exec_prefix@,$exec_prefix,;t t
18714s,@prefix@,$prefix,;t t
18715s,@program_transform_name@,$program_transform_name,;t t
18716s,@bindir@,$bindir,;t t
18717s,@sbindir@,$sbindir,;t t
18718s,@libexecdir@,$libexecdir,;t t
18719s,@datadir@,$datadir,;t t
18720s,@sysconfdir@,$sysconfdir,;t t
18721s,@sharedstatedir@,$sharedstatedir,;t t
18722s,@localstatedir@,$localstatedir,;t t
18723s,@libdir@,$libdir,;t t
18724s,@includedir@,$includedir,;t t
18725s,@oldincludedir@,$oldincludedir,;t t
18726s,@infodir@,$infodir,;t t
18727s,@mandir@,$mandir,;t t
18728s,@build_alias@,$build_alias,;t t
18729s,@host_alias@,$host_alias,;t t
18730s,@target_alias@,$target_alias,;t t
18731s,@DEFS@,$DEFS,;t t
18732s,@ECHO_C@,$ECHO_C,;t t
18733s,@ECHO_N@,$ECHO_N,;t t
18734s,@ECHO_T@,$ECHO_T,;t t
18735s,@LIBS@,$LIBS,;t t
18736s,@VERSION@,$VERSION,;t t
18737s,@SOVERSION@,$SOVERSION,;t t
18738s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18739s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18740s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18741s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18742s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18743s,@MACHDEP@,$MACHDEP,;t t
18744s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018745s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018746s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018747s,@CXX@,$CXX,;t t
18748s,@MAINOBJ@,$MAINOBJ,;t t
18749s,@EXEEXT@,$EXEEXT,;t t
18750s,@CC@,$CC,;t t
18751s,@CFLAGS@,$CFLAGS,;t t
18752s,@LDFLAGS@,$LDFLAGS,;t t
18753s,@CPPFLAGS@,$CPPFLAGS,;t t
18754s,@ac_ct_CC@,$ac_ct_CC,;t t
18755s,@OBJEXT@,$OBJEXT,;t t
18756s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018757s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018758s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18759s,@LIBRARY@,$LIBRARY,;t t
18760s,@LDLIBRARY@,$LDLIBRARY,;t t
18761s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18762s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18763s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18764s,@INSTSONAME@,$INSTSONAME,;t t
18765s,@RUNSHARED@,$RUNSHARED,;t t
18766s,@LINKCC@,$LINKCC,;t t
18767s,@RANLIB@,$RANLIB,;t t
18768s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18769s,@AR@,$AR,;t t
18770s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18771s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18772s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18773s,@LN@,$LN,;t t
18774s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018775s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018776s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18777s,@SO@,$SO,;t t
18778s,@LDSHARED@,$LDSHARED,;t t
18779s,@BLDSHARED@,$BLDSHARED,;t t
18780s,@CCSHARED@,$CCSHARED,;t t
18781s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18782s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018783s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018784s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18785s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18786s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18787s,@LDLAST@,$LDLAST,;t t
18788s,@THREADOBJ@,$THREADOBJ,;t t
18789s,@DLINCLDIR@,$DLINCLDIR,;t t
18790s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18791s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018792s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018793s,@LIBOBJS@,$LIBOBJS,;t t
18794s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18795s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18796s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18797s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18798s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18799s,@LIBM@,$LIBM,;t t
18800s,@LIBC@,$LIBC,;t t
18801s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18802s,@THREADHEADERS@,$THREADHEADERS,;t t
18803s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018804s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018805CEOF
18806
18807_ACEOF
18808
18809 cat >>$CONFIG_STATUS <<\_ACEOF
18810 # Split the substitutions into bite-sized pieces for seds with
18811 # small command number limits, like on Digital OSF/1 and HP-UX.
18812 ac_max_sed_lines=48
18813 ac_sed_frag=1 # Number of current file.
18814 ac_beg=1 # First line for current file.
18815 ac_end=$ac_max_sed_lines # Line after last line for current file.
18816 ac_more_lines=:
18817 ac_sed_cmds=
18818 while $ac_more_lines; do
18819 if test $ac_beg -gt 1; then
18820 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18821 else
18822 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18823 fi
18824 if test ! -s $tmp/subs.frag; then
18825 ac_more_lines=false
18826 else
18827 # The purpose of the label and of the branching condition is to
18828 # speed up the sed processing (if there are no `@' at all, there
18829 # is no need to browse any of the substitutions).
18830 # These are the two extra sed commands mentioned above.
18831 (echo ':t
18832 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18833 if test -z "$ac_sed_cmds"; then
18834 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18835 else
18836 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18837 fi
18838 ac_sed_frag=`expr $ac_sed_frag + 1`
18839 ac_beg=$ac_end
18840 ac_end=`expr $ac_end + $ac_max_sed_lines`
18841 fi
18842 done
18843 if test -z "$ac_sed_cmds"; then
18844 ac_sed_cmds=cat
18845 fi
18846fi # test -n "$CONFIG_FILES"
18847
18848_ACEOF
18849cat >>$CONFIG_STATUS <<\_ACEOF
18850for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18851 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18852 case $ac_file in
18853 - | *:- | *:-:* ) # input from stdin
18854 cat >$tmp/stdin
18855 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18856 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18857 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18858 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18859 * ) ac_file_in=$ac_file.in ;;
18860 esac
18861
18862 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18863 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18864$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18865 X"$ac_file" : 'X\(//\)[^/]' \| \
18866 X"$ac_file" : 'X\(//\)$' \| \
18867 X"$ac_file" : 'X\(/\)' \| \
18868 . : '\(.\)' 2>/dev/null ||
18869echo X"$ac_file" |
18870 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18871 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18872 /^X\(\/\/\)$/{ s//\1/; q; }
18873 /^X\(\/\).*/{ s//\1/; q; }
18874 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018875 { if $as_mkdir_p; then
18876 mkdir -p "$ac_dir"
18877 else
18878 as_dir="$ac_dir"
18879 as_dirs=
18880 while test ! -d "$as_dir"; do
18881 as_dirs="$as_dir $as_dirs"
18882 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18883$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18884 X"$as_dir" : 'X\(//\)[^/]' \| \
18885 X"$as_dir" : 'X\(//\)$' \| \
18886 X"$as_dir" : 'X\(/\)' \| \
18887 . : '\(.\)' 2>/dev/null ||
18888echo X"$as_dir" |
18889 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18890 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18891 /^X\(\/\/\)$/{ s//\1/; q; }
18892 /^X\(\/\).*/{ s//\1/; q; }
18893 s/.*/./; q'`
18894 done
18895 test ! -n "$as_dirs" || mkdir $as_dirs
18896 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18897echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18898 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018899
18900 ac_builddir=.
18901
18902if test "$ac_dir" != .; then
18903 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18904 # A "../" for each directory in $ac_dir_suffix.
18905 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18906else
18907 ac_dir_suffix= ac_top_builddir=
18908fi
18909
18910case $srcdir in
18911 .) # No --srcdir option. We are building in place.
18912 ac_srcdir=.
18913 if test -z "$ac_top_builddir"; then
18914 ac_top_srcdir=.
18915 else
18916 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18917 fi ;;
18918 [\\/]* | ?:[\\/]* ) # Absolute path.
18919 ac_srcdir=$srcdir$ac_dir_suffix;
18920 ac_top_srcdir=$srcdir ;;
18921 *) # Relative path.
18922 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18923 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18924esac
18925# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18926# absolute.
18927ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018928ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018929ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18930ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18931
18932
18933 case $INSTALL in
18934 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18935 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18936 esac
18937
18938 if test x"$ac_file" != x-; then
18939 { echo "$as_me:$LINENO: creating $ac_file" >&5
18940echo "$as_me: creating $ac_file" >&6;}
18941 rm -f "$ac_file"
18942 fi
18943 # Let's still pretend it is `configure' which instantiates (i.e., don't
18944 # use $as_me), people would be surprised to read:
18945 # /* config.h. Generated by config.status. */
18946 if test x"$ac_file" = x-; then
18947 configure_input=
18948 else
18949 configure_input="$ac_file. "
18950 fi
18951 configure_input=$configure_input"Generated from `echo $ac_file_in |
18952 sed 's,.*/,,'` by configure."
18953
18954 # First look for the input files in the build tree, otherwise in the
18955 # src tree.
18956 ac_file_inputs=`IFS=:
18957 for f in $ac_file_in; do
18958 case $f in
18959 -) echo $tmp/stdin ;;
18960 [\\/$]*)
18961 # Absolute (can't be DOS-style, as IFS=:)
18962 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18963echo "$as_me: error: cannot find input file: $f" >&2;}
18964 { (exit 1); exit 1; }; }
18965 echo $f;;
18966 *) # Relative
18967 if test -f "$f"; then
18968 # Build tree
18969 echo $f
18970 elif test -f "$srcdir/$f"; then
18971 # Source tree
18972 echo $srcdir/$f
18973 else
18974 # /dev/null tree
18975 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18976echo "$as_me: error: cannot find input file: $f" >&2;}
18977 { (exit 1); exit 1; }; }
18978 fi;;
18979 esac
18980 done` || { (exit 1); exit 1; }
18981_ACEOF
18982cat >>$CONFIG_STATUS <<_ACEOF
18983 sed "$ac_vpsub
18984$extrasub
18985_ACEOF
18986cat >>$CONFIG_STATUS <<\_ACEOF
18987:t
18988/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18989s,@configure_input@,$configure_input,;t t
18990s,@srcdir@,$ac_srcdir,;t t
18991s,@abs_srcdir@,$ac_abs_srcdir,;t t
18992s,@top_srcdir@,$ac_top_srcdir,;t t
18993s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18994s,@builddir@,$ac_builddir,;t t
18995s,@abs_builddir@,$ac_abs_builddir,;t t
18996s,@top_builddir@,$ac_top_builddir,;t t
18997s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18998s,@INSTALL@,$ac_INSTALL,;t t
18999" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19000 rm -f $tmp/stdin
19001 if test x"$ac_file" != x-; then
19002 mv $tmp/out $ac_file
19003 else
19004 cat $tmp/out
19005 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019006 fi
19007
Martin v. Löwis11437992002-04-12 09:54:03 +000019008done
19009_ACEOF
19010cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019011
Martin v. Löwis11437992002-04-12 09:54:03 +000019012#
19013# CONFIG_HEADER section.
19014#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019016# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19017# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019018#
19019# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000019020ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19021ac_dB='[ ].*$,\1#\2'
19022ac_dC=' '
19023ac_dD=',;t'
19024# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19025ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19026ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019027ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019028ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019029
Martin v. Löwis11437992002-04-12 09:54:03 +000019030for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019031 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019032 case $ac_file in
19033 - | *:- | *:-:* ) # input from stdin
19034 cat >$tmp/stdin
19035 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19036 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19037 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19038 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19039 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019040 esac
19041
Martin v. Löwis11437992002-04-12 09:54:03 +000019042 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19043echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019044
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 # First look for the input files in the build tree, otherwise in the
19046 # src tree.
19047 ac_file_inputs=`IFS=:
19048 for f in $ac_file_in; do
19049 case $f in
19050 -) echo $tmp/stdin ;;
19051 [\\/$]*)
19052 # Absolute (can't be DOS-style, as IFS=:)
19053 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19054echo "$as_me: error: cannot find input file: $f" >&2;}
19055 { (exit 1); exit 1; }; }
19056 echo $f;;
19057 *) # Relative
19058 if test -f "$f"; then
19059 # Build tree
19060 echo $f
19061 elif test -f "$srcdir/$f"; then
19062 # Source tree
19063 echo $srcdir/$f
19064 else
19065 # /dev/null tree
19066 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19067echo "$as_me: error: cannot find input file: $f" >&2;}
19068 { (exit 1); exit 1; }; }
19069 fi;;
19070 esac
19071 done` || { (exit 1); exit 1; }
19072 # Remove the trailing spaces.
19073 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019074
Martin v. Löwis11437992002-04-12 09:54:03 +000019075_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019076
Martin v. Löwis11437992002-04-12 09:54:03 +000019077# Transform confdefs.h into two sed scripts, `conftest.defines' and
19078# `conftest.undefs', that substitutes the proper values into
19079# config.h.in to produce config.h. The first handles `#define'
19080# templates, and the second `#undef' templates.
19081# And first: Protect against being on the right side of a sed subst in
19082# config.status. Protect against being in an unquoted here document
19083# in config.status.
19084rm -f conftest.defines conftest.undefs
19085# Using a here document instead of a string reduces the quoting nightmare.
19086# Putting comments in sed scripts is not portable.
19087#
19088# `end' is used to avoid that the second main sed command (meant for
19089# 0-ary CPP macros) applies to n-ary macro definitions.
19090# See the Autoconf documentation for `clear'.
19091cat >confdef2sed.sed <<\_ACEOF
19092s/[\\&,]/\\&/g
19093s,[\\$`],\\&,g
19094t clear
19095: clear
19096s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19097t end
19098s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19099: end
19100_ACEOF
19101# If some macros were called several times there might be several times
19102# the same #defines, which is useless. Nevertheless, we may not want to
19103# sort them, since we want the *last* AC-DEFINE to be honored.
19104uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19105sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19106rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019107
19108# This sed command replaces #undef with comments. This is necessary, for
19109# example, in the case of _POSIX_SOURCE, which is predefined and required
19110# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019111cat >>conftest.undefs <<\_ACEOF
19112s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19113_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019114
Martin v. Löwis11437992002-04-12 09:54:03 +000019115# Break up conftest.defines because some shells have a limit on the size
19116# of here documents, and old seds have small limits too (100 cmds).
19117echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanaro6dead952003-09-25 14:50:04 +000019118echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019119echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19120echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019121rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019122while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019123do
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 # Write a limited-size here document to $tmp/defines.sed.
19125 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19126 # Speed up: don't consider the non `#define' lines.
19127 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19128 # Work around the forget-to-reset-the-flag bug.
19129 echo 't clr' >>$CONFIG_STATUS
19130 echo ': clr' >>$CONFIG_STATUS
19131 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019132 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019133 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19134 rm -f $tmp/in
19135 mv $tmp/out $tmp/in
19136' >>$CONFIG_STATUS
19137 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19138 rm -f conftest.defines
19139 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019140done
Martin v. Löwis11437992002-04-12 09:54:03 +000019141rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019142echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019143echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019144
Martin v. Löwis11437992002-04-12 09:54:03 +000019145# Break up conftest.undefs because some shells have a limit on the size
19146# of here documents, and old seds have small limits too (100 cmds).
19147echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19148rm -f conftest.tail
19149while grep . conftest.undefs >/dev/null
19150do
19151 # Write a limited-size here document to $tmp/undefs.sed.
19152 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19153 # Speed up: don't consider the non `#undef'
19154 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19155 # Work around the forget-to-reset-the-flag bug.
19156 echo 't clr' >>$CONFIG_STATUS
19157 echo ': clr' >>$CONFIG_STATUS
19158 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19159 echo 'CEOF
19160 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19161 rm -f $tmp/in
19162 mv $tmp/out $tmp/in
19163' >>$CONFIG_STATUS
19164 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19165 rm -f conftest.undefs
19166 mv conftest.tail conftest.undefs
19167done
19168rm -f conftest.undefs
19169
19170cat >>$CONFIG_STATUS <<\_ACEOF
19171 # Let's still pretend it is `configure' which instantiates (i.e., don't
19172 # use $as_me), people would be surprised to read:
19173 # /* config.h. Generated by config.status. */
19174 if test x"$ac_file" = x-; then
19175 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019176 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019177 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019178 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019179 cat $tmp/in >>$tmp/config.h
19180 rm -f $tmp/in
19181 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019182 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019183 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19184echo "$as_me: $ac_file is unchanged" >&6;}
19185 else
19186 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19187$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19188 X"$ac_file" : 'X\(//\)[^/]' \| \
19189 X"$ac_file" : 'X\(//\)$' \| \
19190 X"$ac_file" : 'X\(/\)' \| \
19191 . : '\(.\)' 2>/dev/null ||
19192echo X"$ac_file" |
19193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19194 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19195 /^X\(\/\/\)$/{ s//\1/; q; }
19196 /^X\(\/\).*/{ s//\1/; q; }
19197 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019198 { if $as_mkdir_p; then
19199 mkdir -p "$ac_dir"
19200 else
19201 as_dir="$ac_dir"
19202 as_dirs=
19203 while test ! -d "$as_dir"; do
19204 as_dirs="$as_dir $as_dirs"
19205 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19206$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19207 X"$as_dir" : 'X\(//\)[^/]' \| \
19208 X"$as_dir" : 'X\(//\)$' \| \
19209 X"$as_dir" : 'X\(/\)' \| \
19210 . : '\(.\)' 2>/dev/null ||
19211echo X"$as_dir" |
19212 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19213 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19214 /^X\(\/\/\)$/{ s//\1/; q; }
19215 /^X\(\/\).*/{ s//\1/; q; }
19216 s/.*/./; q'`
19217 done
19218 test ! -n "$as_dirs" || mkdir $as_dirs
19219 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19220echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19221 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019222
Martin v. Löwis11437992002-04-12 09:54:03 +000019223 rm -f $ac_file
19224 mv $tmp/config.h $ac_file
19225 fi
19226 else
19227 cat $tmp/config.h
19228 rm -f $tmp/config.h
19229 fi
19230done
19231_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019232
Martin v. Löwis11437992002-04-12 09:54:03 +000019233cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019234
Martin v. Löwis11437992002-04-12 09:54:03 +000019235{ (exit 0); exit 0; }
19236_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019237chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019238ac_clean_files=$ac_clean_files_save
19239
19240
19241# configure is writing to config.log, and then calls config.status.
19242# config.status does its own redirection, appending to config.log.
19243# Unfortunately, on DOS this fails, as config.log is still kept open
19244# by configure, so config.status won't be able to write to it; its
19245# output is simply discarded. So we exec the FD to /dev/null,
19246# effectively closing config.log, so it can be properly (re)opened and
19247# appended to by config.status. When coming back to configure, we
19248# need to make the FD available again.
19249if test "$no_create" != yes; then
19250 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019251 ac_config_status_args=
19252 test "$silent" = yes &&
19253 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019254 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019255 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019256 exec 5>>config.log
19257 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19258 # would make configure fail if this is the last instruction.
19259 $ac_cs_success || { (exit 1); exit 1; }
19260fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019261
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019262
19263echo "creating Setup"
19264if test ! -f Modules/Setup
19265then
19266 cp $srcdir/Modules/Setup.dist Modules/Setup
19267fi
19268
19269echo "creating Setup.local"
19270if test ! -f Modules/Setup.local
19271then
19272 echo "# Edit this file for local setup changes" >Modules/Setup.local
19273fi
19274
19275echo "creating Makefile"
19276$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19277 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019278 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019279mv config.c Modules