blob: 9c913df982441d33a7db19f173b149cbd3866ea5 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002# From configure.in Revision: 86548 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004# Generated by GNU Autoconf 2.68 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000095as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000096case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117fi
118
Matthias Kloseb9621712010-04-24 17:59:49 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
Matthias Kloseb9621712010-04-24 17:59:49 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000221 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Kloseb9621712010-04-24 17:59:49 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000564PACKAGE_VERSION='3.2'
565PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
647SVNVERSION
648ARFLAGS
649AR
650RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000651USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652GNULD
653LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000654LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000655RUNSHARED
656INSTSONAME
657LDLIBRARYDIR
658BLDLIBRARY
659DLLLIBRARY
660LDLIBRARY
661LIBRARY
662BUILDEXEEXT
663EGREP
664GREP
665CPP
666MAINCC
667CXX
668OBJEXT
669EXEEXT
670ac_ct_CC
671CPPFLAGS
672LDFLAGS
673CFLAGS
674CC
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677SGI_ABI
678MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000679FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000680FRAMEWORKUNIXTOOLSPREFIX
681FRAMEWORKALTINSTALLLAST
682FRAMEWORKALTINSTALLFIRST
683FRAMEWORKINSTALLLAST
684FRAMEWORKINSTALLFIRST
685PYTHONFRAMEWORKINSTALLDIR
686PYTHONFRAMEWORKPREFIX
687PYTHONFRAMEWORKDIR
688PYTHONFRAMEWORKIDENTIFIER
689PYTHONFRAMEWORK
690LIPO_32BIT_FLAGS
691ARCH_RUN_32BIT
692UNIVERSALSDK
693CONFIG_ARGS
694SOVERSION
695VERSION
696target_alias
697host_alias
698build_alias
699LIBS
700ECHO_T
701ECHO_N
702ECHO_C
703DEFS
704mandir
705localedir
706libdir
707psdir
708pdfdir
709dvidir
710htmldir
711infodir
712docdir
713oldincludedir
714includedir
715localstatedir
716sharedstatedir
717sysconfdir
718datadir
719datarootdir
720libexecdir
721sbindir
722bindir
723program_transform_name
724prefix
725exec_prefix
726PACKAGE_URL
727PACKAGE_BUGREPORT
728PACKAGE_STRING
729PACKAGE_VERSION
730PACKAGE_TARNAME
731PACKAGE_NAME
732PATH_SEPARATOR
733SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000734ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000735ac_user_opts='
736enable_option_checking
737enable_universalsdk
738with_universal_archs
739with_framework_name
740enable_framework
741with_gcc
742with_cxx_main
743with_suffix
744enable_shared
745enable_profiling
746with_pydebug
747with_libs
748with_system_expat
749with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000750enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000751with_dbmliborder
752with_signal_module
753with_dec_threads
754with_threads
755with_thread
756enable_ipv6
757with_doc_strings
758with_tsc
759with_pymalloc
760with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000761with_fpectl
762with_libm
763with_libc
764enable_big_digits
765with_wide_unicode
766with_computed_gotos
767'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000768 ac_precious_vars='build_alias
769host_alias
770target_alias
771CC
772CFLAGS
773LDFLAGS
774LIBS
775CPPFLAGS
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000776CPP
777CPPFLAGS'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778
Guido van Rossum627b2d71993-12-24 10:39:16 +0000779
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000781ac_init_help=
782ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000783ac_unrecognized_opts=
784ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785# The variables have the same names as the options, with
786# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000787cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790no_recursion=
791prefix=NONE
792program_prefix=NONE
793program_suffix=NONE
794program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799x_includes=NONE
800x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000801
802# Installation directory options.
803# These are left unexpanded so users can "make install exec_prefix=/foo"
804# and all the variables that are supposed to be based on exec_prefix
805# by default will actually change.
806# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808bindir='${exec_prefix}/bin'
809sbindir='${exec_prefix}/sbin'
810libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811datarootdir='${prefix}/share'
812datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813sysconfdir='${prefix}/etc'
814sharedstatedir='${prefix}/com'
815localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816includedir='${prefix}/include'
817oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
819infodir='${datarootdir}/info'
820htmldir='${docdir}'
821dvidir='${docdir}'
822pdfdir='${docdir}'
823psdir='${docdir}'
824libdir='${exec_prefix}/lib'
825localedir='${datarootdir}/locale'
826mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000831do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832 # If the previous option needs an argument, assign it.
833 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835 ac_prev=
836 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000837 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 case $ac_option in
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000840 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
841 *=) ac_optarg= ;;
842 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845 # Accept the important Cygnus configure options, so we can diagnose typos.
846
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 case $ac_dashdash$ac_option in
848 --)
849 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851 -bindir | --bindir | --bindi | --bind | --bin | --bi)
852 ac_prev=bindir ;;
853 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855
856 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861 -cache-file | --cache-file | --cache-fil | --cache-fi \
862 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
863 ac_prev=cache_file ;;
864 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
865 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 cache_file=$ac_optarg ;;
867
868 --config-cache | -C)
869 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
877 | --dataroo | --dataro | --datar)
878 ac_prev=datarootdir ;;
879 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
880 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
881 datarootdir=$ac_optarg ;;
882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000884 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000886 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000887 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt_orig=$ac_useropt
889 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
890 case $ac_user_opts in
891 *"
892"enable_$ac_useropt"
893"*) ;;
894 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
895 ac_unrecognized_sep=', ';;
896 esac
897 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898
899 -docdir | --docdir | --docdi | --doc | --do)
900 ac_prev=docdir ;;
901 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
902 docdir=$ac_optarg ;;
903
904 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
905 ac_prev=dvidir ;;
906 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
907 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
909 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000910 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +0000913 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt_orig=$ac_useropt
915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
916 case $ac_user_opts in
917 *"
918"enable_$ac_useropt"
919"*) ;;
920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
921 ac_unrecognized_sep=', ';;
922 esac
923 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
926 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
927 | --exec | --exe | --ex)
928 ac_prev=exec_prefix ;;
929 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
930 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
931 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 # Obsolete; use --with-gas.
936 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 -help | --help | --hel | --he | -h)
939 ac_init_help=long ;;
940 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
941 ac_init_help=recursive ;;
942 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
943 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
945 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
951 ac_prev=htmldir ;;
952 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
953 | --ht=*)
954 htmldir=$ac_optarg ;;
955
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 -includedir | --includedir | --includedi | --included | --include \
957 | --includ | --inclu | --incl | --inc)
958 ac_prev=includedir ;;
959 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
960 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -infodir | --infodir | --infodi | --infod | --info | --inf)
964 ac_prev=infodir ;;
965 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libdir | --libdir | --libdi | --libd)
969 ac_prev=libdir ;;
970 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
973 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
974 | --libexe | --libex | --libe)
975 ac_prev=libexecdir ;;
976 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
977 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 -localedir | --localedir | --localedi | --localed | --locale)
981 ac_prev=localedir ;;
982 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
983 localedir=$ac_optarg ;;
984
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000986 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987 ac_prev=localstatedir ;;
988 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
993 ac_prev=mandir ;;
994 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Obsolete; use --without-fp.
999 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 no_create=yes ;;
1004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1010 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1011 | --oldin | --oldi | --old | --ol | --o)
1012 ac_prev=oldincludedir ;;
1013 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1014 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1015 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1019 ac_prev=prefix ;;
1020 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1024 | --program-pre | --program-pr | --program-p)
1025 ac_prev=program_prefix ;;
1026 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1027 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1031 | --program-suf | --program-su | --program-s)
1032 ac_prev=program_suffix ;;
1033 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1034 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -program-transform-name | --program-transform-name \
1038 | --program-transform-nam | --program-transform-na \
1039 | --program-transform-n | --program-transform- \
1040 | --program-transform | --program-transfor \
1041 | --program-transfo | --program-transf \
1042 | --program-trans | --program-tran \
1043 | --progr-tra | --program-tr | --program-t)
1044 ac_prev=program_transform_name ;;
1045 -program-transform-name=* | --program-transform-name=* \
1046 | --program-transform-nam=* | --program-transform-na=* \
1047 | --program-transform-n=* | --program-transform-=* \
1048 | --program-transform=* | --program-transfor=* \
1049 | --program-transfo=* | --program-transf=* \
1050 | --program-trans=* | --program-tran=* \
1051 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1055 ac_prev=pdfdir ;;
1056 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1057 pdfdir=$ac_optarg ;;
1058
1059 -psdir | --psdir | --psdi | --psd | --ps)
1060 ac_prev=psdir ;;
1061 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1062 psdir=$ac_optarg ;;
1063
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1065 | -silent | --silent | --silen | --sile | --sil)
1066 silent=yes ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1069 ac_prev=sbindir ;;
1070 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1071 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1075 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1076 | --sharedst | --shareds | --shared | --share | --shar \
1077 | --sha | --sh)
1078 ac_prev=sharedstatedir ;;
1079 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1080 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1081 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1082 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 -site | --site | --sit)
1086 ac_prev=site ;;
1087 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1091 ac_prev=srcdir ;;
1092 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1096 | --syscon | --sysco | --sysc | --sys | --sy)
1097 ac_prev=sysconfdir ;;
1098 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1099 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1108 verbose=yes ;;
1109
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 -version | --version | --versio | --versi | --vers | -V)
1111 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001114 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001116 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001117 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt_orig=$ac_useropt
1119 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1120 case $ac_user_opts in
1121 *"
1122"with_$ac_useropt"
1123"*) ;;
1124 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1125 ac_unrecognized_sep=', ';;
1126 esac
1127 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128
1129 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001132 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001133 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt_orig=$ac_useropt
1135 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136 case $ac_user_opts in
1137 *"
1138"with_$ac_useropt"
1139"*) ;;
1140 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1141 ac_unrecognized_sep=', ';;
1142 esac
1143 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145 --x)
1146 # Obsolete; use --with-x.
1147 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1150 | --x-incl | --x-inc | --x-in | --x-i)
1151 ac_prev=x_includes ;;
1152 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1153 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1157 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1158 ac_prev=x_libraries ;;
1159 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1160 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001163 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1164Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 ;;
1166
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 *=*)
1168 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1169 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 case $ac_envvar in #(
1171 '' | [0-9]* | *[!_$as_cr_alnum]* )
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001172 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 export $ac_envvar ;;
1176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001182 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ;;
1184
1185 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001186done
1187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001190 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191fi
1192
Matthias Kloseb9621712010-04-24 17:59:49 +00001193if test -n "$ac_unrecognized_opts"; then
1194 case $enable_option_checking in
1195 no) ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001196 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1198 esac
1199fi
1200
1201# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1203 datadir sysconfdir sharedstatedir localstatedir includedir \
1204 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1205 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 # Remove trailing slashes.
1209 case $ac_val in
1210 */ )
1211 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1212 eval $ac_var=\$ac_val;;
1213 esac
1214 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001216 [\\/$]* | ?:[\\/]* ) continue;;
1217 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218 esac
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001219 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001220done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221
Martin v. Löwis11437992002-04-12 09:54:03 +00001222# There might be people who depend on the old broken behavior: `$host'
1223# used to hold the argument of --host etc.
1224# FIXME: To remove some day.
1225build=$build_alias
1226host=$host_alias
1227target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228
Martin v. Löwis11437992002-04-12 09:54:03 +00001229# FIXME: To remove some day.
1230if test "x$host_alias" != x; then
1231 if test "x$build_alias" = x; then
1232 cross_compiling=maybe
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001233 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1234 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 elif test "x$build_alias" != "x$host_alias"; then
1236 cross_compiling=yes
1237 fi
1238fi
1239
1240ac_tool_prefix=
1241test -n "$host_alias" && ac_tool_prefix=$host_alias-
1242
1243test "$silent" = yes && exec 6>/dev/null
1244
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246ac_pwd=`pwd` && test -n "$ac_pwd" &&
1247ac_ls_di=`ls -di .` &&
1248ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001249 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001251 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252
1253
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254# Find the source files, if location was not specified.
1255if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 ac_confdir=`$as_dirname -- "$as_myself" ||
1259$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1260 X"$as_myself" : 'X\(//\)[^/]' \| \
1261 X"$as_myself" : 'X\(//\)$' \| \
1262 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1263$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)[^/].*/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)$/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\).*/{
1277 s//\1/
1278 q
1279 }
1280 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283 srcdir=..
1284 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285else
1286 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288if test ! -r "$srcdir/$ac_unique_file"; then
1289 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001290 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1293ac_abs_confdir=`(
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001294 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 pwd)`
1296# When building in place, set srcdir=.
1297if test "$ac_abs_confdir" = "$ac_pwd"; then
1298 srcdir=.
1299fi
1300# Remove unnecessary trailing slashes from srcdir.
1301# Double slashes in file names in object file debugging info
1302# mess up M-x gdb in Emacs.
1303case $srcdir in
1304*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1305esac
1306for ac_var in $ac_precious_vars; do
1307 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1308 eval ac_env_${ac_var}_value=\$${ac_var}
1309 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1310 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1311done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313#
1314# Report the --help message.
1315#
1316if test "$ac_init_help" = "long"; then
1317 # Omit some internal or obsolete options to make the list less imposing.
1318 # This message is too long to be a string in the A/UX 3.1 sh.
1319 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001320\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001321
1322Usage: $0 [OPTION]... [VAR=VALUE]...
1323
1324To assign environment variables (e.g., CC, CFLAGS...), specify them as
1325VAR=VALUE. See below for descriptions of some of the useful variables.
1326
1327Defaults for the options are specified in brackets.
1328
1329Configuration:
1330 -h, --help display this help and exit
1331 --help=short display options specific to this package
1332 --help=recursive display the short help of all the included packages
1333 -V, --version display version information and exit
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001334 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001335 --cache-file=FILE cache test results in FILE [disabled]
1336 -C, --config-cache alias for \`--cache-file=config.cache'
1337 -n, --no-create do not create output files
1338 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1339
Martin v. Löwis11437992002-04-12 09:54:03 +00001340Installation directories:
1341 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001343 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001345
1346By default, \`make install' will install all the files in
1347\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1348an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1349for instance \`--prefix=\$HOME'.
1350
1351For better control, use the options below.
1352
1353Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001354 --bindir=DIR user executables [EPREFIX/bin]
1355 --sbindir=DIR system admin executables [EPREFIX/sbin]
1356 --libexecdir=DIR program executables [EPREFIX/libexec]
1357 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1358 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1359 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1360 --libdir=DIR object code libraries [EPREFIX/lib]
1361 --includedir=DIR C header files [PREFIX/include]
1362 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1363 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1364 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1365 --infodir=DIR info documentation [DATAROOTDIR/info]
1366 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1367 --mandir=DIR man documentation [DATAROOTDIR/man]
1368 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1369 --htmldir=DIR html documentation [DOCDIR]
1370 --dvidir=DIR dvi documentation [DOCDIR]
1371 --pdfdir=DIR pdf documentation [DOCDIR]
1372 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001373_ACEOF
1374
1375 cat <<\_ACEOF
1376_ACEOF
1377fi
1378
1379if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001380 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001381 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001382 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 cat <<\_ACEOF
1384
1385Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001386 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1388 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001389 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001390 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001391 --enable-framework[=INSTALLDIR]
1392 Build (MacOSX|Darwin) framework
1393 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001394 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001395 --enable-loadable-sqlite-extensions
1396 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397 --enable-ipv6 Enable ipv6 (with ipv4) support
1398 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001399 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001400 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Optional Packages:
1403 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1404 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001405 --with-universal-archs=ARCH
1406 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001407 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001408 --with-framework-name=FRAMEWORK
1409 specify an alternate name of the framework built
1410 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001412 --with-cxx-main=<compiler>
1413 compile main() and link python executable with C++
1414 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with-suffix=.exe set executable suffix
1416 --with-pydebug build with Py_DEBUG defined
1417 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001418 --with-system-expat build pyexpat module using an installed expat
1419 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001420 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001421 --with-dbmliborder=db1:db2:...
1422 order to check db backends for dbm. Valid value is a
1423 colon separated string with the backend names
1424 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with-signal-module disable/enable signal module
1426 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1427 --with(out)-threads[=DIRECTORY]
1428 disable/enable thread support
1429 --with(out)-thread[=DIRECTORY]
1430 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001431 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001432 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001434 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --with-fpectl enable SIGFPE catching
1436 --with-libm=STRING math library
1437 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001438 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001439 --with(out)-computed-gotos
1440 Use computed gotos in evaluation loop (enabled by
1441 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
1443Some influential environment variables:
1444 CC C compiler command
1445 CFLAGS C compiler flags
1446 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1447 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 CPP C preprocessor
1452
1453Use these variables to override the choices made by `configure' or to help
1454it to find libraries and programs with nonstandard names/locations.
1455
Georg Brandle2e15612009-05-20 18:25:10 +00001456Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001459fi
1460
1461if test "$ac_init_help" = "recursive"; then
1462 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001463 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 test -d "$ac_dir" ||
1465 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1466 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 ac_builddir=.
1468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469case "$ac_dir" in
1470.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 case $ac_top_builddir_sub in
1476 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1477 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1478 esac ;;
1479esac
1480ac_abs_top_builddir=$ac_pwd
1481ac_abs_builddir=$ac_pwd$ac_dir_suffix
1482# for backward compatibility:
1483ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001484
1485case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488 ac_top_srcdir=$ac_top_builddir_sub
1489 ac_abs_top_srcdir=$ac_pwd ;;
1490 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 ac_top_srcdir=$srcdir
1493 ac_abs_top_srcdir=$srcdir ;;
1494 *) # Relative name.
1495 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1496 ac_top_srcdir=$ac_top_build_prefix$srcdir
1497 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001498esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501 cd "$ac_dir" || { ac_status=$?; continue; }
1502 # Check for guested configure.
1503 if test -f "$ac_srcdir/configure.gnu"; then
1504 echo &&
1505 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1506 elif test -f "$ac_srcdir/configure"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001510 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 fi || ac_status=$?
1512 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 done
1514fi
1515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001517if $ac_init_version; then
1518 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001519python configure 3.2
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001520generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001521
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001522Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001523This configure script is free software; the Free Software Foundation
1524gives unlimited permission to copy, distribute and modify it.
1525_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001528
1529## ------------------------ ##
1530## Autoconf initialization. ##
1531## ------------------------ ##
1532
1533# ac_fn_c_try_compile LINENO
1534# --------------------------
1535# Try to compile conftest.$ac_ext, and return whether this succeeded.
1536ac_fn_c_try_compile ()
1537{
1538 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1539 rm -f conftest.$ac_objext
1540 if { { ac_try="$ac_compile"
1541case "(($ac_try" in
1542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1543 *) ac_try_echo=$ac_try;;
1544esac
1545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1546$as_echo "$ac_try_echo"; } >&5
1547 (eval "$ac_compile") 2>conftest.err
1548 ac_status=$?
1549 if test -s conftest.err; then
1550 grep -v '^ *+' conftest.err >conftest.er1
1551 cat conftest.er1 >&5
1552 mv -f conftest.er1 conftest.err
1553 fi
1554 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1555 test $ac_status = 0; } && {
1556 test -z "$ac_c_werror_flag" ||
1557 test ! -s conftest.err
1558 } && test -s conftest.$ac_objext; then :
1559 ac_retval=0
1560else
1561 $as_echo "$as_me: failed program was:" >&5
1562sed 's/^/| /' conftest.$ac_ext >&5
1563
1564 ac_retval=1
1565fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001566 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 as_fn_set_status $ac_retval
1568
1569} # ac_fn_c_try_compile
1570
1571# ac_fn_c_try_cpp LINENO
1572# ----------------------
1573# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1574ac_fn_c_try_cpp ()
1575{
1576 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1577 if { { ac_try="$ac_cpp conftest.$ac_ext"
1578case "(($ac_try" in
1579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1580 *) ac_try_echo=$ac_try;;
1581esac
1582eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1583$as_echo "$ac_try_echo"; } >&5
1584 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1585 ac_status=$?
1586 if test -s conftest.err; then
1587 grep -v '^ *+' conftest.err >conftest.er1
1588 cat conftest.er1 >&5
1589 mv -f conftest.er1 conftest.err
1590 fi
1591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001592 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001593 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1594 test ! -s conftest.err
1595 }; then :
1596 ac_retval=0
1597else
1598 $as_echo "$as_me: failed program was:" >&5
1599sed 's/^/| /' conftest.$ac_ext >&5
1600
1601 ac_retval=1
1602fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001603 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 as_fn_set_status $ac_retval
1605
1606} # ac_fn_c_try_cpp
1607
1608# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1609# -------------------------------------------------------
1610# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1611# the include files in INCLUDES and setting the cache variable VAR
1612# accordingly.
1613ac_fn_c_check_header_mongrel ()
1614{
1615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001616 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1618$as_echo_n "checking for $2... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001619if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo_n "(cached) " >&6
1621fi
1622eval ac_res=\$$3
1623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1624$as_echo "$ac_res" >&6; }
1625else
1626 # Is the header compilable?
1627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1628$as_echo_n "checking $2 usability... " >&6; }
1629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1630/* end confdefs.h. */
1631$4
1632#include <$2>
1633_ACEOF
1634if ac_fn_c_try_compile "$LINENO"; then :
1635 ac_header_compiler=yes
1636else
1637 ac_header_compiler=no
1638fi
1639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1641$as_echo "$ac_header_compiler" >&6; }
1642
1643# Is the header present?
1644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1645$as_echo_n "checking $2 presence... " >&6; }
1646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1647/* end confdefs.h. */
1648#include <$2>
1649_ACEOF
1650if ac_fn_c_try_cpp "$LINENO"; then :
1651 ac_header_preproc=yes
1652else
1653 ac_header_preproc=no
1654fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001655rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1657$as_echo "$ac_header_preproc" >&6; }
1658
1659# So? What about this header?
1660case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1661 yes:no: )
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1663$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1666 ;;
1667 no:yes:* )
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1669$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1671$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1673$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1675$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1677$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001678( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001679## Report this to http://bugs.python.org/ ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001680## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 ) | sed "s/^/$as_me: WARNING: /" >&2
1682 ;;
1683esac
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1685$as_echo_n "checking for $2... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001686if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 $as_echo_n "(cached) " >&6
1688else
1689 eval "$3=\$ac_header_compiler"
1690fi
1691eval ac_res=\$$3
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1693$as_echo "$ac_res" >&6; }
1694fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001695 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001696
1697} # ac_fn_c_check_header_mongrel
1698
1699# ac_fn_c_try_run LINENO
1700# ----------------------
1701# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1702# that executables *can* be run.
1703ac_fn_c_try_run ()
1704{
1705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1706 if { { ac_try="$ac_link"
1707case "(($ac_try" in
1708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1709 *) ac_try_echo=$ac_try;;
1710esac
1711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1712$as_echo "$ac_try_echo"; } >&5
1713 (eval "$ac_link") 2>&5
1714 ac_status=$?
1715 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1717 { { case "(($ac_try" in
1718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1719 *) ac_try_echo=$ac_try;;
1720esac
1721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1722$as_echo "$ac_try_echo"; } >&5
1723 (eval "$ac_try") 2>&5
1724 ac_status=$?
1725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1726 test $ac_status = 0; }; }; then :
1727 ac_retval=0
1728else
1729 $as_echo "$as_me: program exited with status $ac_status" >&5
1730 $as_echo "$as_me: failed program was:" >&5
1731sed 's/^/| /' conftest.$ac_ext >&5
1732
1733 ac_retval=$ac_status
1734fi
1735 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001736 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001737 as_fn_set_status $ac_retval
1738
1739} # ac_fn_c_try_run
1740
1741# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1742# -------------------------------------------------------
1743# Tests whether HEADER exists and can be compiled using the include files in
1744# INCLUDES, setting the cache variable VAR accordingly.
1745ac_fn_c_check_header_compile ()
1746{
1747 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1749$as_echo_n "checking for $2... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001750if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 $as_echo_n "(cached) " >&6
1752else
1753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1754/* end confdefs.h. */
1755$4
1756#include <$2>
1757_ACEOF
1758if ac_fn_c_try_compile "$LINENO"; then :
1759 eval "$3=yes"
1760else
1761 eval "$3=no"
1762fi
1763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1764fi
1765eval ac_res=\$$3
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1767$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001769
1770} # ac_fn_c_check_header_compile
1771
1772# ac_fn_c_try_link LINENO
1773# -----------------------
1774# Try to link conftest.$ac_ext, and return whether this succeeded.
1775ac_fn_c_try_link ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778 rm -f conftest.$ac_objext conftest$ac_exeext
1779 if { { ac_try="$ac_link"
1780case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_link") 2>conftest.err
1787 ac_status=$?
1788 if test -s conftest.err; then
1789 grep -v '^ *+' conftest.err >conftest.er1
1790 cat conftest.er1 >&5
1791 mv -f conftest.er1 conftest.err
1792 fi
1793 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794 test $ac_status = 0; } && {
1795 test -z "$ac_c_werror_flag" ||
1796 test ! -s conftest.err
1797 } && test -s conftest$ac_exeext && {
1798 test "$cross_compiling" = yes ||
1799 $as_test_x conftest$ac_exeext
1800 }; then :
1801 ac_retval=0
1802else
1803 $as_echo "$as_me: failed program was:" >&5
1804sed 's/^/| /' conftest.$ac_ext >&5
1805
1806 ac_retval=1
1807fi
1808 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1809 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1810 # interfere with the next link command; also delete a directory that is
1811 # left behind by Apple's compiler. We do this before executing the actions.
1812 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001813 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 as_fn_set_status $ac_retval
1815
1816} # ac_fn_c_try_link
1817
1818# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1819# -------------------------------------------
1820# Tests whether TYPE exists after having included INCLUDES, setting cache
1821# variable VAR accordingly.
1822ac_fn_c_check_type ()
1823{
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1826$as_echo_n "checking for $2... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001827if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001828 $as_echo_n "(cached) " >&6
1829else
1830 eval "$3=no"
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834int
1835main ()
1836{
1837if (sizeof ($2))
1838 return 0;
1839 ;
1840 return 0;
1841}
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1845/* end confdefs.h. */
1846$4
1847int
1848main ()
1849{
1850if (sizeof (($2)))
1851 return 0;
1852 ;
1853 return 0;
1854}
1855_ACEOF
1856if ac_fn_c_try_compile "$LINENO"; then :
1857
1858else
1859 eval "$3=yes"
1860fi
1861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865eval ac_res=\$$3
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1867$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001868 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001869
1870} # ac_fn_c_check_type
1871
1872# ac_fn_c_find_uintX_t LINENO BITS VAR
1873# ------------------------------------
1874# Finds an unsigned integer type with width BITS, setting cache variable VAR
1875# accordingly.
1876ac_fn_c_find_uintX_t ()
1877{
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1880$as_echo_n "checking for uint$2_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001881if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001882 $as_echo_n "(cached) " >&6
1883else
1884 eval "$3=no"
1885 # Order is important - never check a type that is potentially smaller
1886 # than half of the expected target width.
1887 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1888 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1890/* end confdefs.h. */
1891$ac_includes_default
1892int
1893main ()
1894{
1895static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1896test_array [0] = 0
1897
1898 ;
1899 return 0;
1900}
1901_ACEOF
1902if ac_fn_c_try_compile "$LINENO"; then :
1903 case $ac_type in #(
1904 uint$2_t) :
1905 eval "$3=yes" ;; #(
1906 *) :
1907 eval "$3=\$ac_type" ;;
1908esac
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001911 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912
1913else
1914 break
1915fi
1916 done
1917fi
1918eval ac_res=\$$3
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1920$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001921 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001922
1923} # ac_fn_c_find_uintX_t
1924
1925# ac_fn_c_find_intX_t LINENO BITS VAR
1926# -----------------------------------
1927# Finds a signed integer type with width BITS, setting cache variable VAR
1928# accordingly.
1929ac_fn_c_find_intX_t ()
1930{
1931 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1933$as_echo_n "checking for int$2_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001934if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001935 $as_echo_n "(cached) " >&6
1936else
1937 eval "$3=no"
1938 # Order is important - never check a type that is potentially smaller
1939 # than half of the expected target width.
1940 for ac_type in int$2_t 'int' 'long int' \
1941 'long long int' 'short int' 'signed char'; do
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001945 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001946int
1947main ()
1948{
Barry Warsaw278266f2010-10-14 17:38:46 +00001949static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001950test_array [0] = 0
1951
1952 ;
1953 return 0;
1954}
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001960 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001961int
1962main ()
1963{
Barry Warsaw278266f2010-10-14 17:38:46 +00001964static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001965 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1966test_array [0] = 0
1967
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 case $ac_type in #(
1976 int$2_t) :
1977 eval "$3=yes" ;; #(
1978 *) :
1979 eval "$3=\$ac_type" ;;
1980esac
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001985 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001986
1987else
1988 break
1989fi
1990 done
1991fi
1992eval ac_res=\$$3
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1994$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00001995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997} # ac_fn_c_find_intX_t
1998
1999# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2000# --------------------------------------------
2001# Tries to find the compile-time value of EXPR in a program that includes
2002# INCLUDES, setting VAR accordingly. Returns whether the value could be
2003# computed
2004ac_fn_c_compute_int ()
2005{
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 if test "$cross_compiling" = yes; then
2008 # Depending upon the size, compute the lo and hi bounds.
2009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) >= 0)];
2016test_array [0] = 0
2017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 ac_lo=0 ac_mid=0
2024 while :; do
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2032test_array [0] = 0
2033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_hi=$ac_mid; break
2040else
2041 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2042 if test $ac_lo -le $ac_mid; then
2043 ac_lo= ac_hi=
2044 break
2045 fi
2046 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2047fi
2048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049 done
2050else
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) < 0)];
2058test_array [0] = 0
2059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 ac_hi=-1 ac_mid=-1
2066 while :; do
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2074test_array [0] = 0
2075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_lo=$ac_mid; break
2082else
2083 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2084 if test $ac_mid -le $ac_hi; then
2085 ac_lo= ac_hi=
2086 break
2087 fi
2088 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091 done
2092else
2093 ac_lo= ac_hi=
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098# Binary search between lo and hi bounds.
2099while test "x$ac_lo" != "x$ac_hi"; do
2100 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2108test_array [0] = 0
2109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_hi=$ac_mid
2116else
2117 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120done
2121case $ac_lo in #((
2122?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2123'') ac_retval=1 ;;
2124esac
2125 else
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129static long int longval () { return $2; }
2130static unsigned long int ulongval () { return $2; }
2131#include <stdio.h>
2132#include <stdlib.h>
2133int
2134main ()
2135{
2136
2137 FILE *f = fopen ("conftest.val", "w");
2138 if (! f)
2139 return 1;
2140 if (($2) < 0)
2141 {
2142 long int i = longval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%ld", i);
2146 }
2147 else
2148 {
2149 unsigned long int i = ulongval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%lu", i);
2153 }
2154 /* Do not output a trailing newline, as this causes \r\n confusion
2155 on some platforms. */
2156 return ferror (f) || fclose (f) != 0;
2157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_run "$LINENO"; then :
2163 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2164else
2165 ac_retval=1
2166fi
2167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2168 conftest.$ac_objext conftest.beam conftest.$ac_ext
2169rm -f conftest.val
2170
2171 fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002172 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002173 as_fn_set_status $ac_retval
2174
2175} # ac_fn_c_compute_int
2176
2177# ac_fn_c_check_func LINENO FUNC VAR
2178# ----------------------------------
2179# Tests whether FUNC exists, setting the cache variable VAR accordingly
2180ac_fn_c_check_func ()
2181{
2182 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2184$as_echo_n "checking for $2... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002185if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002186 $as_echo_n "(cached) " >&6
2187else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2192#define $2 innocuous_$2
2193
2194/* System header to define __stub macros and hopefully few prototypes,
2195 which can conflict with char $2 (); below.
2196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2197 <limits.h> exists even on freestanding compilers. */
2198
2199#ifdef __STDC__
2200# include <limits.h>
2201#else
2202# include <assert.h>
2203#endif
2204
2205#undef $2
2206
2207/* Override any GCC internal prototype to avoid an error.
2208 Use char because int might match the return type of a GCC
2209 builtin and then its argument prototype would still apply. */
2210#ifdef __cplusplus
2211extern "C"
2212#endif
2213char $2 ();
2214/* The GNU C library defines this for functions which it implements
2215 to always fail with ENOSYS. Some functions are actually named
2216 something starting with __ and the normal name is an alias. */
2217#if defined __stub_$2 || defined __stub___$2
2218choke me
2219#endif
2220
2221int
2222main ()
2223{
2224return $2 ();
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_link "$LINENO"; then :
2230 eval "$3=yes"
2231else
2232 eval "$3=no"
2233fi
2234rm -f core conftest.err conftest.$ac_objext \
2235 conftest$ac_exeext conftest.$ac_ext
2236fi
2237eval ac_res=\$$3
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002240 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002241
2242} # ac_fn_c_check_func
2243
2244# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2245# ----------------------------------------------------
2246# Tries to find if the field MEMBER exists in type AGGR, after including
2247# INCLUDES, setting cache variable VAR accordingly.
2248ac_fn_c_check_member ()
2249{
2250 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2252$as_echo_n "checking for $2.$3... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002253if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002254 $as_echo_n "(cached) " >&6
2255else
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h. */
2258$5
2259int
2260main ()
2261{
2262static $2 ac_aggr;
2263if (ac_aggr.$3)
2264return 0;
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$4=yes"
2271else
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$5
2275int
2276main ()
2277{
2278static $2 ac_aggr;
2279if (sizeof ac_aggr.$3)
2280return 0;
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_compile "$LINENO"; then :
2286 eval "$4=yes"
2287else
2288 eval "$4=no"
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294eval ac_res=\$$4
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2296$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002297 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002298
2299} # ac_fn_c_check_member
2300
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002301# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2302# ---------------------------------------------
2303# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2304# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002305ac_fn_c_check_decl ()
2306{
2307 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002308 as_decl_name=`echo $2|sed 's/ *(.*//'`
2309 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2311$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2312if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002313 $as_echo_n "(cached) " >&6
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$4
2318int
2319main ()
2320{
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002321#ifndef $as_decl_name
2322#ifdef __cplusplus
2323 (void) $as_decl_use;
2324#else
2325 (void) $as_decl_name;
2326#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002327#endif
2328
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$3=yes"
2335else
2336 eval "$3=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340eval ac_res=\$$3
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002343 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002344
2345} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002347This file contains any messages produced by compilers while
2348running configure, to aid debugging if configure makes a mistake.
2349
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002350It was created by python $as_me 3.2, which was
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002351generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002352
2353 $ $0 $@
2354
2355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002357{
2358cat <<_ASUNAME
2359## --------- ##
2360## Platform. ##
2361## --------- ##
2362
2363hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2364uname -m = `(uname -m) 2>/dev/null || echo unknown`
2365uname -r = `(uname -r) 2>/dev/null || echo unknown`
2366uname -s = `(uname -s) 2>/dev/null || echo unknown`
2367uname -v = `(uname -v) 2>/dev/null || echo unknown`
2368
2369/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2370/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2371
2372/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2373/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2374/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002376/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2377/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2378/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2379
2380_ASUNAME
2381
2382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2383for as_dir in $PATH
2384do
2385 IFS=$as_save_IFS
2386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002387 $as_echo "PATH: $as_dir"
2388 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002390
2391} >&5
2392
2393cat >&5 <<_ACEOF
2394
2395
2396## ----------- ##
2397## Core tests. ##
2398## ----------- ##
2399
2400_ACEOF
2401
2402
2403# Keep a trace of the command line.
2404# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002406# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002409ac_configure_args0=
2410ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_must_keep_next=false
2412for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002413do
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 for ac_arg
2415 do
2416 case $ac_arg in
2417 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2418 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2419 | -silent | --silent | --silen | --sile | --sil)
2420 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002421 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 esac
2424 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002429 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 case $ac_arg in
2432 *=* | --config-cache | -C | -disable-* | --disable-* \
2433 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2434 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2435 | -with-* | --with-* | -without-* | --without-* | --x)
2436 case "$ac_configure_args0 " in
2437 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2438 esac
2439 ;;
2440 -* ) ac_must_keep_next=true ;;
2441 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002443 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 ;;
2445 esac
2446 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002447done
Matthias Kloseb9621712010-04-24 17:59:49 +00002448{ ac_configure_args0=; unset ac_configure_args0;}
2449{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451# When interrupted or exit'd, cleanup temporary files, and complete
2452# config.log. We remove comments because anyway the quotes in there
2453# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454# WARNING: Use '\'' to represent an apostrophe within the trap.
2455# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002456trap 'exit_status=$?
2457 # Save into config.log some information that might help in debugging.
2458 {
2459 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002460
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002461 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002462## Cache variables. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002463## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 echo
2465 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466(
2467 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2468 eval ac_val=\$$ac_var
2469 case $ac_val in #(
2470 *${as_nl}*)
2471 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2473$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac
2475 case $ac_var in #(
2476 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2478 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 esac ;;
2480 esac
2481 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2484 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 "s/'\''/'\''\\\\'\'''\''/g;
2487 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2488 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002489 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac |
2493 sort
2494)
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002496
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002497 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002498## Output variables. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002499## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 echo
2501 for ac_var in $ac_subst_vars
2502 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 eval ac_val=\$$ac_var
2504 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 done | sort
2509 echo
2510
2511 if test -n "$ac_subst_files"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002512 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513## File substitutions. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002514## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 echo
2516 for ac_var in $ac_subst_files
2517 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 eval ac_val=\$$ac_var
2519 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 done | sort
2524 echo
2525 fi
2526
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 if test -s confdefs.h; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002528 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002529## confdefs.h. ##
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002530## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
2534 fi
2535 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 $as_echo "$as_me: caught signal $ac_signal"
2537 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 rm -f core *.core core.conftest.* &&
2540 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002543for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002545done
2546ac_signal=0
2547
2548# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Matthias Kloseb9621712010-04-24 17:59:49 +00002551$as_echo "/* confdefs.h */" > confdefs.h
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553# Predefined preprocessor variables.
2554
2555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_NAME "$PACKAGE_NAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_VERSION "$PACKAGE_VERSION"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_STRING "$PACKAGE_STRING"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2573_ACEOF
2574
Matthias Kloseb9621712010-04-24 17:59:49 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_URL "$PACKAGE_URL"
2577_ACEOF
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579
2580# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002581# Prefer an explicitly selected file to automatically selected ones.
2582ac_site_file1=NONE
2583ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584if test -n "$CONFIG_SITE"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002585 # We do not want a PATH search for config.site.
2586 case $CONFIG_SITE in #((
2587 -*) ac_site_file1=./$CONFIG_SITE;;
2588 */*) ac_site_file1=$CONFIG_SITE;;
2589 *) ac_site_file1=./$CONFIG_SITE;;
2590 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 ac_site_file1=$prefix/share/config.site
2593 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594else
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$ac_default_prefix/share/config.site
2596 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002598for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599do
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 test "x$ac_site_file" = xNONE && continue
2601 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2603$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 sed 's/^/| /' "$ac_site_file" >&5
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002605 . "$ac_site_file" \
2606 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2608as_fn_error $? "failed to load site script $ac_site_file
2609See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610 fi
2611done
2612
2613if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 # Some versions of bash will fail to source /dev/null (special files
2615 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2616 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2618$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2621 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 esac
2623 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624else
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2626$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 >$cache_file
2628fi
2629
2630# Check that the precious variables saved in the cache have kept the same
2631# value.
2632ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2635 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2637 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 case $ac_old_set,$ac_new_set in
2639 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2641$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 ac_cache_corrupted=: ;;
2643 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2645$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 ac_cache_corrupted=: ;;
2647 ,);;
2648 *)
2649 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 # differences in whitespace do not lead to failure.
2651 ac_old_val_w=`echo x $ac_old_val`
2652 ac_new_val_w=`echo x $ac_new_val`
2653 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2655$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2656 ac_cache_corrupted=:
2657 else
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2659$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2660 eval $ac_var=\$ac_old_val
2661 fi
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2663$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2665$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 fi;;
2667 esac
2668 # Pass precious variables to config.status.
2669 if test "$ac_new_set" = set; then
2670 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 *) ac_arg=$ac_var=$ac_new_val ;;
2673 esac
2674 case " $ac_configure_args " in
2675 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
2679done
2680if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2684$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002685 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002687## -------------------- ##
2688## Main body of script. ##
2689## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690
Guido van Rossum7f43da71994-08-01 12:15:30 +00002691ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2695ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696
Guido van Rossum627b2d71993-12-24 10:39:16 +00002697
Michael W. Hudson54241132001-12-07 15:38:26 +00002698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002700
2701
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
Benjamin Petersond23f8222009-04-05 19:13:16 +00002703if test "$prefix" != "/"; then
2704 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2705fi
2706
2707
Martin v. Löwis11437992002-04-12 09:54:03 +00002708
2709
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002710# We don't use PACKAGE_ variables, and they cause conflicts
2711# with other autoconf-based packages that include Python.h
2712grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2713rm confdefs.h
2714mv confdefs.h.new confdefs.h
2715
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002716
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002717VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002718
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002719# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002720
2721SOVERSION=1.0
2722
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002723# The later defininition of _XOPEN_SOURCE disables certain features
2724# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2725
Matthias Kloseb9621712010-04-24 17:59:49 +00002726$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002727
2728
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002729# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2731# them.
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002734
2735
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2738# them.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002741
2742
Martin v. Löwisd6320502004-08-12 13:45:08 +00002743# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2744# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2745
Matthias Kloseb9621712010-04-24 17:59:49 +00002746$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002747
2748
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002749# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2750# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2751# them.
2752
Matthias Kloseb9621712010-04-24 17:59:49 +00002753$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002754
2755
2756
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002757define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002758
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002759# Arguments passed to configure.
2760
2761CONFIG_ARGS="$ac_configure_args"
2762
Matthias Kloseb9621712010-04-24 17:59:49 +00002763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2764$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002766if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002768 case $enableval in
2769 yes)
2770 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002771 if test ! -d "${enableval}"
2772 then
2773 enableval=/
2774 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775 ;;
2776 esac
2777 case $enableval in
2778 no)
2779 UNIVERSALSDK=
2780 enable_universalsdk=
2781 ;;
2782 *)
2783 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784 if test ! -d "${UNIVERSALSDK}"
2785 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00002786 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002788 ;;
2789 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002790
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791
Thomas Wouters477c8d52006-05-27 19:21:47 +00002792else
2793
2794 UNIVERSALSDK=
2795 enable_universalsdk=
2796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002797fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002798
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002799if test -n "${UNIVERSALSDK}"
2800then
Matthias Kloseb9621712010-04-24 17:59:49 +00002801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2802$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002803else
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002806fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002808
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002809
2810
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002811UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002812
Matthias Kloseb9621712010-04-24 17:59:49 +00002813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2814$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002817if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002818 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2820$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002821 UNIVERSAL_ARCHS="$withval"
2822
2823else
2824
Matthias Kloseb9621712010-04-24 17:59:49 +00002825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2826$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002827
2828fi
2829
2830
2831
2832
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002833
2834# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002835if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002836 withval=$with_framework_name;
2837 PYTHONFRAMEWORK=${withval}
2838 PYTHONFRAMEWORKDIR=${withval}.framework
2839 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2840
2841else
2842
2843 PYTHONFRAMEWORK=Python
2844 PYTHONFRAMEWORKDIR=Python.framework
2845 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2846
2847fi
2848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002849# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002850if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002852 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002853 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002854 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002855 esac
2856 case $enableval in
2857 no)
2858 PYTHONFRAMEWORK=
2859 PYTHONFRAMEWORKDIR=no-framework
2860 PYTHONFRAMEWORKPREFIX=
2861 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002862 FRAMEWORKINSTALLFIRST=
2863 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002864 FRAMEWORKALTINSTALLFIRST=
2865 FRAMEWORKALTINSTALLLAST=
2866 if test "x${prefix}" = "xNONE"; then
2867 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2868 else
2869 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2870 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002871 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002872 ;;
2873 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002874 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002875 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002876 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002877 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002878 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2879 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002880 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002881
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002882 if test "x${prefix}" = "xNONE" ; then
2883 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002884
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002885 else
2886 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2887 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002888
2889 case "${enableval}" in
2890 /System*)
2891 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2892 if test "${prefix}" = "NONE" ; then
2893 # See below
2894 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2895 fi
2896 ;;
2897
2898 /Library*)
2899 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2900 ;;
2901
2902 */Library/Frameworks)
2903 MDIR="`dirname "${enableval}"`"
2904 MDIR="`dirname "${MDIR}"`"
2905 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2906
2907 if test "${prefix}" = "NONE"; then
2908 # User hasn't specified the
2909 # --prefix option, but wants to install
2910 # the framework in a non-default location,
2911 # ensure that the compatibility links get
2912 # installed relative to that prefix as well
2913 # instead of in /usr/local.
2914 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2915 fi
2916 ;;
2917
2918 *)
2919 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2920 ;;
2921 esac
2922
Jack Jansen127e56e2001-09-11 14:41:54 +00002923 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002925 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002926 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002929 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002931 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2932
2933 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2934
Jack Jansene578a632001-08-15 01:27:14 +00002935 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Guido van Rossum563e7081996-09-10 18:20:48 +00002937else
Martin v. Löwis11437992002-04-12 09:54:03 +00002938
Jack Jansene578a632001-08-15 01:27:14 +00002939 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002940 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002941 PYTHONFRAMEWORKPREFIX=
2942 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002943 FRAMEWORKINSTALLFIRST=
2944 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002945 FRAMEWORKALTINSTALLFIRST=
2946 FRAMEWORKALTINSTALLLAST=
2947 if test "x${prefix}" = "xNONE" ; then
2948 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2949 else
2950 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2951 fi
Jack Jansene578a632001-08-15 01:27:14 +00002952 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002953
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002955fi
2956
Thomas Wouters477c8d52006-05-27 19:21:47 +00002957
2958
Michael W. Hudson54241132001-12-07 15:38:26 +00002959
2960
2961
2962
Jack Jansene578a632001-08-15 01:27:14 +00002963
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002964
2965
2966
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002967
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002968
Jack Jansene578a632001-08-15 01:27:14 +00002969##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002970## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002971## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002972##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973# Set name for machine-dependent library files
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2976$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977if test -z "$MACHDEP"
2978then
Guido van Rossum563e7081996-09-10 18:20:48 +00002979 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002980 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002981 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002982 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002983 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002984 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 ac_md_system=`echo $ac_sys_system |
2987 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2988 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002989 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002990 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002991
Guido van Rossum07397971997-04-29 21:49:50 +00002992 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002993 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002994 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002995 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002996 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002997 esac
2998fi
Guido van Rossum91922671997-10-09 20:24:13 +00002999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003000# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3001# disable features if it is defined, without any means to access these
3002# features as extensions. For these systems, we skip the definition of
3003# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3004# some feature, make sure there is no alternative way to access this
3005# feature. Also, when using wildcards, make sure you have verified the
3006# need for not defining _XOPEN_SOURCE on all systems matching the
3007# wildcard, and that the wildcard does not include future systems
3008# (which may remove their limitations).
3009case $ac_sys_system/$ac_sys_release in
3010 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3011 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003012 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003013 # In addition, Stefan Krah confirms that issue #1244610 exists through
3014 # OpenBSD 4.6, but is fixed in 4.7.
3015 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003016 define_xopen_source=no
3017 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3018 # also defined. This can be overridden by defining _BSD_SOURCE
3019 # As this has a different meaning on Linux, only define it on OpenBSD
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003022
3023 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003024 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003025 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3026 # also defined. This can be overridden by defining _BSD_SOURCE
3027 # As this has a different meaning on Linux, only define it on OpenBSD
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003030
3031 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003032 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3033 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3034 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003035 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003037 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3038 # request to enable features supported by the standard as a request
3039 # to disable features not supported by the standard. The best way
3040 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3041 # entirely and define __EXTENSIONS__ instead.
3042 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003043 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003044 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3045 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003046 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003047 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003048 define_xopen_source=no;;
3049 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003050 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003051 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003052 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003053 # On FreeBSD 4, the math functions C89 does not cover are never defined
3054 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3055 FreeBSD/4.*)
3056 define_xopen_source=no;;
3057 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3058 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3059 # identifies itself as Darwin/7.*
3060 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3061 # disables platform specific features beyond repair.
3062 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3063 # has no effect, don't bother defining them
3064 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003065 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003066 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003067 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003068 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3069 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3070 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003071 AIX/4)
3072 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003073 AIX/5)
3074 if test `uname -r` -eq 1; then
3075 define_xopen_source=no
3076 fi
3077 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003078 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3079 # defining NI_NUMERICHOST.
3080 QNX/6.3.2)
3081 define_xopen_source=no
3082 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003083
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003084esac
3085
3086if test $define_xopen_source = yes
3087then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003090
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003091
3092 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3093 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3094 # several APIs are not declared. Since this is also needed in some
3095 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
Matthias Kloseb9621712010-04-24 17:59:49 +00003097$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
3099
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003100
Matthias Kloseb9621712010-04-24 17:59:49 +00003101$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
3103
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003104fi
3105
Guido van Rossum91922671997-10-09 20:24:13 +00003106#
3107# SGI compilers allow the specification of the both the ABI and the
3108# ISA on the command line. Depending on the values of these switches,
3109# different and often incompatable code will be generated.
3110#
3111# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3112# thus supply support for various ABI/ISA combinations. The MACHDEP
3113# variable is also adjusted.
3114#
3115
3116if test ! -z "$SGI_ABI"
3117then
3118 CC="cc $SGI_ABI"
3119 LDFLAGS="$SGI_ABI $LDFLAGS"
3120 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3123$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003124
Jack Jansen6b08a402004-06-03 12:41:45 +00003125# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3126# it may influence the way we can build extensions, so distutils
3127# needs to check it
3128
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129
Jack Jansen6b08a402004-06-03 12:41:45 +00003130CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003132
Matthias Kloseb9621712010-04-24 17:59:49 +00003133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3134$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003135ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3137$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003138
Guido van Rossum627b2d71993-12-24 10:39:16 +00003139# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003140
3141# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3142# for debug/optimization stuff. BASECFLAGS is for flags that are required
3143# just to get things to compile and link. Users are free to override OPT
3144# when running configure or make. The build should not break if they do.
3145# BASECFLAGS should generally not be messed with, however.
3146
3147# XXX shouldn't some/most/all of this code be merged with the stuff later
3148# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3150$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003153if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003155 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003156 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003157 without_gcc=yes;;
3158 yes) CC=gcc
3159 without_gcc=no;;
3160 *) CC=$withval
3161 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003163else
Martin v. Löwis11437992002-04-12 09:54:03 +00003164
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003165 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003166 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003167 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003168 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170fi
3171
Matthias Kloseb9621712010-04-24 17:59:49 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3173$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003174
Guido van Rossum8b131c51995-03-09 14:10:13 +00003175# If the user switches compilers, we can't believe the cache
3176if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3177then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003178 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003179(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003180fi
3181
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003182# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3183# when the compiler supports them, but we don't always want -O2, and
3184# we set -g later.
3185if test -z "$CFLAGS"; then
3186 CFLAGS=
3187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003188ac_ext=c
3189ac_cpp='$CPP $CPPFLAGS'
3190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3192ac_compiler_gnu=$ac_cv_c_compiler_gnu
3193if test -n "$ac_tool_prefix"; then
3194 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3195set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003198if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003200else
3201 if test -n "$CC"; then
3202 ac_cv_prog_CC="$CC" # Let the user override the test.
3203else
Martin v. Löwis11437992002-04-12 09:54:03 +00003204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3205for as_dir in $PATH
3206do
3207 IFS=$as_save_IFS
3208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003211 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003213 break 2
3214 fi
3215done
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
Jack Jansendd19cf82001-12-06 22:36:17 +00003219fi
3220fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003221CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003222if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3224$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003225else
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3227$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003228fi
3229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230
Martin v. Löwis11437992002-04-12 09:54:03 +00003231fi
3232if test -z "$ac_cv_prog_CC"; then
3233 ac_ct_CC=$CC
3234 # Extract the first word of "gcc", so it can be a program name with args.
3235set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3237$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003238if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003240else
3241 if test -n "$ac_ct_CC"; then
3242 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3243else
3244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3245for as_dir in $PATH
3246do
3247 IFS=$as_save_IFS
3248 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003251 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003253 break 2
3254 fi
3255done
Matthias Kloseb9621712010-04-24 17:59:49 +00003256 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003258
3259fi
3260fi
3261ac_ct_CC=$ac_cv_prog_ac_ct_CC
3262if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3264$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003265else
Matthias Kloseb9621712010-04-24 17:59:49 +00003266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3267$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003268fi
3269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270 if test "x$ac_ct_CC" = x; then
3271 CC=""
3272 else
3273 case $cross_compiling:$ac_tool_warned in
3274yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277ac_tool_warned=yes ;;
3278esac
3279 CC=$ac_ct_CC
3280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003281else
3282 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003283fi
3284
Jack Jansendd19cf82001-12-06 22:36:17 +00003285if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286 if test -n "$ac_tool_prefix"; then
3287 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003288set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3290$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003291if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003293else
3294 if test -n "$CC"; then
3295 ac_cv_prog_CC="$CC" # Let the user override the test.
3296else
Martin v. Löwis11437992002-04-12 09:54:03 +00003297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3298for as_dir in $PATH
3299do
3300 IFS=$as_save_IFS
3301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003304 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003306 break 2
3307 fi
3308done
Matthias Kloseb9621712010-04-24 17:59:49 +00003309 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003311
3312fi
3313fi
3314CC=$ac_cv_prog_CC
3315if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3317$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003318else
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3320$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003321fi
3322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323
Martin v. Löwis11437992002-04-12 09:54:03 +00003324 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003325fi
3326if test -z "$CC"; then
3327 # Extract the first word of "cc", so it can be a program name with args.
3328set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3330$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003331if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003333else
3334 if test -n "$CC"; then
3335 ac_cv_prog_CC="$CC" # Let the user override the test.
3336else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003337 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3339for as_dir in $PATH
3340do
3341 IFS=$as_save_IFS
3342 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003343 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003345 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3346 ac_prog_rejected=yes
3347 continue
3348 fi
3349 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 break 2
3352 fi
3353done
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003355IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003356
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003357if test $ac_prog_rejected = yes; then
3358 # We found a bogon in the path, so make sure we never use it.
3359 set dummy $ac_cv_prog_CC
3360 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003362 # We chose a different compiler from the bogus one.
3363 # However, it has the same basename, so the bogon will be chosen
3364 # first if we set CC to just the basename; use the full file name.
3365 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003366 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367 fi
3368fi
3369fi
3370fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003371CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3374$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375else
Matthias Kloseb9621712010-04-24 17:59:49 +00003376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3377$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003378fi
3379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380
Martin v. Löwis11437992002-04-12 09:54:03 +00003381fi
3382if test -z "$CC"; then
3383 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003385 do
3386 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3389$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003390if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003392else
3393 if test -n "$CC"; then
3394 ac_cv_prog_CC="$CC" # Let the user override the test.
3395else
Martin v. Löwis11437992002-04-12 09:54:03 +00003396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003403 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003407done
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
3411fi
3412fi
3413CC=$ac_cv_prog_CC
3414if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3416$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003417else
Matthias Kloseb9621712010-04-24 17:59:49 +00003418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3419$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003420fi
3421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 test -n "$CC" && break
3424 done
3425fi
3426if test -z "$CC"; then
3427 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003428 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003429do
3430 # Extract the first word of "$ac_prog", so it can be a program name with args.
3431set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3433$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003434if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003436else
3437 if test -n "$ac_ct_CC"; then
3438 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3439else
3440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3441for as_dir in $PATH
3442do
3443 IFS=$as_save_IFS
3444 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003449 break 2
3450 fi
3451done
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455fi
3456fi
3457ac_ct_CC=$ac_cv_prog_ac_ct_CC
3458if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3460$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003461else
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3463$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003464fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 test -n "$ac_ct_CC" && break
3468done
Michael W. Hudson54241132001-12-07 15:38:26 +00003469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470 if test "x$ac_ct_CC" = x; then
3471 CC=""
3472 else
3473 case $cross_compiling:$ac_tool_warned in
3474yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477ac_tool_warned=yes ;;
3478esac
3479 CC=$ac_ct_CC
3480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003481fi
3482
3483fi
3484
3485
Matthias Kloseb9621712010-04-24 17:59:49 +00003486test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003488as_fn_error $? "no acceptable C compiler found in \$PATH
3489See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003490
3491# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003492$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3493set X $ac_compile
3494ac_compiler=$2
3495for ac_option in --version -v -V -qversion; do
3496 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497case "(($ac_try" in
3498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3499 *) ac_try_echo=$ac_try;;
3500esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3502$as_echo "$ac_try_echo"; } >&5
3503 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003505 if test -s conftest.err; then
3506 sed '10a\
3507... rest of stderr output deleted ...
3508 10q' conftest.err >conftest.er1
3509 cat conftest.er1 >&5
3510 fi
3511 rm -f conftest.er1 conftest.err
3512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3513 test $ac_status = 0; }
3514done
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Matthias Kloseb9621712010-04-24 17:59:49 +00003516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003518
Martin v. Löwis11437992002-04-12 09:54:03 +00003519int
3520main ()
3521{
3522
3523 ;
3524 return 0;
3525}
3526_ACEOF
3527ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003528ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003529# Try to create an executable without -o first, disregard a.out.
3530# It will help us diagnose broken compilers, and finding out an intuition
3531# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3533$as_echo_n "checking whether the C compiler works... " >&6; }
3534ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3535
3536# The possible output files:
3537ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539ac_rmfiles=
3540for ac_file in $ac_files
3541do
3542 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3545 esac
3546done
3547rm -f $ac_rmfiles
3548
Matthias Kloseb9621712010-04-24 17:59:49 +00003549if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550case "(($ac_try" in
3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3552 *) ac_try_echo=$ac_try;;
3553esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003554eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3555$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3559 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3561# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3562# in a Makefile. We should not override ac_cv_exeext if it was cached,
3563# so that the user can short-circuit this test for compilers unknown to
3564# Autoconf.
3565for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003566do
3567 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003570 ;;
3571 [ab].out )
3572 # We found the default executable, but exeext='' is most
3573 # certainly right.
3574 break;;
3575 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003576 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577 then :; else
3578 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3579 fi
3580 # We set ac_cv_exeext here because the later test for it is not
3581 # safe: cross compilers may not add the suffix if given an `-o'
3582 # argument, so we may need to know it at that point already.
3583 # Even if this section looks crufty: it has the advantage of
3584 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003585 break;;
3586 * )
3587 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 esac
3589done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590test "$ac_cv_exeext" = no && ac_cv_exeext=
3591
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003592else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 ac_file=''
3594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003595if test -z "$ac_file"; then :
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3597$as_echo "no" >&6; }
3598$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003599sed 's/^/| /' conftest.$ac_ext >&5
3600
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003603as_fn_error 77 "C compiler cannot create executables
3604See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003605else
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3607$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3610$as_echo_n "checking for C compiler default output file name... " >&6; }
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3612$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003613ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003614
Matthias Kloseb9621712010-04-24 17:59:49 +00003615rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003616ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3618$as_echo_n "checking for suffix of executables... " >&6; }
3619if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620case "(($ac_try" in
3621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3622 *) ac_try_echo=$ac_try;;
3623esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003624eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3625$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3629 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003630 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3631# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3632# work properly (i.e., refer to `conftest.exe'), while it won't with
3633# `rm'.
3634for ac_file in conftest.exe conftest conftest.*; do
3635 test -f "$ac_file" || continue
3636 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003638 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3639 break;;
3640 * ) break;;
3641 esac
3642done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003643else
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003646as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3647See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003649rm -f conftest conftest$ac_cv_exeext
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3651$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652
3653rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003654EXEEXT=$ac_cv_exeext
3655ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3657/* end confdefs.h. */
3658#include <stdio.h>
3659int
3660main ()
3661{
3662FILE *f = fopen ("conftest.out", "w");
3663 return ferror (f) || fclose (f) != 0;
3664
3665 ;
3666 return 0;
3667}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003669ac_clean_files="$ac_clean_files conftest.out"
3670# Check that the compiler produces executables we can run. If not, either
3671# the compiler is broken, or we cross compile.
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3673$as_echo_n "checking whether we are cross compiling... " >&6; }
3674if test "$cross_compiling" != yes; then
3675 { { ac_try="$ac_link"
3676case "(($ac_try" in
3677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678 *) ac_try_echo=$ac_try;;
3679esac
3680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3681$as_echo "$ac_try_echo"; } >&5
3682 (eval "$ac_link") 2>&5
3683 ac_status=$?
3684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }
3686 if { ac_try='./conftest$ac_cv_exeext'
3687 { { case "(($ac_try" in
3688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3689 *) ac_try_echo=$ac_try;;
3690esac
3691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3692$as_echo "$ac_try_echo"; } >&5
3693 (eval "$ac_try") 2>&5
3694 ac_status=$?
3695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }; }; then
3697 cross_compiling=no
3698 else
3699 if test "$cross_compiling" = maybe; then
3700 cross_compiling=yes
3701 else
3702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003704as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003705If you meant to cross compile, use \`--host'.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003706See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 fi
3708 fi
3709fi
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3711$as_echo "$cross_compiling" >&6; }
3712
3713rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3714ac_clean_files=$ac_clean_files_save
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3716$as_echo_n "checking for suffix of object files... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003717if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
3719else
3720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003721/* end confdefs.h. */
3722
3723int
3724main ()
3725{
3726
3727 ;
3728 return 0;
3729}
3730_ACEOF
3731rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003732if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733case "(($ac_try" in
3734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735 *) ac_try_echo=$ac_try;;
3736esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3738$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3742 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 for ac_file in conftest.o conftest.obj conftest.*; do
3744 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3748 break;;
3749 esac
3750done
3751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003753sed 's/^/| /' conftest.$ac_ext >&5
3754
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003757as_fn_error $? "cannot compute suffix of object files: cannot compile
3758See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003759fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003760rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3763$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003764OBJEXT=$ac_cv_objext
3765ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3767$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003768if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774int
3775main ()
3776{
3777#ifndef __GNUC__
3778 choke me
3779#endif
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_compiler_gnu=yes
3787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003791ac_cv_c_compiler_gnu=$ac_compiler_gnu
3792
3793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3795$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3796if test $ac_compiler_gnu = yes; then
3797 GCC=yes
3798else
3799 GCC=
3800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801ac_test_CFLAGS=${CFLAGS+set}
3802ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3804$as_echo_n "checking whether $CC accepts -g... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003805if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 ac_save_c_werror_flag=$ac_c_werror_flag
3809 ac_c_werror_flag=yes
3810 ac_cv_prog_cc_g=no
3811 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
Martin v. Löwis11437992002-04-12 09:54:03 +00003815int
3816main ()
3817{
3818
3819 ;
3820 return 0;
3821}
3822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003823if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825else
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 CFLAGS=""
3827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828/* end confdefs.h. */
3829
3830int
3831main ()
3832{
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003838if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Matthias Kloseb9621712010-04-24 17:59:49 +00003840else
3841 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844/* end confdefs.h. */
3845
3846int
3847main ()
3848{
3849
3850 ;
3851 return 0;
3852}
3853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003854if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862 ac_c_werror_flag=$ac_save_c_werror_flag
3863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3865$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003866if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003868elif test $ac_cv_prog_cc_g = yes; then
3869 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003870 CFLAGS="-g -O2"
3871 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003872 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873 fi
3874else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003875 if test "$GCC" = yes; then
3876 CFLAGS="-O2"
3877 else
3878 CFLAGS=
3879 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3882$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00003883if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003885else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003887ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003889/* end confdefs.h. */
3890#include <stdarg.h>
3891#include <stdio.h>
3892#include <sys/types.h>
3893#include <sys/stat.h>
3894/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3895struct buf { int x; };
3896FILE * (*rcsopen) (struct buf *, struct stat *, int);
3897static char *e (p, i)
3898 char **p;
3899 int i;
3900{
3901 return p[i];
3902}
3903static char *f (char * (*g) (char **, int), char **p, ...)
3904{
3905 char *s;
3906 va_list v;
3907 va_start (v,p);
3908 s = g (p, va_arg (v,int));
3909 va_end (v);
3910 return s;
3911}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003912
3913/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3914 function prototypes and stuff, but not '\xHH' hex character constants.
3915 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003917 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3918 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003920int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3923 inside strings and character constants. */
3924#define FOO(x) 'x'
3925int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3926
Skip Montanaro6dead952003-09-25 14:50:04 +00003927int test (int i, double x);
3928struct s1 {int (*f) (int a);};
3929struct s2 {int (*f) (double a);};
3930int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3931int argc;
3932char **argv;
3933int
3934main ()
3935{
3936return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3937 ;
3938 return 0;
3939}
3940_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3942 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003943do
3944 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948rm -f core conftest.err conftest.$ac_objext
3949 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003950done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003952CC=$ac_save_CC
3953
3954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955# AC_CACHE_VAL
3956case "x$ac_cv_prog_cc_c89" in
3957 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3959$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3962$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003963 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3966$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003967esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003969
Matthias Kloseb9621712010-04-24 17:59:49 +00003970fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003971
Martin v. Löwis11437992002-04-12 09:54:03 +00003972ac_ext=c
3973ac_cpp='$CPP $CPPFLAGS'
3974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3976ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003977
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003978
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003979
3980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3982$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003985if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003987
3988 case $withval in
3989 no) with_cxx_main=no
3990 MAINCC='$(CC)';;
3991 yes) with_cxx_main=yes
3992 MAINCC='$(CXX)';;
3993 *) with_cxx_main=yes
3994 MAINCC=$withval
3995 if test -z "$CXX"
3996 then
3997 CXX=$withval
3998 fi;;
3999 esac
4000else
4001
4002 with_cxx_main=no
4003 MAINCC='$(CC)'
4004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005fi
4006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4008$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004009
4010preset_cxx="$CXX"
4011if test -z "$CXX"
4012then
4013 case "$CC" in
4014 gcc) # Extract the first word of "g++", so it can be a program name with args.
4015set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4017$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004018if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004020else
4021 case $CXX in
4022 [\\/]* | ?:[\\/]*)
4023 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4024 ;;
4025 *)
4026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4027for as_dir in notfound
4028do
4029 IFS=$as_save_IFS
4030 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004033 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035 break 2
4036 fi
4037done
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004040
4041 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4042 ;;
4043esac
4044fi
4045CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004046if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4048$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004049else
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4051$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004053
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004054 ;;
4055 cc) # Extract the first word of "c++", so it can be a program name with args.
4056set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004059if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004061else
4062 case $CXX in
4063 [\\/]* | ?:[\\/]*)
4064 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4065 ;;
4066 *)
4067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in notfound
4069do
4070 IFS=$as_save_IFS
4071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004074 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076 break 2
4077 fi
4078done
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004081
4082 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4083 ;;
4084esac
4085fi
4086CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4089$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004090else
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095 ;;
4096 esac
4097 if test "$CXX" = "notfound"
4098 then
4099 CXX=""
4100 fi
4101fi
4102if test -z "$CXX"
4103then
4104 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4105do
4106 # Extract the first word of "$ac_prog", so it can be a program name with args.
4107set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4109$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004110if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112else
4113 if test -n "$CXX"; then
4114 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4115else
4116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117for as_dir in $PATH
4118do
4119 IFS=$as_save_IFS
4120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 break 2
4126 fi
4127done
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130
4131fi
4132fi
4133CXX=$ac_cv_prog_CXX
4134if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4136$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137else
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4139$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004140fi
4141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143 test -n "$CXX" && break
4144done
4145test -n "$CXX" || CXX="notfound"
4146
4147 if test "$CXX" = "notfound"
4148 then
4149 CXX=""
4150 fi
4151fi
4152if test "$preset_cxx" != "$CXX"
4153then
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004155
4156 By default, distutils will build C++ extension modules with \"$CXX\".
4157 If this is not intended, then set CXX on the configure command line.
4158 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004159$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004160
4161 By default, distutils will build C++ extension modules with \"$CXX\".
4162 If this is not intended, then set CXX on the configure command line.
4163 " >&2;}
4164fi
4165
4166
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004167# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
4169ac_ext=c
4170ac_cpp='$CPP $CPPFLAGS'
4171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4173ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4175$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004176# On Suns, sometimes $CPP names a directory.
4177if test -n "$CPP" && test -d "$CPP"; then
4178 CPP=
4179fi
4180if test -z "$CPP"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004181 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004183else
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 # Double quotes because CPP needs to be expanded
4185 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4186 do
4187 ac_preproc_ok=false
4188for ac_c_preproc_warn_flag in '' yes
4189do
4190 # Use a header file that comes with gcc, so configuring glibc
4191 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004192 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4193 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004194 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
4198#ifdef __STDC__
4199# include <limits.h>
4200#else
4201# include <assert.h>
4202#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004203 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004206
Matthias Kloseb9621712010-04-24 17:59:49 +00004207else
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Broken: fails on valid input.
4209continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004210fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004211rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004217#include <ac_nonexistent.h>
4218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004220 # Broken: success on invalid input.
4221continue
4222else
Martin v. Löwis11437992002-04-12 09:54:03 +00004223 # Passes both tests.
4224ac_preproc_ok=:
4225break
4226fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004227rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004228
4229done
4230# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004231rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004232if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 break
4234fi
4235
4236 done
4237 ac_cv_prog_CPP=$CPP
4238
4239fi
4240 CPP=$ac_cv_prog_CPP
4241else
4242 ac_cv_prog_CPP=$CPP
4243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4245$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004246ac_preproc_ok=false
4247for ac_c_preproc_warn_flag in '' yes
4248do
4249 # Use a header file that comes with gcc, so configuring glibc
4250 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004251 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4252 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 # On the NeXT, cc -E runs the code through the compiler's parser,
4254 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* end confdefs.h. */
4257#ifdef __STDC__
4258# include <limits.h>
4259#else
4260# include <assert.h>
4261#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004265
Matthias Kloseb9621712010-04-24 17:59:49 +00004266else
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: fails on valid input.
4268continue
4269fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004270rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004276#include <ac_nonexistent.h>
4277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004278if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # Broken: success on invalid input.
4280continue
4281else
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 # Passes both tests.
4283ac_preproc_ok=:
4284break
4285fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004286rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004287
4288done
4289# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004290rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004291if $ac_preproc_ok; then :
4292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004296as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4297See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004298fi
4299
4300ac_ext=c
4301ac_cpp='$CPP $CPPFLAGS'
4302ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4303ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4304ac_compiler_gnu=$ac_cv_c_compiler_gnu
4305
4306
Matthias Kloseb9621712010-04-24 17:59:49 +00004307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4308$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004309if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004311else
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 # Loop through the user's path and test for each of PROGNAME-LIST
4315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4317do
4318 IFS=$as_save_IFS
4319 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 for ac_prog in grep ggrep; do
4321 for ac_exec_ext in '' $ac_executable_extensions; do
4322 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4323 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4324# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 # Check for GNU $ac_path_GREP
4326case `"$ac_path_GREP" --version 2>&1` in
4327*GNU*)
4328 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4329*)
4330 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 while :
4333 do
4334 cat "conftest.in" "conftest.in" >"conftest.tmp"
4335 mv "conftest.tmp" "conftest.in"
4336 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4339 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4342 # Best one so far, save it but keep looking for a better one
4343 ac_cv_path_GREP="$ac_path_GREP"
4344 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004345 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 # 10*(2^10) chars as input seems more than enough
4347 test $ac_count -gt 10 && break
4348 done
4349 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4350esac
4351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 $ac_path_GREP_found && break 3
4353 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 if test -z "$ac_cv_path_GREP"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004358 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360else
4361 ac_cv_path_GREP=$GREP
4362fi
4363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4366$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 GREP="$ac_cv_path_GREP"
4368
4369
Matthias Kloseb9621712010-04-24 17:59:49 +00004370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4371$as_echo_n "checking for egrep... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004372if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374else
4375 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4376 then ac_cv_path_EGREP="$GREP -E"
4377 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 # Loop through the user's path and test for each of PROGNAME-LIST
4381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4383do
4384 IFS=$as_save_IFS
4385 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 for ac_prog in egrep; do
4387 for ac_exec_ext in '' $ac_executable_extensions; do
4388 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4389 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4390# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 # Check for GNU $ac_path_EGREP
4392case `"$ac_path_EGREP" --version 2>&1` in
4393*GNU*)
4394 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4395*)
4396 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398 while :
4399 do
4400 cat "conftest.in" "conftest.in" >"conftest.tmp"
4401 mv "conftest.tmp" "conftest.in"
4402 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4405 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4408 # Best one so far, save it but keep looking for a better one
4409 ac_cv_path_EGREP="$ac_path_EGREP"
4410 ac_path_EGREP_max=$ac_count
4411 fi
4412 # 10*(2^10) chars as input seems more than enough
4413 test $ac_count -gt 10 && break
4414 done
4415 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4416esac
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 $ac_path_EGREP_found && break 3
4419 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 if test -z "$ac_cv_path_EGREP"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004424 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426else
4427 ac_cv_path_EGREP=$EGREP
4428fi
4429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 fi
4431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4433$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004435
4436
Matthias Kloseb9621712010-04-24 17:59:49 +00004437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4438$as_echo_n "checking for ANSI C header files... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004439if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 $as_echo_n "(cached) " >&6
4441else
4442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004443/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004444#include <stdlib.h>
4445#include <stdarg.h>
4446#include <string.h>
4447#include <float.h>
4448
4449int
4450main ()
4451{
4452
4453 ;
4454 return 0;
4455}
4456_ACEOF
4457if ac_fn_c_try_compile "$LINENO"; then :
4458 ac_cv_header_stdc=yes
4459else
4460 ac_cv_header_stdc=no
4461fi
4462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4463
4464if test $ac_cv_header_stdc = yes; then
4465 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4467/* end confdefs.h. */
4468#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004469
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004470_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004473
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004474else
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004476fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004477rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004478
Matthias Kloseb9621712010-04-24 17:59:49 +00004479fi
4480
4481if test $ac_cv_header_stdc = yes; then
4482 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4484/* end confdefs.h. */
4485#include <stdlib.h>
4486
4487_ACEOF
4488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4489 $EGREP "free" >/dev/null 2>&1; then :
4490
4491else
4492 ac_cv_header_stdc=no
4493fi
4494rm -f conftest*
4495
4496fi
4497
4498if test $ac_cv_header_stdc = yes; then
4499 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4500 if test "$cross_compiling" = yes; then :
4501 :
4502else
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504/* end confdefs.h. */
4505#include <ctype.h>
4506#include <stdlib.h>
4507#if ((' ' & 0x0FF) == 0x020)
4508# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4509# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4510#else
4511# define ISLOWER(c) \
4512 (('a' <= (c) && (c) <= 'i') \
4513 || ('j' <= (c) && (c) <= 'r') \
4514 || ('s' <= (c) && (c) <= 'z'))
4515# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4516#endif
4517
4518#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4519int
4520main ()
4521{
4522 int i;
4523 for (i = 0; i < 256; i++)
4524 if (XOR (islower (i), ISLOWER (i))
4525 || toupper (i) != TOUPPER (i))
4526 return 2;
4527 return 0;
4528}
4529_ACEOF
4530if ac_fn_c_try_run "$LINENO"; then :
4531
4532else
4533 ac_cv_header_stdc=no
4534fi
4535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4536 conftest.$ac_objext conftest.beam conftest.$ac_ext
4537fi
4538
4539fi
4540fi
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4542$as_echo "$ac_cv_header_stdc" >&6; }
4543if test $ac_cv_header_stdc = yes; then
4544
4545$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4546
4547fi
4548
4549# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4550for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4551 inttypes.h stdint.h unistd.h
4552do :
4553 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4554ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4555"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004556if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 cat >>confdefs.h <<_ACEOF
4558#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4559_ACEOF
4560
4561fi
4562
4563done
4564
4565
4566
4567 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004568if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004569 MINIX=yes
4570else
4571 MINIX=
4572fi
4573
4574
4575 if test "$MINIX" = yes; then
4576
4577$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4578
4579
4580$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4581
4582
4583$as_echo "#define _MINIX 1" >>confdefs.h
4584
4585 fi
4586
4587
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4589$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004590if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 $as_echo_n "(cached) " >&6
4592else
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594/* end confdefs.h. */
4595
4596# define __EXTENSIONS__ 1
4597 $ac_includes_default
4598int
4599main ()
4600{
4601
4602 ;
4603 return 0;
4604}
4605_ACEOF
4606if ac_fn_c_try_compile "$LINENO"; then :
4607 ac_cv_safe_to_define___extensions__=yes
4608else
4609 ac_cv_safe_to_define___extensions__=no
4610fi
4611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4612fi
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4614$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4615 test $ac_cv_safe_to_define___extensions__ = yes &&
4616 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4617
4618 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4619
4620 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4621
4622 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4623
4624 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4625
4626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628# Check for unsupported systems
4629case $ac_sys_system/$ac_sys_release in
4630atheos*|Linux*/1*)
4631 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4632 echo See README for details.
4633 exit 1;;
4634esac
4635
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4638$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004639
4640# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004641if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642 withval=$with_suffix;
4643 case $withval in
4644 no) EXEEXT=;;
4645 yes) EXEEXT=.exe;;
4646 *) EXEEXT=$withval;;
4647 esac
4648fi
4649
Matthias Kloseb9621712010-04-24 17:59:49 +00004650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4651$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652
4653# Test whether we're running on a non-case-sensitive system, in which
4654# case we give a warning if no ext is given
4655
Matthias Kloseb9621712010-04-24 17:59:49 +00004656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4657$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658if test ! -d CaseSensitiveTestDir; then
4659mkdir CaseSensitiveTestDir
4660fi
4661
4662if test -d casesensitivetestdir
4663then
Matthias Kloseb9621712010-04-24 17:59:49 +00004664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4665$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666 BUILDEXEEXT=.exe
4667else
Matthias Kloseb9621712010-04-24 17:59:49 +00004668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004670 BUILDEXEEXT=$EXEEXT
4671fi
4672rmdir CaseSensitiveTestDir
4673
4674case $MACHDEP in
4675bsdos*)
4676 case $CC in
4677 gcc) CC="$CC -D_HAVE_BSDI";;
4678 esac;;
4679esac
4680
4681case $ac_sys_system in
4682hp*|HP*)
4683 case $CC in
4684 cc|*/cc) CC="$CC -Ae";;
4685 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686esac
4687
4688
4689
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004692if test -z "$LIBRARY"
4693then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004694 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698
4699# LDLIBRARY is the name of the library to link against (as opposed to the
4700# name of the library into which to insert object files). BLDLIBRARY is also
4701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4702# is blank as the main program is not linked directly against LDLIBRARY.
4703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4706# DLLLIBRARY is the shared (i.e., DLL) library.
4707#
4708# RUNSHARED is used to run shared python without installed libraries
4709#
4710# INSTSONAME is the name of the shared library that will be use to install
4711# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004712#
4713# LDVERSION is the shared library version number, normally the Python version
4714# with the ABI build flags appended.
4715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716
4717
4718
4719
4720
4721
4722LDLIBRARY="$LIBRARY"
4723BLDLIBRARY='$(LDLIBRARY)'
4724INSTSONAME='$(LDLIBRARY)'
4725DLLLIBRARY=''
4726LDLIBRARYDIR=''
4727RUNSHARED=''
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004728LDVERSION="$(VERSION)"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004729
4730# LINKCC is the command that links the python executable -- default is $(CC).
4731# If CXX is set, and if it is needed to link a main function that was
4732# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4733# python might then depend on the C++ runtime
4734# This is altered for AIX in order to build the export list before
4735# linking.
4736
Matthias Kloseb9621712010-04-24 17:59:49 +00004737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4738$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739if test -z "$LINKCC"
4740then
4741 LINKCC='$(PURIFY) $(MAINCC)'
4742 case $ac_sys_system in
4743 AIX*)
4744 exp_extra="\"\""
4745 if test $ac_sys_release -ge 5 -o \
4746 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4747 exp_extra="."
4748 fi
4749 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750 QNX*)
4751 # qcc must be used because the other compilers do not
4752 # support -N.
4753 LINKCC=qcc;;
4754 esac
4755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4757$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758
4759# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4760# make sure we default having it set to "no": this is used by
4761# distutils.unixccompiler to know if it should add --enable-new-dtags
4762# to linker command lines, and failing to detect GNU ld simply results
4763# in the same bahaviour as before.
4764
Matthias Kloseb9621712010-04-24 17:59:49 +00004765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4766$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767ac_prog=ld
4768if test "$GCC" = yes; then
4769 ac_prog=`$CC -print-prog-name=ld`
4770fi
4771case `"$ac_prog" -V 2>&1 < /dev/null` in
4772 *GNU*)
4773 GNULD=yes;;
4774 *)
4775 GNULD=no;;
4776esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4778$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4781$as_echo_n "checking for inline... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004782if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004783 $as_echo_n "(cached) " >&6
4784else
4785 ac_cv_c_inline=no
4786for ac_kw in inline __inline__ __inline; do
4787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4788/* end confdefs.h. */
4789#ifndef __cplusplus
4790typedef int foo_t;
4791static $ac_kw foo_t static_foo () {return 0; }
4792$ac_kw foo_t foo () {return 0; }
4793#endif
4794
4795_ACEOF
4796if ac_fn_c_try_compile "$LINENO"; then :
4797 ac_cv_c_inline=$ac_kw
4798fi
4799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4800 test "$ac_cv_c_inline" != no && break
4801done
4802
4803fi
4804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4805$as_echo "$ac_cv_c_inline" >&6; }
4806
4807case $ac_cv_c_inline in
4808 inline | yes) ;;
4809 *)
4810 case $ac_cv_c_inline in
4811 no) ac_val=;;
4812 *) ac_val=$ac_cv_c_inline;;
4813 esac
4814 cat >>confdefs.h <<_ACEOF
4815#ifndef __cplusplus
4816#define inline $ac_val
4817#endif
4818_ACEOF
4819 ;;
4820esac
4821
4822if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004823
4824$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004825
4826
4827fi
4828
4829
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4831$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004833if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 enableval=$enable_shared;
4835fi
4836
4837
4838if test -z "$enable_shared"
4839then
4840 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004841 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 enable_shared="yes";;
4843 *)
4844 enable_shared="no";;
4845 esac
4846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4848$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849
Matthias Kloseb9621712010-04-24 17:59:49 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4851$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004853if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 enableval=$enable_profiling; ac_save_cc="$CC"
4855 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857 ac_enable_profiling="no"
4858else
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860/* end confdefs.h. */
4861int main() { return 0; }
4862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 ac_enable_profiling="yes"
4865else
Matthias Kloseb9621712010-04-24 17:59:49 +00004866 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004870fi
4871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872 CC="$ac_save_cc"
4873fi
4874
Matthias Kloseb9621712010-04-24 17:59:49 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4876$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877
4878case "$ac_enable_profiling" in
4879 "yes")
4880 BASECFLAGS="-pg $BASECFLAGS"
4881 LDFLAGS="-pg $LDFLAGS"
4882 ;;
4883esac
4884
Matthias Kloseb9621712010-04-24 17:59:49 +00004885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4886$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887
4888# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4889# library that we build, but we do not want to link against it (we
4890# will find it with a -framework option). For this reason there is an
4891# extra variable BLDLIBRARY against which Python and the extension
4892# modules are linked, BLDLIBRARY. This is normally the same as
4893# LDLIBRARY, but empty for MacOSX framework builds.
4894if test "$enable_framework"
4895then
4896 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4897 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4898 BLDLIBRARY=''
4899else
4900 BLDLIBRARY='$(LDLIBRARY)'
4901fi
4902
4903# Other platforms follow
4904if test $enable_shared = "yes"; then
4905
Matthias Kloseb9621712010-04-24 17:59:49 +00004906$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907
4908 case $ac_sys_system in
4909 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004910 LDLIBRARY='libpython$(LDVERSION).dll.a'
4911 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 ;;
4913 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004914 LDLIBRARY='libpython$(LDVERSION).so'
4915 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4917 INSTSONAME="$LDLIBRARY".$SOVERSION
4918 ;;
4919 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004920 LDLIBRARY='libpython$(LDVERSION).so'
4921 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4923 case $ac_sys_system in
4924 FreeBSD*)
4925 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4926 ;;
4927 esac
4928 INSTSONAME="$LDLIBRARY".$SOVERSION
4929 ;;
4930 hp*|HP*)
4931 case `uname -m` in
4932 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004933 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934 ;;
4935 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004936 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937 ;;
4938 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004939 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4941 ;;
4942 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004943 LDLIBRARY='libpython$(LDVERSION).so'
4944 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4946 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004948 LDLIBRARY='libpython$(LDVERSION).dylib'
4949 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4951 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004952 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004953 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004954 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956
4957 esac
4958else # shared is disabled
4959 case $ac_sys_system in
4960 CYGWIN*)
4961 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004962 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 ;;
4964 esac
4965fi
4966
Matthias Kloseb9621712010-04-24 17:59:49 +00004967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4968$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969
4970if test -n "$ac_tool_prefix"; then
4971 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4972set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00004975if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977else
4978 if test -n "$RANLIB"; then
4979 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4980else
4981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4988 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990 break 2
4991 fi
4992done
Matthias Kloseb9621712010-04-24 17:59:49 +00004993 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994IFS=$as_save_IFS
4995
4996fi
4997fi
4998RANLIB=$ac_cv_prog_RANLIB
4999if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5001$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002else
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005fi
5006
5007
5008fi
5009if test -z "$ac_cv_prog_RANLIB"; then
5010 ac_ct_RANLIB=$RANLIB
5011 # Extract the first word of "ranlib", so it can be a program name with args.
5012set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005015if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017else
5018 if test -n "$ac_ct_RANLIB"; then
5019 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5020else
5021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024 IFS=$as_save_IFS
5025 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5028 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 break 2
5031 fi
5032done
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034IFS=$as_save_IFS
5035
5036fi
5037fi
5038ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5039if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5041$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042else
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045fi
5046
5047 if test "x$ac_ct_RANLIB" = x; then
5048 RANLIB=":"
5049 else
5050 case $cross_compiling:$ac_tool_warned in
5051yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054ac_tool_warned=yes ;;
5055esac
5056 RANLIB=$ac_ct_RANLIB
5057 fi
5058else
5059 RANLIB="$ac_cv_prog_RANLIB"
5060fi
5061
5062
5063for ac_prog in ar aal
5064do
5065 # Extract the first word of "$ac_prog", so it can be a program name with args.
5066set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005069if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005071else
5072 if test -n "$AR"; then
5073 ac_cv_prog_AR="$AR" # Let the user override the test.
5074else
5075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078 IFS=$as_save_IFS
5079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5082 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084 break 2
5085 fi
5086done
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005088IFS=$as_save_IFS
5089
5090fi
5091fi
5092AR=$ac_cv_prog_AR
5093if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5095$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096else
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5098$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099fi
5100
5101
5102 test -n "$AR" && break
5103done
5104test -n "$AR" || AR="ar"
5105
5106
5107# tweak ARFLAGS only if the user didn't set it on the command line
5108
5109if test -z "$ARFLAGS"
5110then
5111 ARFLAGS="rc"
5112fi
5113
5114
5115# Extract the first word of "svnversion", so it can be a program name with args.
5116set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005119if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121else
5122 if test -n "$SVNVERSION"; then
5123 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5124else
5125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5132 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134 break 2
5135 fi
5136done
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138IFS=$as_save_IFS
5139
5140 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5141fi
5142fi
5143SVNVERSION=$ac_cv_prog_SVNVERSION
5144if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5146$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147else
Matthias Kloseb9621712010-04-24 17:59:49 +00005148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5149$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150fi
5151
5152
5153if test $SVNVERSION = found
5154then
5155 SVNVERSION="svnversion \$(srcdir)"
5156else
5157 SVNVERSION="echo Unversioned directory"
5158fi
5159
5160case $MACHDEP in
5161bsdos*|hp*|HP*)
5162 # install -d does not work on BSDI or HP-UX
5163 if test -z "$INSTALL"
5164 then
5165 INSTALL="${srcdir}/install-sh -c"
5166 fi
5167esac
5168ac_aux_dir=
5169for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005170 if test -f "$ac_dir/install-sh"; then
5171 ac_aux_dir=$ac_dir
5172 ac_install_sh="$ac_aux_dir/install-sh -c"
5173 break
5174 elif test -f "$ac_dir/install.sh"; then
5175 ac_aux_dir=$ac_dir
5176 ac_install_sh="$ac_aux_dir/install.sh -c"
5177 break
5178 elif test -f "$ac_dir/shtool"; then
5179 ac_aux_dir=$ac_dir
5180 ac_install_sh="$ac_aux_dir/shtool install -c"
5181 break
5182 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183done
5184if test -z "$ac_aux_dir"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005185 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186fi
5187
5188# These three variables are undocumented and unsupported,
5189# and are intended to be withdrawn in a future Autoconf release.
5190# They can cause serious problems if a builder's source tree is in a directory
5191# whose full name contains unusual characters.
5192ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5193ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5194ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5195
5196
5197# Find a good install program. We prefer a C program (faster),
5198# so one script is as good as another. But avoid the broken or
5199# incompatible versions:
5200# SysV /etc/install, /usr/sbin/install
5201# SunOS /usr/etc/install
5202# IRIX /sbin/install
5203# AIX /bin/install
5204# AmigaOS /C/install, which installs bootblocks on floppy discs
5205# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5206# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5207# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5208# OS/2's system install, which has a completely different semantic
5209# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005210# Reject install programs that cannot install multiple files.
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5212$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213if test -z "$INSTALL"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005214if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005215 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216else
5217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218for as_dir in $PATH
5219do
5220 IFS=$as_save_IFS
5221 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005222 # Account for people who put trailing slashes in PATH elements.
5223case $as_dir/ in #((
5224 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227 /usr/ucb/* ) ;;
5228 *)
5229 # OSF1 and SCO ODT 3.0 have their own names for install.
5230 # Don't use installbsd from OSF since it installs stuff as root
5231 # by default.
5232 for ac_prog in ginstall scoinst install; do
5233 for ac_exec_ext in '' $ac_executable_extensions; do
5234 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5235 if test $ac_prog = install &&
5236 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5237 # AIX install. It has an incompatible calling convention.
5238 :
5239 elif test $ac_prog = install &&
5240 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5241 # program-specific install script used by HP pwplus--don't use.
5242 :
5243 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005244 rm -rf conftest.one conftest.two conftest.dir
5245 echo one > conftest.one
5246 echo two > conftest.two
5247 mkdir conftest.dir
5248 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5249 test -s conftest.one && test -s conftest.two &&
5250 test -s conftest.dir/conftest.one &&
5251 test -s conftest.dir/conftest.two
5252 then
5253 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5254 break 3
5255 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256 fi
5257 fi
5258 done
5259 done
5260 ;;
5261esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005262
5263 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005264IFS=$as_save_IFS
5265
Matthias Kloseb9621712010-04-24 17:59:49 +00005266rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267
5268fi
5269 if test "${ac_cv_path_install+set}" = set; then
5270 INSTALL=$ac_cv_path_install
5271 else
5272 # As a last resort, use the slow shell script. Don't cache a
5273 # value for INSTALL within a source directory, because that will
5274 # break other packages using the cache if that directory is
5275 # removed, or if the value is a relative name.
5276 INSTALL=$ac_install_sh
5277 fi
5278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5280$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281
5282# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5283# It thinks the first close brace ends the variable substitution.
5284test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5285
5286test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5287
5288test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5289
5290
5291# Not every filesystem supports hard links
5292
5293if test -z "$LN" ; then
5294 case $ac_sys_system in
5295 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296 *) LN=ln;;
5297 esac
5298fi
5299
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005300# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005301
5302ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005303
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5306$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307
5308# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005309if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 withval=$with_pydebug;
5311if test "$withval" != no
5312then
5313
Matthias Kloseb9621712010-04-24 17:59:49 +00005314$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315
Matthias Kloseb9621712010-04-24 17:59:49 +00005316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5317$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005319 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005320else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5321$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322fi
5323else
Matthias Kloseb9621712010-04-24 17:59:49 +00005324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326fi
5327
5328
5329# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5330# merged with this chunk of code?
5331
5332# Optimizer/debugger flags
5333# ------------------------
5334# (The following bit of code is complicated enough - please keep things
5335# indented properly. Just pretend you're editing Python code. ;-)
5336
5337# There are two parallel sets of case statements below, one that checks to
5338# see if OPT was set and one that does BASECFLAGS setting based upon
5339# compiler and platform. BASECFLAGS tweaks need to be made even if the
5340# user set OPT.
5341
5342# tweak OPT based on compiler and platform, only if the user didn't set
5343# it on the command line
5344
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005345if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346then
5347 case $GCC in
5348 yes)
5349 if test "$CC" != 'g++' ; then
5350 STRICT_PROTO="-Wstrict-prototypes"
5351 fi
5352 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5353 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5354 WRAP="-fwrapv"
5355 fi
5356 case $ac_cv_prog_cc_g in
5357 yes)
5358 if test "$Py_DEBUG" = 'true' ; then
5359 # Optimization messes up debuggers, so turn it off for
5360 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005361 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362 else
5363 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5364 fi
5365 ;;
5366 *)
5367 OPT="-O3 -Wall $STRICT_PROTO"
5368 ;;
5369 esac
5370 case $ac_sys_system in
5371 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5372 ;;
5373 esac
5374 ;;
5375
5376 *)
5377 OPT="-O"
5378 ;;
5379 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380fi
5381
5382
5383
5384# The -arch flags for universal builds on OSX
5385UNIVERSAL_ARCH_FLAGS=
5386
5387
5388# tweak BASECFLAGS based on compiler and platform
5389case $GCC in
5390yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005391 # Python doesn't violate C99 aliasing rules, but older versions of
5392 # GCC produce warnings for legal Python code. Enable
5393 # -fno-strict-aliasing on versions of GCC that support but produce
5394 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5396$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 ac_save_cc="$CC"
5398 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005399 save_CFLAGS="$CFLAGS"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005400 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005402else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005405
Matthias Kloseb159a552010-04-25 21:00:44 +00005406
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005407int
5408main ()
5409{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005410
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005411 ;
5412 return 0;
5413}
Matthias Kloseb159a552010-04-25 21:00:44 +00005414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005416if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005417
5418 CC="$ac_save_cc -fstrict-aliasing"
5419 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005421/* end confdefs.h. */
5422
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005423 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005424int
5425main ()
5426{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005427double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005428 ;
5429 return 0;
5430}
Matthias Kloseb159a552010-04-25 21:00:44 +00005431
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005433if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005434
5435 ac_cv_no_strict_aliasing=no
5436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005437else
Matthias Kloseb159a552010-04-25 21:00:44 +00005438
5439 ac_cv_no_strict_aliasing=yes
5440
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005441fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005443
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005444else
Matthias Kloseb159a552010-04-25 21:00:44 +00005445
5446 ac_cv_no_strict_aliasing=no
5447
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005450fi
5451
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005452 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5455$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005456 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457 then
5458 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5459 fi
5460
5461 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5462 # support. Without this, treatment of subnormals doesn't follow
5463 # the standard.
5464 case $ac_sys_machine in
5465 alpha*)
5466 BASECFLAGS="$BASECFLAGS -mieee"
5467 ;;
5468 esac
5469
5470 case $ac_sys_system in
5471 SCO_SV*)
5472 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5473 ;;
5474 # is there any other compiler on Darwin besides gcc?
5475 Darwin*)
5476 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5477 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005478 if test "${CC}" = gcc
5479 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5481$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005482 case "${UNIVERSALSDK}" in
5483 */MacOSX10.4u.sdk)
5484 # Build using 10.4 SDK, force usage of gcc when the
5485 # compiler is gcc, otherwise the user will get very
5486 # confusing error messages when building on OSX 10.6
5487 CC=gcc-4.0
5488 CPP=cpp-4.0
5489 ;;
5490 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5492$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005493 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494
5495
5496 if test "${enable_universalsdk}"; then
5497 UNIVERSAL_ARCH_FLAGS=""
5498 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5499 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5500 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005501 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5503 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005504 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005505 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506
5507 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5508 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005509 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005510 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005512 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5513 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005514 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005515 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005516
5517 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5518 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005519 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005520 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 else
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005523 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524
5525 fi
5526
5527
Ronald Oussoren666028b2010-04-18 19:07:43 +00005528 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5529 if test "${UNIVERSALSDK}" != "/"
5530 then
5531 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5532 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005533 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534 fi
5535 fi
5536
5537 # Calculate the right deployment target for this build.
5538 #
5539 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5540 if test ${cur_target} '>' 10.2; then
5541 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005542 if test ${enable_universalsdk}; then
5543 if test "${UNIVERSAL_ARCHS}" = "all"; then
5544 # Ensure that the default platform for a
5545 # 4-way universal build is OSX 10.5,
5546 # that's the first OS release where
5547 # 4-way builds make sense.
5548 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005549
5550 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5551 cur_target='10.5'
5552
5553 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5554 cur_target='10.5'
5555
5556 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5557 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005558 fi
5559 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005560 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005561 # On Intel macs default to a deployment
5562 # target of 10.4, that's the first OSX
5563 # release with Intel support.
5564 cur_target="10.4"
5565 fi
5566 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567 fi
5568 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5569
5570 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5571 # environment with a value that is the same as what we'll use
5572 # in the Makefile to ensure that we'll get the same compiler
5573 # environment during configure and build time.
5574 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5575 export MACOSX_DEPLOYMENT_TARGET
5576 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5577
5578 ;;
5579 OSF*)
5580 BASECFLAGS="$BASECFLAGS -mieee"
5581 ;;
5582 esac
5583 ;;
5584
5585*)
5586 case $ac_sys_system in
5587 OpenUNIX*|UnixWare*)
5588 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5589 ;;
5590 OSF*)
5591 BASECFLAGS="$BASECFLAGS -ieee -std"
5592 ;;
5593 SCO_SV*)
5594 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5595 ;;
5596 esac
5597 ;;
5598esac
5599
5600if test "$Py_DEBUG" = 'true'; then
5601 :
5602else
5603 OPT="-DNDEBUG $OPT"
5604fi
5605
5606if test "$ac_arch_flags"
5607then
5608 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5609fi
5610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611# Check whether GCC supports PyArg_ParseTuple format
5612if test "$GCC" = "yes"
5613then
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5615$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 save_CFLAGS=$CFLAGS
5617 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619/* end confdefs.h. */
5620
5621 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622int
5623main ()
5624{
5625
5626 ;
5627 return 0;
5628}
Matthias Kloseb159a552010-04-25 21:00:44 +00005629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005631if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632
Matthias Kloseb159a552010-04-25 21:00:44 +00005633
Matthias Kloseb9621712010-04-24 17:59:49 +00005634$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
Matthias Kloseb159a552010-04-25 21:00:44 +00005636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005637$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639else
Matthias Kloseb159a552010-04-25 21:00:44 +00005640
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005642$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643
5644fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5646 CFLAGS=$save_CFLAGS
5647fi
5648
5649# On some compilers, pthreads are available without further options
5650# (e.g. MacOS X). On some of these systems, the compiler will not
5651# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5652# So we have to see first whether pthreads are available without
5653# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5655$as_echo_n "checking whether pthreads are available without options... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005656if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658else
Matthias Kloseb9621712010-04-24 17:59:49 +00005659 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 ac_cv_pthread_is_default=no
5661else
Matthias Kloseb9621712010-04-24 17:59:49 +00005662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663/* end confdefs.h. */
5664
5665#include <pthread.h>
5666
5667void* routine(void* p){return NULL;}
5668
5669int main(){
5670 pthread_t p;
5671 if(pthread_create(&p,NULL,routine,NULL)!=0)
5672 return 1;
5673 (void)pthread_detach(p);
5674 return 0;
5675}
5676
5677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005678if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679
5680 ac_cv_pthread_is_default=yes
5681 ac_cv_kthread=no
5682 ac_cv_pthread=no
5683
5684else
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689fi
5690
5691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692fi
5693
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5695$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696
5697
5698if test $ac_cv_pthread_is_default = yes
5699then
5700 ac_cv_kpthread=no
5701else
5702# -Kpthread, if available, provides the right #defines
5703# and linker options to make pthread_create available
5704# Some compilers won't report that they do not support -Kpthread,
5705# so we need to run a program to see whether it really made the
5706# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5708$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005709if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711else
5712 ac_save_cc="$CC"
5713CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005714if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715 ac_cv_kpthread=no
5716else
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718/* end confdefs.h. */
5719
5720#include <pthread.h>
5721
5722void* routine(void* p){return NULL;}
5723
5724int main(){
5725 pthread_t p;
5726 if(pthread_create(&p,NULL,routine,NULL)!=0)
5727 return 1;
5728 (void)pthread_detach(p);
5729 return 0;
5730}
5731
5732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005733if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734 ac_cv_kpthread=yes
5735else
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740fi
5741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742CC="$ac_save_cc"
5743fi
5744
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5746$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747fi
5748
5749if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5750then
5751# -Kthread, if available, provides the right #defines
5752# and linker options to make pthread_create available
5753# Some compilers won't report that they do not support -Kthread,
5754# so we need to run a program to see whether it really made the
5755# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5757$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005758if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005759 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760else
5761 ac_save_cc="$CC"
5762CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005763if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764 ac_cv_kthread=no
5765else
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767/* end confdefs.h. */
5768
5769#include <pthread.h>
5770
5771void* routine(void* p){return NULL;}
5772
5773int main(){
5774 pthread_t p;
5775 if(pthread_create(&p,NULL,routine,NULL)!=0)
5776 return 1;
5777 (void)pthread_detach(p);
5778 return 0;
5779}
5780
5781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005782if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783 ac_cv_kthread=yes
5784else
Matthias Kloseb9621712010-04-24 17:59:49 +00005785 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5788 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789fi
5790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791CC="$ac_save_cc"
5792fi
5793
Matthias Kloseb9621712010-04-24 17:59:49 +00005794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5795$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796fi
5797
5798if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5799then
5800# -pthread, if available, provides the right #defines
5801# and linker options to make pthread_create available
5802# Some compilers won't report that they do not support -pthread,
5803# so we need to run a program to see whether it really made the
5804# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5806$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005807if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809else
5810 ac_save_cc="$CC"
5811CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005812if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 ac_cv_pthread=no
5814else
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816/* end confdefs.h. */
5817
5818#include <pthread.h>
5819
5820void* routine(void* p){return NULL;}
5821
5822int main(){
5823 pthread_t p;
5824 if(pthread_create(&p,NULL,routine,NULL)!=0)
5825 return 1;
5826 (void)pthread_detach(p);
5827 return 0;
5828}
5829
5830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832 ac_cv_pthread=yes
5833else
Matthias Kloseb9621712010-04-24 17:59:49 +00005834 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840CC="$ac_save_cc"
5841fi
5842
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5844$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845fi
5846
5847# If we have set a CC compiler flag for thread support then
5848# check if it works for CXX, too.
5849ac_cv_cxx_thread=no
5850if test ! -z "$CXX"
5851then
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5853$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854ac_save_cxx="$CXX"
5855
5856if test "$ac_cv_kpthread" = "yes"
5857then
5858 CXX="$CXX -Kpthread"
5859 ac_cv_cxx_thread=yes
5860elif test "$ac_cv_kthread" = "yes"
5861then
5862 CXX="$CXX -Kthread"
5863 ac_cv_cxx_thread=yes
5864elif test "$ac_cv_pthread" = "yes"
5865then
5866 CXX="$CXX -pthread"
5867 ac_cv_cxx_thread=yes
5868fi
5869
5870if test $ac_cv_cxx_thread = yes
5871then
5872 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5873 $CXX -c conftest.$ac_ext 2>&5
5874 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5875 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5876 then
5877 ac_cv_cxx_thread=yes
5878 else
5879 ac_cv_cxx_thread=no
5880 fi
5881 rm -fr conftest*
5882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5884$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
5886CXX="$ac_save_cxx"
5887
5888
5889# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5891$as_echo_n "checking for ANSI C header files... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00005892if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005893 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894else
Matthias Kloseb9621712010-04-24 17:59:49 +00005895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896/* end confdefs.h. */
5897#include <stdlib.h>
5898#include <stdarg.h>
5899#include <string.h>
5900#include <float.h>
5901
5902int
5903main ()
5904{
5905
5906 ;
5907 return 0;
5908}
5909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005910if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ac_cv_header_stdc=yes
5912else
Matthias Kloseb9621712010-04-24 17:59:49 +00005913 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5916
5917if test $ac_cv_header_stdc = yes; then
5918 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920/* end confdefs.h. */
5921#include <string.h>
5922
5923_ACEOF
5924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 $EGREP "memchr" >/dev/null 2>&1; then :
5926
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927else
5928 ac_cv_header_stdc=no
5929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005930rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931
5932fi
5933
5934if test $ac_cv_header_stdc = yes; then
5935 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937/* end confdefs.h. */
5938#include <stdlib.h>
5939
5940_ACEOF
5941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 $EGREP "free" >/dev/null 2>&1; then :
5943
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944else
5945 ac_cv_header_stdc=no
5946fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005947rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948
5949fi
5950
5951if test $ac_cv_header_stdc = yes; then
5952 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 :
5955else
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957/* end confdefs.h. */
5958#include <ctype.h>
5959#include <stdlib.h>
5960#if ((' ' & 0x0FF) == 0x020)
5961# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5962# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5963#else
5964# define ISLOWER(c) \
5965 (('a' <= (c) && (c) <= 'i') \
5966 || ('j' <= (c) && (c) <= 'r') \
5967 || ('s' <= (c) && (c) <= 'z'))
5968# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5969#endif
5970
5971#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5972int
5973main ()
5974{
5975 int i;
5976 for (i = 0; i < 256; i++)
5977 if (XOR (islower (i), ISLOWER (i))
5978 || toupper (i) != TOUPPER (i))
5979 return 2;
5980 return 0;
5981}
5982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005983if ac_fn_c_try_run "$LINENO"; then :
5984
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985else
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5989 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990fi
5991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992fi
5993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5995$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996if test $ac_cv_header_stdc = yes; then
5997
Matthias Kloseb9621712010-04-24 17:59:49 +00005998$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999
6000fi
6001
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006002for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6003fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006004ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006005shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006006unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006007sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6008sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006009sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006010sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006011sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006012sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006013bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006014do :
6015 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6016ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006017if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006018 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006019#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006020_ACEOF
6021
6022fi
6023
Guido van Rossum627b2d71993-12-24 10:39:16 +00006024done
6025
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006026ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006027for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6030$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006031if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006033else
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006035/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036#include <sys/types.h>
6037#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006038
Martin v. Löwis11437992002-04-12 09:54:03 +00006039int
6040main ()
6041{
6042if ((DIR *) 0)
6043return 0;
6044 ;
6045 return 0;
6046}
6047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006049 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006050else
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006055eval ac_res=\$$as_ac_Header
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6057$as_echo "$ac_res" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006058if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006059 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006060#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006061_ACEOF
6062
6063ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006066done
6067# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6068if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6070$as_echo_n "checking for library containing opendir... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006071if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006073else
Martin v. Löwis11437992002-04-12 09:54:03 +00006074 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006078/* Override any GCC internal prototype to avoid an error.
6079 Use char because int might match the return type of a GCC
6080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006081#ifdef __cplusplus
6082extern "C"
6083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006084char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006085int
6086main ()
6087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006089 ;
6090 return 0;
6091}
6092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093for ac_lib in '' dir; do
6094 if test -z "$ac_lib"; then
6095 ac_res="none required"
6096 else
6097 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006098 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006103rm -f core conftest.err conftest.$ac_objext \
6104 conftest$ac_exeext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006105 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108done
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006109if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006111else
6112 ac_cv_search_opendir=no
6113fi
6114rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006115LIBS=$ac_func_search_save_LIBS
6116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6118$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006120if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006124
Michael W. Hudson54241132001-12-07 15:38:26 +00006125else
Matthias Kloseb9621712010-04-24 17:59:49 +00006126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6127$as_echo_n "checking for library containing opendir... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006128if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006130else
6131 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135/* Override any GCC internal prototype to avoid an error.
6136 Use char because int might match the return type of a GCC
6137 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006138#ifdef __cplusplus
6139extern "C"
6140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006141char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006142int
6143main ()
6144{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006145return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006146 ;
6147 return 0;
6148}
6149_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150for ac_lib in '' x; do
6151 if test -z "$ac_lib"; then
6152 ac_res="none required"
6153 else
6154 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006156 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006160rm -f core conftest.err conftest.$ac_objext \
6161 conftest$ac_exeext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006162 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165done
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006166if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168else
6169 ac_cv_search_opendir=no
6170fi
6171rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006172LIBS=$ac_func_search_save_LIBS
6173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6175$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006177if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006179
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006180fi
6181
6182fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006183
Matthias Kloseb9621712010-04-24 17:59:49 +00006184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6185$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006186if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188else
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006190/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192int
6193main ()
6194{
6195return makedev(0, 0);
6196 ;
6197 return 0;
6198}
6199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201 ac_cv_header_sys_types_h_makedev=yes
6202else
Matthias Kloseb9621712010-04-24 17:59:49 +00006203 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006205rm -f core conftest.err conftest.$ac_objext \
6206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207
6208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6210$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006213ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006214if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006215
Matthias Kloseb9621712010-04-24 17:59:49 +00006216$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217
6218fi
6219
6220
6221
6222 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006224if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006225
Matthias Kloseb9621712010-04-24 17:59:49 +00006226$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227
6228fi
6229
6230
6231 fi
6232fi
6233
Michael W. Hudson54241132001-12-07 15:38:26 +00006234
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006235# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006236for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006237do :
6238 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006239#ifdef HAVE_CURSES_H
6240#include <curses.h>
6241#endif
6242
Matthias Kloseb9621712010-04-24 17:59:49 +00006243"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006244if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006245 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006246#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006247_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006248
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006249fi
6250
6251done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006252
6253
Martin v. Löwis11017b12006-01-14 18:12:57 +00006254# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006255for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006256do :
6257 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006258#ifdef HAVE_ASM_TYPES_H
6259#include <asm/types.h>
6260#endif
6261#ifdef HAVE_SYS_SOCKET_H
6262#include <sys/socket.h>
6263#endif
6264
Matthias Kloseb9621712010-04-24 17:59:49 +00006265"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006266if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006267 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006268#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006269_ACEOF
6270
6271fi
6272
6273done
6274
6275
Guido van Rossum627b2d71993-12-24 10:39:16 +00006276# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006277was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6279$as_echo_n "checking for clock_t in time.h... " >&6; }
6280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006281/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006282#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006283
6284_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006286 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006287 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006288else
Martin v. Löwis11437992002-04-12 09:54:03 +00006289
6290
Matthias Kloseb9621712010-04-24 17:59:49 +00006291$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006292
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006293
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006295rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006296
Matthias Kloseb9621712010-04-24 17:59:49 +00006297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6298$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006299
Neal Norwitz11690112002-07-30 01:08:28 +00006300# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6302$as_echo_n "checking for makedev... " >&6; }
6303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006304/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006305
Jesus Cea740f53a2010-04-28 11:35:30 +00006306#if defined(MAJOR_IN_MKDEV)
6307#include <sys/mkdev.h>
6308#elif defined(MAJOR_IN_SYSMACROS)
6309#include <sys/sysmacros.h>
6310#else
6311#include <sys/types.h>
6312#endif
6313
Neal Norwitz11690112002-07-30 01:08:28 +00006314int
6315main ()
6316{
Jesus Cea740f53a2010-04-28 11:35:30 +00006317
6318 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006319 ;
6320 return 0;
6321}
Matthias Kloseb159a552010-04-25 21:00:44 +00006322
Neal Norwitz11690112002-07-30 01:08:28 +00006323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006324if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006325 ac_cv_has_makedev=yes
6326else
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006329rm -f core conftest.err conftest.$ac_objext \
6330 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006331if test "$ac_cv_has_makedev" = "no"; then
6332 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006334/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006335
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006336#define _OSF_SOURCE 1
6337#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006338
Neal Norwitz11690112002-07-30 01:08:28 +00006339int
6340main ()
6341{
6342 makedev(0, 0)
6343 ;
6344 return 0;
6345}
6346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006347if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006348 ac_cv_has_makedev=yes
6349else
Matthias Kloseb9621712010-04-24 17:59:49 +00006350 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006352rm -f core conftest.err conftest.$ac_objext \
6353 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006354 if test "$ac_cv_has_makedev" = "yes"; then
6355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006357
6358 fi
6359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6361$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006362if test "$ac_cv_has_makedev" = "yes"; then
6363
Matthias Kloseb9621712010-04-24 17:59:49 +00006364$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006365
6366fi
6367
Martin v. Löwis399a6892002-10-04 10:22:02 +00006368# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6369# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6370# defined, but the compiler does not support pragma redefine_extname,
6371# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6372# structures (such as rlimit64) without declaring them. As a
6373# work-around, disable LFS on such configurations
6374
6375use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6377$as_echo_n "checking Solaris LFS bug... " >&6; }
6378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006379/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006380
6381#define _LARGEFILE_SOURCE 1
6382#define _FILE_OFFSET_BITS 64
6383#include <sys/resource.h>
6384
Martin v. Löwis399a6892002-10-04 10:22:02 +00006385int
6386main ()
6387{
6388struct rlimit foo;
6389 ;
6390 return 0;
6391}
6392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006394 sol_lfs_bug=no
6395else
Matthias Kloseb9621712010-04-24 17:59:49 +00006396 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6400$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006401if test "$sol_lfs_bug" = "yes"; then
6402 use_lfs=no
6403fi
6404
6405if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006406# Two defines needed to enable largefile support on various platforms
6407# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006410
6411
Matthias Kloseb9621712010-04-24 17:59:49 +00006412$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006413
Martin v. Löwis399a6892002-10-04 10:22:02 +00006414fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006415
Guido van Rossum84e7b241996-08-19 21:59:00 +00006416# Add some code to confdefs.h so that the test for off_t works on SCO
6417cat >> confdefs.h <<\EOF
6418#if defined(SCO_DS)
6419#undef _OFF_T
6420#endif
6421EOF
6422
Guido van Rossumef2255b2000-03-10 22:30:29 +00006423# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006424ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006425if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006426
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006427else
Martin v. Löwis11437992002-04-12 09:54:03 +00006428
6429cat >>confdefs.h <<_ACEOF
6430#define mode_t int
6431_ACEOF
6432
6433fi
6434
Matthias Kloseb9621712010-04-24 17:59:49 +00006435ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006436if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006438else
Martin v. Löwis11437992002-04-12 09:54:03 +00006439
6440cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006441#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006442_ACEOF
6443
6444fi
6445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006447if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449else
Martin v. Löwis11437992002-04-12 09:54:03 +00006450
6451cat >>confdefs.h <<_ACEOF
6452#define pid_t int
6453_ACEOF
6454
6455fi
6456
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006457
Martin v. Löwis11437992002-04-12 09:54:03 +00006458cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006459#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006460_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006463if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006464
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465else
Martin v. Löwis11437992002-04-12 09:54:03 +00006466
6467cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006468#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006469_ACEOF
6470
6471fi
6472
Matthias Kloseb9621712010-04-24 17:59:49 +00006473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6474$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006475if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006476 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006477else
Matthias Kloseb9621712010-04-24 17:59:49 +00006478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006479/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006481
6482_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006484 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485 ac_cv_type_uid_t=yes
6486else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006487 ac_cv_type_uid_t=no
6488fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006489rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6493$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006494if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495
Matthias Kloseb9621712010-04-24 17:59:49 +00006496$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498
Matthias Kloseb9621712010-04-24 17:59:49 +00006499$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500
6501fi
6502
Matthias Kloseb9621712010-04-24 17:59:49 +00006503ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6504case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006505 no|yes) ;; #(
6506 *)
6507
Matthias Kloseb9621712010-04-24 17:59:49 +00006508$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006509
6510
6511cat >>confdefs.h <<_ACEOF
6512#define uint32_t $ac_cv_c_uint32_t
6513_ACEOF
6514;;
6515 esac
6516
Matthias Kloseb9621712010-04-24 17:59:49 +00006517ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6518case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006519 no|yes) ;; #(
6520 *)
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006523
6524
6525cat >>confdefs.h <<_ACEOF
6526#define uint64_t $ac_cv_c_uint64_t
6527_ACEOF
6528;;
6529 esac
6530
Matthias Kloseb9621712010-04-24 17:59:49 +00006531ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6532case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006533 no|yes) ;; #(
6534 *)
6535
6536cat >>confdefs.h <<_ACEOF
6537#define int32_t $ac_cv_c_int32_t
6538_ACEOF
6539;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006540esac
6541
Matthias Kloseb9621712010-04-24 17:59:49 +00006542ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6543case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006544 no|yes) ;; #(
6545 *)
6546
6547cat >>confdefs.h <<_ACEOF
6548#define int64_t $ac_cv_c_int64_t
6549_ACEOF
6550;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006551esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006554if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555
Matthias Kloseb9621712010-04-24 17:59:49 +00006556$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006557
6558fi
6559
Jack Jansendd19cf82001-12-06 22:36:17 +00006560
Michael W. Hudson54241132001-12-07 15:38:26 +00006561# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006562# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006563# The cast to long int works around a bug in the HP C Compiler
6564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6566# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6568$as_echo_n "checking size of int... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006569if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006571else
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006573
Martin v. Löwis11437992002-04-12 09:54:03 +00006574else
Matthias Kloseb9621712010-04-24 17:59:49 +00006575 if test "$ac_cv_type_int" = yes; then
6576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006578as_fn_error 77 "cannot compute sizeof (int)
6579See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006580 else
6581 ac_cv_sizeof_int=0
6582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006584
Martin v. Löwis11437992002-04-12 09:54:03 +00006585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6587$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006588
6589
6590
Martin v. Löwis11437992002-04-12 09:54:03 +00006591cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006592#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006593_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006594
6595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596# The cast to long int works around a bug in the HP C Compiler
6597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6601$as_echo_n "checking size of long... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006602if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006604else
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607else
Matthias Kloseb9621712010-04-24 17:59:49 +00006608 if test "$ac_cv_type_long" = yes; then
6609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006611as_fn_error 77 "cannot compute sizeof (long)
6612See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 else
6614 ac_cv_sizeof_long=0
6615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006617
Martin v. Löwis11437992002-04-12 09:54:03 +00006618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6620$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621
6622
6623
Martin v. Löwis11437992002-04-12 09:54:03 +00006624cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006625#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006626_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006627
6628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629# The cast to long int works around a bug in the HP C Compiler
6630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6634$as_echo_n "checking size of void *... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006635if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 if test "$ac_cv_type_void_p" = yes; then
6642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006644as_fn_error 77 "cannot compute sizeof (void *)
6645See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 else
6647 ac_cv_sizeof_void_p=0
6648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6653$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654
6655
6656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006658#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006659_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006660
6661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662# The cast to long int works around a bug in the HP C Compiler
6663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6667$as_echo_n "checking size of short... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006668if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673else
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 if test "$ac_cv_type_short" = yes; then
6675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006677as_fn_error 77 "cannot compute sizeof (short)
6678See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679 else
6680 ac_cv_sizeof_short=0
6681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006683
Martin v. Löwis11437992002-04-12 09:54:03 +00006684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6686$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687
6688
6689
Martin v. Löwis11437992002-04-12 09:54:03 +00006690cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006691#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006693
6694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695# The cast to long int works around a bug in the HP C Compiler
6696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6700$as_echo_n "checking size of float... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006701if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 if test "$ac_cv_type_float" = yes; then
6708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006710as_fn_error 77 "cannot compute sizeof (float)
6711See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712 else
6713 ac_cv_sizeof_float=0
6714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6719$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720
6721
6722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006724#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006725_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726
6727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728# The cast to long int works around a bug in the HP C Compiler
6729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6733$as_echo_n "checking size of double... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006734if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 if test "$ac_cv_type_double" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006743as_fn_error 77 "cannot compute sizeof (double)
6744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745 else
6746 ac_cv_sizeof_double=0
6747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6752$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753
6754
6755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006757#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006758_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759
6760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761# The cast to long int works around a bug in the HP C Compiler
6762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6766$as_echo_n "checking size of fpos_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006767if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 if test "$ac_cv_type_fpos_t" = yes; then
6774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006776as_fn_error 77 "cannot compute sizeof (fpos_t)
6777See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778 else
6779 ac_cv_sizeof_fpos_t=0
6780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006782
Martin v. Löwis11437992002-04-12 09:54:03 +00006783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6785$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786
6787
6788
Martin v. Löwis11437992002-04-12 09:54:03 +00006789cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006790#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006791_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006792
Michael W. Hudson54241132001-12-07 15:38:26 +00006793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794# The cast to long int works around a bug in the HP C Compiler
6795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6797# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6799$as_echo_n "checking size of size_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006800if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006804
Martin v. Löwis18e16552006-02-15 17:27:45 +00006805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 if test "$ac_cv_type_size_t" = yes; then
6807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006809as_fn_error 77 "cannot compute sizeof (size_t)
6810See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811 else
6812 ac_cv_sizeof_size_t=0
6813 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006815
Martin v. Löwis18e16552006-02-15 17:27:45 +00006816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6818$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819
6820
6821
Martin v. Löwis18e16552006-02-15 17:27:45 +00006822cat >>confdefs.h <<_ACEOF
6823#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6824_ACEOF
6825
6826
Christian Heimes400adb02008-02-01 08:12:03 +00006827# The cast to long int works around a bug in the HP C Compiler
6828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6832$as_echo_n "checking size of pid_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006833if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006837
Christian Heimes400adb02008-02-01 08:12:03 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 if test "$ac_cv_type_pid_t" = yes; then
6840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006842as_fn_error 77 "cannot compute sizeof (pid_t)
6843See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006844 else
6845 ac_cv_sizeof_pid_t=0
6846 fi
6847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006848
Christian Heimes400adb02008-02-01 08:12:03 +00006849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6851$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006852
6853
6854
6855cat >>confdefs.h <<_ACEOF
6856#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6857_ACEOF
6858
6859
Michael W. Hudson54241132001-12-07 15:38:26 +00006860
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6862$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006863have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006865/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867int
6868main ()
6869{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006870long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006871 ;
6872 return 0;
6873}
6874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006876
6877
Matthias Kloseb9621712010-04-24 17:59:49 +00006878$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006879
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006880 have_long_long=yes
6881
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6885$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006886if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887# The cast to long int works around a bug in the HP C Compiler
6888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6890# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6892$as_echo_n "checking size of long long... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006893if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006895else
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 if test "$ac_cv_type_long_long" = yes; then
6900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006902as_fn_error 77 "cannot compute sizeof (long long)
6903See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006904 else
6905 ac_cv_sizeof_long_long=0
6906 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6911$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912
6913
6914
Martin v. Löwis11437992002-04-12 09:54:03 +00006915cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006916#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006917_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006918
Michael W. Hudson54241132001-12-07 15:38:26 +00006919
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006920fi
6921
Matthias Kloseb9621712010-04-24 17:59:49 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6923$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006924have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006926/* end confdefs.h. */
6927
6928int
6929main ()
6930{
6931long double x; x = (long double)0;
6932 ;
6933 return 0;
6934}
6935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006936if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006937
6938
Matthias Kloseb9621712010-04-24 17:59:49 +00006939$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006940
6941 have_long_double=yes
6942
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006943fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6946$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948# The cast to long int works around a bug in the HP C Compiler
6949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6951# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6953$as_echo_n "checking size of long double... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006954if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956else
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006958
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006959else
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 if test "$ac_cv_type_long_double" = yes; then
6961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00006963as_fn_error 77 "cannot compute sizeof (long double)
6964See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965 else
6966 ac_cv_sizeof_long_double=0
6967 fi
6968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006969
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6972$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006973
6974
6975
6976cat >>confdefs.h <<_ACEOF
6977#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6978_ACEOF
6979
6980
6981fi
6982
6983
Matthias Kloseb9621712010-04-24 17:59:49 +00006984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6985$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006986have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006988/* end confdefs.h. */
6989
6990int
6991main ()
6992{
6993_Bool x; x = (_Bool)0;
6994 ;
6995 return 0;
6996}
6997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006998if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006999
7000
Matthias Kloseb9621712010-04-24 17:59:49 +00007001$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007002
7003 have_c99_bool=yes
7004
Thomas Woutersb2137042007-02-01 18:02:27 +00007005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7008$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007009if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010# The cast to long int works around a bug in the HP C Compiler
7011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7013# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7015$as_echo_n "checking size of _Bool... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007016if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007018else
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007020
Thomas Woutersb2137042007-02-01 18:02:27 +00007021else
Matthias Kloseb9621712010-04-24 17:59:49 +00007022 if test "$ac_cv_type__Bool" = yes; then
7023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007025as_fn_error 77 "cannot compute sizeof (_Bool)
7026See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027 else
7028 ac_cv_sizeof__Bool=0
7029 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007031
Thomas Woutersb2137042007-02-01 18:02:27 +00007032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7034$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035
7036
7037
Thomas Woutersb2137042007-02-01 18:02:27 +00007038cat >>confdefs.h <<_ACEOF
7039#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7040_ACEOF
7041
7042
7043fi
7044
Matthias Kloseb9621712010-04-24 17:59:49 +00007045ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007046 #include <stdint.h>
7047 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007048 #ifdef HAVE_INTTYPES_H
7049 #include <inttypes.h>
7050 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007051"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007052if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007053
7054cat >>confdefs.h <<_ACEOF
7055#define HAVE_UINTPTR_T 1
7056_ACEOF
7057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058# The cast to long int works around a bug in the HP C Compiler
7059# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7060# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7061# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7063$as_echo_n "checking size of uintptr_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007064if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007066else
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007068
Martin v. Löwis11437992002-04-12 09:54:03 +00007069else
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 if test "$ac_cv_type_uintptr_t" = yes; then
7071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007073as_fn_error 77 "cannot compute sizeof (uintptr_t)
7074See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075 else
7076 ac_cv_sizeof_uintptr_t=0
7077 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079
Martin v. Löwis11437992002-04-12 09:54:03 +00007080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7082$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007083
7084
7085
Martin v. Löwis11437992002-04-12 09:54:03 +00007086cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007087#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007088_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007089
Michael W. Hudson54241132001-12-07 15:38:26 +00007090
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007091fi
7092
Thomas Wouters89f507f2006-12-13 04:49:30 +00007093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007094# The cast to long int works around a bug in the HP C Compiler
7095# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7096# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7097# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7099$as_echo_n "checking size of off_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007100if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007102else
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007104#ifdef HAVE_SYS_TYPES_H
7105#include <sys/types.h>
7106#endif
7107
Matthias Kloseb9621712010-04-24 17:59:49 +00007108"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007110else
Matthias Kloseb9621712010-04-24 17:59:49 +00007111 if test "$ac_cv_type_off_t" = yes; then
7112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007114as_fn_error 77 "cannot compute sizeof (off_t)
7115See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116 else
7117 ac_cv_sizeof_off_t=0
7118 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007120
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7123$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007124
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007125
7126
Martin v. Löwis11437992002-04-12 09:54:03 +00007127cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007129_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007130
Michael W. Hudson54241132001-12-07 15:38:26 +00007131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007132
Matthias Kloseb9621712010-04-24 17:59:49 +00007133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7134$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007135if test "$have_long_long" = yes
7136then
7137if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007138 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007141
Matthias Kloseb9621712010-04-24 17:59:49 +00007142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7143$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007144else
Matthias Kloseb9621712010-04-24 17:59:49 +00007145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7146$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007147fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007148else
Matthias Kloseb9621712010-04-24 17:59:49 +00007149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7150$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007151fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007152
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007153# The cast to long int works around a bug in the HP C Compiler
7154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7156# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7158$as_echo_n "checking size of time_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007159if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161else
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007163#ifdef HAVE_SYS_TYPES_H
7164#include <sys/types.h>
7165#endif
7166#ifdef HAVE_TIME_H
7167#include <time.h>
7168#endif
7169
Matthias Kloseb9621712010-04-24 17:59:49 +00007170"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007172else
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 if test "$ac_cv_type_time_t" = yes; then
7174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007176as_fn_error 77 "cannot compute sizeof (time_t)
7177See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007178 else
7179 ac_cv_sizeof_time_t=0
7180 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007182
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7185$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007186
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187
7188
Martin v. Löwis11437992002-04-12 09:54:03 +00007189cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007190#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007191_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007192
Michael W. Hudson54241132001-12-07 15:38:26 +00007193
7194
Trent Mick635f6fb2000-08-23 21:33:05 +00007195# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007196ac_save_cc="$CC"
7197if test "$ac_cv_kpthread" = "yes"
7198then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007199elif test "$ac_cv_kthread" = "yes"
7200then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007201elif test "$ac_cv_pthread" = "yes"
7202then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007203fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7206$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007207have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007209/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007210
7211 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007212int
7213main ()
7214{
Guido van Rossum12580492000-09-24 16:47:19 +00007215pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007216 ;
7217 return 0;
7218}
Matthias Kloseb159a552010-04-25 21:00:44 +00007219
Martin v. Löwis11437992002-04-12 09:54:03 +00007220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007221if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007222 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7226$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007227if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7231# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7233$as_echo_n "checking size of pthread_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007234if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007235 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007236else
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238#ifdef HAVE_PTHREAD_H
7239#include <pthread.h>
7240#endif
7241
Matthias Kloseb9621712010-04-24 17:59:49 +00007242"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 if test "$ac_cv_type_pthread_t" = yes; then
7246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007248as_fn_error 77 "cannot compute sizeof (pthread_t)
7249See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250 else
7251 ac_cv_sizeof_pthread_t=0
7252 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007254
Trent Mick635f6fb2000-08-23 21:33:05 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7257$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
7260
Martin v. Löwis11437992002-04-12 09:54:03 +00007261cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007262#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007263_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265
Trent Mick635f6fb2000-08-23 21:33:05 +00007266fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007267CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007268
Michael W. Hudson54241132001-12-07 15:38:26 +00007269
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007270case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007271 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007272 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7273 ;;
7274 Darwin/*)
7275 OTHER_LIBTOOL_OPT=""
7276 ;;
7277esac
7278
7279
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007280ARCH_RUN_32BIT=""
7281
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007282case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007283 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007284 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7285 if test "${enable_universalsdk}"; then
7286 :
7287 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007288 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007289 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007292 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007293 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007294 if test ${gcc_version} '<' 4.0
7295 then
7296 LIBTOOL_CRUFT="-lcc_dynamic"
7297 else
7298 LIBTOOL_CRUFT=""
7299 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007301 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007305
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007306 #include <unistd.h>
7307 int main(int argc, char*argv[])
7308 {
7309 if (sizeof(long) == 4) {
7310 return 0;
7311 } else {
7312 return 1;
7313 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007314 }
7315
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318 ac_osx_32bit=yes
7319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007324fi
7325
7326
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007328 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329 i386)
7330 MACOSX_DEFAULT_ARCH="i386"
7331 ;;
7332 ppc)
7333 MACOSX_DEFAULT_ARCH="ppc"
7334 ;;
7335 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007336 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337 ;;
7338 esac
7339 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007340 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341 i386)
7342 MACOSX_DEFAULT_ARCH="x86_64"
7343 ;;
7344 ppc)
7345 MACOSX_DEFAULT_ARCH="ppc64"
7346 ;;
7347 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007348 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349 ;;
7350 esac
7351
7352 #ARCH_RUN_32BIT="true"
7353 fi
7354
7355 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007356 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007357 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007358esac
7359
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7361$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007362if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007363then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007364 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007366 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367
Matthias Kloseb9621712010-04-24 17:59:49 +00007368$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7371$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007372 if test $enable_shared = "yes"
7373 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007374 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007375 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7378$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379fi
7380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7382$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007383case $ac_sys_system/$ac_sys_release in
7384 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007387
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7389$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007390 ;;
7391 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7393$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007394 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007395esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007396
Guido van Rossum0a516c91994-09-12 10:58:40 +00007397# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007398
Michael W. Hudson54241132001-12-07 15:38:26 +00007399
7400
7401
7402
Benjamin Peterson99f03762010-04-11 22:15:28 +00007403
Thomas Wouters477c8d52006-05-27 19:21:47 +00007404
Georg Brandlb1441c72009-01-03 22:33:39 +00007405
Thomas Wouters477c8d52006-05-27 19:21:47 +00007406cat >>confdefs.h <<_ACEOF
7407#define SHLIB_EXT "$SO"
7408_ACEOF
7409
Guido van Rossum0a516c91994-09-12 10:58:40 +00007410# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007411# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007412# (Shared libraries in this instance are shared modules to be loaded into
7413# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7415$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007416if test -z "$LDSHARED"
7417then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007419 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007420 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007421 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007422 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007423 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007424 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007426 if test "$GCC" = "yes" ; then
7427 LDSHARED='$(CC) -shared'
7428 LDCXXSHARED='$(CXX) -shared'
7429 else
7430 LDSHARED='$(CC) -G'
7431 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007432 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007433 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007434 if test "$GCC" = "yes" ; then
7435 LDSHARED='$(CC) -shared'
7436 LDCXXSHARED='$(CXX) -shared'
7437 else
7438 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007439 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007440 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007441 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007442 LDSHARED='$(CC) -bundle'
7443 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007444 if test "$enable_framework" ; then
7445 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007446 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7447 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007449 else
7450 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007451 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007452 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007453 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007454 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007455 LDSHARED='$(CC) -bundle'
7456 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007457 if test "$enable_framework" ; then
7458 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007459 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7460 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007461 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007462 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007463 # No framework, use the Python app as bundle-loader
7464 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007465 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007467 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007468 Darwin/*)
7469 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7470 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007471
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007472 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007473 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007474 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007475 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007477 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7478 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007479 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007480 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007481 LDSHARED='$(CC) -bundle'
7482 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007483 if test "$enable_framework" ; then
7484 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007485 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7486 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007487 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007488 else
7489 # No framework, use the Python app as bundle-loader
7490 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7491 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 fi
7494 fi
7495 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 Linux*|GNU*|QNX*)
7497 LDSHARED='$(CC) -shared'
7498 LDCXXSHARED='$(CXX) -shared';;
7499 BSD/OS*/4*)
7500 LDSHARED="gcc -shared"
7501 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007502 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007504 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007505 LDSHARED='$(CC) -shared'
7506 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007507 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007508 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007509 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007510 OpenBSD*)
7511 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7512 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007513 LDSHARED='$(CC) -shared $(CCSHARED)'
7514 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007515 else
7516 case `uname -r` in
7517 [01].* | 2.[0-7] | 2.[0-7].*)
7518 LDSHARED="ld -Bshareable ${LDFLAGS}"
7519 ;;
7520 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007521 LDSHARED='$(CC) -shared $(CCSHARED)'
7522 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007523 ;;
7524 esac
7525 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007526 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007527 LDSHARED="cc -shared"
7528 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007529 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 if test "$GCC" = "yes" ; then
7531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared'
7533 else
7534 LDSHARED='$(CC) -G'
7535 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007536 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007537 SCO_SV*)
7538 LDSHARED='$(CC) -Wl,-G,-Bexport'
7539 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7540 CYGWIN*)
7541 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7542 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007543 *) LDSHARED="ld";;
7544 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7547$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007548LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007549BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007551# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7553$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554if test -z "$CCSHARED"
7555then
Guido van Rossum07397971997-04-29 21:49:50 +00007556 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007557 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007558 then CCSHARED="-fPIC";
7559 elif test `uname -p` = sparc;
7560 then CCSHARED="-xcode=pic32";
7561 else CCSHARED="-Kpic";
7562 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007563 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007564 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007565 else CCSHARED="+z";
7566 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007567 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007568 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007569 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007570 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007571 if test "$GCC" = "yes"
7572 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007573 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007574 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007575 SCO_SV*)
7576 if test "$GCC" = "yes"
7577 then CCSHARED="-fPIC"
7578 else CCSHARED="-Kpic -belf"
7579 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007580 IRIX*/6*) case $CC in
7581 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007582 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007583 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007584 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7587$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007588# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007589# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7591$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592if test -z "$LINKFORSHARED"
7593then
Guido van Rossum07397971997-04-29 21:49:50 +00007594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007595 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007596 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007597 LINKFORSHARED="-Wl,-E -Wl,+s";;
7598# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007599 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007600 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007601 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007603 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007604 if test "$enable_framework"
7605 then
Jack Jansenda49e192005-01-07 13:08:22 +00007606 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007607 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007608 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007609 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007610 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007611 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007612 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007613 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7614 then
7615 LINKFORSHARED="-Wl,--export-dynamic"
7616 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007617 SunOS/5*) case $CC in
7618 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007619 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007620 then
7621 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007622 fi;;
7623 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007624 CYGWIN*)
7625 if test $enable_shared = "no"
7626 then
7627 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7628 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007629 QNX*)
7630 # -Wl,-E causes the symbols to be added to the dynamic
7631 # symbol table so that they can be found when a module
7632 # is loaded. -N 2048K causes the stack size to be set
7633 # to 2048 kilobytes so that the stack doesn't overflow
7634 # when running test_compile.py.
7635 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007636 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7639$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640
Michael W. Hudson54241132001-12-07 15:38:26 +00007641
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7644$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007645if test ! "$LIBRARY" = "$LDLIBRARY"
7646then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007647 case $ac_sys_system in
7648 CYGWIN*)
7649 # Cygwin needs CCSHARED when building extension DLLs
7650 # but not when building the interpreter DLL.
7651 CFLAGSFORSHARED='';;
7652 *)
7653 CFLAGSFORSHARED='$(CCSHARED)'
7654 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7657$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007658
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007659# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7660# library (with --enable-shared).
7661# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007662# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7663# if it is not required, since it creates a dependency of the shared library
7664# to LIBS. This, in turn, means that applications linking the shared libpython
7665# don't need to link LIBS explicitly. The default should be only changed
7666# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7669$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007670case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007671 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007672 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7675$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007676
7677
Guido van Rossum627b2d71993-12-24 10:39:16 +00007678# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7680$as_echo_n "checking for dlopen in -ldl... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007681if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007683else
Martin v. Löwis11437992002-04-12 09:54:03 +00007684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007685LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689/* Override any GCC internal prototype to avoid an error.
7690 Use char because int might match the return type of a GCC
7691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692#ifdef __cplusplus
7693extern "C"
7694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007695char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ;
7701 return 0;
7702}
7703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709rm -f core conftest.err conftest.$ac_objext \
7710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007711LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7714$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007715if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 cat >>confdefs.h <<_ACEOF
7717#define HAVE_LIBDL 1
7718_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007719
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007720 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007721
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007722fi
7723 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7725$as_echo_n "checking for shl_load in -ldld... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007726if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007728else
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007730LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734/* Override any GCC internal prototype to avoid an error.
7735 Use char because int might match the return type of a GCC
7736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007737#ifdef __cplusplus
7738extern "C"
7739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007740char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007741int
7742main ()
7743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ;
7746 return 0;
7747}
7748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007751else
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754rm -f core conftest.err conftest.$ac_objext \
7755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007756LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7759$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007760if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 cat >>confdefs.h <<_ACEOF
7762#define HAVE_LIBDLD 1
7763_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007765 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767fi
7768 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007769
Georg Brandlb1441c72009-01-03 22:33:39 +00007770# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007771if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7773$as_echo_n "checking for library containing sem_init... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007774if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007776else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007777 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781/* Override any GCC internal prototype to avoid an error.
7782 Use char because int might match the return type of a GCC
7783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007784#ifdef __cplusplus
7785extern "C"
7786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007787char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007788int
7789main ()
7790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 ;
7793 return 0;
7794}
7795_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796for ac_lib in '' pthread rt posix4; do
7797 if test -z "$ac_lib"; then
7798 ac_res="none required"
7799 else
7800 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806rm -f core conftest.err conftest.$ac_objext \
7807 conftest$ac_exeext
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007808 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811done
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007812if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814else
7815 ac_cv_search_sem_init=no
7816fi
7817rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007818LIBS=$ac_func_search_save_LIBS
7819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7821$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007823if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007825
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007826fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007827 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007828 # posix4 on Solaris 2.6
7829 # pthread (first!) on Linux
7830fi
7831
Martin v. Löwis19d17342003-06-14 21:03:05 +00007832# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7834$as_echo_n "checking for textdomain in -lintl... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007835if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007837else
7838 ac_check_lib_save_LIBS=$LIBS
7839LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007841/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843/* Override any GCC internal prototype to avoid an error.
7844 Use char because int might match the return type of a GCC
7845 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007846#ifdef __cplusplus
7847extern "C"
7848#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007849char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007850int
7851main ()
7852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007854 ;
7855 return 0;
7856}
7857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859 ac_cv_lib_intl_textdomain=yes
7860else
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007865LIBS=$ac_check_lib_save_LIBS
7866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7868$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007869if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007870
Matthias Kloseb9621712010-04-24 17:59:49 +00007871$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872
Brett Cannonc6d936e2009-06-07 20:09:53 +00007873 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007874fi
7875
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007876
7877# checks for system dependent C++ extensions support
7878case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7880$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007882/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007883
7884 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007888loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ;
7890 return 0;
7891}
Matthias Kloseb159a552010-04-25 21:00:44 +00007892
Martin v. Löwis11437992002-04-12 09:54:03 +00007893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007895
Matthias Kloseb159a552010-04-25 21:00:44 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Matthias Kloseb159a552010-04-25 21:00:44 +00007899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007900$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007901
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007902else
Matthias Kloseb159a552010-04-25 21:00:44 +00007903
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007905$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007906
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908rm -f core conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007910 *) ;;
7911esac
7912
Guido van Rossum70c7f481998-03-26 18:44:10 +00007913# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7915$as_echo_n "checking for t_open in -lnsl... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007916if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007920LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924/* Override any GCC internal prototype to avoid an error.
7925 Use char because int might match the return type of a GCC
7926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927#ifdef __cplusplus
7928extern "C"
7929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007930char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ;
7936 return 0;
7937}
7938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944rm -f core conftest.err conftest.$ac_objext \
7945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007946LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7949$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007950if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007951 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007952fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007953 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7955$as_echo_n "checking for socket in -lsocket... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007956if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958else
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007960LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964/* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#ifdef __cplusplus
7968extern "C"
7969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007970char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971int
7972main ()
7973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ;
7976 return 0;
7977}
7978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984rm -f core conftest.err conftest.$ac_objext \
7985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7989$as_echo "$ac_cv_lib_socket_socket" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00007990if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007991 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007992fi
7993 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00007994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
7996$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00007999if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8002$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008003LIBS="$withval $LIBS"
8004
8005else
Matthias Kloseb9621712010-04-24 17:59:49 +00008006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008fi
8009
Guido van Rossum7f43da71994-08-01 12:15:30 +00008010
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008011if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008012 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8013set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8015$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008016if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008018else
8019 case $PKG_CONFIG in
8020 [\\/]* | ?:[\\/]*)
8021 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8022 ;;
8023 *)
8024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8025for as_dir in $PATH
8026do
8027 IFS=$as_save_IFS
8028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008030 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8031 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008033 break 2
8034 fi
8035done
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008037IFS=$as_save_IFS
8038
8039 ;;
8040esac
8041fi
8042PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8043if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8045$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8048$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008049fi
8050
8051
8052fi
8053if test -z "$ac_cv_path_PKG_CONFIG"; then
8054 ac_pt_PKG_CONFIG=$PKG_CONFIG
8055 # Extract the first word of "pkg-config", so it can be a program name with args.
8056set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008059if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008061else
8062 case $ac_pt_PKG_CONFIG in
8063 [\\/]* | ?:[\\/]*)
8064 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8065 ;;
8066 *)
8067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068for as_dir in $PATH
8069do
8070 IFS=$as_save_IFS
8071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8074 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076 break 2
8077 fi
8078done
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008080IFS=$as_save_IFS
8081
8082 ;;
8083esac
8084fi
8085ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8086if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8088$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089else
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008092fi
8093
8094 if test "x$ac_pt_PKG_CONFIG" = x; then
8095 PKG_CONFIG=""
8096 else
8097 case $cross_compiling:$ac_tool_warned in
8098yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008101ac_tool_warned=yes ;;
8102esac
8103 PKG_CONFIG=$ac_pt_PKG_CONFIG
8104 fi
8105else
8106 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8107fi
8108
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008109
8110# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8112$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008113
8114# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008115if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008116 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008117else
8118 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008119fi
8120
8121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8123$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008124
8125# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8127$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008128
8129# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008131 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008132else
8133 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008134fi
8135
8136
8137if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8139else
8140 LIBFFI_INCLUDEDIR=""
8141fi
8142
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8145$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008146
Benjamin Peterson076ed002010-10-31 17:11:02 +00008147# Check for support for loadable sqlite extensions
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8149$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8150# Check whether --enable-loadable-sqlite-extensions was given.
8151if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8152 enableval=$enable_loadable_sqlite_extensions;
8153else
8154 enable_loadable_sqlite_extensions="no"
8155fi
8156
8157
8158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8159$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8160
Matthias Klose55708cc2009-04-30 08:06:49 +00008161# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8163$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008164
8165# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008166if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008167 withval=$with_dbmliborder;
8168if test x$with_dbmliborder = xyes
8169then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008170as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008171else
8172 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8173 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8174 then
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008175 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008176 fi
8177 done
8178fi
8179fi
8180
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8182$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008183
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008184# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008185
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8188$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008191if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 withval=$with_signal_module;
8193fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008194
8195
8196if test -z "$with_signal_module"
8197then with_signal_module="yes"
8198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8200$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008201
8202if test "${with_signal_module}" = "yes"; then
8203 USE_SIGNAL_MODULE=""
8204 SIGNAL_OBJS=""
8205else
8206 USE_SIGNAL_MODULE="#"
8207 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8208fi
8209
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008210# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008211
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008212USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8215$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008216
Guido van Rossumec2f0731997-01-22 20:54:01 +00008217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008219if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8222$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008223LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008224if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008225 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008226fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008227else
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8229$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230fi
8231
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
8233# Templates for things AC_DEFINEd more than once.
8234# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008235
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8240$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 withval=$with_threads;
8245fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008246
8247
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008248# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008251if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 withval=$with_thread; with_threads=$with_thread
8253fi
8254
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008255
8256if test -z "$with_threads"
8257then with_threads="yes"
8258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8260$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008261
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008262
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008263if test "$with_threads" = "no"
8264then
8265 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008266elif test "$ac_cv_pthread_is_default" = yes
8267then
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008269
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008270 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008272
8273 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008275elif test "$ac_cv_kpthread" = "yes"
8276then
8277 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008278 if test "$ac_cv_cxx_thread" = "yes"; then
8279 CXX="$CXX -Kpthread"
8280 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008282
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008283 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008284 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008285elif test "$ac_cv_kthread" = "yes"
8286then
8287 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008288 if test "$ac_cv_cxx_thread" = "yes"; then
8289 CXX="$CXX -Kthread"
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008292
8293 posix_threads=yes
8294 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008295elif test "$ac_cv_pthread" = "yes"
8296then
8297 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008298 if test "$ac_cv_cxx_thread" = "yes"; then
8299 CXX="$CXX -pthread"
8300 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008302
8303 posix_threads=yes
8304 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008305else
8306 if test ! -z "$with_threads" -a -d "$with_threads"
8307 then LDFLAGS="$LDFLAGS -L$with_threads"
8308 fi
8309 if test ! -z "$withval" -a -d "$withval"
8310 then LDFLAGS="$LDFLAGS -L$withval"
8311 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008312
8313 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008314 # define _POSIX_THREADS in unistd.h. Some apparently don't
8315 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8317$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008319/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008320
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008321#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008322#ifdef _POSIX_THREADS
8323yes
8324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008325
8326_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008329 unistd_defines_pthreads=yes
8330else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008331 unistd_defines_pthreads=no
8332fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008333rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8336$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008341if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008348
8349 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008350 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008351else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008354if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008361
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008362 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008363else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008364
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008365 # Just looking for pthread_create in libpthread is not enough:
8366 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8367 # So we really have to include pthread.h, and then link.
8368 _libs=$LIBS
8369 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8371$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008373/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008374#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008375
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008376void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008377int
8378main ()
8379{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008380
8381pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 ;
8383 return 0;
8384}
8385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8389$as_echo "yes" >&6; }
8390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008391
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008393 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008396 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008398if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008402 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008403else
Guido van Rossumad678af1998-10-02 14:42:15 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8406$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008407if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008409else
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008411LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415/* Override any GCC internal prototype to avoid an error.
8416 Use char because int might match the return type of a GCC
8417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008418#ifdef __cplusplus
8419extern "C"
8420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008421char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008422int
8423main ()
8424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 ;
8427 return 0;
8428}
8429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435rm -f core conftest.err conftest.$ac_objext \
8436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008437LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8440$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008441if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008445 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008446 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008447else
Greg Steinadf63d62000-07-05 10:38:09 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8450$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008451if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008455LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459/* Override any GCC internal prototype to avoid an error.
8460 Use char because int might match the return type of a GCC
8461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462#ifdef __cplusplus
8463extern "C"
8464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008465char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ;
8471 return 0;
8472}
8473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479rm -f core conftest.err conftest.$ac_objext \
8480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008481LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8484$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008485if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008488 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008489 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008490 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008491else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8494$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008495if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008499LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503/* Override any GCC internal prototype to avoid an error.
8504 Use char because int might match the return type of a GCC
8505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008506#ifdef __cplusplus
8507extern "C"
8508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008509char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ;
8515 return 0;
8516}
8517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523rm -f core conftest.err conftest.$ac_objext \
8524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8528$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008529if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008533 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008534 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008535else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008536
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8538$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008539if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008541else
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008543LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547/* Override any GCC internal prototype to avoid an error.
8548 Use char because int might match the return type of a GCC
8549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008550#ifdef __cplusplus
8551extern "C"
8552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008553char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008554int
8555main ()
8556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ;
8559 return 0;
8560}
8561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567rm -f core conftest.err conftest.$ac_objext \
8568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008569LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8572$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008573if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008576 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008577 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008578 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008579else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008580
Martin v. Löwis130fb172001-07-19 11:00:41 +00008581 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008582fi
8583
Guido van Rossum627b2d71993-12-24 10:39:16 +00008584
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008585fi
8586
Guido van Rossum0be3e491997-05-22 20:33:33 +00008587fi
8588
Guido van Rossum49545951997-12-02 19:28:29 +00008589fi
8590
Guido van Rossumb93a8621998-05-07 13:27:32 +00008591fi
8592
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008594rm -f core conftest.err conftest.$ac_objext \
8595 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596fi
8597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
8599fi
8600
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008601
Michael W. Hudson54241132001-12-07 15:38:26 +00008602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8604$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008605if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008607else
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008609LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613/* Override any GCC internal prototype to avoid an error.
8614 Use char because int might match the return type of a GCC
8615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616#ifdef __cplusplus
8617extern "C"
8618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008619char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008620int
8621main ()
8622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ;
8625 return 0;
8626}
8627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633rm -f core conftest.err conftest.$ac_objext \
8634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008635LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8638$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008639if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008641
Martin v. Löwis130fb172001-07-19 11:00:41 +00008642 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008643 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008644 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008645fi
8646
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008647
Neal Norwitza978ab02002-11-02 16:58:05 +00008648 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8650$as_echo_n "checking for thr_create in -lthread... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008651if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008653else
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008655LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659/* Override any GCC internal prototype to avoid an error.
8660 Use char because int might match the return type of a GCC
8661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#ifdef __cplusplus
8663extern "C"
8664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008665char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
8668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679rm -f core conftest.err conftest.$ac_objext \
8680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8684$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008685if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008688 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008689 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008690 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008691fi
8692
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008693 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008694
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 if test "$USE_THREAD_MODULE" != "#"
8696 then
8697 # If the above checks didn't disable threads, (at least) OSF1
8698 # needs this '-threads' argument during linking.
8699 case $ac_sys_system in
8700 OSF1) LDLAST=-threads;;
8701 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008702 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008703fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705if test "$posix_threads" = "yes"; then
8706 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008709
8710 fi
8711
8712 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8713 case $ac_sys_system/$ac_sys_release in
8714 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008715$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008717 ;;
8718 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008719$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008720
8721 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008722 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008723$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008724
8725 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008726 AIX/6)
8727$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8728
8729 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008730 esac
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8733$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008734 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008738 ac_cv_pthread_system_supported=no
8739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742#include <pthread.h>
8743 void *foo(void *parm) {
8744 return NULL;
8745 }
8746 main() {
8747 pthread_attr_t attr;
8748 pthread_t id;
8749 if (pthread_attr_init(&attr)) exit(-1);
8750 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8751 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8752 exit(0);
8753 }
8754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008755if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756 ac_cv_pthread_system_supported=yes
8757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764
Guido van Rossum627b2d71993-12-24 10:39:16 +00008765fi
8766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8768$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 if test "$ac_cv_pthread_system_supported" = "yes"; then
8770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772
8773 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 for ac_func in pthread_sigmask
8775do :
8776 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00008777if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008779#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008781 case $ac_sys_system in
8782 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008785
8786 ;;
8787 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008788fi
8789done
8790
8791fi
8792
8793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008794# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008795
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8797$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008801 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008804 ipv6=no
8805 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8807$as_echo "yes" >&6; }
8808 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008809
8810 ipv6=yes
8811 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008819 ipv6=no
8820
8821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008824 /* AF_INET6 available check */
8825#include <sys/types.h>
8826#include <sys/socket.h>
8827main()
8828{
8829 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8830 exit(1);
8831 else
8832 exit(0);
8833}
8834
Martin v. Löwis11437992002-04-12 09:54:03 +00008835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8839$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842else
Matthias Kloseb159a552010-04-25 21:00:44 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008846 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008851fi
8852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008854if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8856$as_echo_n "checking if RFC2553 API is available... " >&6; }
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
8860 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008861#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008865struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008866 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ;
8868 return 0;
8869}
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008873
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008875$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008876 ipv6=yes
8877
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008878else
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008881$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008882 ipv6=no
8883
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008886fi
8887
8888if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008890
8891fi
8892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893fi
8894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895
8896ipv6type=unknown
8897ipv6lib=none
8898ipv6trylibc=no
8899
8900if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8902$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008905 case $i in
8906 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910#include <netinet/in.h>
8911#ifdef IPV6_INRIA_VERSION
8912yes
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008917 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008919rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920
8921 ;;
8922 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926#include <netinet/in.h>
8927#ifdef __KAME__
8928yes
8929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933 ipv6type=$i;
8934 ipv6lib=inet6
8935 ipv6libdir=/usr/local/v6/lib
8936 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008938rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939
8940 ;;
8941 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008943/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945#include <features.h>
8946#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8947yes
8948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008952 ipv6type=$i;
8953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ;;
8958 linux-inet6)
8959 if test -d /usr/inet6; then
8960 ipv6type=$i
8961 ipv6lib=inet6
8962 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008963 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964 fi
8965 ;;
8966 solaris)
8967 if test -f /etc/netconfig; then
8968 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8969 ipv6type=$i
8970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971 fi
8972 fi
8973 ;;
8974 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008977
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978#include <sys/param.h>
8979#ifdef _TOSHIBA_INET6
8980yes
8981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008982_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985 ipv6type=$i;
8986 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008987 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include </usr/local/v6/include/sys/v6config.h>
8997#ifdef __V6D__
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6lib=v6;
9005 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009006 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009008rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010 ;;
9011 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015#include <sys/param.h>
9016#ifdef _ZETA_MINAMI_INET6
9017yes
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 ipv6type=$i;
9023 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009024 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027
9028 ;;
9029 esac
9030 if test "$ipv6type" != "unknown"; then
9031 break
9032 fi
9033 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9035$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036fi
9037
9038if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9039 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9040 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9041 echo "using lib$ipv6lib"
9042 else
9043 if test $ipv6trylibc = "yes"; then
9044 echo "using libc"
9045 else
9046 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9047 echo "You need to fetch lib$ipv6lib.a from appropriate"
9048 echo 'ipv6 kit and compile beforehand.'
9049 exit 1
9050 fi
9051 fi
9052fi
9053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9055$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009057/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009058
9059 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009060int
9061main ()
9062{
9063FSIORefNum fRef = 0
9064 ;
9065 return 0;
9066}
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009069if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009070
Matthias Kloseb159a552010-04-25 21:00:44 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9075$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009076
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009077else
Matthias Kloseb159a552010-04-25 21:00:44 +00009078
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009081
9082fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9084
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009085# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9087$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091 withval=$with_doc_strings;
9092fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009093
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094
9095if test -z "$with_doc_strings"
9096then with_doc_strings="yes"
9097fi
9098if test "$with_doc_strings" != "no"
9099then
9100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009102
9103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9105$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009106
Antoine Pitrou042b1282010-08-13 21:15:58 +00009107# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9109$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009112if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009114if test "$withval" != no
9115then
9116
Matthias Kloseb9621712010-04-24 17:59:49 +00009117$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9120$as_echo "yes" >&6; }
9121else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009123fi
9124else
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127fi
9128
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009129
9130# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9132$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009135if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 withval=$with_pymalloc;
9137fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009138
Neil Schemenauera35c6882001-02-27 04:45:05 +00009139
Neil Schemenauer16c22972002-03-22 15:34:49 +00009140if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009141then
9142 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009143 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009144fi
9145if test "$with_pymalloc" != "no"
9146then
Martin v. Löwis11437992002-04-12 09:54:03 +00009147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009149
9150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9152$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009153
Benjamin Peterson05159c42009-12-03 03:01:27 +00009154# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9156$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009157
9158# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009160 withval=$with_valgrind;
9161else
9162 with_valgrind=no
9163fi
9164
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9166$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009167if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009169if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009172
9173else
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009174 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009175
9176fi
9177
9178
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009179 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009180fi
9181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009182# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009183
Guido van Rossum98935bf2001-09-05 19:13:16 +00009184DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009185
Guido van Rossume97ee181999-12-20 21:27:22 +00009186# the dlopen() function means we might want to use dynload_shlib.o. some
9187# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009188for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009189do :
9190 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009191if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009193#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009195
Guido van Rossume97ee181999-12-20 21:27:22 +00009196fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009197done
Guido van Rossume97ee181999-12-20 21:27:22 +00009198
Michael W. Hudson54241132001-12-07 15:38:26 +00009199
Guido van Rossume97ee181999-12-20 21:27:22 +00009200# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9201# loading of modules.
9202
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9204$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009205if test -z "$DYNLOADFILE"
9206then
9207 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009208 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9209 if test "$ac_cv_func_dlopen" = yes
9210 then DYNLOADFILE="dynload_shlib.o"
9211 else DYNLOADFILE="dynload_aix.o"
9212 fi
9213 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009214 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009215 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9216 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009217 *)
9218 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9219 # out any dynamic loading
9220 if test "$ac_cv_func_dlopen" = yes
9221 then DYNLOADFILE="dynload_shlib.o"
9222 else DYNLOADFILE="dynload_stub.o"
9223 fi
9224 ;;
9225 esac
9226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9228$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009229if test "$DYNLOADFILE" != "dynload_stub.o"
9230then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009233
9234fi
9235
Neil Schemenauer4e425612001-06-19 15:44:15 +00009236# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9237
Michael W. Hudson54241132001-12-07 15:38:26 +00009238
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9240$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009241if test -z "$MACHDEP_OBJS"
9242then
Jack Jansene578a632001-08-15 01:27:14 +00009243 MACHDEP_OBJS=$extra_machdep_objs
9244else
9245 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9248$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009249
Guido van Rossum627b2d71993-12-24 10:39:16 +00009250# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009251for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009252 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009253 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009254 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009255 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009256 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009257 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009258 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9259 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009260 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009261 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009262 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009263 truncate uname unsetenv utimes waitpid wait3 wait4 \
9264 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009265do :
9266 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9267ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009268if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009270#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009271_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009272
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009273fi
9274done
9275
Michael W. Hudson54241132001-12-07 15:38:26 +00009276
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009277# For some functions, having a definition is not sufficient, since
9278# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9280$as_echo_n "checking for chroot... " >&6; }
9281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009282/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009283#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009284int
9285main ()
9286{
9287void *x=chroot
9288 ;
9289 return 0;
9290}
9291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009295
Matthias Kloseb159a552010-04-25 21:00:44 +00009296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009297$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009298else
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009301
9302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9305$as_echo_n "checking for link... " >&6; }
9306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009307/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009308#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009309int
9310main ()
9311{
9312void *x=link
9313 ;
9314 return 0;
9315}
9316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009320
Matthias Kloseb159a552010-04-25 21:00:44 +00009321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009322$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323else
Matthias Kloseb9621712010-04-24 17:59:49 +00009324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9325$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009326
9327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9330$as_echo_n "checking for symlink... " >&6; }
9331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009332/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009333#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009334int
9335main ()
9336{
9337void *x=symlink
9338 ;
9339 return 0;
9340}
9341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009343
Matthias Kloseb9621712010-04-24 17:59:49 +00009344$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345
Matthias Kloseb159a552010-04-25 21:00:44 +00009346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009347$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348else
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351
9352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9355$as_echo_n "checking for fchdir... " >&6; }
9356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009357/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009358#include <unistd.h>
9359int
9360main ()
9361{
9362void *x=fchdir
9363 ;
9364 return 0;
9365}
9366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009370
Matthias Kloseb159a552010-04-25 21:00:44 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009373else
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9375$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009376
9377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9380$as_echo_n "checking for fsync... " >&6; }
9381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009382/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009383#include <unistd.h>
9384int
9385main ()
9386{
9387void *x=fsync
9388 ;
9389 return 0;
9390}
9391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009393
Matthias Kloseb9621712010-04-24 17:59:49 +00009394$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009395
Matthias Kloseb159a552010-04-25 21:00:44 +00009396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009398else
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009401
9402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9405$as_echo_n "checking for fdatasync... " >&6; }
9406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009407/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009408#include <unistd.h>
9409int
9410main ()
9411{
9412void *x=fdatasync
9413 ;
9414 return 0;
9415}
9416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009418
Matthias Kloseb9621712010-04-24 17:59:49 +00009419$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009420
Matthias Kloseb159a552010-04-25 21:00:44 +00009421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423else
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009426
9427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9430$as_echo_n "checking for epoll... " >&6; }
9431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009432/* end confdefs.h. */
9433#include <sys/epoll.h>
9434int
9435main ()
9436{
9437void *x=epoll_create
9438 ;
9439 return 0;
9440}
9441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009443
Matthias Kloseb9621712010-04-24 17:59:49 +00009444$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009445
Matthias Kloseb159a552010-04-25 21:00:44 +00009446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009448else
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9450$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009451
9452fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9455$as_echo_n "checking for kqueue... " >&6; }
9456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009457/* end confdefs.h. */
9458
9459#include <sys/types.h>
9460#include <sys/event.h>
9461
9462int
9463main ()
9464{
9465int x=kqueue()
9466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009473
Matthias Kloseb159a552010-04-25 21:00:44 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009479
9480fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009482# On some systems (eg. FreeBSD 5), we would find a definition of the
9483# functions ctermid_r, setgroups in the library, but no prototype
9484# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9485# address to avoid compiler warnings and potential miscompilations
9486# because of the missing prototypes.
9487
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9489$as_echo_n "checking for ctermid_r... " >&6; }
9490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009492
Martin v. Löwisd5843682002-11-21 20:41:28 +00009493#include <stdio.h>
9494
Martin v. Löwisd5843682002-11-21 20:41:28 +00009495int
9496main ()
9497{
9498void* p = ctermid_r
9499 ;
9500 return 0;
9501}
9502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009504
Matthias Kloseb9621712010-04-24 17:59:49 +00009505$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009506
Matthias Kloseb159a552010-04-25 21:00:44 +00009507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009508$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009509else
Matthias Kloseb9621712010-04-24 17:59:49 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009512
9513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9515
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9517$as_echo_n "checking for flock declaration... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009518if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009519 $as_echo_n "(cached) " >&6
9520else
9521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009522/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009523#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009524int
9525main ()
9526{
9527void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009528
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009529 ;
9530 return 0;
9531}
9532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009533if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009534 ac_cv_flock_decl=yes
9535else
9536 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009537
9538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009540
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009541fi
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9543$as_echo "$ac_cv_flock_decl" >&6; }
9544if test "x${ac_cv_flock_decl}" = xyes; then
9545 for ac_func in flock
9546do :
9547 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009548if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009549 cat >>confdefs.h <<_ACEOF
9550#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009551_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009552
Antoine Pitroua3000072010-09-07 14:52:42 +00009553else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009555$as_echo_n "checking for flock in -lbsd... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009556if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009557 $as_echo_n "(cached) " >&6
9558else
9559 ac_check_lib_save_LIBS=$LIBS
9560LIBS="-lbsd $LIBS"
9561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9562/* end confdefs.h. */
9563
9564/* Override any GCC internal prototype to avoid an error.
9565 Use char because int might match the return type of a GCC
9566 builtin and then its argument prototype would still apply. */
9567#ifdef __cplusplus
9568extern "C"
9569#endif
9570char flock ();
9571int
9572main ()
9573{
9574return flock ();
9575 ;
9576 return 0;
9577}
9578_ACEOF
9579if ac_fn_c_try_link "$LINENO"; then :
9580 ac_cv_lib_bsd_flock=yes
9581else
9582 ac_cv_lib_bsd_flock=no
9583fi
9584rm -f core conftest.err conftest.$ac_objext \
9585 conftest$ac_exeext conftest.$ac_ext
9586LIBS=$ac_check_lib_save_LIBS
9587fi
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9589$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009590if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009591 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009592
9593
9594$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9595
9596
9597fi
9598
9599
9600fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009601done
9602
Antoine Pitroua3000072010-09-07 14:52:42 +00009603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604
Matthias Kloseb9621712010-04-24 17:59:49 +00009605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9606$as_echo_n "checking for getpagesize... " >&6; }
9607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009608/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009609
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610#include <unistd.h>
9611
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612int
9613main ()
9614{
9615void* p = getpagesize
9616 ;
9617 return 0;
9618}
9619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009621
Matthias Kloseb9621712010-04-24 17:59:49 +00009622$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009623
Matthias Kloseb159a552010-04-25 21:00:44 +00009624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626else
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009629
9630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009632
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009633for ac_prog in true
9634do
9635 # Extract the first word of "$ac_prog", so it can be a program name with args.
9636set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9638$as_echo_n "checking for $ac_word... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009639if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009641else
9642 if test -n "$TRUE"; then
9643 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9644else
9645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9646for as_dir in $PATH
9647do
9648 IFS=$as_save_IFS
9649 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009654 break 2
9655 fi
9656done
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009659
9660fi
9661fi
9662TRUE=$ac_cv_prog_TRUE
9663if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9665$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666else
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669fi
9670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009672 test -n "$TRUE" && break
9673done
9674test -n "$TRUE" || TRUE="/bin/true"
9675
9676
Matthias Kloseb9621712010-04-24 17:59:49 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9678$as_echo_n "checking for inet_aton in -lc... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009679if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009681else
9682 ac_check_lib_save_LIBS=$LIBS
9683LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009685/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687/* Override any GCC internal prototype to avoid an error.
9688 Use char because int might match the return type of a GCC
9689 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009690#ifdef __cplusplus
9691extern "C"
9692#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009693char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009694int
9695main ()
9696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009698 ;
9699 return 0;
9700}
9701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703 ac_cv_lib_c_inet_aton=yes
9704else
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707rm -f core conftest.err conftest.$ac_objext \
9708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009709LIBS=$ac_check_lib_save_LIBS
9710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9712$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009713if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009715else
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9717$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009718if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009720else
9721 ac_check_lib_save_LIBS=$LIBS
9722LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009729#ifdef __cplusplus
9730extern "C"
9731#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009732char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733int
9734main ()
9735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742 ac_cv_lib_resolv_inet_aton=yes
9743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746rm -f core conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748LIBS=$ac_check_lib_save_LIBS
9749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9751$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009752if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753 cat >>confdefs.h <<_ACEOF
9754#define HAVE_LIBRESOLV 1
9755_ACEOF
9756
9757 LIBS="-lresolv $LIBS"
9758
9759fi
9760
9761
9762fi
9763
9764
Christian Heimesd0764e22007-12-04 15:00:33 +00009765# On Tru64, chflags seems to be present, but calling it will
9766# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9768$as_echo_n "checking for chflags... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009769if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009771else
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009773 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009776/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009777[
Christian Heimesd0764e22007-12-04 15:00:33 +00009778#include <sys/stat.h>
9779#include <unistd.h>
9780int main(int argc, char*argv[])
9781{
9782 if(chflags(argv[0], 0) != 0)
9783 return 1;
9784 return 0;
9785}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009786]
Christian Heimesd0764e22007-12-04 15:00:33 +00009787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009788if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009789 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009790else
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009795fi
9796
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9800$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009801if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009803if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009804 ac_cv_have_chflags="yes"
9805else
9806 ac_cv_have_chflags="no"
9807fi
9808
9809fi
9810if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009811
Matthias Kloseb9621712010-04-24 17:59:49 +00009812$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009813
9814fi
9815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9817$as_echo_n "checking for lchflags... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009818if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009820else
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009822 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009825/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009826[
Christian Heimesd0764e22007-12-04 15:00:33 +00009827#include <sys/stat.h>
9828#include <unistd.h>
9829int main(int argc, char*argv[])
9830{
9831 if(lchflags(argv[0], 0) != 0)
9832 return 1;
9833 return 0;
9834}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009835]
Christian Heimesd0764e22007-12-04 15:00:33 +00009836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009838 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009839else
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009844fi
9845
9846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9849$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009850if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009851 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009852if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009853 ac_cv_have_lchflags="yes"
9854else
9855 ac_cv_have_lchflags="no"
9856fi
9857
9858fi
9859if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009860
Matthias Kloseb9621712010-04-24 17:59:49 +00009861$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009862
9863fi
9864
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009865case $ac_sys_system/$ac_sys_release in
9866Darwin/*)
9867 _CUR_CFLAGS="${CFLAGS}"
9868 _CUR_LDFLAGS="${LDFLAGS}"
9869 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9870 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9871 ;;
9872esac
9873
Matthias Kloseb9621712010-04-24 17:59:49 +00009874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9875$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009876if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009878else
9879 ac_check_lib_save_LIBS=$LIBS
9880LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009882/* end confdefs.h. */
9883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884/* Override any GCC internal prototype to avoid an error.
9885 Use char because int might match the return type of a GCC
9886 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009887#ifdef __cplusplus
9888extern "C"
9889#endif
9890char inflateCopy ();
9891int
9892main ()
9893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009895 ;
9896 return 0;
9897}
9898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009899if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009900 ac_cv_lib_z_inflateCopy=yes
9901else
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904rm -f core conftest.err conftest.$ac_objext \
9905 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009906LIBS=$ac_check_lib_save_LIBS
9907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9909$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +00009910if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009911
Matthias Kloseb9621712010-04-24 17:59:49 +00009912$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009913
9914fi
9915
9916
9917case $ac_sys_system/$ac_sys_release in
9918Darwin/*)
9919 CFLAGS="${_CUR_CFLAGS}"
9920 LDFLAGS="${_CUR_LDFLAGS}"
9921 ;;
9922esac
9923
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9925$as_echo_n "checking for hstrerror... " >&6; }
9926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009928
Martin v. Löwise9416172003-05-03 10:12:45 +00009929#include <netdb.h>
9930
Martin v. Löwise9416172003-05-03 10:12:45 +00009931int
9932main ()
9933{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009934void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009935 ;
9936 return 0;
9937}
9938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009940
Matthias Kloseb9621712010-04-24 17:59:49 +00009941$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009942
Matthias Kloseb159a552010-04-25 21:00:44 +00009943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009944$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009945else
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009948
9949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009950rm -f core conftest.err conftest.$ac_objext \
9951 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9954$as_echo_n "checking for inet_aton... " >&6; }
9955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009956/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009957
Martin v. Löwis86d66262006-02-17 08:40:11 +00009958#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009959#include <sys/socket.h>
9960#include <netinet/in.h>
9961#include <arpa/inet.h>
9962
Martin v. Löwise9416172003-05-03 10:12:45 +00009963int
9964main ()
9965{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009966void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009974
Matthias Kloseb159a552010-04-25 21:00:44 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009976$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009980
9981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009982rm -f core conftest.err conftest.$ac_objext \
9983 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9986$as_echo_n "checking for inet_pton... " >&6; }
9987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009988/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009989
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009990#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009991#include <sys/socket.h>
9992#include <netinet/in.h>
9993#include <arpa/inet.h>
9994
Martin v. Löwise9416172003-05-03 10:12:45 +00009995int
9996main ()
9997{
9998void* p = inet_pton
9999 ;
10000 return 0;
10001}
10002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010004
Matthias Kloseb9621712010-04-24 17:59:49 +000010005$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010006
Matthias Kloseb159a552010-04-25 21:00:44 +000010007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010008$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010009else
Matthias Kloseb9621712010-04-24 17:59:49 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010012
10013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010015
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010016# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10018$as_echo_n "checking for setgroups... " >&6; }
10019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010021
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010022#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010023#ifdef HAVE_GRP_H
10024#include <grp.h>
10025#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010026
Martin v. Löwisd5843682002-11-21 20:41:28 +000010027int
10028main ()
10029{
10030void* p = setgroups
10031 ;
10032 return 0;
10033}
10034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010035if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010038
Matthias Kloseb159a552010-04-25 21:00:44 +000010039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010040$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010041else
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010044
10045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010047
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010048# check for openpty and forkpty
10049
10050for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010051do :
10052 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010053if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010055#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010056_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010057
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010058else
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10060$as_echo_n "checking for openpty in -lutil... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010061if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010063else
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010065LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069/* Override any GCC internal prototype to avoid an error.
10070 Use char because int might match the return type of a GCC
10071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010072#ifdef __cplusplus
10073extern "C"
10074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010075char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010076int
10077main ()
10078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ;
10081 return 0;
10082}
10083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010086else
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010089rm -f core conftest.err conftest.$ac_objext \
10090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010091LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10094$as_echo "$ac_cv_lib_util_openpty" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010095if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010097 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010098else
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10100$as_echo_n "checking for openpty in -lbsd... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010101if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010103else
10104 ac_check_lib_save_LIBS=$LIBS
10105LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010107/* end confdefs.h. */
10108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109/* Override any GCC internal prototype to avoid an error.
10110 Use char because int might match the return type of a GCC
10111 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010112#ifdef __cplusplus
10113extern "C"
10114#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010115char openpty ();
10116int
10117main ()
10118{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010120 ;
10121 return 0;
10122}
10123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010125 ac_cv_lib_bsd_openpty=yes
10126else
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010129rm -f core conftest.err conftest.$ac_objext \
10130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010131LIBS=$ac_check_lib_save_LIBS
10132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10134$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010135if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010137 LIBS="$LIBS -lbsd"
10138fi
10139
10140
10141fi
10142
Fred Drake8cef4cf2000-06-28 16:40:38 +000010143
10144fi
10145done
10146
10147for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010148do :
10149 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010150if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010151 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010152#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010153_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010154
Fred Drake8cef4cf2000-06-28 16:40:38 +000010155else
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10157$as_echo_n "checking for forkpty in -lutil... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010158if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010160else
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010162LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166/* Override any GCC internal prototype to avoid an error.
10167 Use char because int might match the return type of a GCC
10168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010169#ifdef __cplusplus
10170extern "C"
10171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010172char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010173int
10174main ()
10175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ;
10178 return 0;
10179}
10180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010183else
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010186rm -f core conftest.err conftest.$ac_objext \
10187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010188LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10191$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010192if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010194 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010195else
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10197$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010198if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010200else
10201 ac_check_lib_save_LIBS=$LIBS
10202LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010204/* end confdefs.h. */
10205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206/* Override any GCC internal prototype to avoid an error.
10207 Use char because int might match the return type of a GCC
10208 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010209#ifdef __cplusplus
10210extern "C"
10211#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010212char forkpty ();
10213int
10214main ()
10215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010222 ac_cv_lib_bsd_forkpty=yes
10223else
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226rm -f core conftest.err conftest.$ac_objext \
10227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010228LIBS=$ac_check_lib_save_LIBS
10229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10231$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010232if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010234 LIBS="$LIBS -lbsd"
10235fi
10236
10237
10238fi
10239
Fred Drake8cef4cf2000-06-28 16:40:38 +000010240
10241fi
10242done
10243
Jack Jansendd19cf82001-12-06 22:36:17 +000010244
Christian Heimesb186d002008-03-18 15:15:01 +000010245# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010246for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010247do :
10248 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010249if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010250 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010251#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010252_ACEOF
10253
10254fi
10255done
10256
10257
Michael W. Hudson54241132001-12-07 15:38:26 +000010258# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010259for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010260do :
10261 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10262ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010263if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010266_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010267
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010269done
10270
Michael W. Hudson54241132001-12-07 15:38:26 +000010271
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010272ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10273if test "x$ac_cv_func_dup2" = xyes; then :
10274 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010275
Martin v. Löwis1142de32002-03-29 16:28:31 +000010276else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277 case " $LIBOBJS " in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010278 *" dup2.$ac_objext "* ) ;;
10279 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010281esac
10282
Martin v. Löwis1142de32002-03-29 16:28:31 +000010283fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010284
10285ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10286if test "x$ac_cv_func_getcwd" = xyes; then :
10287 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10288
10289else
10290 case " $LIBOBJS " in
10291 *" getcwd.$ac_objext "* ) ;;
10292 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10293 ;;
10294esac
10295
10296fi
10297
10298ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10299if test "x$ac_cv_func_strdup" = xyes; then :
10300 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10301
10302else
10303 case " $LIBOBJS " in
10304 *" strdup.$ac_objext "* ) ;;
10305 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10306 ;;
10307esac
10308
10309fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010310
10311
10312for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010313do :
10314 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010315if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010321#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010325getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331
Matthias Kloseb9621712010-04-24 17:59:49 +000010332$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010333
Guido van Rossum627b2d71993-12-24 10:39:16 +000010334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010336
Guido van Rossum627b2d71993-12-24 10:39:16 +000010337fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010338done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010339
Jack Jansen150753c2003-03-29 22:07:47 +000010340for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010341do :
10342 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010343if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010344 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010345#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010348/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010349#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010350int
10351main ()
10352{
10353setpgrp(0,0);
10354 ;
10355 return 0;
10356}
10357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010361
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010364
10365fi
10366done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010367
Thomas Wouters3a584202000-08-05 23:28:51 +000010368for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010369do :
10370 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010371if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010377#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010378int
10379main ()
10380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ;
10383 return 0;
10384}
10385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010386if ac_fn_c_try_compile "$LINENO"; then :
10387
Guido van Rossum627b2d71993-12-24 10:39:16 +000010388else
Skip Montanaro6dead952003-09-25 14:50:04 +000010389
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010391
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
Guido van Rossum627b2d71993-12-24 10:39:16 +000010393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010395
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010396fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010397done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010398
Michael W. Hudson54241132001-12-07 15:38:26 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10401$as_echo_n "checking for major... " >&6; }
10402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010403/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010404
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010405#if defined(MAJOR_IN_MKDEV)
10406#include <sys/mkdev.h>
10407#elif defined(MAJOR_IN_SYSMACROS)
10408#include <sys/sysmacros.h>
10409#else
10410#include <sys/types.h>
10411#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010412
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010413int
10414main ()
10415{
10416
10417 makedev(major(0),minor(0));
10418
10419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010424
10425
Matthias Kloseb9621712010-04-24 17:59:49 +000010426$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10429$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010430
10431else
Skip Montanaro6dead952003-09-25 14:50:04 +000010432
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010435
10436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010437rm -f core conftest.err conftest.$ac_objext \
10438 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010439
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010440# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010441# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10443$as_echo_n "checking for getaddrinfo... " >&6; }
10444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010445/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010446
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010447#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010448#include <sys/socket.h>
10449#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010450#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010451
Martin v. Löwis11437992002-04-12 09:54:03 +000010452int
10453main ()
10454{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010455getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010461 have_getaddrinfo=yes
10462else
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010465rm -f core conftest.err conftest.$ac_objext \
10466 conftest$ac_exeext conftest.$ac_ext
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10468$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010469if test $have_getaddrinfo = yes
10470then
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10472$as_echo_n "checking getaddrinfo bug... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010473 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010475else
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010477 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010478else
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010480/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010481
10482#include <sys/types.h>
10483#include <netdb.h>
10484#include <string.h>
10485#include <sys/socket.h>
10486#include <netinet/in.h>
10487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010488int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010489{
10490 int passive, gaierr, inet4 = 0, inet6 = 0;
10491 struct addrinfo hints, *ai, *aitop;
10492 char straddr[INET6_ADDRSTRLEN], strport[16];
10493
10494 for (passive = 0; passive <= 1; passive++) {
10495 memset(&hints, 0, sizeof(hints));
10496 hints.ai_family = AF_UNSPEC;
10497 hints.ai_flags = passive ? AI_PASSIVE : 0;
10498 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010499 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010500 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10501 (void)gai_strerror(gaierr);
10502 goto bad;
10503 }
10504 for (ai = aitop; ai; ai = ai->ai_next) {
10505 if (ai->ai_addr == NULL ||
10506 ai->ai_addrlen == 0 ||
10507 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10508 straddr, sizeof(straddr), strport, sizeof(strport),
10509 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10510 goto bad;
10511 }
10512 switch (ai->ai_family) {
10513 case AF_INET:
10514 if (strcmp(strport, "54321") != 0) {
10515 goto bad;
10516 }
10517 if (passive) {
10518 if (strcmp(straddr, "0.0.0.0") != 0) {
10519 goto bad;
10520 }
10521 } else {
10522 if (strcmp(straddr, "127.0.0.1") != 0) {
10523 goto bad;
10524 }
10525 }
10526 inet4++;
10527 break;
10528 case AF_INET6:
10529 if (strcmp(strport, "54321") != 0) {
10530 goto bad;
10531 }
10532 if (passive) {
10533 if (strcmp(straddr, "::") != 0) {
10534 goto bad;
10535 }
10536 } else {
10537 if (strcmp(straddr, "::1") != 0) {
10538 goto bad;
10539 }
10540 }
10541 inet6++;
10542 break;
10543 case AF_UNSPEC:
10544 goto bad;
10545 break;
10546 default:
10547 /* another family support? */
10548 break;
10549 }
10550 }
10551 }
10552
10553 if (!(inet4 == 0 || inet4 == 2))
10554 goto bad;
10555 if (!(inet6 == 0 || inet6 == 2))
10556 goto bad;
10557
10558 if (aitop)
10559 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010560 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010561
10562 bad:
10563 if (aitop)
10564 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010565 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010566}
10567
Martin v. Löwis11437992002-04-12 09:54:03 +000010568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010569if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010570 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010571else
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010578fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010579
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10583$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10584
Mark Dickinson2df5d282009-12-31 21:22:50 +000010585if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010586then
10587 if test $ipv6 = yes
10588 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010589 echo 'Fatal: You must get working getaddrinfo() function.'
10590 echo ' or you can specify "--disable-ipv6"'.
10591 exit 1
10592 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010593else
Martin v. Löwis11437992002-04-12 09:54:03 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010596
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010597fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010598
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010599for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010600do :
10601 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010602if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010606
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010607fi
10608done
10609
Michael W. Hudson54241132001-12-07 15:38:26 +000010610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010611# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10613$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010614if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010619#include <sys/types.h>
10620#include <sys/time.h>
10621#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623int
10624main ()
10625{
10626if ((struct tm *) 0)
10627return 0;
10628 ;
10629 return 0;
10630}
10631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010632if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634else
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10640$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010641if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010642
Matthias Kloseb9621712010-04-24 17:59:49 +000010643$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644
10645fi
10646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10648$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010649if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010651else
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010653/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654#include <sys/types.h>
10655#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Martin v. Löwis11437992002-04-12 09:54:03 +000010657int
10658main ()
10659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660struct tm tm;
10661 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 ;
10664 return 0;
10665}
10666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668 ac_cv_struct_tm=time.h
10669else
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10675$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010676if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010679
10680fi
10681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010686if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010687
10688cat >>confdefs.h <<_ACEOF
10689#define HAVE_STRUCT_TM_TM_ZONE 1
10690_ACEOF
10691
10692
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010693fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010694
Martin v. Löwis11437992002-04-12 09:54:03 +000010695if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010698
10699else
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10701"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010702if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704else
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706fi
10707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010709#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710_ACEOF
10711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10713$as_echo_n "checking for tzname... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010714if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716else
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010718/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010719#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720#if !HAVE_DECL_TZNAME
10721extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010723
Martin v. Löwis11437992002-04-12 09:54:03 +000010724int
10725main ()
10726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010733 ac_cv_var_tzname=yes
10734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737rm -f core conftest.err conftest.$ac_objext \
10738 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10741$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010742 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010745
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010746 fi
10747fi
10748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010750if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
10752cat >>confdefs.h <<_ACEOF
10753#define HAVE_STRUCT_STAT_ST_RDEV 1
10754_ACEOF
10755
10756
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010757fi
10758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010760if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010761
Martin v. Löwis11437992002-04-12 09:54:03 +000010762cat >>confdefs.h <<_ACEOF
10763#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10764_ACEOF
10765
10766
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010767fi
10768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010770if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010771
10772cat >>confdefs.h <<_ACEOF
10773#define HAVE_STRUCT_STAT_ST_FLAGS 1
10774_ACEOF
10775
10776
10777fi
10778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010780if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010781
10782cat >>confdefs.h <<_ACEOF
10783#define HAVE_STRUCT_STAT_ST_GEN 1
10784_ACEOF
10785
10786
10787fi
10788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010790if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010791
10792cat >>confdefs.h <<_ACEOF
10793#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10794_ACEOF
10795
10796
10797fi
10798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010800if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010801
Martin v. Löwis11437992002-04-12 09:54:03 +000010802cat >>confdefs.h <<_ACEOF
10803#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10804_ACEOF
10805
10806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010808
10809else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010811 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10813 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010814esac
10815
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010816fi
10817
Michael W. Hudson54241132001-12-07 15:38:26 +000010818
Martin v. Löwis11437992002-04-12 09:54:03 +000010819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10821$as_echo_n "checking for time.h that defines altzone... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010822if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010824else
Matthias Kloseb159a552010-04-25 21:00:44 +000010825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010828#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010829int
10830main ()
10831{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 ;
10834 return 0;
10835}
10836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010837if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010838 ac_cv_header_time_altzone=yes
10839else
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844fi
10845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10847$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010848if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851
10852fi
10853
Guido van Rossumda88dad1995-01-26 00:46:29 +000010854was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10856$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010859
10860#include <sys/types.h>
10861#include <sys/select.h>
10862#include <sys/time.h>
10863
Martin v. Löwis11437992002-04-12 09:54:03 +000010864int
10865main ()
10866{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867;
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 ;
10869 return 0;
10870}
10871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010872if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
10874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010877 was_it_defined=yes
10878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10882$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10885$as_echo_n "checking for addrinfo... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010886if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010891#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010892int
10893main ()
10894{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ;
10897 return 0;
10898}
10899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901 ac_cv_struct_addrinfo=yes
10902else
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10906fi
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10909$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010913
10914fi
10915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10917$as_echo_n "checking for sockaddr_storage... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010918if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920else
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010922/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010923
10924# include <sys/types.h>
10925# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010926int
10927main ()
10928{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 ;
10931 return 0;
10932}
10933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010934if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935 ac_cv_struct_sockaddr_storage=yes
10936else
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10940fi
10941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10943$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947
10948fi
10949
Guido van Rossum627b2d71993-12-24 10:39:16 +000010950# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10953$as_echo_n "checking whether char is unsigned... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010954if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010959$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
10963static int test_array [1 - 2 * !(((char) -1) < 0)];
10964test_array [0] = 0
10965
10966 ;
10967 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010968}
Martin v. Löwis11437992002-04-12 09:54:03 +000010969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010970if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010971 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010972else
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10978$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010979if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981
10982fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10985$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000010986if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991
Martin v. Löwis11437992002-04-12 09:54:03 +000010992int
10993main ()
10994{
10995/* FIXME: Include the comments suggested by Paul. */
10996#ifndef __cplusplus
10997 /* Ultrix mips cc rejects this. */
10998 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 char const *const *pcpcc;
11002 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 /* NEC SVR4.0.2 mips cc rejects this. */
11004 struct point {int x, y;};
11005 static struct point const zero = {0,0};
11006 /* AIX XL C 1.02.0.0 rejects this.
11007 It does not let you subtract one const X* pointer from another in
11008 an arm of an if-expression whose if-part is not a constant
11009 expression */
11010 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013 ++pcpcc;
11014 ppc = (char**) pcpcc;
11015 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 { /* SCO 3.2v4 cc rejects this. */
11017 char *t;
11018 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011019
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 }
11023 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11024 int x[] = {25, 17};
11025 const int *foo = &x[0];
11026 ++foo;
11027 }
11028 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11029 typedef const int *iptr;
11030 iptr p = 0;
11031 ++p;
11032 }
11033 { /* AIX XL C 1.02.0.0 rejects this saying
11034 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11035 struct s { int j; const int *ap[3]; };
11036 struct s *b; b->j = 5;
11037 }
11038 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11039 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011043#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011044
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 ;
11046 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011047}
Martin v. Löwis11437992002-04-12 09:54:03 +000011048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011049if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050 ac_cv_c_const=yes
11051else
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11057$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011061
11062fi
11063
Michael W. Hudson54241132001-12-07 15:38:26 +000011064
Guido van Rossumda88dad1995-01-26 00:46:29 +000011065works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11067$as_echo_n "checking for working volatile... " >&6; }
11068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011069/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011070
Martin v. Löwis11437992002-04-12 09:54:03 +000011071int
11072main ()
11073{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ;
11076 return 0;
11077}
11078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011079if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011080 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011081else
Skip Montanaro6dead952003-09-25 14:50:04 +000011082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011084
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011085
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11089$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011090
Guido van Rossumda88dad1995-01-26 00:46:29 +000011091works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11093$as_echo_n "checking for working signed char... " >&6; }
11094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011095/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097int
11098main ()
11099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011100signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 ;
11102 return 0;
11103}
11104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011105if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011106 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011107else
Skip Montanaro6dead952003-09-25 14:50:04 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011110
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011111
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11115$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011116
Guido van Rossumda88dad1995-01-26 00:46:29 +000011117have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11119$as_echo_n "checking for prototypes... " >&6; }
11120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011121/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011122int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
Matthias Kloseb159a552010-04-25 21:00:44 +000011135 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11139$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011140
Guido van Rossumda88dad1995-01-26 00:46:29 +000011141works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11143$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011146
11147#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011148int foo(int x, ...) {
11149 va_list va;
11150 va_start(va, x);
11151 va_arg(va, int);
11152 va_arg(va, char *);
11153 va_arg(va, double);
11154 return 0;
11155}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011156
Martin v. Löwis11437992002-04-12 09:54:03 +000011157int
11158main ()
11159{
Guido van Rossum90eea071996-08-30 20:58:57 +000011160return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 ;
11162 return 0;
11163}
11164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011166
11167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011169
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011170 works=yes
11171
Guido van Rossum627b2d71993-12-24 10:39:16 +000011172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11175$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176
Martin v. Löwisd6320502004-08-12 13:45:08 +000011177# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11179$as_echo_n "checking for socketpair... " >&6; }
11180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011181/* end confdefs.h. */
11182
11183#include <sys/types.h>
11184#include <sys/socket.h>
11185
11186int
11187main ()
11188{
11189void *x=socketpair
11190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197
Matthias Kloseb159a552010-04-25 21:00:44 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011200else
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011203
11204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011206
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011207# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11209$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011211/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011212#include <sys/types.h>
11213#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217struct sockaddr x;
11218x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ;
11220 return 0;
11221}
11222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011223if ac_fn_c_try_compile "$LINENO"; then :
11224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11225$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011228
11229else
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11231$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011232
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235
Guido van Rossumda88dad1995-01-26 00:46:29 +000011236va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11238$as_echo_n "checking whether va_list is an array... " >&6; }
11239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241
11242#ifdef HAVE_STDARG_PROTOTYPES
11243#include <stdarg.h>
11244#else
11245#include <varargs.h>
11246#endif
11247
Martin v. Löwis11437992002-04-12 09:54:03 +000011248int
11249main ()
11250{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011251va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_compile "$LINENO"; then :
11257
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011258else
Skip Montanaro6dead952003-09-25 14:50:04 +000011259
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Guido van Rossumda88dad1995-01-26 00:46:29 +000011263 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011264
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11268$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011270# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011271
11272
Matthias Kloseb9621712010-04-24 17:59:49 +000011273ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011274if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11279$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011280 OLD_CFLAGS=$CFLAGS
11281 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011284
11285# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287int
11288main ()
11289{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011290
11291 char *name;
11292 struct hostent *he, *res;
11293 char buffer[2048];
11294 int buflen = 2048;
11295 int h_errnop;
11296
11297 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11311$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011313else
Skip Montanaro6dead952003-09-25 14:50:04 +000011314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11318$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011321
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011322# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Martin v. Löwis11437992002-04-12 09:54:03 +000011324int
11325main ()
11326{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011327
11328 char *name;
11329 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011330 char buffer[2048];
11331 int buflen = 2048;
11332 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011333
Matthias Kloseb159a552010-04-25 21:00:44 +000011334 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
11336 ;
11337 return 0;
11338}
11339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011341
Matthias Kloseb9621712010-04-24 17:59:49 +000011342 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011343
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
Matthias Kloseb159a552010-04-25 21:00:44 +000011345$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011346
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11348$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011349
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011350else
Skip Montanaro6dead952003-09-25 14:50:04 +000011351
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11355$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357/* end confdefs.h. */
11358
11359# include <netdb.h>
11360
11361int
11362main ()
11363{
11364
11365 char *name;
11366 struct hostent *he;
11367 struct hostent_data data;
11368
11369 (void) gethostbyname_r(name, he, &data);
11370
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375if ac_fn_c_try_compile "$LINENO"; then :
11376
11377 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11378
11379
11380$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11381
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11383$as_echo "yes" >&6; }
11384
11385else
11386
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398 CFLAGS=$OLD_CFLAGS
11399
11400else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011401
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 for ac_func in gethostbyname
11403do :
11404 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011405if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011407#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011408_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011410fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011411done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412
Michael W. Hudson54241132001-12-07 15:38:26 +000011413
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414fi
11415
Michael W. Hudson54241132001-12-07 15:38:26 +000011416
11417
11418
11419
11420
11421
Guido van Rossum627b2d71993-12-24 10:39:16 +000011422# checks for system services
11423# (none yet)
11424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011425# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011426ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011427if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011428
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011429else
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11431$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011432if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434else
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011436LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440/* Override any GCC internal prototype to avoid an error.
11441 Use char because int might match the return type of a GCC
11442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011443#ifdef __cplusplus
11444extern "C"
11445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011446char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011447int
11448main ()
11449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ;
11452 return 0;
11453}
11454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011457else
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011460rm -f core conftest.err conftest.$ac_objext \
11461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011462LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11465$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011466if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 cat >>confdefs.h <<_ACEOF
11468#define HAVE_LIBIEEE 1
11469_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011470
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011471 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473fi
11474
Michael W. Hudson54241132001-12-07 15:38:26 +000011475
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011476fi
11477
Michael W. Hudson54241132001-12-07 15:38:26 +000011478
Guido van Rossum7f253911997-05-09 02:42:48 +000011479# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11481$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011486if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011487then
11488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11492$as_echo "yes" >&6; }
11493else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011495fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011496else
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11498$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499fi
11500
Guido van Rossum7f253911997-05-09 02:42:48 +000011501
Guido van Rossum7f43da71994-08-01 12:15:30 +000011502# check for --with-libm=...
11503
Guido van Rossum563e7081996-09-10 18:20:48 +000011504case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011505Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011506*) LIBM=-lm
11507esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11509$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011512if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011514if test "$withval" = no
11515then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11517$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011518elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011519then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11521$as_echo "set LIBM=\"$withval\"" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011522else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011523fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11526$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527fi
11528
Guido van Rossum7f43da71994-08-01 12:15:30 +000011529
11530# check for --with-libc=...
11531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11533$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011536if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011538if test "$withval" = no
11539then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11541$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011542elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011543then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11545$as_echo "set LIBC=\"$withval\"" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011546else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011547fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11550$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551fi
11552
Guido van Rossum7f43da71994-08-01 12:15:30 +000011553
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011554# **************************************************
11555# * Check for various properties of floating point *
11556# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11559$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011560if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011562else
11563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011565 ac_cv_little_endian_double=no
11566else
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011568/* end confdefs.h. */
11569
11570#include <string.h>
11571int main() {
11572 double x = 9006104071832581.0;
11573 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11574 return 0;
11575 else
11576 return 1;
11577}
11578
11579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011580if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011581 ac_cv_little_endian_double=yes
11582else
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587fi
11588
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589fi
11590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11592$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593if test "$ac_cv_little_endian_double" = yes
11594then
11595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011597
11598fi
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11601$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011602if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604else
11605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011607 ac_cv_big_endian_double=no
11608else
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011610/* end confdefs.h. */
11611
11612#include <string.h>
11613int main() {
11614 double x = 9006104071832581.0;
11615 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11616 return 0;
11617 else
11618 return 1;
11619}
11620
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011623 ac_cv_big_endian_double=yes
11624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629fi
11630
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011631fi
11632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11634$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635if test "$ac_cv_big_endian_double" = yes
11636then
11637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639
11640fi
11641
11642# Some ARM platforms use a mixed-endian representation for doubles.
11643# While Python doesn't currently have full support for these platforms
11644# (see e.g., issue 1762561), we can at least make sure that float <-> string
11645# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11647$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011648if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650else
11651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653 ac_cv_mixed_endian_double=no
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656/* end confdefs.h. */
11657
11658#include <string.h>
11659int main() {
11660 double x = 9006104071832581.0;
11661 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11662 return 0;
11663 else
11664 return 1;
11665}
11666
11667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669 ac_cv_mixed_endian_double=yes
11670else
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675fi
11676
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677fi
11678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11680$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681if test "$ac_cv_mixed_endian_double" = yes
11682then
11683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011685
11686fi
11687
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011688# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011689# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011690# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011691# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011692# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011693# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011694
11695# This inline assembler syntax may also work for suncc and icc,
11696# so we try it on all platforms.
11697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11699$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701/* end confdefs.h. */
11702
11703int
11704main ()
11705{
11706
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011707 unsigned short cw;
11708 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11709 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710
11711 ;
11712 return 0;
11713}
11714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716 have_gcc_asm_for_x87=yes
11717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11722$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011723if test "$have_gcc_asm_for_x87" = yes
11724then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011730# Detect whether system arithmetic is subject to x87-style double
11731# rounding issues. The result of this test has little meaning on non
11732# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11733# mode is round-to-nearest and double rounding issues are present, and
11734# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11736$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737# $BASECFLAGS may affect the result
11738ac_save_cc="$CC"
11739CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011741 ac_cv_x87_double_rounding=no
11742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011744/* end confdefs.h. */
11745
11746#include <stdlib.h>
11747#include <math.h>
11748int main() {
11749 volatile double x, y, z;
11750 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11751 x = 0.99999999999999989; /* 1-2**-53 */
11752 y = 1./x;
11753 if (y != 1.)
11754 exit(0);
11755 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11756 x = 1e16;
11757 y = 2.99999;
11758 z = x + y;
11759 if (z != 1e16+4.)
11760 exit(0);
11761 /* both tests show evidence of double rounding */
11762 exit(1);
11763}
11764
11765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011766if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011767 ac_cv_x87_double_rounding=no
11768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011773fi
11774
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011775CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11777$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011778if test "$ac_cv_x87_double_rounding" = yes
11779then
11780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011782
11783fi
11784
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785# ************************************
11786# * Check for mathematical functions *
11787# ************************************
11788
11789LIBS_SAVE=$LIBS
11790LIBS="$LIBS $LIBM"
11791
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011792for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11793do :
11794 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11795ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11796if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11797 cat >>confdefs.h <<_ACEOF
11798#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11799_ACEOF
11800
11801fi
11802done
11803
11804for ac_func in hypot lgamma log1p round tgamma
11805do :
11806 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11807ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11808if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11809 cat >>confdefs.h <<_ACEOF
11810#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11811_ACEOF
11812
11813fi
11814done
11815
11816ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11817"
11818if test "x$ac_cv_have_decl_isinf" = xyes; then :
11819 ac_have_decl=1
11820else
11821 ac_have_decl=0
11822fi
11823
11824cat >>confdefs.h <<_ACEOF
11825#define HAVE_DECL_ISINF $ac_have_decl
11826_ACEOF
11827ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11828"
11829if test "x$ac_cv_have_decl_isnan" = xyes; then :
11830 ac_have_decl=1
11831else
11832 ac_have_decl=0
11833fi
11834
11835cat >>confdefs.h <<_ACEOF
11836#define HAVE_DECL_ISNAN $ac_have_decl
11837_ACEOF
11838ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11839"
11840if test "x$ac_cv_have_decl_isfinite" = xyes; then :
11841 ac_have_decl=1
11842else
11843 ac_have_decl=0
11844fi
11845
11846cat >>confdefs.h <<_ACEOF
11847#define HAVE_DECL_ISFINITE $ac_have_decl
11848_ACEOF
11849
11850
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011851# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11852# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11854$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011855if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011857else
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011860 ac_cv_tanh_preserves_zero_sign=no
11861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011863/* end confdefs.h. */
11864
11865#include <math.h>
11866#include <stdlib.h>
11867int main() {
11868 /* return 0 if either negative zeros don't exist
11869 on this platform or if negative zeros exist
11870 and tanh(-0.) == -0. */
11871 if (atan2(0., -1.) == atan2(-0., -1.) ||
11872 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11873 else exit(1);
11874}
11875
11876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011878 ac_cv_tanh_preserves_zero_sign=yes
11879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011884fi
11885
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011886fi
11887
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11889$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011890if test "$ac_cv_tanh_preserves_zero_sign" = yes
11891then
11892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011894
11895fi
11896
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011897if test "$ac_cv_func_log1p" = yes
11898then
11899 # On some versions of AIX, log1p(-0.) returns 0. instead of
11900 # -0. See issue #9920.
11901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11902$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
11903 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
11904 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011905else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011906
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011907 if test "$cross_compiling" = yes; then :
11908 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011909else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11911/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011913 #include <math.h>
11914 #include <stdlib.h>
11915 int main() {
11916 /* Fail if the signs of log1p(-0.) and -0. can be
11917 distinguished. */
11918 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11919 return 0;
11920 else
11921 return 1;
11922 }
11923
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011924_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011925if ac_fn_c_try_run "$LINENO"; then :
11926 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011927else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011928 ac_cv_log1p_drops_zero_sign=yes
11929fi
11930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011932fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011933
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011934fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11937$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11938fi
11939if test "$ac_cv_log1p_drops_zero_sign" = yes
11940then
11941
11942$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11943
11944fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011945
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011946LIBS=$LIBS_SAVE
11947
Mark Dickinsona614f042009-11-28 12:48:43 +000011948# For multiprocessing module, check that sem_open
11949# actually works. For FreeBSD versions <= 7.2,
11950# the kernel module that provides POSIX semaphores
11951# isn't loaded by default, so an attempt to call
11952# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11954$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011955if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011957else
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011959 ac_cv_posix_semaphores_enabled=yes
11960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011962/* end confdefs.h. */
11963
11964#include <unistd.h>
11965#include <fcntl.h>
11966#include <stdio.h>
11967#include <semaphore.h>
11968#include <sys/stat.h>
11969
11970int main(void) {
11971 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11972 if (a == SEM_FAILED) {
11973 perror("sem_open");
11974 return 1;
11975 }
11976 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011977 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011978 return 0;
11979}
11980
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011983 ac_cv_posix_semaphores_enabled=yes
11984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011989fi
11990
11991
Mark Dickinsona614f042009-11-28 12:48:43 +000011992fi
11993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11995$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011996if test $ac_cv_posix_semaphores_enabled = no
11997then
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012000
12001fi
12002
Mark Dickinson10683072009-04-18 21:18:19 +000012003# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12005$as_echo_n "checking for broken sem_getvalue... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012006if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012013/* end confdefs.h. */
12014
12015#include <unistd.h>
12016#include <fcntl.h>
12017#include <stdio.h>
12018#include <semaphore.h>
12019#include <sys/stat.h>
12020
12021int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012022 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012023 int count;
12024 int res;
12025 if(a==SEM_FAILED){
12026 perror("sem_open");
12027 return 1;
12028
12029 }
12030 res = sem_getvalue(a, &count);
12031 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012032 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012033 return res==-1 ? 1 : 0;
12034}
12035
Mark Dickinson10683072009-04-18 21:18:19 +000012036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012038 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012044fi
12045
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012046
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012047fi
12048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12050$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012051if test $ac_cv_broken_sem_getvalue = yes
12052then
12053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012055
12056fi
12057
Mark Dickinsonbd792642009-03-18 20:06:12 +000012058# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12060$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012061# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012062if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012063 enableval=$enable_big_digits; case $enable_big_digits in
12064yes)
12065 enable_big_digits=30 ;;
12066no)
12067 enable_big_digits=15 ;;
1206815|30)
12069 ;;
12070*)
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012071 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000012072esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12074$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012075
12076cat >>confdefs.h <<_ACEOF
12077#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12078_ACEOF
12079
12080
12081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12083$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012084fi
12085
12086
Guido van Rossumef2255b2000-03-10 22:30:29 +000012087# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012088ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012089if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012090
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012094 wchar_h="yes"
12095
Guido van Rossumef2255b2000-03-10 22:30:29 +000012096else
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012098
12099fi
12100
Michael W. Hudson54241132001-12-07 15:38:26 +000012101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012103# determine wchar_t size
12104if test "$wchar_h" = yes
12105then
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12108# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12109# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12111$as_echo_n "checking size of wchar_t... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012112if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12116"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Martin v. Löwis11437992002-04-12 09:54:03 +000012118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 if test "$ac_cv_type_wchar_t" = yes; then
12120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012122as_fn_error 77 "cannot compute sizeof (wchar_t)
12123See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124 else
12125 ac_cv_sizeof_wchar_t=0
12126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012128
Martin v. Löwis11437992002-04-12 09:54:03 +000012129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12131$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132
12133
12134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012136#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012137_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012138
Michael W. Hudson54241132001-12-07 15:38:26 +000012139
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012140fi
12141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12143$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012144have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012146/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012147
12148#include <tcl.h>
12149#if TCL_UTF_MAX != 6
12150# error "NOT UCS4_TCL"
12151#endif
12152int
12153main ()
12154{
12155
12156 ;
12157 return 0;
12158}
12159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012161
12162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012164
12165 have_ucs4_tcl=yes
12166
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12170$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012171
Skip Montanaro6dead952003-09-25 14:50:04 +000012172# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012173if test "$wchar_h" = yes
12174then
12175 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12177$as_echo_n "checking whether wchar_t is signed... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012178 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012180else
12181
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012183 ac_cv_wchar_t_signed=yes
12184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012186/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012187
12188 #include <wchar.h>
12189 int main()
12190 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012191 /* Success: exit code 0 */
12192 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012193 }
12194
12195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012197 ac_cv_wchar_t_signed=yes
12198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012203fi
12204
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012205fi
12206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12208$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209fi
12210
Matthias Kloseb9621712010-04-24 17:59:49 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12212$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012213
12214# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012215if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012216 withval=$with_wide_unicode;
12217if test "$withval" != no
12218then unicode_size="4"
12219else unicode_size="2"
12220fi
12221
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223
Georg Brandl52d168a2008-01-07 18:10:24 +000012224case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012225 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012226 *) unicode_size="2" ;;
12227esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012228
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012229fi
12230
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012231
12232
Georg Brandl52d168a2008-01-07 18:10:24 +000012233case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012234 4)
12235 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12236
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012237 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012238 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012240 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012241esac
12242
Michael W. Hudson54241132001-12-07 15:38:26 +000012243
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
Georg Brandl52d168a2008-01-07 18:10:24 +000012245# wchar_t is only usable if it maps to an unsigned type
12246if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012247 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012248then
12249 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012254
Georg Brandl52d168a2008-01-07 18:10:24 +000012255elif test "$ac_cv_sizeof_short" = "$unicode_size"
12256then
12257 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012259
Georg Brandl52d168a2008-01-07 18:10:24 +000012260elif test "$ac_cv_sizeof_long" = "$unicode_size"
12261then
12262 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012264
Georg Brandl52d168a2008-01-07 18:10:24 +000012265else
12266 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12269$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012270
12271# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12273$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012274if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012276else
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 ac_cv_c_bigendian=unknown
12278 # See if we're dealing with a universal compiler.
12279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12280/* end confdefs.h. */
12281#ifndef __APPLE_CC__
12282 not a universal capable compiler
12283 #endif
12284 typedef int dummy;
12285
Skip Montanaro6dead952003-09-25 14:50:04 +000012286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if ac_fn_c_try_compile "$LINENO"; then :
12288
12289 # Check for potential -arch flags. It is not universal unless
12290 # there are at least two -arch flags with different values.
12291 ac_arch=
12292 ac_prev=
12293 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12294 if test -n "$ac_prev"; then
12295 case $ac_word in
12296 i?86 | x86_64 | ppc | ppc64)
12297 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12298 ac_arch=$ac_word
12299 else
12300 ac_cv_c_bigendian=universal
12301 break
12302 fi
12303 ;;
12304 esac
12305 ac_prev=
12306 elif test "x$ac_word" = "x-arch"; then
12307 ac_prev=arch
12308 fi
12309 done
12310fi
12311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12312 if test $ac_cv_c_bigendian = unknown; then
12313 # See if sys/param.h defines the BYTE_ORDER macro.
12314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012316#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012318
Martin v. Löwis11437992002-04-12 09:54:03 +000012319int
12320main ()
12321{
Matthias Kloseb9621712010-04-24 17:59:49 +000012322#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12323 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12324 && LITTLE_ENDIAN)
12325 bogus endian macros
12326 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
12328 ;
12329 return 0;
12330}
12331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012333 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012335/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338
Martin v. Löwis11437992002-04-12 09:54:03 +000012339int
12340main ()
12341{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012342#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 not big endian
12344 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
12346 ;
12347 return 0;
12348}
12349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012351 ac_cv_c_bigendian=yes
12352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012356fi
12357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12358 fi
12359 if test $ac_cv_c_bigendian = unknown; then
12360 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012363#include <limits.h>
12364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365int
12366main ()
12367{
Matthias Kloseb9621712010-04-24 17:59:49 +000012368#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12369 bogus endian macros
12370 #endif
12371
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 ;
12373 return 0;
12374}
12375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376if ac_fn_c_try_compile "$LINENO"; then :
12377 # It does; now see whether it defined to _BIG_ENDIAN or not.
12378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12379/* end confdefs.h. */
12380#include <limits.h>
12381
12382int
12383main ()
12384{
12385#ifndef _BIG_ENDIAN
12386 not big endian
12387 #endif
12388
12389 ;
12390 return 0;
12391}
12392_ACEOF
12393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012395else
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12399fi
12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12401 fi
12402 if test $ac_cv_c_bigendian = unknown; then
12403 # Compile a test program.
12404 if test "$cross_compiling" = yes; then :
12405 # Try to guess by grepping values from an object file.
12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407/* end confdefs.h. */
12408short int ascii_mm[] =
12409 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12410 short int ascii_ii[] =
12411 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12412 int use_ascii (int i) {
12413 return ascii_mm[i] + ascii_ii[i];
12414 }
12415 short int ebcdic_ii[] =
12416 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12417 short int ebcdic_mm[] =
12418 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12419 int use_ebcdic (int i) {
12420 return ebcdic_mm[i] + ebcdic_ii[i];
12421 }
12422 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424int
12425main ()
12426{
12427return use_ascii (foo) == use_ebcdic (foo);
12428 ;
12429 return 0;
12430}
12431_ACEOF
12432if ac_fn_c_try_compile "$LINENO"; then :
12433 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12434 ac_cv_c_bigendian=yes
12435 fi
12436 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12437 if test "$ac_cv_c_bigendian" = unknown; then
12438 ac_cv_c_bigendian=no
12439 else
12440 # finding both strings is unlikely to happen, but who knows?
12441 ac_cv_c_bigendian=unknown
12442 fi
12443 fi
12444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012446else
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012448/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012450int
12451main ()
12452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 /* Are we little or big endian? From Harbison&Steele. */
12455 union
12456 {
12457 long int l;
12458 char c[sizeof (long int)];
12459 } u;
12460 u.l = 1;
12461 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462
12463 ;
12464 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012465}
Martin v. Löwis11437992002-04-12 09:54:03 +000012466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468 ac_cv_c_bigendian=no
12469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12473 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12479$as_echo "$ac_cv_c_bigendian" >&6; }
12480 case $ac_cv_c_bigendian in #(
12481 yes)
12482 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12483;; #(
12484 no)
12485 ;; #(
12486 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 ;; #(
12491 *)
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012492 as_fn_error $? "unknown endianness
Benjamin Peterson79263252010-10-31 16:50:44 +000012493 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012495
Michael W. Hudson54241132001-12-07 15:38:26 +000012496
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012497# ABI version string for Python extension modules. This appears between the
12498# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12499# from the following attributes which affect the ABI of this Python build (in
12500# this order):
12501#
12502# * The Python implementation (always 'cpython-' for us)
12503# * The major and minor version numbers
12504# * --with-pydebug (adds a 'd')
12505# * --with-pymalloc (adds a 'm')
12506# * --with-wide-unicode (adds a 'u')
12507#
12508# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012509# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12510# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012511
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12513$as_echo_n "checking ABIFLAGS... " >&6; }
12514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12515$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12517$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012518SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12520$as_echo "$SOABI" >&6; }
12521
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12523$as_echo_n "checking LDVERSION... " >&6; }
12524LDVERSION='$(VERSION)$(ABIFLAGS)'
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12526$as_echo "$LDVERSION" >&6; }
12527
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012528# SO is the extension of shared libraries `(including the dot!)
12529# -- usually .so, .sl on HP-UX, .dll on Cygwin
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12531$as_echo_n "checking SO... " >&6; }
12532if test -z "$SO"
12533then
12534 case $ac_sys_system in
12535 hp*|HP*)
12536 case `uname -m` in
12537 ia64) SO=.so;;
12538 *) SO=.sl;;
12539 esac
12540 ;;
12541 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012542 Linux*|GNU*)
12543 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012544 *) SO=.so;;
12545 esac
12546else
12547 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012548 echo
12549 echo '====================================================================='
12550 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012551 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012552 echo '+ Do you really mean to change the extension for shared libraries? +'
12553 echo '+ Continuing in 10 seconds to let you to ponder. +'
12554 echo '+ +'
12555 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012556 sleep 10
12557fi
12558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12559$as_echo "$SO" >&6; }
12560
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012561# Check whether right shifting a negative integer extends the sign bit
12562# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12564$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012565if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012567else
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012570 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012573/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012574
12575int main()
12576{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012577 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012578}
12579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012582 ac_cv_rshift_extends_sign=yes
12583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012588fi
12589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590fi
12591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12593$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012594if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012595then
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012598
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012599fi
12600
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012601# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12603$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012604if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012609/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012610#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012611int
12612main ()
12613{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012614
12615 FILE *f = fopen("/dev/null", "r");
12616 flockfile(f);
12617 getc_unlocked(f);
12618 funlockfile(f);
12619
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 ;
12621 return 0;
12622}
12623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012625 ac_cv_have_getc_unlocked=yes
12626else
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 ac_cv_have_getc_unlocked=no
12628fi
12629rm -f core conftest.err conftest.$ac_objext \
12630 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12634$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012635if test "$ac_cv_have_getc_unlocked" = yes
12636then
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012639
12640fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012641
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012642# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012643# save the value of LIBS so we don't actually link Python with readline
12644LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012645
Gregory P. Smith18820942008-09-07 06:24:49 +000012646# On some systems we need to link readline to a termcap compatible
12647# library. NOTE: Keep the precedence of listed libraries synchronised
12648# with setup.py.
12649py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12651$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012652for py_libtermcap in "" ncursesw ncurses curses termcap; do
12653 if test -z "$py_libtermcap"; then
12654 READLINE_LIBS="-lreadline"
12655 else
12656 READLINE_LIBS="-lreadline -l$py_libtermcap"
12657 fi
12658 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012660/* end confdefs.h. */
12661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012662/* Override any GCC internal prototype to avoid an error.
12663 Use char because int might match the return type of a GCC
12664 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012665#ifdef __cplusplus
12666extern "C"
12667#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012668char readline ();
12669int
12670main ()
12671{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012673 ;
12674 return 0;
12675}
12676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012678 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012680rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012682 if test $py_cv_lib_readline = yes; then
12683 break
12684 fi
12685done
12686# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12687#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012688if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12690$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012691else
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12693$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012696
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012697fi
12698
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012699# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12701$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012702if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012704else
12705 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012706LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012708/* end confdefs.h. */
12709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710/* Override any GCC internal prototype to avoid an error.
12711 Use char because int might match the return type of a GCC
12712 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012713#ifdef __cplusplus
12714extern "C"
12715#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012716char rl_callback_handler_install ();
12717int
12718main ()
12719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012721 ;
12722 return 0;
12723}
12724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012725if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012726 ac_cv_lib_readline_rl_callback_handler_install=yes
12727else
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012730rm -f core conftest.err conftest.$ac_objext \
12731 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012732LIBS=$ac_check_lib_save_LIBS
12733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12735$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012736if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739
12740fi
12741
12742
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012743# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012745/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012746#include <readline/readline.h>
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012749 have_readline=yes
12750else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012751 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012752
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012753fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012754rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012755if test $have_readline = yes
12756then
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012758/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012759#include <readline/readline.h>
12760
12761_ACEOF
12762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012766
12767fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012768rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012771/* end confdefs.h. */
12772#include <readline/readline.h>
12773
12774_ACEOF
12775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012779
12780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012781rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012782
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012783fi
12784
Martin v. Löwis0daad592001-09-30 21:09:59 +000012785# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12787$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012788if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012790else
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012792LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796/* Override any GCC internal prototype to avoid an error.
12797 Use char because int might match the return type of a GCC
12798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012799#ifdef __cplusplus
12800extern "C"
12801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012802char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012803int
12804main ()
12805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012816rm -f core conftest.err conftest.$ac_objext \
12817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012818LIBS=$ac_check_lib_save_LIBS
12819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12821$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012822if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012825
Martin v. Löwis0daad592001-09-30 21:09:59 +000012826fi
12827
Michael W. Hudson54241132001-12-07 15:38:26 +000012828
Thomas Wouters89d996e2007-09-08 17:39:28 +000012829# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12831$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012832if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012834else
12835 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012836LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012838/* end confdefs.h. */
12839
12840/* Override any GCC internal prototype to avoid an error.
12841 Use char because int might match the return type of a GCC
12842 builtin and then its argument prototype would still apply. */
12843#ifdef __cplusplus
12844extern "C"
12845#endif
12846char rl_completion_display_matches_hook ();
12847int
12848main ()
12849{
12850return rl_completion_display_matches_hook ();
12851 ;
12852 return 0;
12853}
12854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012855if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012856 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12857else
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012860rm -f core conftest.err conftest.$ac_objext \
12861 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012862LIBS=$ac_check_lib_save_LIBS
12863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12865$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012866if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012867
Matthias Kloseb9621712010-04-24 17:59:49 +000012868$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012869
12870fi
12871
12872
Martin v. Löwis0daad592001-09-30 21:09:59 +000012873# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12875$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012876if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012878else
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012880LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884/* Override any GCC internal prototype to avoid an error.
12885 Use char because int might match the return type of a GCC
12886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012887#ifdef __cplusplus
12888extern "C"
12889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012890char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012891int
12892main ()
12893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ;
12896 return 0;
12897}
12898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012899if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012901else
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012904rm -f core conftest.err conftest.$ac_objext \
12905 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012906LIBS=$ac_check_lib_save_LIBS
12907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12909$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012910if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012913
Guido van Rossum353ae582001-07-10 16:45:32 +000012914fi
12915
Jack Jansendd19cf82001-12-06 22:36:17 +000012916
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012917# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919/* end confdefs.h. */
12920#include <readline/readline.h>
12921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012922if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012923 have_readline=yes
12924else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012925 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012926
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012927fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012928rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929if test $have_readline = yes
12930then
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012932/* end confdefs.h. */
12933#include <readline/readline.h>
12934
12935_ACEOF
12936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012940
12941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012942rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012943
12944fi
12945
Martin v. Löwis82bca632006-02-10 20:49:30 +000012946# End of readline checks: restore LIBS
12947LIBS=$LIBS_no_readline
12948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12950$as_echo_n "checking for broken nice()... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012951if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012953else
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012956 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012959/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012960
12961int main()
12962{
12963 int val1 = nice(1);
12964 if (val1 != -1 && val1 == nice(2))
12965 exit(0);
12966 exit(1);
12967}
12968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012971 ac_cv_broken_nice=yes
12972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012977fi
12978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979fi
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12982$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012983if test "$ac_cv_broken_nice" = yes
12984then
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012987
12988fi
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12991$as_echo_n "checking for broken poll()... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012992if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012996 ac_cv_broken_poll=no
12997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012999/* end confdefs.h. */
13000
13001#include <poll.h>
13002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013003int main()
13004{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013005 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013006 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013007
13008 close (42);
13009
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013010 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013011 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013013 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013014 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013016 return 1;
13017}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013018
13019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013020if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013021 ac_cv_broken_poll=yes
13022else
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013029fi
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13032$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013033if test "$ac_cv_broken_poll" = yes
13034then
13035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013037
13038fi
13039
Brett Cannon43802422005-02-10 20:48:03 +000013040# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000013041# (which is not required by ISO C or UNIX spec) and/or if we support
13042# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013043ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000013044#include <$ac_cv_struct_tm>
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013047if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013048
13049cat >>confdefs.h <<_ACEOF
13050#define HAVE_STRUCT_TM_TM_ZONE 1
13051_ACEOF
13052
13053
13054fi
13055
13056if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013059
13060else
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13062"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013063if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067fi
13068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013070#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071_ACEOF
13072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13074$as_echo_n "checking for tzname... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013075if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013079/* end confdefs.h. */
13080#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081#if !HAVE_DECL_TZNAME
13082extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013083#endif
13084
13085int
13086main ()
13087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013089 ;
13090 return 0;
13091}
13092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013094 ac_cv_var_tzname=yes
13095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013098rm -f core conftest.err conftest.$ac_objext \
13099 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13102$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013103 if test $ac_cv_var_tzname = yes; then
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013106
13107 fi
13108fi
13109
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013110
Martin v. Löwis1d459062005-03-14 21:23:33 +000013111# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13113$as_echo_n "checking for working tzset()... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013114if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013116else
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013119 ac_cv_working_tzset=no
13120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013122/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013123
13124#include <stdlib.h>
13125#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013126#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013127
13128#if HAVE_TZNAME
13129extern char *tzname[];
13130#endif
13131
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013132int main()
13133{
Brett Cannon18367812003-09-19 00:59:16 +000013134 /* Note that we need to ensure that not only does tzset(3)
13135 do 'something' with localtime, but it works as documented
13136 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013137 This includes making sure that tzname is set properly if
13138 tm->tm_zone does not exist since it is the alternative way
13139 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013140
13141 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013142 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013143 */
13144
Martin v. Löwis1d459062005-03-14 21:23:33 +000013145 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013146 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13147
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013148 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013149 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013150 if (localtime(&groundhogday)->tm_hour != 0)
13151 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013152#if HAVE_TZNAME
13153 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13154 if (strcmp(tzname[0], "UTC") ||
13155 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13156 exit(1);
13157#endif
Brett Cannon18367812003-09-19 00:59:16 +000013158
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013159 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013160 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013161 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013162 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013163#if HAVE_TZNAME
13164 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13165 exit(1);
13166#endif
Brett Cannon18367812003-09-19 00:59:16 +000013167
13168 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13169 tzset();
13170 if (localtime(&groundhogday)->tm_hour != 11)
13171 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013172#if HAVE_TZNAME
13173 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13174 exit(1);
13175#endif
13176
13177#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013178 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13179 exit(1);
13180 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13181 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013182#endif
Brett Cannon18367812003-09-19 00:59:16 +000013183
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013184 exit(0);
13185}
13186
13187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013188if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013189 ac_cv_working_tzset=yes
13190else
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013195fi
13196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197fi
13198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13200$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013201if test "$ac_cv_working_tzset" = yes
13202then
13203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013205
13206fi
13207
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013208# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13210$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013211if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013213else
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013215/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013216#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013217int
13218main ()
13219{
13220
13221struct stat st;
13222st.st_mtim.tv_nsec = 1;
13223
13224 ;
13225 return 0;
13226}
13227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013229 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013230else
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13234fi
13235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13237$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013238if test "$ac_cv_stat_tv_nsec" = yes
13239then
13240
Matthias Kloseb9621712010-04-24 17:59:49 +000013241$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013242
13243fi
13244
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013245# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13247$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013248if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013252/* end confdefs.h. */
13253#include <sys/stat.h>
13254int
13255main ()
13256{
13257
13258struct stat st;
13259st.st_mtimespec.tv_nsec = 1;
13260
13261 ;
13262 return 0;
13263}
13264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013266 ac_cv_stat_tv_nsec2=yes
13267else
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13271fi
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13274$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013275if test "$ac_cv_stat_tv_nsec2" = yes
13276then
13277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013279
13280fi
13281
Jack Jansen666b1e72001-10-31 12:11:48 +000013282# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13284$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013285if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013289/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013290#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013291int
13292main ()
13293{
Jack Jansen666b1e72001-10-31 12:11:48 +000013294
13295 int rtn;
13296 rtn = mvwdelch(0,0,0);
13297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 ;
13299 return 0;
13300}
13301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013302if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013303 ac_cv_mvwdelch_is_expression=yes
13304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13308fi
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13311$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013312
13313if test "$ac_cv_mvwdelch_is_expression" = yes
13314then
Martin v. Löwis11437992002-04-12 09:54:03 +000013315
Matthias Kloseb9621712010-04-24 17:59:49 +000013316$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013317
13318fi
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13321$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013322if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013326/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013327#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013328int
13329main ()
13330{
Jack Jansen666b1e72001-10-31 12:11:48 +000013331
13332 WINDOW *w;
13333 w->_flags = 0;
13334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ;
13336 return 0;
13337}
13338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013339if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013340 ac_cv_window_has_flags=yes
13341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345fi
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13348$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013349
Jack Jansen666b1e72001-10-31 12:11:48 +000013350
13351if test "$ac_cv_window_has_flags" = yes
13352then
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013355
13356fi
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13359$as_echo_n "checking for is_term_resized... " >&6; }
13360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013361/* end confdefs.h. */
13362#include <curses.h>
13363int
13364main ()
13365{
13366void *x=is_term_resized
13367 ;
13368 return 0;
13369}
13370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013374
Matthias Kloseb159a552010-04-25 21:00:44 +000013375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013377else
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13379$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013380
13381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13385$as_echo_n "checking for resize_term... " >&6; }
13386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013387/* end confdefs.h. */
13388#include <curses.h>
13389int
13390main ()
13391{
13392void *x=resize_term
13393 ;
13394 return 0;
13395}
13396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013397if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013400
Matthias Kloseb159a552010-04-25 21:00:44 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013402$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13405$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013406
13407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13411$as_echo_n "checking for resizeterm... " >&6; }
13412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013413/* end confdefs.h. */
13414#include <curses.h>
13415int
13416main ()
13417{
13418void *x=resizeterm
13419 ;
13420 return 0;
13421}
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013426
Matthias Kloseb159a552010-04-25 21:00:44 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13431$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013432
13433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13437$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013438
13439if test -r /dev/ptmx
13440then
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13442$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013445
Thomas Wouters89f507f2006-12-13 04:49:30 +000013446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13448$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13452$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013453
13454if test -r /dev/ptc
13455then
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13457$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013460
Thomas Wouters89f507f2006-12-13 04:49:30 +000013461else
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13463$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013464fi
13465
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013466if test "$have_long_long" = yes
13467then
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13469$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013470 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013474 ac_cv_have_long_long_format=no
13475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013477/* end confdefs.h. */
13478
13479 #include <stdio.h>
13480 #include <stddef.h>
13481 #include <string.h>
13482
13483 #ifdef HAVE_SYS_TYPES_H
13484 #include <sys/types.h>
13485 #endif
13486
13487 int main()
13488 {
13489 char buffer[256];
13490
13491 if (sprintf(buffer, "%lld", (long long)123) < 0)
13492 return 1;
13493 if (strcmp(buffer, "123"))
13494 return 1;
13495
13496 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13497 return 1;
13498 if (strcmp(buffer, "-123"))
13499 return 1;
13500
13501 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13502 return 1;
13503 if (strcmp(buffer, "123"))
13504 return 1;
13505
13506 return 0;
13507 }
13508
13509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013510if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013511 ac_cv_have_long_long_format=yes
13512else
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013517fi
13518
13519
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013520fi
13521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13523$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013524fi
13525
Mark Dickinson89d7d412009-12-31 20:50:59 +000013526if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527then
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013530
13531fi
13532
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013533if test $ac_sys_system = Darwin
13534then
13535 LIBS="$LIBS -framework CoreFoundation"
13536fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13539$as_echo_n "checking for %zd printf() format support... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013540if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013544 ac_cv_have_size_t_format="cross -- assuming yes"
13545
Thomas Wouters477c8d52006-05-27 19:21:47 +000013546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013548/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549
Thomas Wouters477c8d52006-05-27 19:21:47 +000013550#include <stdio.h>
13551#include <stddef.h>
13552#include <string.h>
13553
Christian Heimes2c181612007-12-17 20:04:13 +000013554#ifdef HAVE_SYS_TYPES_H
13555#include <sys/types.h>
13556#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013557
13558#ifdef HAVE_SSIZE_T
13559typedef ssize_t Py_ssize_t;
13560#elif SIZEOF_VOID_P == SIZEOF_LONG
13561typedef long Py_ssize_t;
13562#else
13563typedef int Py_ssize_t;
13564#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013565
Christian Heimes2c181612007-12-17 20:04:13 +000013566int main()
13567{
13568 char buffer[256];
13569
Thomas Wouters477c8d52006-05-27 19:21:47 +000013570 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13571 return 1;
13572
Thomas Wouters89f507f2006-12-13 04:49:30 +000013573 if (strcmp(buffer, "123"))
13574 return 1;
13575
13576 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13577 return 1;
13578
13579 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013580 return 1;
13581
13582 return 0;
13583}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013584
Thomas Wouters477c8d52006-05-27 19:21:47 +000013585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013587 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013593fi
13594
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13597$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013598if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013601
13602fi
13603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013605#ifdef HAVE_SYS_TYPES_H
13606#include <sys/types.h>
13607#endif
13608#ifdef HAVE_SYS_SOCKET_H
13609#include <sys/socket.h>
13610#endif
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013613if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013618
13619fi
13620
Michael W. Hudson54241132001-12-07 15:38:26 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13623$as_echo_n "checking for broken mbstowcs... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013624if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013628 ac_cv_broken_mbstowcs=no
13629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013631/* end confdefs.h. */
13632
13633#include<stdlib.h>
13634int main() {
13635 size_t len = -1;
13636 const char *str = "text";
13637 len = mbstowcs(NULL, str, 0);
13638 return (len != 4);
13639}
13640
13641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013643 ac_cv_broken_mbstowcs=no
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013649fi
13650
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651fi
13652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13654$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013655if test "$ac_cv_broken_mbstowcs" = yes
13656then
13657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013659
13660fi
13661
Antoine Pitrou042b1282010-08-13 21:15:58 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13663$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013664if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013665 $as_echo_n "(cached) " >&6
13666else
13667 if test "$cross_compiling" = yes; then :
13668 ac_cv_computed_gotos=no
13669else
13670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13671/* end confdefs.h. */
13672
13673int main(int argc, char **argv)
13674{
13675 static void *targets[1] = { &&LABEL1 };
13676 goto LABEL2;
13677LABEL1:
13678 return 0;
13679LABEL2:
13680 goto *targets[0];
13681 return 1;
13682}
13683
13684_ACEOF
13685if ac_fn_c_try_run "$LINENO"; then :
13686 ac_cv_computed_gotos=yes
13687else
13688 ac_cv_computed_gotos=no
13689fi
13690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13691 conftest.$ac_objext conftest.beam conftest.$ac_ext
13692fi
13693
13694fi
13695
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13697$as_echo "$ac_cv_computed_gotos" >&6; }
13698if test "$ac_cv_computed_gotos" = yes
13699then
13700
13701$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13702
13703fi
13704
Antoine Pitroub52ec782009-01-25 16:34:23 +000013705# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13707$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013708
13709# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013710if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013711 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013712if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013713then
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13718$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013719fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013720if test "$withval" = no
13721then
13722
13723$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13726$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013727fi
13728
Antoine Pitrou042b1282010-08-13 21:15:58 +000013729else
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13731$as_echo "no value specified" >&6; }
13732fi
13733
Antoine Pitroub52ec782009-01-25 16:34:23 +000013734
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013735case $ac_sys_system in
13736AIX*)
13737
13738$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13739 ;;
13740esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013741
Michael W. Hudson54241132001-12-07 15:38:26 +000013742
Jesus Cea6a792292010-05-03 21:18:48 +000013743case $ac_sys_system in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013744 OSF*) as_fn_error $? "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000013745esac
13746
13747
13748
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013749
13750
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013751for h in `(cd $srcdir;echo Python/thread_*.h)`
13752do
13753 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13754done
13755
Michael W. Hudson54241132001-12-07 15:38:26 +000013756
Neal Norwitzd24499d2005-12-18 21:36:39 +000013757SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13759$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013760for dir in $SRCDIRS; do
13761 if test ! -d $dir; then
13762 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013763 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013764done
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13766$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013767
Guido van Rossum627b2d71993-12-24 10:39:16 +000013768# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013769ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013770
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013771ac_config_files="$ac_config_files Modules/ld_so_aix"
13772
Martin v. Löwis11437992002-04-12 09:54:03 +000013773cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774# This file is a shell script that caches the results of configure
13775# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013776# scripts and configure runs, see configure's option --config-cache.
13777# It is not useful on other systems. If it contains results you don't
13778# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779#
Martin v. Löwis11437992002-04-12 09:54:03 +000013780# config.status only pays attention to the cache file if you give it
13781# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782#
Skip Montanaro6dead952003-09-25 14:50:04 +000013783# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013784# loading this file, other *unset* `ac_cv_foo' will be assigned the
13785# following values.
13786
13787_ACEOF
13788
Guido van Rossumf78abae1997-01-21 22:02:36 +000013789# The following way of writing the cache mishandles newlines in values,
13790# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013792# Ultrix sh set writes to stderr and can't be redirected directly,
13793# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794(
13795 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13796 eval ac_val=\$$ac_var
13797 case $ac_val in #(
13798 *${as_nl}*)
13799 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13801$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802 esac
13803 case $ac_var in #(
13804 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13806 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013807 esac ;;
13808 esac
13809 done
13810
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13813 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 # `set' does not quote correctly, so add quotes: double-quote
13815 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013817 "s/'/'\\\\''/g;
13818 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 *)
13821 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 esac |
13825 sort
13826) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13832 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13834 :end' >>confcache
13835if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13836 if test -w "$cache_file"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013837 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13839$as_echo "$as_me: updating cache $cache_file" >&6;}
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013840 if test ! -f "$cache_file" || test -h "$cache_file"; then
13841 cat confcache >"$cache_file"
13842 else
13843 case $cache_file in #(
13844 */* | ?:*)
13845 mv -f confcache "$cache_file"$$ &&
13846 mv -f "$cache_file"$$ "$cache_file" ;; #(
13847 *)
13848 mv -f confcache "$cache_file" ;;
13849 esac
13850 fi
13851 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013852 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13854$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013855 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013856fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013857rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013858
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859test "x$prefix" = xNONE && prefix=$ac_default_prefix
13860# Let make expand exec_prefix.
13861test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013862
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863DEFS=-DHAVE_CONFIG_H
13864
Skip Montanaro6dead952003-09-25 14:50:04 +000013865ac_libobjs=
13866ac_ltlibobjs=
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013867U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013868for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13869 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013872 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13873 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13875 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013876done
13877LIBOBJS=$ac_libobjs
13878
13879LTLIBOBJS=$ac_ltlibobjs
13880
13881
Martin v. Löwis11437992002-04-12 09:54:03 +000013882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013884: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013885ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013886ac_clean_files_save=$ac_clean_files
13887ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13889$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13890as_write_fail=0
13891cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013892#! $SHELL
13893# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013894# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013895# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013896# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013897
Martin v. Löwis11437992002-04-12 09:54:03 +000013898debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013899ac_cs_recheck=false
13900ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902SHELL=\${CONFIG_SHELL-$SHELL}
13903export SHELL
13904_ASEOF
13905cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13906## -------------------- ##
13907## M4sh Initialization. ##
13908## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910# Be more Bourne compatible
13911DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013912if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 emulate sh
13914 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013916 # is contrary to our usage. Disable this feature.
13917 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013919else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 case `(set -o) 2>/dev/null` in #(
13921 *posix*) :
13922 set -o posix ;; #(
13923 *) :
13924 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013926fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013927
13928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929as_nl='
13930'
13931export as_nl
13932# Printing a long string crashes Solaris 7 /usr/bin/printf.
13933as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13934as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13935as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13936# Prefer a ksh shell builtin over an external printf program on Solaris,
13937# but without wasting forks for bash or zsh.
13938if test -z "$BASH_VERSION$ZSH_VERSION" \
13939 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13940 as_echo='print -r --'
13941 as_echo_n='print -rn --'
13942elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13943 as_echo='printf %s\n'
13944 as_echo_n='printf %s'
13945else
13946 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13947 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13948 as_echo_n='/usr/ucb/echo -n'
13949 else
13950 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13951 as_echo_n_body='eval
13952 arg=$1;
13953 case $arg in #(
13954 *"$as_nl"*)
13955 expr "X$arg" : "X\\(.*\\)$as_nl";
13956 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13957 esac;
13958 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13959 '
13960 export as_echo_n_body
13961 as_echo_n='sh -c $as_echo_n_body as_echo'
13962 fi
13963 export as_echo_body
13964 as_echo='sh -c $as_echo_body as_echo'
13965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
13967# The user is always right.
13968if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 PATH_SEPARATOR=:
13970 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13971 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13972 PATH_SEPARATOR=';'
13973 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976
13977# IFS
13978# We need space, tab and new line, in precisely that order. Quoting is
13979# there to prevent editors from complaining about space-tab.
13980# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13981# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982IFS=" "" $as_nl"
13983
13984# Find who we are. Look in the path if we contain no directory separator.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013985as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000013986case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 *[\\/]* ) as_myself=$0 ;;
13988 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013989for as_dir in $PATH
13990do
13991 IFS=$as_save_IFS
13992 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13994 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997 ;;
13998esac
13999# We did not find ourselves, most probably we were run as `sh COMMAND'
14000# in which case we are not to be found in the path.
14001if test "x$as_myself" = x; then
14002 as_myself=$0
14003fi
14004if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14006 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014007fi
14008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009# Unset variables that we do not need and which cause bugs (e.g. in
14010# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14011# suppresses any "Segmentation fault" message there. '((' could
14012# trigger a bug in pdksh 5.2.14.
14013for as_var in BASH_ENV ENV MAIL MAILPATH
14014do eval test x\${$as_var+set} = xset \
14015 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016done
14017PS1='$ '
14018PS2='> '
14019PS4='+ '
14020
14021# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014022LC_ALL=C
14023export LC_ALL
14024LANGUAGE=C
14025export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027# CDPATH.
14028(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14029
14030
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014031# as_fn_error STATUS ERROR [LINENO LOG_FD]
14032# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014033# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14034# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014035# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014036as_fn_error ()
14037{
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014038 as_status=$1; test $as_status -eq 0 && as_status=1
14039 if test "$4"; then
14040 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14041 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 fi
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014043 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 as_fn_exit $as_status
14045} # as_fn_error
14046
14047
14048# as_fn_set_status STATUS
14049# -----------------------
14050# Set $? to STATUS, without forking.
14051as_fn_set_status ()
14052{
14053 return $1
14054} # as_fn_set_status
14055
14056# as_fn_exit STATUS
14057# -----------------
14058# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14059as_fn_exit ()
14060{
14061 set +e
14062 as_fn_set_status $1
14063 exit $1
14064} # as_fn_exit
14065
14066# as_fn_unset VAR
14067# ---------------
14068# Portably unset VAR.
14069as_fn_unset ()
14070{
14071 { eval $1=; unset $1;}
14072}
14073as_unset=as_fn_unset
14074# as_fn_append VAR VALUE
14075# ----------------------
14076# Append the text in VALUE to the end of the definition contained in VAR. Take
14077# advantage of any shell optimizations that allow amortized linear growth over
14078# repeated appends, instead of the typical quadratic growth present in naive
14079# implementations.
14080if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14081 eval 'as_fn_append ()
14082 {
14083 eval $1+=\$2
14084 }'
14085else
14086 as_fn_append ()
14087 {
14088 eval $1=\$$1\$2
14089 }
14090fi # as_fn_append
14091
14092# as_fn_arith ARG...
14093# ------------------
14094# Perform arithmetic evaluation on the ARGs, and store the result in the
14095# global $as_val. Take advantage of shells that can avoid forks. The arguments
14096# must be portable across $(()) and expr.
14097if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14098 eval 'as_fn_arith ()
14099 {
14100 as_val=$(( $* ))
14101 }'
14102else
14103 as_fn_arith ()
14104 {
14105 as_val=`expr "$@" || test $? -eq 1`
14106 }
14107fi # as_fn_arith
14108
14109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110if expr a : '\(a\)' >/dev/null 2>&1 &&
14111 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14112 as_expr=expr
14113else
14114 as_expr=false
14115fi
14116
14117if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14118 as_basename=basename
14119else
14120 as_basename=false
14121fi
14122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14124 as_dirname=dirname
14125else
14126 as_dirname=false
14127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129as_me=`$as_basename -- "$0" ||
14130$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14131 X"$0" : 'X\(//\)$' \| \
14132 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014133$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134 sed '/^.*\/\([^/][^/]*\)\/*$/{
14135 s//\1/
14136 q
14137 }
14138 /^X\/\(\/\/\)$/{
14139 s//\1/
14140 q
14141 }
14142 /^X\/\(\/\).*/{
14143 s//\1/
14144 q
14145 }
14146 s/.*/./; q'`
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148# Avoid depending upon Character Ranges.
14149as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14150as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14151as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14152as_cr_digits='0123456789'
14153as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154
14155ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014156case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 xy) ECHO_C='\c';;
14161 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14162 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163 esac;;
14164*)
14165 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014166esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014167
Martin v. Löwis11437992002-04-12 09:54:03 +000014168rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169if test -d conf$$.dir; then
14170 rm -f conf$$.dir/conf$$.file
14171else
14172 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014175if (echo >conf$$.file) 2>/dev/null; then
14176 if ln -s conf$$.file conf$$ 2>/dev/null; then
14177 as_ln_s='ln -s'
14178 # ... but there are two gotchas:
14179 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14180 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14181 # In both cases, we have to default to `cp -p'.
14182 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14183 as_ln_s='cp -p'
14184 elif ln conf$$.file conf$$ 2>/dev/null; then
14185 as_ln_s=ln
14186 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014189else
14190 as_ln_s='cp -p'
14191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14193rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014194
Matthias Kloseb9621712010-04-24 17:59:49 +000014195
14196# as_fn_mkdir_p
14197# -------------
14198# Create "$as_dir" as a directory, including parents if necessary.
14199as_fn_mkdir_p ()
14200{
14201
14202 case $as_dir in #(
14203 -*) as_dir=./$as_dir;;
14204 esac
14205 test -d "$as_dir" || eval $as_mkdir_p || {
14206 as_dirs=
14207 while :; do
14208 case $as_dir in #(
14209 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14210 *) as_qdir=$as_dir;;
14211 esac
14212 as_dirs="'$as_qdir' $as_dirs"
14213 as_dir=`$as_dirname -- "$as_dir" ||
14214$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14215 X"$as_dir" : 'X\(//\)[^/]' \| \
14216 X"$as_dir" : 'X\(//\)$' \| \
14217 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14218$as_echo X"$as_dir" |
14219 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14220 s//\1/
14221 q
14222 }
14223 /^X\(\/\/\)[^/].*/{
14224 s//\1/
14225 q
14226 }
14227 /^X\(\/\/\)$/{
14228 s//\1/
14229 q
14230 }
14231 /^X\(\/\).*/{
14232 s//\1/
14233 q
14234 }
14235 s/.*/./; q'`
14236 test -d "$as_dir" && break
14237 done
14238 test -z "$as_dirs" || eval "mkdir $as_dirs"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014239 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014240
14241
14242} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014243if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014245else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014246 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014247 as_mkdir_p=false
14248fi
14249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250if test -x / >/dev/null 2>&1; then
14251 as_test_x='test -x'
14252else
14253 if ls -dL / >/dev/null 2>&1; then
14254 as_ls_L_option=L
14255 else
14256 as_ls_L_option=
14257 fi
14258 as_test_x='
14259 eval sh -c '\''
14260 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 case $1 in #(
14264 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 ???[sx]*):;;*)false;;esac;fi
14268 '\'' sh
14269 '
14270fi
14271as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014272
14273# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014274as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
14276# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014277as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
14279
Martin v. Löwis11437992002-04-12 09:54:03 +000014280exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014281## ----------------------------------- ##
14282## Main body of $CONFIG_STATUS script. ##
14283## ----------------------------------- ##
14284_ASEOF
14285test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014286
Matthias Kloseb9621712010-04-24 17:59:49 +000014287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14288# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014289# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290# values after options handling.
14291ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014292This file was extended by python $as_me 3.2, which was
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014293generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
14295 CONFIG_FILES = $CONFIG_FILES
14296 CONFIG_HEADERS = $CONFIG_HEADERS
14297 CONFIG_LINKS = $CONFIG_LINKS
14298 CONFIG_COMMANDS = $CONFIG_COMMANDS
14299 $ $0 $@
14300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301on `(hostname || uname -n) 2>/dev/null | sed 1q`
14302"
14303
Martin v. Löwis11437992002-04-12 09:54:03 +000014304_ACEOF
14305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306case $ac_config_files in *"
14307"*) set x $ac_config_files; shift; ac_config_files=$*;;
14308esac
14309
14310case $ac_config_headers in *"
14311"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14312esac
14313
14314
14315cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014316# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014317config_files="$ac_config_files"
14318config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014323ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014324\`$as_me' instantiates files and other configuration actions
14325from templates according to the current configuration. Unless the files
14326and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
14330 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 --config print configuration, then exit
14333 -q, --quiet, --silent
14334 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 -d, --debug don't remove temporary files
14336 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 --file=FILE[:TEMPLATE]
14338 instantiate the configuration file FILE
14339 --header=FILE[:TEMPLATE]
14340 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014341
14342Configuration files:
14343$config_files
14344
14345Configuration headers:
14346$config_headers
14347
Matthias Kloseb9621712010-04-24 17:59:49 +000014348Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14352ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014353ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014354python config.status 3.2
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014355configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014357
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014358Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014359This config.status script is free software; the Free Software Foundation
14360gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361
14362ac_pwd='$ac_pwd'
14363srcdir='$srcdir'
14364INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014365test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014366_ACEOF
14367
Matthias Kloseb9621712010-04-24 17:59:49 +000014368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14369# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014370ac_need_defaults=:
14371while test $# != 0
14372do
14373 case $1 in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014374 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14376 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014377 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014379 --*=)
14380 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14381 ac_optarg=
14382 ac_shift=:
14383 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014384 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014385 ac_option=$1
14386 ac_optarg=$2
14387 ac_shift=shift
14388 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014389 esac
14390
Skip Montanaro6dead952003-09-25 14:50:04 +000014391 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014393 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14394 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 $as_echo "$ac_cs_version"; exit ;;
14397 --config | --confi | --conf | --con | --co | --c )
14398 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 debug=: ;;
14401 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014402 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 case $ac_optarg in
14404 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014405 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 esac
14407 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ac_need_defaults=false;;
14409 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014410 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 case $ac_optarg in
14412 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14413 esac
14414 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014416 --he | --h)
14417 # Conflict between --help and --header
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014418 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014419Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14423 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14424 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
14426 # This is an error.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014427 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014428Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
14433 esac
14434 shift
14435done
14436
Skip Montanaro6dead952003-09-25 14:50:04 +000014437ac_configure_extra_args=
14438
14439if $ac_cs_silent; then
14440 exec 6>/dev/null
14441 ac_configure_extra_args="$ac_configure_extra_args --silent"
14442fi
14443
14444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014445cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014446if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14448 shift
14449 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14450 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014453fi
14454
Martin v. Löwis11437992002-04-12 09:54:03 +000014455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457exec 5>>config.log
14458{
14459 echo
14460 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14461## Running $as_me. ##
14462_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471
14472# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014473for ac_config_target in $ac_config_targets
14474do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475 case $ac_config_target in
14476 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14477 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14478 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014479 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14480 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14482 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014483 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014484 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014486 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 esac
14488done
14489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490
Martin v. Löwis11437992002-04-12 09:54:03 +000014491# If the user did not use the arguments to specify the items to instantiate,
14492# then the envvar interface is used. Set only those that are not.
14493# We use the long form for the default assignment because of an extremely
14494# bizarre bug on SunOS 4.1.3.
14495if $ac_need_defaults; then
14496 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14497 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14498fi
14499
Skip Montanaro6dead952003-09-25 14:50:04 +000014500# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014502# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503# Hook for its removal unless debugging.
14504# Note that there is a small window in which the directory will not be cleaned:
14505# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014506$debug ||
14507{
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014508 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509 trap 'exit_status=$?
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014510 : "${ac_tmp:=$tmp}"
14511 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014514}
Martin v. Löwis11437992002-04-12 09:54:03 +000014515# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014516
Martin v. Löwis11437992002-04-12 09:54:03 +000014517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014519 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014520} ||
14521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522 tmp=./conf$$-$RANDOM
14523 (umask 077 && mkdir "$tmp")
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014524} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14525ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527# Set up the scripts for CONFIG_FILES section.
14528# No need to generate them if there are no CONFIG_FILES.
14529# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532
14533ac_cr=`echo X | tr X '\015'`
14534# On cygwin, bash can eat \r inside `` if the user requested igncr.
14535# But we know of no other shell where ac_cr would be empty at this
14536# point, so we can use a bashism as a fallback.
14537if test "x$ac_cr" = x; then
14538 eval ac_cr=\$\'\\r\'
14539fi
14540ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14541if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014542 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014543else
14544 ac_cs_awk_cr=$ac_cr
14545fi
14546
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014547echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014548_ACEOF
14549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551{
14552 echo "cat >conf$$subs.awk <<_ACEOF" &&
14553 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14554 echo "_ACEOF"
14555} >conf$$subs.sh ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014556 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14557ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558ac_delim='%!_!# '
14559for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 . ./conf$$subs.sh ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014561 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14564 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565 break
14566 elif $ac_last_try; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014567 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568 else
14569 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014570 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571done
Matthias Kloseb9621712010-04-24 17:59:49 +000014572rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573
Matthias Kloseb9621712010-04-24 17:59:49 +000014574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014575cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014577sed -n '
14578h
14579s/^/S["/; s/!.*/"]=/
14580p
14581g
14582s/^[^!]*!//
14583:repl
14584t repl
14585s/'"$ac_delim"'$//
14586t delim
14587:nl
14588h
14589s/\(.\{148\}\)..*/\1/
14590t more1
14591s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14592p
14593n
14594b repl
14595:more1
14596s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14597p
14598g
14599s/.\{148\}//
14600t nl
14601:delim
14602h
14603s/\(.\{148\}\)..*/\1/
14604t more2
14605s/["\\]/\\&/g; s/^/"/; s/$/"/
14606p
14607b
14608:more2
14609s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14610p
14611g
14612s/.\{148\}//
14613t delim
14614' <conf$$subs.awk | sed '
14615/^[^""]/{
14616 N
14617 s/\n//
14618}
14619' >>$CONFIG_STATUS || ac_write_fail=1
14620rm -f conf$$subs.awk
14621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14622_ACAWK
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014623cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 for (key in S) S_is_set[key] = 1
14625 FS = ""
14626
14627}
14628{
14629 line = $ 0
14630 nfields = split(line, field, "@")
14631 substed = 0
14632 len = length(field[1])
14633 for (i = 2; i < nfields; i++) {
14634 key = field[i]
14635 keylen = length(key)
14636 if (S_is_set[key]) {
14637 value = S[key]
14638 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14639 len += length(value) + length(field[++i])
14640 substed = 1
14641 } else
14642 len += 1 + keylen
14643 }
14644
14645 print line
14646}
14647
14648_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14651if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14652 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14653else
14654 cat
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014655fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14656 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014657_ACEOF
14658
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014659# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14660# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661# trailing colons and then remove the whole line if VPATH becomes empty
14662# (actually we leave an empty line to preserve line numbers).
14663if test "x$srcdir" = x.; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014664 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14665h
14666s///
14667s/^/:/
14668s/[ ]*$/:/
14669s/:\$(srcdir):/:/g
14670s/:\${srcdir}:/:/g
14671s/:@srcdir@:/:/g
14672s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673s/:*$//
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014674x
14675s/\(=[ ]*\).*/\1/
14676G
14677s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678s/^[^=]*=[ ]*$//
14679}'
14680fi
14681
Matthias Kloseb9621712010-04-24 17:59:49 +000014682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014683fi # test -n "$CONFIG_FILES"
14684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685# Set up the scripts for CONFIG_HEADERS section.
14686# No need to generate them if there are no CONFIG_HEADERS.
14687# This happens for instance with `./config.status Makefile'.
14688if test -n "$CONFIG_HEADERS"; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014689cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014690BEGIN {
14691_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693# Transform confdefs.h into an awk script `defines.awk', embedded as
14694# here-document in config.status, that substitutes the proper values into
14695# config.h.in to produce config.h.
14696
14697# Create a delimiter string that does not exist in confdefs.h, to ease
14698# handling of long lines.
14699ac_delim='%!_!# '
14700for ac_last_try in false false :; do
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014701 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14702 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 break
14704 elif $ac_last_try; then
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014705 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 else
14707 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14708 fi
14709done
14710
14711# For the awk script, D is an array of macro values keyed by name,
14712# likewise P contains macro parameters if any. Preserve backslash
14713# newline sequences.
14714
14715ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14716sed -n '
14717s/.\{148\}/&'"$ac_delim"'/g
14718t rset
14719:rset
14720s/^[ ]*#[ ]*define[ ][ ]*/ /
14721t def
14722d
14723:def
14724s/\\$//
14725t bsnl
14726s/["\\]/\\&/g
14727s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14728D["\1"]=" \3"/p
14729s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14730d
14731:bsnl
14732s/["\\]/\\&/g
14733s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14734D["\1"]=" \3\\\\\\n"\\/p
14735t cont
14736s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14737t cont
14738d
14739:cont
14740n
14741s/.\{148\}/&'"$ac_delim"'/g
14742t clear
14743:clear
14744s/\\$//
14745t bsnlc
14746s/["\\]/\\&/g; s/^/"/; s/$/"/p
14747d
14748:bsnlc
14749s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14750b cont
14751' <confdefs.h | sed '
14752s/'"$ac_delim"'/"\\\
14753"/g' >>$CONFIG_STATUS || ac_write_fail=1
14754
14755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14756 for (key in D) D_is_set[key] = 1
14757 FS = ""
14758}
14759/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14760 line = \$ 0
14761 split(line, arg, " ")
14762 if (arg[1] == "#") {
14763 defundef = arg[2]
14764 mac1 = arg[3]
14765 } else {
14766 defundef = substr(arg[1], 2)
14767 mac1 = arg[2]
14768 }
14769 split(mac1, mac2, "(") #)
14770 macro = mac2[1]
14771 prefix = substr(line, 1, index(line, defundef) - 1)
14772 if (D_is_set[macro]) {
14773 # Preserve the white space surrounding the "#".
14774 print prefix "define", macro P[macro] D[macro]
14775 next
14776 } else {
14777 # Replace #undef with comments. This is necessary, for example,
14778 # in the case of _POSIX_SOURCE, which is predefined and required
14779 # on some systems where configure will not decide to define it.
14780 if (defundef == "undef") {
14781 print "/*", prefix defundef, macro, "*/"
14782 next
14783 }
14784 }
14785}
14786{ print }
14787_ACAWK
14788_ACEOF
14789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014790 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014791fi # test -n "$CONFIG_HEADERS"
14792
14793
14794eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14795shift
14796for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797do
14798 case $ac_tag in
14799 :[FHLC]) ac_mode=$ac_tag; continue;;
14800 esac
14801 case $ac_mode$ac_tag in
14802 :[FHL]*:*);;
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014803 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804 :[FH]-) ac_tag=-:-;;
14805 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14806 esac
14807 ac_save_IFS=$IFS
14808 IFS=:
14809 set x $ac_tag
14810 IFS=$ac_save_IFS
14811 shift
14812 ac_file=$1
14813 shift
14814
14815 case $ac_mode in
14816 :L) ac_source=$1;;
14817 :[FH])
14818 ac_file_inputs=
14819 for ac_f
14820 do
14821 case $ac_f in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014822 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823 *) # Look for the file first in the build tree, then in the source tree
14824 # (if the path is not absolute). The absolute path cannot be DOS-style,
14825 # because $ac_f cannot contain `:'.
14826 test -f "$ac_f" ||
14827 case $ac_f in
14828 [\\/$]*) false;;
14829 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14830 esac ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014831 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14834 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835 done
14836
14837 # Let's still pretend it is `configure' which instantiates (i.e., don't
14838 # use $as_me), people would be surprised to read:
14839 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 configure_input='Generated from '`
14841 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14842 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843 if test x"$ac_file" != x-; then
14844 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14846$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 # Neutralize special characters interpreted by sed in replacement strings.
14849 case $configure_input in #(
14850 *\&* | *\|* | *\\* )
14851 ac_sed_conf_input=`$as_echo "$configure_input" |
14852 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14853 *) ac_sed_conf_input=$configure_input;;
14854 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855
14856 case $ac_tag in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014857 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14858 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859 esac
14860 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 esac
14862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014864$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014865 X"$ac_file" : 'X\(//\)[^/]' \| \
14866 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014868$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14870 s//\1/
14871 q
14872 }
14873 /^X\(\/\/\)[^/].*/{
14874 s//\1/
14875 q
14876 }
14877 /^X\(\/\/\)$/{
14878 s//\1/
14879 q
14880 }
14881 /^X\(\/\).*/{
14882 s//\1/
14883 q
14884 }
14885 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 ac_builddir=.
14888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889case "$ac_dir" in
14890.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14891*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895 case $ac_top_builddir_sub in
14896 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14897 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14898 esac ;;
14899esac
14900ac_abs_top_builddir=$ac_pwd
14901ac_abs_builddir=$ac_pwd$ac_dir_suffix
14902# for backward compatibility:
14903ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
14905case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908 ac_top_srcdir=$ac_top_builddir_sub
14909 ac_abs_top_srcdir=$ac_pwd ;;
14910 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912 ac_top_srcdir=$srcdir
14913 ac_abs_top_srcdir=$srcdir ;;
14914 *) # Relative name.
14915 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14916 ac_top_srcdir=$ac_top_build_prefix$srcdir
14917 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014918esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014920
Martin v. Löwis11437992002-04-12 09:54:03 +000014921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922 case $ac_mode in
14923 :F)
14924 #
14925 # CONFIG_FILE
14926 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014927
14928 case $INSTALL in
14929 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014932_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933
Matthias Kloseb9621712010-04-24 17:59:49 +000014934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935# If the template does not know about datarootdir, expand it.
14936# FIXME: This hack should be removed a few years after 2.60.
14937ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014938ac_sed_dataroot='
14939/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 p
14941 q
14942}
14943/@datadir@/p
14944/@docdir@/p
14945/@infodir@/p
14946/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014947/@mandir@/p'
14948case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949*datarootdir*) ac_datarootdir_seen=yes;;
14950*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14952$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014954cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955 ac_datarootdir_hack='
14956 s&@datadir@&$datadir&g
14957 s&@docdir@&$docdir&g
14958 s&@infodir@&$infodir&g
14959 s&@localedir@&$localedir&g
14960 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962esac
14963_ACEOF
14964
14965# Neutralize VPATH when `$srcdir' = `.'.
14966# Shell code in configure.ac might set extrasub.
14967# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014968cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14969ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014970$extrasub
14971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014972cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014973:t
14974/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014975s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014977s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978s&@srcdir@&$ac_srcdir&;t t
14979s&@abs_srcdir@&$ac_abs_srcdir&;t t
14980s&@top_srcdir@&$ac_top_srcdir&;t t
14981s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14982s&@builddir@&$ac_builddir&;t t
14983s&@abs_builddir@&$ac_abs_builddir&;t t
14984s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14985s&@INSTALL@&$ac_INSTALL&;t t
14986$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014987"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014988eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
14989 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014992 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
14993 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
14994 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014996which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014997$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014998which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014999
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015000 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 case $ac_file in
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015002 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15003 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 esac \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015005 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 ;;
15007 :H)
15008 #
15009 # CONFIG_HEADER
15010 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 {
15013 $as_echo "/* $configure_input */" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015014 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15015 } >"$ac_tmp/config.h" \
15016 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15017 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15019$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 rm -f "$ac_file"
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015022 mv "$ac_tmp/config.h" "$ac_file" \
15023 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 fi
15025 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 $as_echo "/* $configure_input */" \
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015027 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15028 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032
15033 esac
15034
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015035
15036 case $ac_file$ac_mode in
15037 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15038
15039 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040done # for ac_tag
15041
Guido van Rossum627b2d71993-12-24 10:39:16 +000015042
Matthias Kloseb9621712010-04-24 17:59:49 +000015043as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015044_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015045ac_clean_files=$ac_clean_files_save
15046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047test $ac_write_fail = 0 ||
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015048 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015049
Martin v. Löwis11437992002-04-12 09:54:03 +000015050
15051# configure is writing to config.log, and then calls config.status.
15052# config.status does its own redirection, appending to config.log.
15053# Unfortunately, on DOS this fails, as config.log is still kept open
15054# by configure, so config.status won't be able to write to it; its
15055# output is simply discarded. So we exec the FD to /dev/null,
15056# effectively closing config.log, so it can be properly (re)opened and
15057# appended to by config.status. When coming back to configure, we
15058# need to make the FD available again.
15059if test "$no_create" != yes; then
15060 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015061 ac_config_status_args=
15062 test "$silent" = yes &&
15063 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015064 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015065 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 exec 5>>config.log
15067 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15068 # would make configure fail if this is the last instruction.
Mark Dickinsonec0d3552010-11-20 10:29:12 +000015069 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015070fi
15071if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15073$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015074fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015075
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015076
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015077echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015078if test ! -f Modules/Setup
15079then
15080 cp $srcdir/Modules/Setup.dist Modules/Setup
15081fi
15082
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015083echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015084if test ! -f Modules/Setup.local
15085then
15086 echo "# Edit this file for local setup changes" >Modules/Setup.local
15087fi
15088
15089echo "creating Makefile"
15090$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15091 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015092 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015093mv config.c Modules