blob: cbc529307e5bba4665f844bf492dbcbd2ae1d0bb [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl941f9562011-02-25 15:21:47 +00002# From configure.in Revision: 88580 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Georg Brandl941f9562011-02-25 15:21:47 +00004# Generated by GNU Autoconf 2.68 for python 3.3.
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,
Georg Brandl941f9562011-02-25 15:21:47 +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.
Georg Brandl941f9562011-02-25 15:21:47 +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.
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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"
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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.
Georg Brandl941f9562011-02-25 15:21:47 +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'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000564PACKAGE_VERSION='3.3'
565PACKAGE_STRING='python 3.3'
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
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000658PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
667MAINCC
668CXX
669OBJEXT
670EXEEXT
671ac_ct_CC
672CPPFLAGS
673LDFLAGS
674CFLAGS
675CC
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CONFIGURE_MACOSX_DEPLOYMENT_TARGET
678SGI_ABI
679MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000680FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000681FRAMEWORKUNIXTOOLSPREFIX
682FRAMEWORKALTINSTALLLAST
683FRAMEWORKALTINSTALLFIRST
684FRAMEWORKINSTALLLAST
685FRAMEWORKINSTALLFIRST
686PYTHONFRAMEWORKINSTALLDIR
687PYTHONFRAMEWORKPREFIX
688PYTHONFRAMEWORKDIR
689PYTHONFRAMEWORKIDENTIFIER
690PYTHONFRAMEWORK
691LIPO_32BIT_FLAGS
692ARCH_RUN_32BIT
693UNIVERSALSDK
694CONFIG_ARGS
695SOVERSION
696VERSION
697target_alias
698host_alias
699build_alias
700LIBS
701ECHO_T
702ECHO_N
703ECHO_C
704DEFS
705mandir
706localedir
707libdir
708psdir
709pdfdir
710dvidir
711htmldir
712infodir
713docdir
714oldincludedir
715includedir
716localstatedir
717sharedstatedir
718sysconfdir
719datadir
720datarootdir
721libexecdir
722sbindir
723bindir
724program_transform_name
725prefix
726exec_prefix
727PACKAGE_URL
728PACKAGE_BUGREPORT
729PACKAGE_STRING
730PACKAGE_VERSION
731PACKAGE_TARNAME
732PACKAGE_NAME
733PATH_SEPARATOR
734SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000736ac_user_opts='
737enable_option_checking
738enable_universalsdk
739with_universal_archs
740with_framework_name
741enable_framework
742with_gcc
743with_cxx_main
744with_suffix
745enable_shared
746enable_profiling
747with_pydebug
748with_libs
749with_system_expat
750with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000751enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000752with_dbmliborder
753with_signal_module
754with_dec_threads
755with_threads
756with_thread
757enable_ipv6
758with_doc_strings
759with_tsc
760with_pymalloc
761with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000762with_fpectl
763with_libm
764with_libc
765enable_big_digits
766with_wide_unicode
767with_computed_gotos
768'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000769 ac_precious_vars='build_alias
770host_alias
771target_alias
772CC
773CFLAGS
774LDFLAGS
775LIBS
776CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000777CPP'
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
Georg Brandl941f9562011-02-25 15:21:47 +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 &&
Georg Brandl941f9562011-02-25 15:21:47 +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 &&
Georg Brandl941f9562011-02-25 15:21:47 +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 &&
Georg Brandl941f9562011-02-25 15:21:47 +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 &&
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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]* )
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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'`
Georg Brandl941f9562011-02-25 15:21:47 +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) ;;
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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 .` ||
Georg Brandl941f9562011-02-25 15:21:47 +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" ||
Georg Brandl941f9562011-02-25 15:21:47 +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 .."
Georg Brandl941f9562011-02-25 15:21:47 +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=`(
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001320\`configure' configures python 3.3 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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001381 short | recursive ) echo "Configuration of python 3.3:";;
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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001519python configure 3.3
Georg Brandl941f9562011-02-25 15:21:47 +00001520generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001521
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +00001678( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001679## Report this to http://bugs.python.org/ ##
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001945 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001946int
1947main ()
1948{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001960 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001961int
1962main ()
1963{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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{
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002350It was created by python $as_me 3.3, which was
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +00002461 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002462## Cache variables. ##
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +00002497 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002498## Output variables. ##
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +00002512 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513## File substitutions. ##
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +00002528 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002529## confdefs.h. ##
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002717VERSION=3.3
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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +00003704as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003705If you meant to cross compile, use \`--host'.
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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.
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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.
Georg Brandl941f9562011-02-25 15:21:47 +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;}
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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"
Georg Brandl941f9562011-02-25 15:21:47 +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"
Georg Brandl941f9562011-02-25 15:21:47 +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; }
Georg Brandl941f9562011-02-25 15:21:47 +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
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723LDLIBRARY="$LIBRARY"
4724BLDLIBRARY='$(LDLIBRARY)'
4725INSTSONAME='$(LDLIBRARY)'
4726DLLLIBRARY=''
4727LDLIBRARYDIR=''
4728RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004729LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730
4731# LINKCC is the command that links the python executable -- default is $(CC).
4732# If CXX is set, and if it is needed to link a main function that was
4733# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4734# python might then depend on the C++ runtime
4735# This is altered for AIX in order to build the export list before
4736# linking.
4737
Matthias Kloseb9621712010-04-24 17:59:49 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4739$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740if test -z "$LINKCC"
4741then
4742 LINKCC='$(PURIFY) $(MAINCC)'
4743 case $ac_sys_system in
4744 AIX*)
4745 exp_extra="\"\""
4746 if test $ac_sys_release -ge 5 -o \
4747 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4748 exp_extra="."
4749 fi
4750 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751 QNX*)
4752 # qcc must be used because the other compilers do not
4753 # support -N.
4754 LINKCC=qcc;;
4755 esac
4756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4758$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759
4760# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4761# make sure we default having it set to "no": this is used by
4762# distutils.unixccompiler to know if it should add --enable-new-dtags
4763# to linker command lines, and failing to detect GNU ld simply results
4764# in the same bahaviour as before.
4765
Matthias Kloseb9621712010-04-24 17:59:49 +00004766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4767$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768ac_prog=ld
4769if test "$GCC" = yes; then
4770 ac_prog=`$CC -print-prog-name=ld`
4771fi
4772case `"$ac_prog" -V 2>&1 < /dev/null` in
4773 *GNU*)
4774 GNULD=yes;;
4775 *)
4776 GNULD=no;;
4777esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4779$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4782$as_echo_n "checking for inline... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00004783if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004784 $as_echo_n "(cached) " >&6
4785else
4786 ac_cv_c_inline=no
4787for ac_kw in inline __inline__ __inline; do
4788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4789/* end confdefs.h. */
4790#ifndef __cplusplus
4791typedef int foo_t;
4792static $ac_kw foo_t static_foo () {return 0; }
4793$ac_kw foo_t foo () {return 0; }
4794#endif
4795
4796_ACEOF
4797if ac_fn_c_try_compile "$LINENO"; then :
4798 ac_cv_c_inline=$ac_kw
4799fi
4800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4801 test "$ac_cv_c_inline" != no && break
4802done
4803
4804fi
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4806$as_echo "$ac_cv_c_inline" >&6; }
4807
4808case $ac_cv_c_inline in
4809 inline | yes) ;;
4810 *)
4811 case $ac_cv_c_inline in
4812 no) ac_val=;;
4813 *) ac_val=$ac_cv_c_inline;;
4814 esac
4815 cat >>confdefs.h <<_ACEOF
4816#ifndef __cplusplus
4817#define inline $ac_val
4818#endif
4819_ACEOF
4820 ;;
4821esac
4822
4823if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004824
4825$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004826
4827
4828fi
4829
4830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004834if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 enableval=$enable_shared;
4836fi
4837
4838
4839if test -z "$enable_shared"
4840then
4841 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004842 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 enable_shared="yes";;
4844 *)
4845 enable_shared="no";;
4846 esac
4847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4849$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850
Matthias Kloseb9621712010-04-24 17:59:49 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004854if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855 enableval=$enable_profiling; ac_save_cc="$CC"
4856 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858 ac_enable_profiling="no"
4859else
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861/* end confdefs.h. */
4862int main() { return 0; }
4863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865 ac_enable_profiling="yes"
4866else
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871fi
4872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 CC="$ac_save_cc"
4874fi
4875
Matthias Kloseb9621712010-04-24 17:59:49 +00004876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4877$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004878
4879case "$ac_enable_profiling" in
4880 "yes")
4881 BASECFLAGS="-pg $BASECFLAGS"
4882 LDFLAGS="-pg $LDFLAGS"
4883 ;;
4884esac
4885
Matthias Kloseb9621712010-04-24 17:59:49 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4887$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888
4889# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4890# library that we build, but we do not want to link against it (we
4891# will find it with a -framework option). For this reason there is an
4892# extra variable BLDLIBRARY against which Python and the extension
4893# modules are linked, BLDLIBRARY. This is normally the same as
4894# LDLIBRARY, but empty for MacOSX framework builds.
4895if test "$enable_framework"
4896then
4897 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4898 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4899 BLDLIBRARY=''
4900else
4901 BLDLIBRARY='$(LDLIBRARY)'
4902fi
4903
4904# Other platforms follow
4905if test $enable_shared = "yes"; then
4906
Matthias Kloseb9621712010-04-24 17:59:49 +00004907$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908
4909 case $ac_sys_system in
4910 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004911 LDLIBRARY='libpython$(LDVERSION).dll.a'
4912 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 ;;
4914 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004915 LDLIBRARY='libpython$(LDVERSION).so'
4916 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4918 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004919 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004920 then
4921 PY3LIBRARY=libpython3.so
4922 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923 ;;
4924 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004925 LDLIBRARY='libpython$(LDVERSION).so'
4926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4928 case $ac_sys_system in
4929 FreeBSD*)
4930 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4931 ;;
4932 esac
4933 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004934 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004935 then
4936 PY3LIBRARY=libpython3.so
4937 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 ;;
4939 hp*|HP*)
4940 case `uname -m` in
4941 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004942 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943 ;;
4944 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004945 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 ;;
4947 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004948 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4950 ;;
4951 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004952 LDLIBRARY='libpython$(LDVERSION).so'
4953 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004957 LDLIBRARY='libpython$(LDVERSION).dylib'
4958 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4960 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004961 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004962 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004963 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4964 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965
4966 esac
4967else # shared is disabled
4968 case $ac_sys_system in
4969 CYGWIN*)
4970 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004971 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 ;;
4973 esac
4974fi
4975
Matthias Kloseb9621712010-04-24 17:59:49 +00004976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4977$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978
4979if test -n "$ac_tool_prefix"; then
4980 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4981set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4983$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00004984if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986else
4987 if test -n "$RANLIB"; then
4988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4989else
4990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in $PATH
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4997 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999 break 2
5000 fi
5001done
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003IFS=$as_save_IFS
5004
5005fi
5006fi
5007RANLIB=$ac_cv_prog_RANLIB
5008if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5010$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011else
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014fi
5015
5016
5017fi
5018if test -z "$ac_cv_prog_RANLIB"; then
5019 ac_ct_RANLIB=$RANLIB
5020 # Extract the first word of "ranlib", so it can be a program name with args.
5021set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005024if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026else
5027 if test -n "$ac_ct_RANLIB"; then
5028 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5029else
5030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5037 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 break 2
5040 fi
5041done
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043IFS=$as_save_IFS
5044
5045fi
5046fi
5047ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5048if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5050$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051else
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054fi
5055
5056 if test "x$ac_ct_RANLIB" = x; then
5057 RANLIB=":"
5058 else
5059 case $cross_compiling:$ac_tool_warned in
5060yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063ac_tool_warned=yes ;;
5064esac
5065 RANLIB=$ac_ct_RANLIB
5066 fi
5067else
5068 RANLIB="$ac_cv_prog_RANLIB"
5069fi
5070
5071
5072for ac_prog in ar aal
5073do
5074 # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005078if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080else
5081 if test -n "$AR"; then
5082 ac_cv_prog_AR="$AR" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093 break 2
5094 fi
5095done
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097IFS=$as_save_IFS
5098
5099fi
5100fi
5101AR=$ac_cv_prog_AR
5102if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5104$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005105else
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108fi
5109
5110
5111 test -n "$AR" && break
5112done
5113test -n "$AR" || AR="ar"
5114
5115
5116# tweak ARFLAGS only if the user didn't set it on the command line
5117
5118if test -z "$ARFLAGS"
5119then
5120 ARFLAGS="rc"
5121fi
5122
5123
5124# Extract the first word of "svnversion", so it can be a program name with args.
5125set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005128if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130else
5131 if test -n "$SVNVERSION"; then
5132 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5133else
5134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5141 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143 break 2
5144 fi
5145done
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147IFS=$as_save_IFS
5148
5149 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5150fi
5151fi
5152SVNVERSION=$ac_cv_prog_SVNVERSION
5153if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5155$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156else
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159fi
5160
5161
5162if test $SVNVERSION = found
5163then
5164 SVNVERSION="svnversion \$(srcdir)"
5165else
5166 SVNVERSION="echo Unversioned directory"
5167fi
5168
5169case $MACHDEP in
5170bsdos*|hp*|HP*)
5171 # install -d does not work on BSDI or HP-UX
5172 if test -z "$INSTALL"
5173 then
5174 INSTALL="${srcdir}/install-sh -c"
5175 fi
5176esac
5177ac_aux_dir=
5178for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl941f9562011-02-25 15:21:47 +00005179 if test -f "$ac_dir/install-sh"; then
5180 ac_aux_dir=$ac_dir
5181 ac_install_sh="$ac_aux_dir/install-sh -c"
5182 break
5183 elif test -f "$ac_dir/install.sh"; then
5184 ac_aux_dir=$ac_dir
5185 ac_install_sh="$ac_aux_dir/install.sh -c"
5186 break
5187 elif test -f "$ac_dir/shtool"; then
5188 ac_aux_dir=$ac_dir
5189 ac_install_sh="$ac_aux_dir/shtool install -c"
5190 break
5191 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192done
5193if test -z "$ac_aux_dir"; then
Georg Brandl941f9562011-02-25 15:21:47 +00005194 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195fi
5196
5197# These three variables are undocumented and unsupported,
5198# and are intended to be withdrawn in a future Autoconf release.
5199# They can cause serious problems if a builder's source tree is in a directory
5200# whose full name contains unusual characters.
5201ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5202ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5203ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5204
5205
5206# Find a good install program. We prefer a C program (faster),
5207# so one script is as good as another. But avoid the broken or
5208# incompatible versions:
5209# SysV /etc/install, /usr/sbin/install
5210# SunOS /usr/etc/install
5211# IRIX /sbin/install
5212# AIX /bin/install
5213# AmigaOS /C/install, which installs bootblocks on floppy discs
5214# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5215# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5216# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5217# OS/2's system install, which has a completely different semantic
5218# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005219# Reject install programs that cannot install multiple files.
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5221$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222if test -z "$INSTALL"; then
Georg Brandl941f9562011-02-25 15:21:47 +00005223if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225else
5226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5227for as_dir in $PATH
5228do
5229 IFS=$as_save_IFS
5230 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005231 # Account for people who put trailing slashes in PATH elements.
5232case $as_dir/ in #((
5233 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005235 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236 /usr/ucb/* ) ;;
5237 *)
5238 # OSF1 and SCO ODT 3.0 have their own names for install.
5239 # Don't use installbsd from OSF since it installs stuff as root
5240 # by default.
5241 for ac_prog in ginstall scoinst install; do
5242 for ac_exec_ext in '' $ac_executable_extensions; do
5243 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5244 if test $ac_prog = install &&
5245 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5246 # AIX install. It has an incompatible calling convention.
5247 :
5248 elif test $ac_prog = install &&
5249 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5250 # program-specific install script used by HP pwplus--don't use.
5251 :
5252 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005253 rm -rf conftest.one conftest.two conftest.dir
5254 echo one > conftest.one
5255 echo two > conftest.two
5256 mkdir conftest.dir
5257 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5258 test -s conftest.one && test -s conftest.two &&
5259 test -s conftest.dir/conftest.one &&
5260 test -s conftest.dir/conftest.two
5261 then
5262 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5263 break 3
5264 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265 fi
5266 fi
5267 done
5268 done
5269 ;;
5270esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005271
5272 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273IFS=$as_save_IFS
5274
Matthias Kloseb9621712010-04-24 17:59:49 +00005275rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276
5277fi
5278 if test "${ac_cv_path_install+set}" = set; then
5279 INSTALL=$ac_cv_path_install
5280 else
5281 # As a last resort, use the slow shell script. Don't cache a
5282 # value for INSTALL within a source directory, because that will
5283 # break other packages using the cache if that directory is
5284 # removed, or if the value is a relative name.
5285 INSTALL=$ac_install_sh
5286 fi
5287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5289$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290
5291# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5292# It thinks the first close brace ends the variable substitution.
5293test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5294
5295test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5296
5297test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5298
5299
5300# Not every filesystem supports hard links
5301
5302if test -z "$LN" ; then
5303 case $ac_sys_system in
5304 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 *) LN=ln;;
5306 esac
5307fi
5308
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005309# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005310
5311ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005312
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5315$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316
5317# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005318if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319 withval=$with_pydebug;
5320if test "$withval" != no
5321then
5322
Matthias Kloseb9621712010-04-24 17:59:49 +00005323$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324
Matthias Kloseb9621712010-04-24 17:59:49 +00005325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5326$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005328 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005329else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331fi
5332else
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335fi
5336
5337
5338# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5339# merged with this chunk of code?
5340
5341# Optimizer/debugger flags
5342# ------------------------
5343# (The following bit of code is complicated enough - please keep things
5344# indented properly. Just pretend you're editing Python code. ;-)
5345
5346# There are two parallel sets of case statements below, one that checks to
5347# see if OPT was set and one that does BASECFLAGS setting based upon
5348# compiler and platform. BASECFLAGS tweaks need to be made even if the
5349# user set OPT.
5350
5351# tweak OPT based on compiler and platform, only if the user didn't set
5352# it on the command line
5353
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005354if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355then
5356 case $GCC in
5357 yes)
5358 if test "$CC" != 'g++' ; then
5359 STRICT_PROTO="-Wstrict-prototypes"
5360 fi
5361 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5362 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5363 WRAP="-fwrapv"
5364 fi
5365 case $ac_cv_prog_cc_g in
5366 yes)
5367 if test "$Py_DEBUG" = 'true' ; then
5368 # Optimization messes up debuggers, so turn it off for
5369 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005370 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371 else
5372 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5373 fi
5374 ;;
5375 *)
5376 OPT="-O3 -Wall $STRICT_PROTO"
5377 ;;
5378 esac
5379 case $ac_sys_system in
5380 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5381 ;;
5382 esac
5383 ;;
5384
5385 *)
5386 OPT="-O"
5387 ;;
5388 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389fi
5390
5391
5392
5393# The -arch flags for universal builds on OSX
5394UNIVERSAL_ARCH_FLAGS=
5395
5396
5397# tweak BASECFLAGS based on compiler and platform
5398case $GCC in
5399yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005400 # Python doesn't violate C99 aliasing rules, but older versions of
5401 # GCC produce warnings for legal Python code. Enable
5402 # -fno-strict-aliasing on versions of GCC that support but produce
5403 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5405$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 ac_save_cc="$CC"
5407 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005408 save_CFLAGS="$CFLAGS"
Georg Brandl941f9562011-02-25 15:21:47 +00005409 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005411else
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005414
Matthias Kloseb159a552010-04-25 21:00:44 +00005415
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005416int
5417main ()
5418{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005419
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005420 ;
5421 return 0;
5422}
Matthias Kloseb159a552010-04-25 21:00:44 +00005423
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005425if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005426
5427 CC="$ac_save_cc -fstrict-aliasing"
5428 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005430/* end confdefs.h. */
5431
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005432 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433int
5434main ()
5435{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005436double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005437 ;
5438 return 0;
5439}
Matthias Kloseb159a552010-04-25 21:00:44 +00005440
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005442if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005443
5444 ac_cv_no_strict_aliasing=no
5445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446else
Matthias Kloseb159a552010-04-25 21:00:44 +00005447
5448 ac_cv_no_strict_aliasing=yes
5449
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005450fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005452
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005453else
Matthias Kloseb159a552010-04-25 21:00:44 +00005454
5455 ac_cv_no_strict_aliasing=no
5456
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005459fi
5460
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005461 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5464$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005465 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466 then
5467 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5468 fi
5469
5470 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5471 # support. Without this, treatment of subnormals doesn't follow
5472 # the standard.
5473 case $ac_sys_machine in
5474 alpha*)
5475 BASECFLAGS="$BASECFLAGS -mieee"
5476 ;;
5477 esac
5478
5479 case $ac_sys_system in
5480 SCO_SV*)
5481 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5482 ;;
5483 # is there any other compiler on Darwin besides gcc?
5484 Darwin*)
5485 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5486 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005487 if test "${CC}" = gcc
5488 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5490$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005491 case "${UNIVERSALSDK}" in
5492 */MacOSX10.4u.sdk)
5493 # Build using 10.4 SDK, force usage of gcc when the
5494 # compiler is gcc, otherwise the user will get very
5495 # confusing error messages when building on OSX 10.6
5496 CC=gcc-4.0
5497 CPP=cpp-4.0
5498 ;;
5499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5501$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005502 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
5504
5505 if test "${enable_universalsdk}"; then
5506 UNIVERSAL_ARCH_FLAGS=""
5507 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5508 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5509 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005510 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5512 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005513 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005514 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515
5516 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5517 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005518 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005519 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005521 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5522 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005523 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005524 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005525
5526 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5527 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005528 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005529 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531 else
Georg Brandl941f9562011-02-25 15:21:47 +00005532 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 +00005533
5534 fi
5535
5536
Ronald Oussoren666028b2010-04-18 19:07:43 +00005537 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5538 if test "${UNIVERSALSDK}" != "/"
5539 then
5540 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5541 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005542 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543 fi
5544 fi
5545
5546 # Calculate the right deployment target for this build.
5547 #
5548 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5549 if test ${cur_target} '>' 10.2; then
5550 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005551 if test ${enable_universalsdk}; then
5552 if test "${UNIVERSAL_ARCHS}" = "all"; then
5553 # Ensure that the default platform for a
5554 # 4-way universal build is OSX 10.5,
5555 # that's the first OS release where
5556 # 4-way builds make sense.
5557 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005558
5559 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5560 cur_target='10.5'
5561
5562 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5563 cur_target='10.5'
5564
5565 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5566 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005567 fi
5568 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005569 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005570 # On Intel macs default to a deployment
5571 # target of 10.4, that's the first OSX
5572 # release with Intel support.
5573 cur_target="10.4"
5574 fi
5575 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576 fi
5577 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5578
5579 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5580 # environment with a value that is the same as what we'll use
5581 # in the Makefile to ensure that we'll get the same compiler
5582 # environment during configure and build time.
5583 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5584 export MACOSX_DEPLOYMENT_TARGET
5585 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5586
5587 ;;
5588 OSF*)
5589 BASECFLAGS="$BASECFLAGS -mieee"
5590 ;;
5591 esac
5592 ;;
5593
5594*)
5595 case $ac_sys_system in
5596 OpenUNIX*|UnixWare*)
5597 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5598 ;;
5599 OSF*)
5600 BASECFLAGS="$BASECFLAGS -ieee -std"
5601 ;;
5602 SCO_SV*)
5603 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5604 ;;
5605 esac
5606 ;;
5607esac
5608
5609if test "$Py_DEBUG" = 'true'; then
5610 :
5611else
5612 OPT="-DNDEBUG $OPT"
5613fi
5614
5615if test "$ac_arch_flags"
5616then
5617 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5618fi
5619
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620# Check whether GCC supports PyArg_ParseTuple format
5621if test "$GCC" = "yes"
5622then
Matthias Kloseb9621712010-04-24 17:59:49 +00005623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5624$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 save_CFLAGS=$CFLAGS
5626 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628/* end confdefs.h. */
5629
5630 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631int
5632main ()
5633{
5634
5635 ;
5636 return 0;
5637}
Matthias Kloseb159a552010-04-25 21:00:44 +00005638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005640if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
Matthias Kloseb159a552010-04-25 21:00:44 +00005642
Matthias Kloseb9621712010-04-24 17:59:49 +00005643$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
Matthias Kloseb159a552010-04-25 21:00:44 +00005645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005646$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648else
Matthias Kloseb159a552010-04-25 21:00:44 +00005649
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005651$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
5653fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5655 CFLAGS=$save_CFLAGS
5656fi
5657
5658# On some compilers, pthreads are available without further options
5659# (e.g. MacOS X). On some of these systems, the compiler will not
5660# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5661# So we have to see first whether pthreads are available without
5662# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5664$as_echo_n "checking whether pthreads are available without options... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005665if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005666 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667else
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 ac_cv_pthread_is_default=no
5670else
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672/* end confdefs.h. */
5673
5674#include <pthread.h>
5675
5676void* routine(void* p){return NULL;}
5677
5678int main(){
5679 pthread_t p;
5680 if(pthread_create(&p,NULL,routine,NULL)!=0)
5681 return 1;
5682 (void)pthread_detach(p);
5683 return 0;
5684}
5685
5686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005687if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689 ac_cv_pthread_is_default=yes
5690 ac_cv_kthread=no
5691 ac_cv_pthread=no
5692
5693else
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
5699
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701fi
5702
Matthias Kloseb9621712010-04-24 17:59:49 +00005703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5704$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
5706
5707if test $ac_cv_pthread_is_default = yes
5708then
5709 ac_cv_kpthread=no
5710else
5711# -Kpthread, if available, provides the right #defines
5712# and linker options to make pthread_create available
5713# Some compilers won't report that they do not support -Kpthread,
5714# so we need to run a program to see whether it really made the
5715# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5717$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005718if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720else
5721 ac_save_cc="$CC"
5722CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005723if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 ac_cv_kpthread=no
5725else
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727/* end confdefs.h. */
5728
5729#include <pthread.h>
5730
5731void* routine(void* p){return NULL;}
5732
5733int main(){
5734 pthread_t p;
5735 if(pthread_create(&p,NULL,routine,NULL)!=0)
5736 return 1;
5737 (void)pthread_detach(p);
5738 return 0;
5739}
5740
5741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005742if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 ac_cv_kpthread=yes
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751CC="$ac_save_cc"
5752fi
5753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5755$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
5757
5758if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5759then
5760# -Kthread, if available, provides the right #defines
5761# and linker options to make pthread_create available
5762# Some compilers won't report that they do not support -Kthread,
5763# so we need to run a program to see whether it really made the
5764# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5766$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005767if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769else
5770 ac_save_cc="$CC"
5771CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005772if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773 ac_cv_kthread=no
5774else
Matthias Kloseb9621712010-04-24 17:59:49 +00005775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776/* end confdefs.h. */
5777
5778#include <pthread.h>
5779
5780void* routine(void* p){return NULL;}
5781
5782int main(){
5783 pthread_t p;
5784 if(pthread_create(&p,NULL,routine,NULL)!=0)
5785 return 1;
5786 (void)pthread_detach(p);
5787 return 0;
5788}
5789
5790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005791if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 ac_cv_kthread=yes
5793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798fi
5799
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800CC="$ac_save_cc"
5801fi
5802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5804$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805fi
5806
5807if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5808then
5809# -pthread, if available, provides the right #defines
5810# and linker options to make pthread_create available
5811# Some compilers won't report that they do not support -pthread,
5812# so we need to run a program to see whether it really made the
5813# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5815$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005816if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005817 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818else
5819 ac_save_cc="$CC"
5820CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005821if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 ac_cv_pthread=no
5823else
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825/* end confdefs.h. */
5826
5827#include <pthread.h>
5828
5829void* routine(void* p){return NULL;}
5830
5831int main(){
5832 pthread_t p;
5833 if(pthread_create(&p,NULL,routine,NULL)!=0)
5834 return 1;
5835 (void)pthread_detach(p);
5836 return 0;
5837}
5838
5839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005840if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841 ac_cv_pthread=yes
5842else
Matthias Kloseb9621712010-04-24 17:59:49 +00005843 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
5848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849CC="$ac_save_cc"
5850fi
5851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5853$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855
5856# If we have set a CC compiler flag for thread support then
5857# check if it works for CXX, too.
5858ac_cv_cxx_thread=no
5859if test ! -z "$CXX"
5860then
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5862$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863ac_save_cxx="$CXX"
5864
5865if test "$ac_cv_kpthread" = "yes"
5866then
5867 CXX="$CXX -Kpthread"
5868 ac_cv_cxx_thread=yes
5869elif test "$ac_cv_kthread" = "yes"
5870then
5871 CXX="$CXX -Kthread"
5872 ac_cv_cxx_thread=yes
5873elif test "$ac_cv_pthread" = "yes"
5874then
5875 CXX="$CXX -pthread"
5876 ac_cv_cxx_thread=yes
5877fi
5878
5879if test $ac_cv_cxx_thread = yes
5880then
5881 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5882 $CXX -c conftest.$ac_ext 2>&5
5883 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5884 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5885 then
5886 ac_cv_cxx_thread=yes
5887 else
5888 ac_cv_cxx_thread=no
5889 fi
5890 rm -fr conftest*
5891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5893$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894fi
5895CXX="$ac_save_cxx"
5896
5897
5898# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5900$as_echo_n "checking for ANSI C header files... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00005901if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005902 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903else
Matthias Kloseb9621712010-04-24 17:59:49 +00005904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905/* end confdefs.h. */
5906#include <stdlib.h>
5907#include <stdarg.h>
5908#include <string.h>
5909#include <float.h>
5910
5911int
5912main ()
5913{
5914
5915 ;
5916 return 0;
5917}
5918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005919if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ac_cv_header_stdc=yes
5921else
Matthias Kloseb9621712010-04-24 17:59:49 +00005922 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5925
5926if test $ac_cv_header_stdc = yes; then
5927 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929/* end confdefs.h. */
5930#include <string.h>
5931
5932_ACEOF
5933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 $EGREP "memchr" >/dev/null 2>&1; then :
5935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
5937 ac_cv_header_stdc=no
5938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005939rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
5941fi
5942
5943if test $ac_cv_header_stdc = yes; then
5944 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946/* end confdefs.h. */
5947#include <stdlib.h>
5948
5949_ACEOF
5950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 $EGREP "free" >/dev/null 2>&1; then :
5952
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953else
5954 ac_cv_header_stdc=no
5955fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005956rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957
5958fi
5959
5960if test $ac_cv_header_stdc = yes; then
5961 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 :
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966/* end confdefs.h. */
5967#include <ctype.h>
5968#include <stdlib.h>
5969#if ((' ' & 0x0FF) == 0x020)
5970# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5971# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5972#else
5973# define ISLOWER(c) \
5974 (('a' <= (c) && (c) <= 'i') \
5975 || ('j' <= (c) && (c) <= 'r') \
5976 || ('s' <= (c) && (c) <= 'z'))
5977# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5978#endif
5979
5980#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5981int
5982main ()
5983{
5984 int i;
5985 for (i = 0; i < 256; i++)
5986 if (XOR (islower (i), ISLOWER (i))
5987 || toupper (i) != TOUPPER (i))
5988 return 2;
5989 return 0;
5990}
5991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005992if ac_fn_c_try_run "$LINENO"; then :
5993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994else
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999fi
6000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001fi
6002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6004$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005if test $ac_cv_header_stdc = yes; then
6006
Matthias Kloseb9621712010-04-24 17:59:49 +00006007$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
6009fi
6010
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006011for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6012fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006013ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006014shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006015unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006016sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6017sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006018sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6019sys/stat.h sys/termio.h sys/time.h \
6020sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6021libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006022bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006023do :
6024 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6025ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006026if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006027 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006028#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006029_ACEOF
6030
6031fi
6032
Guido van Rossum627b2d71993-12-24 10:39:16 +00006033done
6034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006036for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6039$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006040if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006042else
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006044/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045#include <sys/types.h>
6046#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006047
Martin v. Löwis11437992002-04-12 09:54:03 +00006048int
6049main ()
6050{
6051if ((DIR *) 0)
6052return 0;
6053 ;
6054 return 0;
6055}
6056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006058 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006059else
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006064eval ac_res=\$$as_ac_Header
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6066$as_echo "$ac_res" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006067if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006068 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006069#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006070_ACEOF
6071
6072ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006075done
6076# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6077if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6079$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006080if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082else
Martin v. Löwis11437992002-04-12 09:54:03 +00006083 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087/* Override any GCC internal prototype to avoid an error.
6088 Use char because int might match the return type of a GCC
6089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006090#ifdef __cplusplus
6091extern "C"
6092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006093char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006094int
6095main ()
6096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006097return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006098 ;
6099 return 0;
6100}
6101_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102for ac_lib in '' dir; do
6103 if test -z "$ac_lib"; then
6104 ac_res="none required"
6105 else
6106 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006107 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006112rm -f core conftest.err conftest.$ac_objext \
6113 conftest$ac_exeext
Georg Brandl941f9562011-02-25 15:21:47 +00006114 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006115 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006117done
Georg Brandl941f9562011-02-25 15:21:47 +00006118if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006120else
6121 ac_cv_search_opendir=no
6122fi
6123rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006124LIBS=$ac_func_search_save_LIBS
6125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6127$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006128ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006129if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006130 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
Michael W. Hudson54241132001-12-07 15:38:26 +00006134else
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6136$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006137if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006138 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006139else
6140 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144/* Override any GCC internal prototype to avoid an error.
6145 Use char because int might match the return type of a GCC
6146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006147#ifdef __cplusplus
6148extern "C"
6149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006150char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006151int
6152main ()
6153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006154return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006155 ;
6156 return 0;
6157}
6158_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159for ac_lib in '' x; do
6160 if test -z "$ac_lib"; then
6161 ac_res="none required"
6162 else
6163 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006164 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006166 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006167 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006169rm -f core conftest.err conftest.$ac_objext \
6170 conftest$ac_exeext
Georg Brandl941f9562011-02-25 15:21:47 +00006171 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174done
Georg Brandl941f9562011-02-25 15:21:47 +00006175if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177else
6178 ac_cv_search_opendir=no
6179fi
6180rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006181LIBS=$ac_func_search_save_LIBS
6182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6184$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006185ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006186if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006187 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006189fi
6190
6191fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006192
Matthias Kloseb9621712010-04-24 17:59:49 +00006193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6194$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006195if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197else
Matthias Kloseb9621712010-04-24 17:59:49 +00006198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006199/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201int
6202main ()
6203{
6204return makedev(0, 0);
6205 ;
6206 return 0;
6207}
6208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210 ac_cv_header_sys_types_h_makedev=yes
6211else
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006214rm -f core conftest.err conftest.$ac_objext \
6215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216
6217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6219$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220
6221if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006222ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006223if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006224
Matthias Kloseb9621712010-04-24 17:59:49 +00006225$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226
6227fi
6228
6229
6230
6231 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006233if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006234
Matthias Kloseb9621712010-04-24 17:59:49 +00006235$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236
6237fi
6238
6239
6240 fi
6241fi
6242
Michael W. Hudson54241132001-12-07 15:38:26 +00006243
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006244# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006245for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006246do :
6247 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006248#ifdef HAVE_CURSES_H
6249#include <curses.h>
6250#endif
6251
Matthias Kloseb9621712010-04-24 17:59:49 +00006252"
Georg Brandl941f9562011-02-25 15:21:47 +00006253if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006255#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006256_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006257
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006258fi
6259
6260done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006261
6262
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006264for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006265do :
6266 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 +00006267#ifdef HAVE_ASM_TYPES_H
6268#include <asm/types.h>
6269#endif
6270#ifdef HAVE_SYS_SOCKET_H
6271#include <sys/socket.h>
6272#endif
6273
Matthias Kloseb9621712010-04-24 17:59:49 +00006274"
Georg Brandl941f9562011-02-25 15:21:47 +00006275if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006276 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006277#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006278_ACEOF
6279
6280fi
6281
6282done
6283
6284
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006286was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6288$as_echo_n "checking for clock_t in time.h... " >&6; }
6289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006290/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006291#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006292
6293_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006296 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006297else
Martin v. Löwis11437992002-04-12 09:54:03 +00006298
6299
Matthias Kloseb9621712010-04-24 17:59:49 +00006300$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006301
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006302
Guido van Rossum627b2d71993-12-24 10:39:16 +00006303fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006304rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6307$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006308
Neal Norwitz11690112002-07-30 01:08:28 +00006309# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6311$as_echo_n "checking for makedev... " >&6; }
6312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006313/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006314
Jesus Cea740f53a2010-04-28 11:35:30 +00006315#if defined(MAJOR_IN_MKDEV)
6316#include <sys/mkdev.h>
6317#elif defined(MAJOR_IN_SYSMACROS)
6318#include <sys/sysmacros.h>
6319#else
6320#include <sys/types.h>
6321#endif
6322
Neal Norwitz11690112002-07-30 01:08:28 +00006323int
6324main ()
6325{
Jesus Cea740f53a2010-04-28 11:35:30 +00006326
6327 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006328 ;
6329 return 0;
6330}
Matthias Kloseb159a552010-04-25 21:00:44 +00006331
Neal Norwitz11690112002-07-30 01:08:28 +00006332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006333if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006334 ac_cv_has_makedev=yes
6335else
Matthias Kloseb9621712010-04-24 17:59:49 +00006336 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006338rm -f core conftest.err conftest.$ac_objext \
6339 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006340if test "$ac_cv_has_makedev" = "no"; then
6341 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006343/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006344
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006345#define _OSF_SOURCE 1
6346#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006347
Neal Norwitz11690112002-07-30 01:08:28 +00006348int
6349main ()
6350{
6351 makedev(0, 0)
6352 ;
6353 return 0;
6354}
6355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006356if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006357 ac_cv_has_makedev=yes
6358else
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006361rm -f core conftest.err conftest.$ac_objext \
6362 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006363 if test "$ac_cv_has_makedev" = "yes"; then
6364
Matthias Kloseb9621712010-04-24 17:59:49 +00006365$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006366
6367 fi
6368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6370$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006371if test "$ac_cv_has_makedev" = "yes"; then
6372
Matthias Kloseb9621712010-04-24 17:59:49 +00006373$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006374
6375fi
6376
Martin v. Löwis399a6892002-10-04 10:22:02 +00006377# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6378# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6379# defined, but the compiler does not support pragma redefine_extname,
6380# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6381# structures (such as rlimit64) without declaring them. As a
6382# work-around, disable LFS on such configurations
6383
6384use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6386$as_echo_n "checking Solaris LFS bug... " >&6; }
6387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006388/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006389
6390#define _LARGEFILE_SOURCE 1
6391#define _FILE_OFFSET_BITS 64
6392#include <sys/resource.h>
6393
Martin v. Löwis399a6892002-10-04 10:22:02 +00006394int
6395main ()
6396{
6397struct rlimit foo;
6398 ;
6399 return 0;
6400}
6401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006403 sol_lfs_bug=no
6404else
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6409$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006410if test "$sol_lfs_bug" = "yes"; then
6411 use_lfs=no
6412fi
6413
6414if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006415# Two defines needed to enable largefile support on various platforms
6416# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006417case $ac_sys_system/$ac_sys_release in
6418AIX*)
6419
6420$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6421
6422 ;;
6423esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006426
6427
Matthias Kloseb9621712010-04-24 17:59:49 +00006428$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006429
Martin v. Löwis399a6892002-10-04 10:22:02 +00006430fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006431
Guido van Rossum84e7b241996-08-19 21:59:00 +00006432# Add some code to confdefs.h so that the test for off_t works on SCO
6433cat >> confdefs.h <<\EOF
6434#if defined(SCO_DS)
6435#undef _OFF_T
6436#endif
6437EOF
6438
Guido van Rossumef2255b2000-03-10 22:30:29 +00006439# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006440ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006441if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443else
Martin v. Löwis11437992002-04-12 09:54:03 +00006444
6445cat >>confdefs.h <<_ACEOF
6446#define mode_t int
6447_ACEOF
6448
6449fi
6450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006452if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454else
Martin v. Löwis11437992002-04-12 09:54:03 +00006455
6456cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006457#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006458_ACEOF
6459
6460fi
6461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006463if test "x$ac_cv_type_pid_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
6468#define pid_t int
6469_ACEOF
6470
6471fi
6472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006473
Martin v. Löwis11437992002-04-12 09:54:03 +00006474cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006475#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006476_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006477
Matthias Kloseb9621712010-04-24 17:59:49 +00006478ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006479if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481else
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006484#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006485_ACEOF
6486
6487fi
6488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6490$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006491if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006492 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006493else
Matthias Kloseb9621712010-04-24 17:59:49 +00006494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006495/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006500 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501 ac_cv_type_uid_t=yes
6502else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503 ac_cv_type_uid_t=no
6504fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006505rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6509$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006510if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006513
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516
6517fi
6518
Matthias Kloseb9621712010-04-24 17:59:49 +00006519ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6520case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006521 no|yes) ;; #(
6522 *)
6523
Matthias Kloseb9621712010-04-24 17:59:49 +00006524$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006525
6526
6527cat >>confdefs.h <<_ACEOF
6528#define uint32_t $ac_cv_c_uint32_t
6529_ACEOF
6530;;
6531 esac
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6534case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006535 no|yes) ;; #(
6536 *)
6537
Matthias Kloseb9621712010-04-24 17:59:49 +00006538$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006539
6540
6541cat >>confdefs.h <<_ACEOF
6542#define uint64_t $ac_cv_c_uint64_t
6543_ACEOF
6544;;
6545 esac
6546
Matthias Kloseb9621712010-04-24 17:59:49 +00006547ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6548case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006549 no|yes) ;; #(
6550 *)
6551
6552cat >>confdefs.h <<_ACEOF
6553#define int32_t $ac_cv_c_int32_t
6554_ACEOF
6555;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006556esac
6557
Matthias Kloseb9621712010-04-24 17:59:49 +00006558ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6559case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006560 no|yes) ;; #(
6561 *)
6562
6563cat >>confdefs.h <<_ACEOF
6564#define int64_t $ac_cv_c_int64_t
6565_ACEOF
6566;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006567esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00006570if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006571
Matthias Kloseb9621712010-04-24 17:59:49 +00006572$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006573
6574fi
6575
Jack Jansendd19cf82001-12-06 22:36:17 +00006576
Michael W. Hudson54241132001-12-07 15:38:26 +00006577# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006578# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579# The cast to long int works around a bug in the HP C Compiler
6580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6584$as_echo_n "checking size of int... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006585if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006587else
Matthias Kloseb9621712010-04-24 17:59:49 +00006588 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 +00006589
Martin v. Löwis11437992002-04-12 09:54:03 +00006590else
Matthias Kloseb9621712010-04-24 17:59:49 +00006591 if test "$ac_cv_type_int" = yes; then
6592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006594as_fn_error 77 "cannot compute sizeof (int)
6595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596 else
6597 ac_cv_sizeof_int=0
6598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600
Martin v. Löwis11437992002-04-12 09:54:03 +00006601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6603$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604
6605
6606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006608#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006609_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006610
6611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612# The cast to long int works around a bug in the HP C Compiler
6613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6617$as_echo_n "checking size of long... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006618if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006620else
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 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 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 if test "$ac_cv_type_long" = yes; then
6625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006627as_fn_error 77 "cannot compute sizeof (long)
6628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629 else
6630 ac_cv_sizeof_long=0
6631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006633
Martin v. Löwis11437992002-04-12 09:54:03 +00006634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6636$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637
6638
6639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006641#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006642_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006643
6644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645# The cast to long int works around a bug in the HP C Compiler
6646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6650$as_echo_n "checking size of void *... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006651if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006653else
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 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 +00006655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 if test "$ac_cv_type_void_p" = yes; then
6658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006660as_fn_error 77 "cannot compute sizeof (void *)
6661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662 else
6663 ac_cv_sizeof_void_p=0
6664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006666
Martin v. Löwis11437992002-04-12 09:54:03 +00006667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6669$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006670
6671
6672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006674#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006675_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006676
6677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006678# The cast to long int works around a bug in the HP C Compiler
6679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6683$as_echo_n "checking size of short... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006684if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 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 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 if test "$ac_cv_type_short" = yes; then
6691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006693as_fn_error 77 "cannot compute sizeof (short)
6694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695 else
6696 ac_cv_sizeof_short=0
6697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6702$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703
6704
6705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006708_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709
6710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711# The cast to long int works around a bug in the HP C Compiler
6712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6716$as_echo_n "checking size of float... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006717if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 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 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 if test "$ac_cv_type_float" = yes; then
6724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006726as_fn_error 77 "cannot compute sizeof (float)
6727See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728 else
6729 ac_cv_sizeof_float=0
6730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006732
Martin v. Löwis11437992002-04-12 09:54:03 +00006733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6735$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006736
6737
6738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006740#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006741_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006742
6743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744# The cast to long int works around a bug in the HP C Compiler
6745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6749$as_echo_n "checking size of double... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006750if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006752else
Matthias Kloseb9621712010-04-24 17:59:49 +00006753 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 +00006754
Martin v. Löwis11437992002-04-12 09:54:03 +00006755else
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 if test "$ac_cv_type_double" = yes; then
6757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006759as_fn_error 77 "cannot compute sizeof (double)
6760See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761 else
6762 ac_cv_sizeof_double=0
6763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6768$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769
6770
6771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006773#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006774_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775
6776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777# The cast to long int works around a bug in the HP C Compiler
6778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6780# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6782$as_echo_n "checking size of fpos_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006783if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006784 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 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 +00006787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788else
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 if test "$ac_cv_type_fpos_t" = yes; then
6790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006792as_fn_error 77 "cannot compute sizeof (fpos_t)
6793See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794 else
6795 ac_cv_sizeof_fpos_t=0
6796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006798
Martin v. Löwis11437992002-04-12 09:54:03 +00006799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6801$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802
6803
6804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006806#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006807_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006808
Michael W. Hudson54241132001-12-07 15:38:26 +00006809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810# The cast to long int works around a bug in the HP C Compiler
6811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6815$as_echo_n "checking size of size_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006816if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 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 +00006820
Martin v. Löwis18e16552006-02-15 17:27:45 +00006821else
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 if test "$ac_cv_type_size_t" = yes; then
6823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006825as_fn_error 77 "cannot compute sizeof (size_t)
6826See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006827 else
6828 ac_cv_sizeof_size_t=0
6829 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006831
Martin v. Löwis18e16552006-02-15 17:27:45 +00006832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6834$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006835
6836
6837
Martin v. Löwis18e16552006-02-15 17:27:45 +00006838cat >>confdefs.h <<_ACEOF
6839#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6840_ACEOF
6841
6842
Christian Heimes400adb02008-02-01 08:12:03 +00006843# The cast to long int works around a bug in the HP C Compiler
6844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6846# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6848$as_echo_n "checking size of pid_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006849if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006850 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006851else
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 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 +00006853
Christian Heimes400adb02008-02-01 08:12:03 +00006854else
Matthias Kloseb9621712010-04-24 17:59:49 +00006855 if test "$ac_cv_type_pid_t" = yes; then
6856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006858as_fn_error 77 "cannot compute sizeof (pid_t)
6859See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006860 else
6861 ac_cv_sizeof_pid_t=0
6862 fi
6863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006864
Christian Heimes400adb02008-02-01 08:12:03 +00006865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6867$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006868
6869
6870
6871cat >>confdefs.h <<_ACEOF
6872#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6873_ACEOF
6874
6875
Michael W. Hudson54241132001-12-07 15:38:26 +00006876
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6878$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006879have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006881/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006882
Martin v. Löwis11437992002-04-12 09:54:03 +00006883int
6884main ()
6885{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006886long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006887 ;
6888 return 0;
6889}
6890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006892
6893
Matthias Kloseb9621712010-04-24 17:59:49 +00006894$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006895
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006896 have_long_long=yes
6897
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6901$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006902if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903# The cast to long int works around a bug in the HP C Compiler
6904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6906# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6908$as_echo_n "checking size of long long... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006909if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006910 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006911else
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 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 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914else
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 if test "$ac_cv_type_long_long" = yes; then
6916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006918as_fn_error 77 "cannot compute sizeof (long long)
6919See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920 else
6921 ac_cv_sizeof_long_long=0
6922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006924
Martin v. Löwis11437992002-04-12 09:54:03 +00006925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6927$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006928
6929
6930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006932#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006933_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006934
Michael W. Hudson54241132001-12-07 15:38:26 +00006935
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006936fi
6937
Matthias Kloseb9621712010-04-24 17:59:49 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6939$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006940have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942/* end confdefs.h. */
6943
6944int
6945main ()
6946{
6947long double x; x = (long double)0;
6948 ;
6949 return 0;
6950}
6951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006952if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953
6954
Matthias Kloseb9621712010-04-24 17:59:49 +00006955$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956
6957 have_long_double=yes
6958
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006959fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6962$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006963if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006964# The cast to long int works around a bug in the HP C Compiler
6965# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6966# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6967# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6969$as_echo_n "checking size of long double... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00006970if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006972else
Matthias Kloseb9621712010-04-24 17:59:49 +00006973 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 +00006974
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006975else
Matthias Kloseb9621712010-04-24 17:59:49 +00006976 if test "$ac_cv_type_long_double" = yes; then
6977 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00006979as_fn_error 77 "cannot compute sizeof (long double)
6980See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981 else
6982 ac_cv_sizeof_long_double=0
6983 fi
6984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006985
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6988$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006989
6990
6991
6992cat >>confdefs.h <<_ACEOF
6993#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6994_ACEOF
6995
6996
6997fi
6998
6999
Matthias Kloseb9621712010-04-24 17:59:49 +00007000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7001$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007002have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007004/* end confdefs.h. */
7005
7006int
7007main ()
7008{
7009_Bool x; x = (_Bool)0;
7010 ;
7011 return 0;
7012}
7013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007014if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007015
7016
Matthias Kloseb9621712010-04-24 17:59:49 +00007017$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007018
7019 have_c99_bool=yes
7020
Thomas Woutersb2137042007-02-01 18:02:27 +00007021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7024$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007025if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026# The cast to long int works around a bug in the HP C Compiler
7027# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7028# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7029# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7031$as_echo_n "checking size of _Bool... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007032if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007034else
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 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 +00007036
Thomas Woutersb2137042007-02-01 18:02:27 +00007037else
Matthias Kloseb9621712010-04-24 17:59:49 +00007038 if test "$ac_cv_type__Bool" = yes; then
7039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00007041as_fn_error 77 "cannot compute sizeof (_Bool)
7042See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007043 else
7044 ac_cv_sizeof__Bool=0
7045 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047
Thomas Woutersb2137042007-02-01 18:02:27 +00007048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7050$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007051
7052
7053
Thomas Woutersb2137042007-02-01 18:02:27 +00007054cat >>confdefs.h <<_ACEOF
7055#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7056_ACEOF
7057
7058
7059fi
7060
Matthias Kloseb9621712010-04-24 17:59:49 +00007061ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007062 #include <stdint.h>
7063 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007064 #ifdef HAVE_INTTYPES_H
7065 #include <inttypes.h>
7066 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007067"
Georg Brandl941f9562011-02-25 15:21:47 +00007068if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007069
7070cat >>confdefs.h <<_ACEOF
7071#define HAVE_UINTPTR_T 1
7072_ACEOF
7073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074# The cast to long int works around a bug in the HP C Compiler
7075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7077# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7079$as_echo_n "checking size of uintptr_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007080if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007081 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 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 +00007084
Martin v. Löwis11437992002-04-12 09:54:03 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 if test "$ac_cv_type_uintptr_t" = yes; then
7087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00007089as_fn_error 77 "cannot compute sizeof (uintptr_t)
7090See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091 else
7092 ac_cv_sizeof_uintptr_t=0
7093 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007095
Martin v. Löwis11437992002-04-12 09:54:03 +00007096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7098$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099
7100
7101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007103#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007104_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007105
Michael W. Hudson54241132001-12-07 15:38:26 +00007106
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007107fi
7108
Thomas Wouters89f507f2006-12-13 04:49:30 +00007109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007110# The cast to long int works around a bug in the HP C Compiler
7111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7113# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7115$as_echo_n "checking size of off_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007116if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007120#ifdef HAVE_SYS_TYPES_H
7121#include <sys/types.h>
7122#endif
7123
Matthias Kloseb9621712010-04-24 17:59:49 +00007124"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 if test "$ac_cv_type_off_t" = yes; then
7128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00007130as_fn_error 77 "cannot compute sizeof (off_t)
7131See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007132 else
7133 ac_cv_sizeof_off_t=0
7134 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7139$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007141
7142
Martin v. Löwis11437992002-04-12 09:54:03 +00007143cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007144#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007146
Michael W. Hudson54241132001-12-07 15:38:26 +00007147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7150$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007151if test "$have_long_long" = yes
7152then
7153if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007154 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007155
Matthias Kloseb9621712010-04-24 17:59:49 +00007156$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007157
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7159$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007160else
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007163fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7166$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007167fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169# The cast to long int works around a bug in the HP C Compiler
7170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7172# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7174$as_echo_n "checking size of time_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007175if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007176 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007177else
Matthias Kloseb9621712010-04-24 17:59:49 +00007178 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179#ifdef HAVE_SYS_TYPES_H
7180#include <sys/types.h>
7181#endif
7182#ifdef HAVE_TIME_H
7183#include <time.h>
7184#endif
7185
Matthias Kloseb9621712010-04-24 17:59:49 +00007186"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188else
Matthias Kloseb9621712010-04-24 17:59:49 +00007189 if test "$ac_cv_type_time_t" = yes; then
7190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00007192as_fn_error 77 "cannot compute sizeof (time_t)
7193See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007194 else
7195 ac_cv_sizeof_time_t=0
7196 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7201$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203
7204
Martin v. Löwis11437992002-04-12 09:54:03 +00007205cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007206#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007207_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007208
Michael W. Hudson54241132001-12-07 15:38:26 +00007209
7210
Trent Mick635f6fb2000-08-23 21:33:05 +00007211# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007212ac_save_cc="$CC"
7213if test "$ac_cv_kpthread" = "yes"
7214then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007215elif test "$ac_cv_kthread" = "yes"
7216then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007217elif test "$ac_cv_pthread" = "yes"
7218then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007219fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
Matthias Kloseb9621712010-04-24 17:59:49 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7222$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007223have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007226
7227 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007228int
7229main ()
7230{
Guido van Rossum12580492000-09-24 16:47:19 +00007231pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 ;
7233 return 0;
7234}
Matthias Kloseb159a552010-04-25 21:00:44 +00007235
Martin v. Löwis11437992002-04-12 09:54:03 +00007236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007237if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007238 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7242$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007243if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7247# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7249$as_echo_n "checking size of pthread_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007250if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254#ifdef HAVE_PTHREAD_H
7255#include <pthread.h>
7256#endif
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260else
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 if test "$ac_cv_type_pthread_t" = yes; then
7262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +00007264as_fn_error 77 "cannot compute sizeof (pthread_t)
7265See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266 else
7267 ac_cv_sizeof_pthread_t=0
7268 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007270
Trent Mick635f6fb2000-08-23 21:33:05 +00007271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7273$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275
7276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007278#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007280
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007281
Trent Mick635f6fb2000-08-23 21:33:05 +00007282fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007283CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007284
Michael W. Hudson54241132001-12-07 15:38:26 +00007285
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007286case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007287 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007288 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7289 ;;
7290 Darwin/*)
7291 OTHER_LIBTOOL_OPT=""
7292 ;;
7293esac
7294
7295
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007296ARCH_RUN_32BIT=""
7297
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007298case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007299 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007300 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7301 if test "${enable_universalsdk}"; then
7302 :
7303 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007304 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007305 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007306 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007308 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007309 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007310 if test ${gcc_version} '<' 4.0
7311 then
7312 LIBTOOL_CRUFT="-lcc_dynamic"
7313 else
7314 LIBTOOL_CRUFT=""
7315 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007317 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007321
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007322 #include <unistd.h>
7323 int main(int argc, char*argv[])
7324 {
7325 if (sizeof(long) == 4) {
7326 return 0;
7327 } else {
7328 return 1;
7329 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007330 }
7331
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007333if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334 ac_osx_32bit=yes
7335else
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007340fi
7341
7342
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007343 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007344 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007345 i386)
7346 MACOSX_DEFAULT_ARCH="i386"
7347 ;;
7348 ppc)
7349 MACOSX_DEFAULT_ARCH="ppc"
7350 ;;
7351 *)
Georg Brandl941f9562011-02-25 15:21:47 +00007352 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007353 ;;
7354 esac
7355 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007356 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007357 i386)
7358 MACOSX_DEFAULT_ARCH="x86_64"
7359 ;;
7360 ppc)
7361 MACOSX_DEFAULT_ARCH="ppc64"
7362 ;;
7363 *)
Georg Brandl941f9562011-02-25 15:21:47 +00007364 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007365 ;;
7366 esac
7367
7368 #ARCH_RUN_32BIT="true"
7369 fi
7370
7371 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007374esac
7375
Matthias Kloseb9621712010-04-24 17:59:49 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7377$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007378if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007380 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007381 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007382 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007383
Matthias Kloseb9621712010-04-24 17:59:49 +00007384$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7387$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007388 if test $enable_shared = "yes"
7389 then
Georg Brandl941f9562011-02-25 15:21:47 +00007390 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 +00007391 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007395fi
7396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7398$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007399case $ac_sys_system/$ac_sys_release in
7400 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007403
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7405$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007406 ;;
7407 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7409$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007410 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007411esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007412
Guido van Rossum0a516c91994-09-12 10:58:40 +00007413# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414
Michael W. Hudson54241132001-12-07 15:38:26 +00007415
7416
7417
7418
Benjamin Peterson99f03762010-04-11 22:15:28 +00007419
Thomas Wouters477c8d52006-05-27 19:21:47 +00007420
Georg Brandlb1441c72009-01-03 22:33:39 +00007421
Thomas Wouters477c8d52006-05-27 19:21:47 +00007422cat >>confdefs.h <<_ACEOF
7423#define SHLIB_EXT "$SO"
7424_ACEOF
7425
Guido van Rossum0a516c91994-09-12 10:58:40 +00007426# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007427# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007428# (Shared libraries in this instance are shared modules to be loaded into
7429# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7431$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007432if test -z "$LDSHARED"
7433then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007434 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007435 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007436 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007437 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007438 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007439 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007440 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007441 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007442 if test "$GCC" = "yes" ; then
7443 LDSHARED='$(CC) -shared'
7444 LDCXXSHARED='$(CXX) -shared'
7445 else
7446 LDSHARED='$(CC) -G'
7447 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007448 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007449 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007450 if test "$GCC" = "yes" ; then
7451 LDSHARED='$(CC) -shared'
7452 LDCXXSHARED='$(CXX) -shared'
7453 else
7454 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007455 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007456 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007457 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007458 LDSHARED='$(CC) -bundle'
7459 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007460 if test "$enable_framework" ; then
7461 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007462 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7463 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007464 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007465 else
7466 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007467 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007468 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007469 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007470 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007471 LDSHARED='$(CC) -bundle'
7472 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007473 if test "$enable_framework" ; then
7474 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007475 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7476 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007477 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007478 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007479 # No framework, use the Python app as bundle-loader
7480 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007481 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007482 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007483 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007484 Darwin/*)
7485 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7486 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007487
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007488 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007489 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007490 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007491 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007492 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007493 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7494 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007495 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007496 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007497 LDSHARED='$(CC) -bundle'
7498 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007499 if test "$enable_framework" ; then
7500 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007501 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7502 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007503 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007504 else
7505 # No framework, use the Python app as bundle-loader
7506 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7507 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007508 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007509 fi
7510 fi
7511 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 Linux*|GNU*|QNX*)
7513 LDSHARED='$(CC) -shared'
7514 LDCXXSHARED='$(CXX) -shared';;
7515 BSD/OS*/4*)
7516 LDSHARED="gcc -shared"
7517 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007518 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007519 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007520 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007521 LDSHARED='$(CC) -shared'
7522 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007523 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007524 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007525 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007526 OpenBSD*)
7527 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7528 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007529 LDSHARED='$(CC) -shared $(CCSHARED)'
7530 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007531 else
7532 case `uname -r` in
7533 [01].* | 2.[0-7] | 2.[0-7].*)
7534 LDSHARED="ld -Bshareable ${LDFLAGS}"
7535 ;;
7536 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007537 LDSHARED='$(CC) -shared $(CCSHARED)'
7538 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007539 ;;
7540 esac
7541 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007542 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007543 LDSHARED='$(CC) -shared'
7544 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007545 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 if test "$GCC" = "yes" ; then
7547 LDSHARED='$(CC) -shared'
7548 LDCXXSHARED='$(CXX) -shared'
7549 else
7550 LDSHARED='$(CC) -G'
7551 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007552 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007553 SCO_SV*)
7554 LDSHARED='$(CC) -Wl,-G,-Bexport'
7555 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7556 CYGWIN*)
7557 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7558 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007559 *) LDSHARED="ld";;
7560 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7563$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007564LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007565BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007566# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007567# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7569$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007570if test -z "$CCSHARED"
7571then
Guido van Rossum07397971997-04-29 21:49:50 +00007572 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007573 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007574 then CCSHARED="-fPIC";
7575 elif test `uname -p` = sparc;
7576 then CCSHARED="-xcode=pic32";
7577 else CCSHARED="-Kpic";
7578 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007579 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007580 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007581 else CCSHARED="+z";
7582 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007583 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007584 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007585 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007586 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007587 if test "$GCC" = "yes"
7588 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007589 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007590 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007591 SCO_SV*)
7592 if test "$GCC" = "yes"
7593 then CCSHARED="-fPIC"
7594 else CCSHARED="-Kpic -belf"
7595 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007596 IRIX*/6*) case $CC in
7597 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007598 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007599 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007600 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7603$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007604# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007605# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7607$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007608if test -z "$LINKFORSHARED"
7609then
Guido van Rossum07397971997-04-29 21:49:50 +00007610 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007611 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007612 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007613 LINKFORSHARED="-Wl,-E -Wl,+s";;
7614# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007615 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007616 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007617 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007619 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007620 if test "$enable_framework"
7621 then
Jack Jansenda49e192005-01-07 13:08:22 +00007622 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007623 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007624 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007625 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007626 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007627 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007628 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007629 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7630 then
7631 LINKFORSHARED="-Wl,--export-dynamic"
7632 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007633 SunOS/5*) case $CC in
7634 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007635 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007636 then
7637 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007638 fi;;
7639 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007640 CYGWIN*)
7641 if test $enable_shared = "no"
7642 then
7643 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7644 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007645 QNX*)
7646 # -Wl,-E causes the symbols to be added to the dynamic
7647 # symbol table so that they can be found when a module
7648 # is loaded. -N 2048K causes the stack size to be set
7649 # to 2048 kilobytes so that the stack doesn't overflow
7650 # when running test_compile.py.
7651 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007652 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7655$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007656
Michael W. Hudson54241132001-12-07 15:38:26 +00007657
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007658
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7660$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007661if test ! "$LIBRARY" = "$LDLIBRARY"
7662then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007663 case $ac_sys_system in
7664 CYGWIN*)
7665 # Cygwin needs CCSHARED when building extension DLLs
7666 # but not when building the interpreter DLL.
7667 CFLAGSFORSHARED='';;
7668 *)
7669 CFLAGSFORSHARED='$(CCSHARED)'
7670 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7673$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007674
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007675# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7676# library (with --enable-shared).
7677# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007678# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7679# if it is not required, since it creates a dependency of the shared library
7680# to LIBS. This, in turn, means that applications linking the shared libpython
7681# don't need to link LIBS explicitly. The default should be only changed
7682# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007683
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7685$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007686case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007687 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007688 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007689esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7691$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007692
7693
Guido van Rossum627b2d71993-12-24 10:39:16 +00007694# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7696$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
7697if ${ac_cv_lib_sendfile_sendfile+:} false; then :
7698 $as_echo_n "(cached) " >&6
7699else
7700 ac_check_lib_save_LIBS=$LIBS
7701LIBS="-lsendfile $LIBS"
7702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7703/* end confdefs.h. */
7704
7705/* Override any GCC internal prototype to avoid an error.
7706 Use char because int might match the return type of a GCC
7707 builtin and then its argument prototype would still apply. */
7708#ifdef __cplusplus
7709extern "C"
7710#endif
7711char sendfile ();
7712int
7713main ()
7714{
7715return sendfile ();
7716 ;
7717 return 0;
7718}
7719_ACEOF
7720if ac_fn_c_try_link "$LINENO"; then :
7721 ac_cv_lib_sendfile_sendfile=yes
7722else
7723 ac_cv_lib_sendfile_sendfile=no
7724fi
7725rm -f core conftest.err conftest.$ac_objext \
7726 conftest$ac_exeext conftest.$ac_ext
7727LIBS=$ac_check_lib_save_LIBS
7728fi
7729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7730$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
7731if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
7732 cat >>confdefs.h <<_ACEOF
7733#define HAVE_LIBSENDFILE 1
7734_ACEOF
7735
7736 LIBS="-lsendfile $LIBS"
7737
7738fi
7739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7741$as_echo_n "checking for dlopen in -ldl... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007742if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007744else
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007746LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750/* Override any GCC internal prototype to avoid an error.
7751 Use char because int might match the return type of a GCC
7752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007753#ifdef __cplusplus
7754extern "C"
7755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007756char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007757int
7758main ()
7759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ;
7762 return 0;
7763}
7764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767else
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770rm -f core conftest.err conftest.$ac_objext \
7771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7775$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007776if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 cat >>confdefs.h <<_ACEOF
7778#define HAVE_LIBDL 1
7779_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007780
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007781 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007783fi
7784 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7786$as_echo_n "checking for shl_load in -ldld... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007787if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007789else
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007791LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795/* Override any GCC internal prototype to avoid an error.
7796 Use char because int might match the return type of a GCC
7797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798#ifdef __cplusplus
7799extern "C"
7800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007801char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007802int
7803main ()
7804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 ;
7807 return 0;
7808}
7809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007812else
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815rm -f core conftest.err conftest.$ac_objext \
7816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007817LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7820$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007821if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 cat >>confdefs.h <<_ACEOF
7823#define HAVE_LIBDLD 1
7824_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007825
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007826 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007827
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007828fi
7829 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007830
Georg Brandlb1441c72009-01-03 22:33:39 +00007831# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007832if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7834$as_echo_n "checking for library containing sem_init... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007835if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007837else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007838 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842/* Override any GCC internal prototype to avoid an error.
7843 Use char because int might match the return type of a GCC
7844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007845#ifdef __cplusplus
7846extern "C"
7847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007848char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
7851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 ;
7854 return 0;
7855}
7856_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857for ac_lib in '' pthread rt posix4; do
7858 if test -z "$ac_lib"; then
7859 ac_res="none required"
7860 else
7861 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007862 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867rm -f core conftest.err conftest.$ac_objext \
7868 conftest$ac_exeext
Georg Brandl941f9562011-02-25 15:21:47 +00007869 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872done
Georg Brandl941f9562011-02-25 15:21:47 +00007873if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875else
7876 ac_cv_search_sem_init=no
7877fi
7878rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007879LIBS=$ac_func_search_save_LIBS
7880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7882$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007884if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007886
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007887fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007888 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007889 # posix4 on Solaris 2.6
7890 # pthread (first!) on Linux
7891fi
7892
Martin v. Löwis19d17342003-06-14 21:03:05 +00007893# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7895$as_echo_n "checking for textdomain in -lintl... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007896if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007898else
7899 ac_check_lib_save_LIBS=$LIBS
7900LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007902/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007904/* Override any GCC internal prototype to avoid an error.
7905 Use char because int might match the return type of a GCC
7906 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007907#ifdef __cplusplus
7908extern "C"
7909#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007910char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911int
7912main ()
7913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007915 ;
7916 return 0;
7917}
7918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007920 ac_cv_lib_intl_textdomain=yes
7921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007924rm -f core conftest.err conftest.$ac_objext \
7925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007926LIBS=$ac_check_lib_save_LIBS
7927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7929$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007930if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931
Matthias Kloseb9621712010-04-24 17:59:49 +00007932$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007933
Brett Cannonc6d936e2009-06-07 20:09:53 +00007934 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007935fi
7936
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007937
7938# checks for system dependent C++ extensions support
7939case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007940 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7941$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007943/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007944
Georg Brandl59e87bd2011-02-15 19:48:59 +00007945 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007946int
7947main ()
7948{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007949loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 ;
7951 return 0;
7952}
Matthias Kloseb159a552010-04-25 21:00:44 +00007953
Martin v. Löwis11437992002-04-12 09:54:03 +00007954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007955if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007956
Matthias Kloseb159a552010-04-25 21:00:44 +00007957
Matthias Kloseb9621712010-04-24 17:59:49 +00007958$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007959
Matthias Kloseb159a552010-04-25 21:00:44 +00007960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007961$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007962
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007963else
Matthias Kloseb159a552010-04-25 21:00:44 +00007964
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007966$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007967
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969rm -f core conftest.err conftest.$ac_objext \
7970 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007971 *) ;;
7972esac
7973
Guido van Rossum70c7f481998-03-26 18:44:10 +00007974# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7976$as_echo_n "checking for t_open in -lnsl... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00007977if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007979else
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007981LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985/* Override any GCC internal prototype to avoid an error.
7986 Use char because int might match the return type of a GCC
7987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007988#ifdef __cplusplus
7989extern "C"
7990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007991char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007992int
7993main ()
7994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 ;
7997 return 0;
7998}
7999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008002else
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005rm -f core conftest.err conftest.$ac_objext \
8006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008007LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8010$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008011if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008012 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008013fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008014 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8016$as_echo_n "checking for socket in -lsocket... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008017if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019else
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008021LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025/* Override any GCC internal prototype to avoid an error.
8026 Use char because int might match the return type of a GCC
8027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028#ifdef __cplusplus
8029extern "C"
8030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008031char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032int
8033main ()
8034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ;
8037 return 0;
8038}
8039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008040if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008042else
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045rm -f core conftest.err conftest.$ac_objext \
8046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008047LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8050$as_echo "$ac_cv_lib_socket_socket" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008051if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008052 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008053fi
8054 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008055
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8057$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008060if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8063$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008064LIBS="$withval $LIBS"
8065
8066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8068$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069fi
8070
Guido van Rossum7f43da71994-08-01 12:15:30 +00008071
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008072if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8074set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8076$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008077if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008079else
8080 case $PKG_CONFIG in
8081 [\\/]* | ?:[\\/]*)
8082 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8083 ;;
8084 *)
8085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8086for as_dir in $PATH
8087do
8088 IFS=$as_save_IFS
8089 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008091 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8092 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008094 break 2
8095 fi
8096done
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008098IFS=$as_save_IFS
8099
8100 ;;
8101esac
8102fi
8103PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8104if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8106$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107else
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008110fi
8111
8112
8113fi
8114if test -z "$ac_cv_path_PKG_CONFIG"; then
8115 ac_pt_PKG_CONFIG=$PKG_CONFIG
8116 # Extract the first word of "pkg-config", so it can be a program name with args.
8117set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8119$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008120if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008122else
8123 case $ac_pt_PKG_CONFIG in
8124 [\\/]* | ?:[\\/]*)
8125 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8126 ;;
8127 *)
8128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8129for as_dir in $PATH
8130do
8131 IFS=$as_save_IFS
8132 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008134 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8135 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008137 break 2
8138 fi
8139done
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008141IFS=$as_save_IFS
8142
8143 ;;
8144esac
8145fi
8146ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8147if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8149$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150else
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8152$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008153fi
8154
8155 if test "x$ac_pt_PKG_CONFIG" = x; then
8156 PKG_CONFIG=""
8157 else
8158 case $cross_compiling:$ac_tool_warned in
8159yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008162ac_tool_warned=yes ;;
8163esac
8164 PKG_CONFIG=$ac_pt_PKG_CONFIG
8165 fi
8166else
8167 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8168fi
8169
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008170
8171# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8173$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008174
8175# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008176if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008177 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008178else
8179 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008180fi
8181
8182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8184$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008185
8186# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8188$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008189
8190# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008191if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008192 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008193else
8194 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008195fi
8196
8197
8198if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008199 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8200else
8201 LIBFFI_INCLUDEDIR=""
8202fi
8203
8204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8206$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008207
Benjamin Peterson076ed002010-10-31 17:11:02 +00008208# Check for support for loadable sqlite extensions
8209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8210$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8211# Check whether --enable-loadable-sqlite-extensions was given.
8212if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8213 enableval=$enable_loadable_sqlite_extensions;
8214else
8215 enable_loadable_sqlite_extensions="no"
8216fi
8217
8218
8219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8220$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8221
Matthias Klose55708cc2009-04-30 08:06:49 +00008222# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8224$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008225
8226# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008227if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008228 withval=$with_dbmliborder;
8229if test x$with_dbmliborder = xyes
8230then
Georg Brandl941f9562011-02-25 15:21:47 +00008231as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008232else
8233 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8234 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8235 then
Georg Brandl941f9562011-02-25 15:21:47 +00008236 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008237 fi
8238 done
8239fi
8240fi
8241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8243$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008244
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008245# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008246
8247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8249$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008252if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253 withval=$with_signal_module;
8254fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008255
8256
8257if test -z "$with_signal_module"
8258then with_signal_module="yes"
8259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8261$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008262
8263if test "${with_signal_module}" = "yes"; then
8264 USE_SIGNAL_MODULE=""
8265 SIGNAL_OBJS=""
8266else
8267 USE_SIGNAL_MODULE="#"
8268 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8269fi
8270
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008271# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008272
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008273USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8276$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
Guido van Rossumec2f0731997-01-22 20:54:01 +00008278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008280if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8283$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008284LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008285if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008286 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008287fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008288else
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8290$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291fi
8292
Martin v. Löwis11437992002-04-12 09:54:03 +00008293
8294# Templates for things AC_DEFINEd more than once.
8295# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008296
8297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298
8299
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8301$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008304if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305 withval=$with_threads;
8306fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008307
8308
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008309# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008312if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008313 withval=$with_thread; with_threads=$with_thread
8314fi
8315
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008316
8317if test -z "$with_threads"
8318then with_threads="yes"
8319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8321$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008322
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008323
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008324if test "$with_threads" = "no"
8325then
8326 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008327elif test "$ac_cv_pthread_is_default" = yes
8328then
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008330
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008331 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008333
8334 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008336elif test "$ac_cv_kpthread" = "yes"
8337then
8338 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008339 if test "$ac_cv_cxx_thread" = "yes"; then
8340 CXX="$CXX -Kpthread"
8341 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008343
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008344 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008345 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008346elif test "$ac_cv_kthread" = "yes"
8347then
8348 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008349 if test "$ac_cv_cxx_thread" = "yes"; then
8350 CXX="$CXX -Kthread"
8351 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008353
8354 posix_threads=yes
8355 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008356elif test "$ac_cv_pthread" = "yes"
8357then
8358 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008359 if test "$ac_cv_cxx_thread" = "yes"; then
8360 CXX="$CXX -pthread"
8361 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008363
8364 posix_threads=yes
8365 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008366else
8367 if test ! -z "$with_threads" -a -d "$with_threads"
8368 then LDFLAGS="$LDFLAGS -L$with_threads"
8369 fi
8370 if test ! -z "$withval" -a -d "$withval"
8371 then LDFLAGS="$LDFLAGS -L$withval"
8372 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008373
8374 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008375 # define _POSIX_THREADS in unistd.h. Some apparently don't
8376 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8378$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008380/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008381
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008382#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008383#ifdef _POSIX_THREADS
8384yes
8385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
8387_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008390 unistd_defines_pthreads=yes
8391else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008392 unistd_defines_pthreads=no
8393fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008394rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8397$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008398
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008400
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00008402if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407
Matthias Kloseb9621712010-04-24 17:59:49 +00008408$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008409
8410 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008411 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008412else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008413
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00008415if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008417
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008422
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008423 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008424else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008425
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008426 # Just looking for pthread_create in libpthread is not enough:
8427 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8428 # So we really have to include pthread.h, and then link.
8429 _libs=$LIBS
8430 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8432$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008434/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008435#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008436
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008437void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008441
8442pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ;
8444 return 0;
8445}
8446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008447if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8450$as_echo "yes" >&6; }
8451 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008452
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008453 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008454 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008455else
Martin v. Löwis11437992002-04-12 09:54:03 +00008456
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008457 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Georg Brandl941f9562011-02-25 15:21:47 +00008459if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008461
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008462 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008463 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008464else
Guido van Rossumad678af1998-10-02 14:42:15 +00008465
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8467$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008468if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008470else
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008472LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476/* Override any GCC internal prototype to avoid an error.
8477 Use char because int might match the return type of a GCC
8478 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008479#ifdef __cplusplus
8480extern "C"
8481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008482char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008483int
8484main ()
8485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ;
8488 return 0;
8489}
8490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008491if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008493else
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496rm -f core conftest.err conftest.$ac_objext \
8497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008498LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8501$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008502if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008504
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008505 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008506 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008507 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008508else
Greg Steinadf63d62000-07-05 10:38:09 +00008509
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8511$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008512if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008514else
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008516LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520/* Override any GCC internal prototype to avoid an error.
8521 Use char because int might match the return type of a GCC
8522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008523#ifdef __cplusplus
8524extern "C"
8525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008526char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008527int
8528main ()
8529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 ;
8532 return 0;
8533}
8534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008537else
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540rm -f core conftest.err conftest.$ac_objext \
8541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008542LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8545$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008546if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008548
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008549 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008550 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008551 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008552else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008553
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8555$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008556if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008560LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564/* Override any GCC internal prototype to avoid an error.
8565 Use char because int might match the return type of a GCC
8566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008567#ifdef __cplusplus
8568extern "C"
8569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008570char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008571int
8572main ()
8573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ;
8576 return 0;
8577}
8578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008579if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008581else
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584rm -f core conftest.err conftest.$ac_objext \
8585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8589$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008590if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008592
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008593 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008594 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008595 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008596else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008597
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8599$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008600if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008602else
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008604LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608/* Override any GCC internal prototype to avoid an error.
8609 Use char because int might match the return type of a GCC
8610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008611#ifdef __cplusplus
8612extern "C"
8613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008614char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008615int
8616main ()
8617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ;
8620 return 0;
8621}
8622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008625else
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628rm -f core conftest.err conftest.$ac_objext \
8629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008630LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8633$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008634if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008636
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008637 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008638 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008639 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008640else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008641
Martin v. Löwis130fb172001-07-19 11:00:41 +00008642 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008643fi
8644
Guido van Rossum627b2d71993-12-24 10:39:16 +00008645
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008646fi
8647
Guido van Rossum0be3e491997-05-22 20:33:33 +00008648fi
8649
Guido van Rossum49545951997-12-02 19:28:29 +00008650fi
8651
Guido van Rossumb93a8621998-05-07 13:27:32 +00008652fi
8653
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655rm -f core conftest.err conftest.$ac_objext \
8656 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657fi
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659
8660fi
8661
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008662
Michael W. Hudson54241132001-12-07 15:38:26 +00008663
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8665$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008666if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008668else
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008670LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674/* Override any GCC internal prototype to avoid an error.
8675 Use char because int might match the return type of a GCC
8676 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008677#ifdef __cplusplus
8678extern "C"
8679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008680char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008681int
8682main ()
8683{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ;
8686 return 0;
8687}
8688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008689if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008690 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008691else
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694rm -f core conftest.err conftest.$ac_objext \
8695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008696LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8699$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008700if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008702
Martin v. Löwis130fb172001-07-19 11:00:41 +00008703 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008704 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008705 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008706fi
8707
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008708
Neal Norwitza978ab02002-11-02 16:58:05 +00008709 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8711$as_echo_n "checking for thr_create in -lthread... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008712if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008714else
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008716LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720/* Override any GCC internal prototype to avoid an error.
8721 Use char because int might match the return type of a GCC
8722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008723#ifdef __cplusplus
8724extern "C"
8725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008726char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008727int
8728main ()
8729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ;
8732 return 0;
8733}
8734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740rm -f core conftest.err conftest.$ac_objext \
8741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008742LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8745$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008746if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008749 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008750 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008751 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008752fi
8753
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008754 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008755
Martin v. Löwis130fb172001-07-19 11:00:41 +00008756 if test "$USE_THREAD_MODULE" != "#"
8757 then
8758 # If the above checks didn't disable threads, (at least) OSF1
8759 # needs this '-threads' argument during linking.
8760 case $ac_sys_system in
8761 OSF1) LDLAST=-threads;;
8762 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008763 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008764fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008765
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008766if test "$posix_threads" = "yes"; then
8767 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008770
8771 fi
8772
8773 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8774 case $ac_sys_system/$ac_sys_release in
8775 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008776$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008777
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778 ;;
8779 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008780$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781
8782 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008783 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008784$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008785
8786 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008787 AIX/6)
8788$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8789
8790 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791 esac
8792
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8794$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00008795 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008797else
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008799 ac_cv_pthread_system_supported=no
8800else
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008802/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008803#include <pthread.h>
8804 void *foo(void *parm) {
8805 return NULL;
8806 }
8807 main() {
8808 pthread_attr_t attr;
8809 pthread_t id;
8810 if (pthread_attr_init(&attr)) exit(-1);
8811 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8812 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8813 exit(0);
8814 }
8815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008816if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008817 ac_cv_pthread_system_supported=yes
8818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825
Guido van Rossum627b2d71993-12-24 10:39:16 +00008826fi
8827
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8829$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008830 if test "$ac_cv_pthread_system_supported" = "yes"; then
8831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833
8834 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 for ac_func in pthread_sigmask
8836do :
8837 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Georg Brandl941f9562011-02-25 15:21:47 +00008838if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008840#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008841_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008842 case $ac_sys_system in
8843 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008844
Matthias Kloseb9621712010-04-24 17:59:49 +00008845$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008846
8847 ;;
8848 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008849fi
8850done
8851
8852fi
8853
8854
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008856
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8858$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008860if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008861 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008862 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8864$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008865 ipv6=no
8866 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8868$as_echo "yes" >&6; }
8869 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008870
8871 ipv6=yes
8872 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008874else
Martin v. Löwis11437992002-04-12 09:54:03 +00008875
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008877
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8879$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008880 ipv6=no
8881
8882else
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008884/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885 /* AF_INET6 available check */
8886#include <sys/types.h>
8887#include <sys/socket.h>
8888main()
8889{
8890 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8891 exit(1);
8892 else
8893 exit(0);
8894}
8895
Martin v. Löwis11437992002-04-12 09:54:03 +00008896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008897if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008898
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8900$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008902
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008903else
Matthias Kloseb159a552010-04-25 21:00:44 +00008904
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8906$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008907 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912fi
8913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008915if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8917$as_echo_n "checking if RFC2553 API is available... " >&6; }
8918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008919/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008920
8921 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008922#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008923int
8924main ()
8925{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008926struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008927 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ;
8929 return 0;
8930}
Matthias Kloseb159a552010-04-25 21:00:44 +00008931
Martin v. Löwis11437992002-04-12 09:54:03 +00008932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008933if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008934
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008936$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008937 ipv6=yes
8938
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008939else
Matthias Kloseb159a552010-04-25 21:00:44 +00008940
8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008942$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008943 ipv6=no
8944
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008947fi
8948
8949if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008951
8952fi
8953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954fi
8955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957ipv6type=unknown
8958ipv6lib=none
8959ipv6trylibc=no
8960
8961if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8963$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008964 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8965 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966 case $i in
8967 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008969/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971#include <netinet/in.h>
8972#ifdef IPV6_INRIA_VERSION
8973yes
8974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008975_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008978 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008980rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981
8982 ;;
8983 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987#include <netinet/in.h>
8988#ifdef __KAME__
8989yes
8990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008991_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994 ipv6type=$i;
8995 ipv6lib=inet6
8996 ipv6libdir=/usr/local/v6/lib
8997 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008999rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000
9001 ;;
9002 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009004/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009005
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006#include <features.h>
9007#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9008yes
9009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009010_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013 ipv6type=$i;
9014 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009016rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017
9018 ;;
9019 linux-inet6)
9020 if test -d /usr/inet6; then
9021 ipv6type=$i
9022 ipv6lib=inet6
9023 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009024 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025 fi
9026 ;;
9027 solaris)
9028 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009029 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030 ipv6type=$i
9031 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032 fi
9033 fi
9034 ;;
9035 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009037/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039#include <sys/param.h>
9040#ifdef _TOSHIBA_INET6
9041yes
9042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009043_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046 ipv6type=$i;
9047 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009048 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009050rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009051
9052 ;;
9053 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009055/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009056
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057#include </usr/local/v6/include/sys/v6config.h>
9058#ifdef __V6D__
9059yes
9060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009061_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064 ipv6type=$i;
9065 ipv6lib=v6;
9066 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009067 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009069rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070
9071 ;;
9072 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009074/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009075
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076#include <sys/param.h>
9077#ifdef _ZETA_MINAMI_INET6
9078yes
9079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009080_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009082 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083 ipv6type=$i;
9084 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009085 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009086fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009087rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009088
9089 ;;
9090 esac
9091 if test "$ipv6type" != "unknown"; then
9092 break
9093 fi
9094 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9096$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097fi
9098
9099if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9100 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9101 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9102 echo "using lib$ipv6lib"
9103 else
9104 if test $ipv6trylibc = "yes"; then
9105 echo "using libc"
9106 else
9107 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9108 echo "You need to fetch lib$ipv6lib.a from appropriate"
9109 echo 'ipv6 kit and compile beforehand.'
9110 exit 1
9111 fi
9112 fi
9113fi
9114
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9116$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009118/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009119
9120 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009121int
9122main ()
9123{
9124FSIORefNum fRef = 0
9125 ;
9126 return 0;
9127}
Matthias Kloseb159a552010-04-25 21:00:44 +00009128
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009130if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009131
Matthias Kloseb159a552010-04-25 21:00:44 +00009132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9136$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009137
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009138else
Matthias Kloseb159a552010-04-25 21:00:44 +00009139
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9141$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009142
9143fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9145
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009146# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9148$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009150# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009151if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009152 withval=$with_doc_strings;
9153fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009154
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009155
9156if test -z "$with_doc_strings"
9157then with_doc_strings="yes"
9158fi
9159if test "$with_doc_strings" != "no"
9160then
9161
Matthias Kloseb9621712010-04-24 17:59:49 +00009162$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009163
9164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9166$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009167
Antoine Pitrou042b1282010-08-13 21:15:58 +00009168# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9170$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009172# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009173if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009175if test "$withval" != no
9176then
9177
Matthias Kloseb9621712010-04-24 17:59:49 +00009178$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9181$as_echo "yes" >&6; }
9182else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009184fi
9185else
Matthias Kloseb9621712010-04-24 17:59:49 +00009186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9187$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188fi
9189
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009190
9191# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9193$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009195# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009196if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197 withval=$with_pymalloc;
9198fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009199
Neil Schemenauera35c6882001-02-27 04:45:05 +00009200
Neil Schemenauer16c22972002-03-22 15:34:49 +00009201if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009202then
9203 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009204 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009205fi
9206if test "$with_pymalloc" != "no"
9207then
Martin v. Löwis11437992002-04-12 09:54:03 +00009208
Matthias Kloseb9621712010-04-24 17:59:49 +00009209$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009210
9211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9213$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009214
Benjamin Peterson05159c42009-12-03 03:01:27 +00009215# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9217$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009218
9219# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009220if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009221 withval=$with_valgrind;
9222else
9223 with_valgrind=no
9224fi
9225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9227$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009228if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009229 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +00009230if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009233
9234else
Georg Brandl941f9562011-02-25 15:21:47 +00009235 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009236
9237fi
9238
9239
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009240 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009241fi
9242
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009243# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009244
Guido van Rossum98935bf2001-09-05 19:13:16 +00009245DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009246
Guido van Rossume97ee181999-12-20 21:27:22 +00009247# the dlopen() function means we might want to use dynload_shlib.o. some
9248# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009249for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009250do :
9251 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Georg Brandl941f9562011-02-25 15:21:47 +00009252if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009254#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009255_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009256
Guido van Rossume97ee181999-12-20 21:27:22 +00009257fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009258done
Guido van Rossume97ee181999-12-20 21:27:22 +00009259
Michael W. Hudson54241132001-12-07 15:38:26 +00009260
Guido van Rossume97ee181999-12-20 21:27:22 +00009261# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9262# loading of modules.
9263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9265$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009266if test -z "$DYNLOADFILE"
9267then
9268 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009269 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9270 if test "$ac_cv_func_dlopen" = yes
9271 then DYNLOADFILE="dynload_shlib.o"
9272 else DYNLOADFILE="dynload_aix.o"
9273 fi
9274 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009275 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009276 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9277 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009278 *)
9279 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9280 # out any dynamic loading
9281 if test "$ac_cv_func_dlopen" = yes
9282 then DYNLOADFILE="dynload_shlib.o"
9283 else DYNLOADFILE="dynload_stub.o"
9284 fi
9285 ;;
9286 esac
9287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9289$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009290if test "$DYNLOADFILE" != "dynload_stub.o"
9291then
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Matthias Kloseb9621712010-04-24 17:59:49 +00009293$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009294
9295fi
9296
Neil Schemenauer4e425612001-06-19 15:44:15 +00009297# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9298
Michael W. Hudson54241132001-12-07 15:38:26 +00009299
Matthias Kloseb9621712010-04-24 17:59:49 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9301$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009302if test -z "$MACHDEP_OBJS"
9303then
Jack Jansene578a632001-08-15 01:27:14 +00009304 MACHDEP_OBJS=$extra_machdep_objs
9305else
9306 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9309$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009310
Guido van Rossum627b2d71993-12-24 10:39:16 +00009311# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009312for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009313 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009314 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009315 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009316 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009317 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009318 putenv readlink realpath \
Georg Brandl941f9562011-02-25 15:21:47 +00009319 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009320 setgid \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009321 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009322 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009323 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009324 truncate uname unsetenv utimes waitpid wait3 wait4 \
9325 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009326do :
9327 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9328ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl941f9562011-02-25 15:21:47 +00009329if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009331#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009332_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009333
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009334fi
9335done
9336
Michael W. Hudson54241132001-12-07 15:38:26 +00009337
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338# For some functions, having a definition is not sufficient, since
9339# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9341$as_echo_n "checking for chroot... " >&6; }
9342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009343/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009344#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345int
9346main ()
9347{
9348void *x=chroot
9349 ;
9350 return 0;
9351}
9352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356
Matthias Kloseb159a552010-04-25 21:00:44 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009358$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009359else
Matthias Kloseb9621712010-04-24 17:59:49 +00009360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362
9363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9366$as_echo_n "checking for link... " >&6; }
9367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009368/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009369#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370int
9371main ()
9372{
9373void *x=link
9374 ;
9375 return 0;
9376}
9377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379
Matthias Kloseb9621712010-04-24 17:59:49 +00009380$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009381
Matthias Kloseb159a552010-04-25 21:00:44 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009383$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009384else
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9386$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387
9388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9391$as_echo_n "checking for symlink... " >&6; }
9392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009393/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009394#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395int
9396main ()
9397{
9398void *x=symlink
9399 ;
9400 return 0;
9401}
9402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404
Matthias Kloseb9621712010-04-24 17:59:49 +00009405$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406
Matthias Kloseb159a552010-04-25 21:00:44 +00009407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009408$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009409else
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9411$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009412
9413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9416$as_echo_n "checking for fchdir... " >&6; }
9417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009418/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009419#include <unistd.h>
9420int
9421main ()
9422{
9423void *x=fchdir
9424 ;
9425 return 0;
9426}
9427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009429
Matthias Kloseb9621712010-04-24 17:59:49 +00009430$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009431
Matthias Kloseb159a552010-04-25 21:00:44 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009433$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009434else
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009437
9438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9441$as_echo_n "checking for fsync... " >&6; }
9442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009443/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009444#include <unistd.h>
9445int
9446main ()
9447{
9448void *x=fsync
9449 ;
9450 return 0;
9451}
9452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454
Matthias Kloseb9621712010-04-24 17:59:49 +00009455$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009456
Matthias Kloseb159a552010-04-25 21:00:44 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009458$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009462
9463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9466$as_echo_n "checking for fdatasync... " >&6; }
9467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009468/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009469#include <unistd.h>
9470int
9471main ()
9472{
9473void *x=fdatasync
9474 ;
9475 return 0;
9476}
9477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479
Matthias Kloseb9621712010-04-24 17:59:49 +00009480$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009481
Matthias Kloseb159a552010-04-25 21:00:44 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009483$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009484else
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009487
9488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9491$as_echo_n "checking for epoll... " >&6; }
9492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009493/* end confdefs.h. */
9494#include <sys/epoll.h>
9495int
9496main ()
9497{
9498void *x=epoll_create
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öwisc8ad7cc2002-11-11 13:23:45 +00009504
Matthias Kloseb9621712010-04-24 17:59:49 +00009505$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009509else
Matthias Kloseb9621712010-04-24 17:59:49 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009512
9513fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9516$as_echo_n "checking for kqueue... " >&6; }
9517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009518/* end confdefs.h. */
9519
9520#include <sys/types.h>
9521#include <sys/event.h>
9522
9523int
9524main ()
9525{
9526int x=kqueue()
9527 ;
9528 return 0;
9529}
9530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009531if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009532
Matthias Kloseb9621712010-04-24 17:59:49 +00009533$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009534
Matthias Kloseb159a552010-04-25 21:00:44 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009536$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009537else
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009540
9541fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009543# On some systems (eg. FreeBSD 5), we would find a definition of the
9544# functions ctermid_r, setgroups in the library, but no prototype
9545# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9546# address to avoid compiler warnings and potential miscompilations
9547# because of the missing prototypes.
9548
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9550$as_echo_n "checking for ctermid_r... " >&6; }
9551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009553
Martin v. Löwisd5843682002-11-21 20:41:28 +00009554#include <stdio.h>
9555
Martin v. Löwisd5843682002-11-21 20:41:28 +00009556int
9557main ()
9558{
9559void* p = ctermid_r
9560 ;
9561 return 0;
9562}
9563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009567
Matthias Kloseb159a552010-04-25 21:00:44 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009569$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009570else
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009573
9574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9576
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9578$as_echo_n "checking for flock declaration... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009579if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009580 $as_echo_n "(cached) " >&6
9581else
9582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009583/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009584#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009585int
9586main ()
9587{
9588void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009589
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009590 ;
9591 return 0;
9592}
9593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009594if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009595 ac_cv_flock_decl=yes
9596else
9597 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009598
9599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009601
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009602fi
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9604$as_echo "$ac_cv_flock_decl" >&6; }
9605if test "x${ac_cv_flock_decl}" = xyes; then
9606 for ac_func in flock
9607do :
9608 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Georg Brandl941f9562011-02-25 15:21:47 +00009609if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009610 cat >>confdefs.h <<_ACEOF
9611#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009612_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009613
Antoine Pitroua3000072010-09-07 14:52:42 +00009614else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009616$as_echo_n "checking for flock in -lbsd... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009617if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009618 $as_echo_n "(cached) " >&6
9619else
9620 ac_check_lib_save_LIBS=$LIBS
9621LIBS="-lbsd $LIBS"
9622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9623/* end confdefs.h. */
9624
9625/* Override any GCC internal prototype to avoid an error.
9626 Use char because int might match the return type of a GCC
9627 builtin and then its argument prototype would still apply. */
9628#ifdef __cplusplus
9629extern "C"
9630#endif
9631char flock ();
9632int
9633main ()
9634{
9635return flock ();
9636 ;
9637 return 0;
9638}
9639_ACEOF
9640if ac_fn_c_try_link "$LINENO"; then :
9641 ac_cv_lib_bsd_flock=yes
9642else
9643 ac_cv_lib_bsd_flock=no
9644fi
9645rm -f core conftest.err conftest.$ac_objext \
9646 conftest$ac_exeext conftest.$ac_ext
9647LIBS=$ac_check_lib_save_LIBS
9648fi
9649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9650$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009651if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009652 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009653
9654
9655$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9656
9657
9658fi
9659
9660
9661fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009662done
9663
Antoine Pitroua3000072010-09-07 14:52:42 +00009664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9667$as_echo_n "checking for getpagesize... " >&6; }
9668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009670
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009671#include <unistd.h>
9672
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009673int
9674main ()
9675{
9676void* p = getpagesize
9677 ;
9678 return 0;
9679}
9680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009684
Matthias Kloseb159a552010-04-25 21:00:44 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009686$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009687else
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009690
9691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009693
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009694for ac_prog in true
9695do
9696 # Extract the first word of "$ac_prog", so it can be a program name with args.
9697set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9699$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009700if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702else
9703 if test -n "$TRUE"; then
9704 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9705else
9706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9707for as_dir in $PATH
9708do
9709 IFS=$as_save_IFS
9710 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009712 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 +00009713 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 $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 +00009715 break 2
9716 fi
9717done
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009720
9721fi
9722fi
9723TRUE=$ac_cv_prog_TRUE
9724if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9726$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009727else
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9729$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009730fi
9731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009733 test -n "$TRUE" && break
9734done
9735test -n "$TRUE" || TRUE="/bin/true"
9736
9737
Matthias Kloseb9621712010-04-24 17:59:49 +00009738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9739$as_echo_n "checking for inet_aton in -lc... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009740if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742else
9743 ac_check_lib_save_LIBS=$LIBS
9744LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748/* Override any GCC internal prototype to avoid an error.
9749 Use char because int might match the return type of a GCC
9750 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009751#ifdef __cplusplus
9752extern "C"
9753#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009755int
9756main ()
9757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009759 ;
9760 return 0;
9761}
9762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009764 ac_cv_lib_c_inet_aton=yes
9765else
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009768rm -f core conftest.err conftest.$ac_objext \
9769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770LIBS=$ac_check_lib_save_LIBS
9771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9773$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009774if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009775 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9778$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009779if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009781else
9782 ac_check_lib_save_LIBS=$LIBS
9783LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787/* Override any GCC internal prototype to avoid an error.
9788 Use char because int might match the return type of a GCC
9789 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009790#ifdef __cplusplus
9791extern "C"
9792#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009794int
9795main ()
9796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798 ;
9799 return 0;
9800}
9801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009803 ac_cv_lib_resolv_inet_aton=yes
9804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009807rm -f core conftest.err conftest.$ac_objext \
9808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809LIBS=$ac_check_lib_save_LIBS
9810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9812$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009813if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009814 cat >>confdefs.h <<_ACEOF
9815#define HAVE_LIBRESOLV 1
9816_ACEOF
9817
9818 LIBS="-lresolv $LIBS"
9819
9820fi
9821
9822
9823fi
9824
9825
Christian Heimesd0764e22007-12-04 15:00:33 +00009826# On Tru64, chflags seems to be present, but calling it will
9827# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9829$as_echo_n "checking for chflags... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009830if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009832else
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009834 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009835else
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009837/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009838[
Christian Heimesd0764e22007-12-04 15:00:33 +00009839#include <sys/stat.h>
9840#include <unistd.h>
9841int main(int argc, char*argv[])
9842{
9843 if(chflags(argv[0], 0) != 0)
9844 return 1;
9845 return 0;
9846}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009847]
Christian Heimesd0764e22007-12-04 15:00:33 +00009848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009849if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009850 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009851else
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009856fi
9857
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009858
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9861$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009862if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Georg Brandl941f9562011-02-25 15:21:47 +00009864if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009865 ac_cv_have_chflags="yes"
9866else
9867 ac_cv_have_chflags="no"
9868fi
9869
9870fi
9871if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009872
Matthias Kloseb9621712010-04-24 17:59:49 +00009873$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009874
9875fi
9876
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9878$as_echo_n "checking for lchflags... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009879if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009881else
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009883 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009886/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009887[
Christian Heimesd0764e22007-12-04 15:00:33 +00009888#include <sys/stat.h>
9889#include <unistd.h>
9890int main(int argc, char*argv[])
9891{
9892 if(lchflags(argv[0], 0) != 0)
9893 return 1;
9894 return 0;
9895}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009896]
Christian Heimesd0764e22007-12-04 15:00:33 +00009897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009898if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009899 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009900else
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009905fi
9906
9907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9910$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009911if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Georg Brandl941f9562011-02-25 15:21:47 +00009913if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009914 ac_cv_have_lchflags="yes"
9915else
9916 ac_cv_have_lchflags="no"
9917fi
9918
9919fi
9920if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009921
Matthias Kloseb9621712010-04-24 17:59:49 +00009922$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009923
9924fi
9925
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009926case $ac_sys_system/$ac_sys_release in
9927Darwin/*)
9928 _CUR_CFLAGS="${CFLAGS}"
9929 _CUR_LDFLAGS="${LDFLAGS}"
9930 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9931 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9932 ;;
9933esac
9934
Matthias Kloseb9621712010-04-24 17:59:49 +00009935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9936$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009937if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009939else
9940 ac_check_lib_save_LIBS=$LIBS
9941LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009943/* end confdefs.h. */
9944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945/* Override any GCC internal prototype to avoid an error.
9946 Use char because int might match the return type of a GCC
9947 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009948#ifdef __cplusplus
9949extern "C"
9950#endif
9951char inflateCopy ();
9952int
9953main ()
9954{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009956 ;
9957 return 0;
9958}
9959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009960if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009961 ac_cv_lib_z_inflateCopy=yes
9962else
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009965rm -f core conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009967LIBS=$ac_check_lib_save_LIBS
9968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9970$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +00009971if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009974
9975fi
9976
9977
9978case $ac_sys_system/$ac_sys_release in
9979Darwin/*)
9980 CFLAGS="${_CUR_CFLAGS}"
9981 LDFLAGS="${_CUR_LDFLAGS}"
9982 ;;
9983esac
9984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9986$as_echo_n "checking for hstrerror... " >&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öwise9416172003-05-03 10:12:45 +00009990#include <netdb.h>
9991
Martin v. Löwise9416172003-05-03 10:12:45 +00009992int
9993main ()
9994{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009995void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009996 ;
9997 return 0;
9998}
9999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010001
Matthias Kloseb9621712010-04-24 17:59:49 +000010002$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010003
Matthias Kloseb159a552010-04-25 21:00:44 +000010004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010005$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010006else
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010009
10010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011rm -f core conftest.err conftest.$ac_objext \
10012 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10015$as_echo_n "checking for inet_aton... " >&6; }
10016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010017/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010018
Martin v. Löwis86d66262006-02-17 08:40:11 +000010019#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010020#include <sys/socket.h>
10021#include <netinet/in.h>
10022#include <arpa/inet.h>
10023
Martin v. Löwise9416172003-05-03 10:12:45 +000010024int
10025main ()
10026{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010027void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010028 ;
10029 return 0;
10030}
10031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010035
Matthias Kloseb159a552010-04-25 21:00:44 +000010036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010037$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010038else
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010041
10042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010043rm -f core conftest.err conftest.$ac_objext \
10044 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10047$as_echo_n "checking for inet_pton... " >&6; }
10048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010049/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010050
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010051#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010052#include <sys/socket.h>
10053#include <netinet/in.h>
10054#include <arpa/inet.h>
10055
Martin v. Löwise9416172003-05-03 10:12:45 +000010056int
10057main ()
10058{
10059void* p = inet_pton
10060 ;
10061 return 0;
10062}
10063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010065
Matthias Kloseb9621712010-04-24 17:59:49 +000010066$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010067
Matthias Kloseb159a552010-04-25 21:00:44 +000010068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010069$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010070else
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010073
10074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010076
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010077# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10079$as_echo_n "checking for setgroups... " >&6; }
10080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010081/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010082
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010083#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010084#ifdef HAVE_GRP_H
10085#include <grp.h>
10086#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010087
Martin v. Löwisd5843682002-11-21 20:41:28 +000010088int
10089main ()
10090{
10091void* p = setgroups
10092 ;
10093 return 0;
10094}
10095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010099
Matthias Kloseb159a552010-04-25 21:00:44 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010101$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010102else
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010105
10106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010108
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010109# check for openpty and forkpty
10110
10111for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010112do :
10113 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Georg Brandl941f9562011-02-25 15:21:47 +000010114if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010116#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010117_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010118
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10121$as_echo_n "checking for openpty in -lutil... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010122if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010124else
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010126LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130/* Override any GCC internal prototype to avoid an error.
10131 Use char because int might match the return type of a GCC
10132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133#ifdef __cplusplus
10134extern "C"
10135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010136char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010137int
10138main ()
10139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ;
10142 return 0;
10143}
10144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010147else
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010150rm -f core conftest.err conftest.$ac_objext \
10151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010152LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10155$as_echo "$ac_cv_lib_util_openpty" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010156if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010158 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10161$as_echo_n "checking for openpty in -lbsd... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010162if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010164else
10165 ac_check_lib_save_LIBS=$LIBS
10166LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010168/* end confdefs.h. */
10169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170/* Override any GCC internal prototype to avoid an error.
10171 Use char because int might match the return type of a GCC
10172 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010173#ifdef __cplusplus
10174extern "C"
10175#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010176char openpty ();
10177int
10178main ()
10179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010181 ;
10182 return 0;
10183}
10184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010186 ac_cv_lib_bsd_openpty=yes
10187else
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010190rm -f core conftest.err conftest.$ac_objext \
10191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010192LIBS=$ac_check_lib_save_LIBS
10193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10195$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010196if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010198 LIBS="$LIBS -lbsd"
10199fi
10200
10201
10202fi
10203
Fred Drake8cef4cf2000-06-28 16:40:38 +000010204
10205fi
10206done
10207
10208for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010209do :
10210 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Georg Brandl941f9562011-02-25 15:21:47 +000010211if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010213#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010214_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010215
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216else
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10218$as_echo_n "checking for forkpty in -lutil... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010219if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010221else
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010223LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227/* Override any GCC internal prototype to avoid an error.
10228 Use char because int might match the return type of a GCC
10229 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010230#ifdef __cplusplus
10231extern "C"
10232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010233char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010234int
10235main ()
10236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 ;
10239 return 0;
10240}
10241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010242if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010244else
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247rm -f core conftest.err conftest.$ac_objext \
10248 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010249LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10252$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010253if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010255 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010256else
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10258$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010259if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010261else
10262 ac_check_lib_save_LIBS=$LIBS
10263LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265/* end confdefs.h. */
10266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267/* Override any GCC internal prototype to avoid an error.
10268 Use char because int might match the return type of a GCC
10269 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010270#ifdef __cplusplus
10271extern "C"
10272#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273char forkpty ();
10274int
10275main ()
10276{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010278 ;
10279 return 0;
10280}
10281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010283 ac_cv_lib_bsd_forkpty=yes
10284else
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287rm -f core conftest.err conftest.$ac_objext \
10288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010289LIBS=$ac_check_lib_save_LIBS
10290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10292$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010293if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010295 LIBS="$LIBS -lbsd"
10296fi
10297
10298
10299fi
10300
Fred Drake8cef4cf2000-06-28 16:40:38 +000010301
10302fi
10303done
10304
Jack Jansendd19cf82001-12-06 22:36:17 +000010305
Christian Heimesb186d002008-03-18 15:15:01 +000010306# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010307for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010308do :
10309 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Georg Brandl941f9562011-02-25 15:21:47 +000010310if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010311 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010312#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010313_ACEOF
10314
10315fi
10316done
10317
10318
Michael W. Hudson54241132001-12-07 15:38:26 +000010319# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010320for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010321do :
10322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10323ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl941f9562011-02-25 15:21:47 +000010324if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010327_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010329fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010330done
10331
Michael W. Hudson54241132001-12-07 15:38:26 +000010332
Georg Brandl941f9562011-02-25 15:21:47 +000010333ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10334if test "x$ac_cv_func_dup2" = xyes; then :
10335 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010336
Martin v. Löwis1142de32002-03-29 16:28:31 +000010337else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338 case " $LIBOBJS " in
Georg Brandl941f9562011-02-25 15:21:47 +000010339 *" dup2.$ac_objext "* ) ;;
10340 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010342esac
10343
Martin v. Löwis1142de32002-03-29 16:28:31 +000010344fi
Georg Brandl941f9562011-02-25 15:21:47 +000010345
10346ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10347if test "x$ac_cv_func_getcwd" = xyes; then :
10348 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10349
10350else
10351 case " $LIBOBJS " in
10352 *" getcwd.$ac_objext "* ) ;;
10353 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10354 ;;
10355esac
10356
10357fi
10358
10359ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10360if test "x$ac_cv_func_strdup" = xyes; then :
10361 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10362
10363else
10364 case " $LIBOBJS " in
10365 *" strdup.$ac_objext "* ) ;;
10366 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10367 ;;
10368esac
10369
10370fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010371
10372
10373for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010374do :
10375 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Georg Brandl941f9562011-02-25 15:21:47 +000010376if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010378#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010381/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010382#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010383int
10384main ()
10385{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010386getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 ;
10388 return 0;
10389}
10390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010394
Guido van Rossum627b2d71993-12-24 10:39:16 +000010395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010397
Guido van Rossum627b2d71993-12-24 10:39:16 +000010398fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010399done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010400
Jack Jansen150753c2003-03-29 22:07:47 +000010401for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010402do :
10403 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Georg Brandl941f9562011-02-25 15:21:47 +000010404if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010405 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010406#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010409/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010410#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010411int
10412main ()
10413{
10414setpgrp(0,0);
10415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010422
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010425
10426fi
10427done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010428
Thomas Wouters3a584202000-08-05 23:28:51 +000010429for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010430do :
10431 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Georg Brandl941f9562011-02-25 15:21:47 +000010432if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010434#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010437/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010438#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010439int
10440main ()
10441{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010442gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ;
10444 return 0;
10445}
10446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010447if ac_fn_c_try_compile "$LINENO"; then :
10448
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449else
Skip Montanaro6dead952003-09-25 14:50:04 +000010450
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010452
Martin v. Löwis11437992002-04-12 09:54:03 +000010453
Guido van Rossum627b2d71993-12-24 10:39:16 +000010454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010456
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010457fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010458done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010459
Michael W. Hudson54241132001-12-07 15:38:26 +000010460
Matthias Kloseb9621712010-04-24 17:59:49 +000010461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10462$as_echo_n "checking for major... " >&6; }
10463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010464/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010465
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010466#if defined(MAJOR_IN_MKDEV)
10467#include <sys/mkdev.h>
10468#elif defined(MAJOR_IN_SYSMACROS)
10469#include <sys/sysmacros.h>
10470#else
10471#include <sys/types.h>
10472#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010473
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010474int
10475main ()
10476{
10477
10478 makedev(major(0),minor(0));
10479
10480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010485
10486
Matthias Kloseb9621712010-04-24 17:59:49 +000010487$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010488
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10490$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010491
10492else
Skip Montanaro6dead952003-09-25 14:50:04 +000010493
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10495$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010496
10497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010498rm -f core conftest.err conftest.$ac_objext \
10499 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010500
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010501# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010502# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10504$as_echo_n "checking for getaddrinfo... " >&6; }
10505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010507
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010508#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010509#include <sys/socket.h>
10510#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010511#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010512
Martin v. Löwis11437992002-04-12 09:54:03 +000010513int
10514main ()
10515{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010516getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 ;
10518 return 0;
10519}
10520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010521if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010522 have_getaddrinfo=yes
10523else
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010526rm -f core conftest.err conftest.$ac_objext \
10527 conftest$ac_exeext conftest.$ac_ext
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10529$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010530if test $have_getaddrinfo = yes
10531then
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10533$as_echo_n "checking getaddrinfo bug... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010534 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010536else
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010538 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010539else
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010541/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010542
10543#include <sys/types.h>
10544#include <netdb.h>
10545#include <string.h>
10546#include <sys/socket.h>
10547#include <netinet/in.h>
10548
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010549int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010550{
10551 int passive, gaierr, inet4 = 0, inet6 = 0;
10552 struct addrinfo hints, *ai, *aitop;
10553 char straddr[INET6_ADDRSTRLEN], strport[16];
10554
10555 for (passive = 0; passive <= 1; passive++) {
10556 memset(&hints, 0, sizeof(hints));
10557 hints.ai_family = AF_UNSPEC;
10558 hints.ai_flags = passive ? AI_PASSIVE : 0;
10559 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010560 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010561 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10562 (void)gai_strerror(gaierr);
10563 goto bad;
10564 }
10565 for (ai = aitop; ai; ai = ai->ai_next) {
10566 if (ai->ai_addr == NULL ||
10567 ai->ai_addrlen == 0 ||
10568 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10569 straddr, sizeof(straddr), strport, sizeof(strport),
10570 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10571 goto bad;
10572 }
10573 switch (ai->ai_family) {
10574 case AF_INET:
10575 if (strcmp(strport, "54321") != 0) {
10576 goto bad;
10577 }
10578 if (passive) {
10579 if (strcmp(straddr, "0.0.0.0") != 0) {
10580 goto bad;
10581 }
10582 } else {
10583 if (strcmp(straddr, "127.0.0.1") != 0) {
10584 goto bad;
10585 }
10586 }
10587 inet4++;
10588 break;
10589 case AF_INET6:
10590 if (strcmp(strport, "54321") != 0) {
10591 goto bad;
10592 }
10593 if (passive) {
10594 if (strcmp(straddr, "::") != 0) {
10595 goto bad;
10596 }
10597 } else {
10598 if (strcmp(straddr, "::1") != 0) {
10599 goto bad;
10600 }
10601 }
10602 inet6++;
10603 break;
10604 case AF_UNSPEC:
10605 goto bad;
10606 break;
10607 default:
10608 /* another family support? */
10609 break;
10610 }
10611 }
10612 }
10613
10614 if (!(inet4 == 0 || inet4 == 2))
10615 goto bad;
10616 if (!(inet6 == 0 || inet6 == 2))
10617 goto bad;
10618
10619 if (aitop)
10620 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010621 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010622
10623 bad:
10624 if (aitop)
10625 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010626 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010627}
10628
Martin v. Löwis11437992002-04-12 09:54:03 +000010629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010630if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010631 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010632else
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010639fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010640
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10644$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10645
Mark Dickinson2df5d282009-12-31 21:22:50 +000010646if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010647then
10648 if test $ipv6 = yes
10649 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010650 echo 'Fatal: You must get working getaddrinfo() function.'
10651 echo ' or you can specify "--disable-ipv6"'.
10652 exit 1
10653 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010654else
Martin v. Löwis11437992002-04-12 09:54:03 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010657
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010658fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010659
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010660for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010661do :
10662 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Georg Brandl941f9562011-02-25 15:21:47 +000010663if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010666_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010667
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010668fi
10669done
10670
Michael W. Hudson54241132001-12-07 15:38:26 +000010671
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010672# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10674$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010675if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680#include <sys/types.h>
10681#include <sys/time.h>
10682#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010683
Martin v. Löwis11437992002-04-12 09:54:03 +000010684int
10685main ()
10686{
10687if ((struct tm *) 0)
10688return 0;
10689 ;
10690 return 0;
10691}
10692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010693if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010694 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010695else
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10701$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010702if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010703
Matthias Kloseb9621712010-04-24 17:59:49 +000010704$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010705
10706fi
10707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10709$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010710if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712else
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010714/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010715#include <sys/types.h>
10716#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Martin v. Löwis11437992002-04-12 09:54:03 +000010718int
10719main ()
10720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721struct tm tm;
10722 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 ;
10725 return 0;
10726}
10727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010728if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729 ac_cv_struct_tm=time.h
10730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10736$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010737if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740
10741fi
10742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743ac_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 +000010744#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746"
Georg Brandl941f9562011-02-25 15:21:47 +000010747if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
10749cat >>confdefs.h <<_ACEOF
10750#define HAVE_STRUCT_TM_TM_ZONE 1
10751_ACEOF
10752
10753
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010755
Martin v. Löwis11437992002-04-12 09:54:03 +000010756if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010759
10760else
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10762"
Georg Brandl941f9562011-02-25 15:21:47 +000010763if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767fi
10768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010770#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771_ACEOF
10772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10774$as_echo_n "checking for tzname... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010775if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777else
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010780#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781#if !HAVE_DECL_TZNAME
10782extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Martin v. Löwis11437992002-04-12 09:54:03 +000010785int
10786main ()
10787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 ;
10790 return 0;
10791}
10792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010793if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010794 ac_cv_var_tzname=yes
10795else
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010798rm -f core conftest.err conftest.$ac_objext \
10799 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10802$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010803 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010806
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807 fi
10808fi
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +000010811if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010812
10813cat >>confdefs.h <<_ACEOF
10814#define HAVE_STRUCT_STAT_ST_RDEV 1
10815_ACEOF
10816
10817
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010818fi
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +000010821if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010822
Martin v. Löwis11437992002-04-12 09:54:03 +000010823cat >>confdefs.h <<_ACEOF
10824#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10825_ACEOF
10826
10827
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010828fi
10829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +000010831if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010832
10833cat >>confdefs.h <<_ACEOF
10834#define HAVE_STRUCT_STAT_ST_FLAGS 1
10835_ACEOF
10836
10837
10838fi
10839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +000010841if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010842
10843cat >>confdefs.h <<_ACEOF
10844#define HAVE_STRUCT_STAT_ST_GEN 1
10845_ACEOF
10846
10847
10848fi
10849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +000010851if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010852
10853cat >>confdefs.h <<_ACEOF
10854#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10855_ACEOF
10856
10857
10858fi
10859
Matthias Kloseb9621712010-04-24 17:59:49 +000010860ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +000010861if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010862
Martin v. Löwis11437992002-04-12 09:54:03 +000010863cat >>confdefs.h <<_ACEOF
10864#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10865_ACEOF
10866
10867
Matthias Kloseb9621712010-04-24 17:59:49 +000010868$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010869
10870else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010872 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10874 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010875esac
10876
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010877fi
10878
Michael W. Hudson54241132001-12-07 15:38:26 +000010879
Martin v. Löwis11437992002-04-12 09:54:03 +000010880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10882$as_echo_n "checking for time.h that defines altzone... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010883if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010885else
Matthias Kloseb159a552010-04-25 21:00:44 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010888/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010889#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010890int
10891main ()
10892{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010893return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010894 ;
10895 return 0;
10896}
10897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010898if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010899 ac_cv_header_time_altzone=yes
10900else
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905fi
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10908$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010909if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010912
10913fi
10914
Guido van Rossumda88dad1995-01-26 00:46:29 +000010915was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10917$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010919/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010920
10921#include <sys/types.h>
10922#include <sys/select.h>
10923#include <sys/time.h>
10924
Martin v. Löwis11437992002-04-12 09:54:03 +000010925int
10926main ()
10927{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010928;
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 ;
10930 return 0;
10931}
10932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010933if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010934
10935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010937
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010938 was_it_defined=yes
10939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10943$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10946$as_echo_n "checking for addrinfo... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010947if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010949else
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010951/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010952#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010953int
10954main ()
10955{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010956struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 ;
10958 return 0;
10959}
10960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010961if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010962 ac_cv_struct_addrinfo=yes
10963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10967fi
10968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10970$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010971if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010974
10975fi
10976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10978$as_echo_n "checking for sockaddr_storage... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000010979if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010981else
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010983/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010984
10985# include <sys/types.h>
10986# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010987int
10988main ()
10989{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010990struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 ;
10992 return 0;
10993}
10994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010996 ac_cv_struct_sockaddr_storage=yes
10997else
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11001fi
11002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11004$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011005if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011008
11009fi
11010
Guido van Rossum627b2d71993-12-24 10:39:16 +000011011# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11014$as_echo_n "checking whether char is unsigned... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011015if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011017else
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011020$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011021int
11022main ()
11023{
11024static int test_array [1 - 2 * !(((char) -1) < 0)];
11025test_array [0] = 0
11026
11027 ;
11028 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011029}
Martin v. Löwis11437992002-04-12 09:54:03 +000011030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011031if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011032 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011033else
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11039$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011042
11043fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011044
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11046$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011047if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011049else
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
11056/* FIXME: Include the comments suggested by Paul. */
11057#ifndef __cplusplus
11058 /* Ultrix mips cc rejects this. */
11059 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011060 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062 char const *const *pcpcc;
11063 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 /* NEC SVR4.0.2 mips cc rejects this. */
11065 struct point {int x, y;};
11066 static struct point const zero = {0,0};
11067 /* AIX XL C 1.02.0.0 rejects this.
11068 It does not let you subtract one const X* pointer from another in
11069 an arm of an if-expression whose if-part is not a constant
11070 expression */
11071 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011072 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074 ++pcpcc;
11075 ppc = (char**) pcpcc;
11076 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 { /* SCO 3.2v4 cc rejects this. */
11078 char *t;
11079 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011080
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 }
11084 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11085 int x[] = {25, 17};
11086 const int *foo = &x[0];
11087 ++foo;
11088 }
11089 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11090 typedef const int *iptr;
11091 iptr p = 0;
11092 ++p;
11093 }
11094 { /* AIX XL C 1.02.0.0 rejects this saying
11095 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11096 struct s { int j; const int *ap[3]; };
11097 struct s *b; b->j = 5;
11098 }
11099 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11100 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011104#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011105
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 ;
11107 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011108}
Martin v. Löwis11437992002-04-12 09:54:03 +000011109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111 ac_cv_c_const=yes
11112else
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11118$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011122
11123fi
11124
Michael W. Hudson54241132001-12-07 15:38:26 +000011125
Guido van Rossumda88dad1995-01-26 00:46:29 +000011126works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11128$as_echo_n "checking for working volatile... " >&6; }
11129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011131
Martin v. Löwis11437992002-04-12 09:54:03 +000011132int
11133main ()
11134{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011135volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ;
11137 return 0;
11138}
11139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011140if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011141 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011142else
Skip Montanaro6dead952003-09-25 14:50:04 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011145
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011146
Guido van Rossum627b2d71993-12-24 10:39:16 +000011147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11150$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011151
Guido van Rossumda88dad1995-01-26 00:46:29 +000011152works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11154$as_echo_n "checking for working signed char... " >&6; }
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011156/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011157
Martin v. Löwis11437992002-04-12 09:54:03 +000011158int
11159main ()
11160{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 ;
11163 return 0;
11164}
11165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011166if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011167 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011168else
Skip Montanaro6dead952003-09-25 14:50:04 +000011169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011171
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011172
Guido van Rossum7f43da71994-08-01 12:15:30 +000011173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11176$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011177
Guido van Rossumda88dad1995-01-26 00:46:29 +000011178have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11180$as_echo_n "checking for prototypes... " >&6; }
11181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011182/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011183int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011184int
11185main ()
11186{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 ;
11189 return 0;
11190}
11191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011193
Matthias Kloseb9621712010-04-24 17:59:49 +000011194$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
Matthias Kloseb159a552010-04-25 21:00:44 +000011196 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11200$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011201
Guido van Rossumda88dad1995-01-26 00:46:29 +000011202works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11204$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011207
11208#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011209int foo(int x, ...) {
11210 va_list va;
11211 va_start(va, x);
11212 va_arg(va, int);
11213 va_arg(va, char *);
11214 va_arg(va, double);
11215 return 0;
11216}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011217
Martin v. Löwis11437992002-04-12 09:54:03 +000011218int
11219main ()
11220{
Guido van Rossum90eea071996-08-30 20:58:57 +000011221return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 ;
11223 return 0;
11224}
11225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011226if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011227
11228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011230
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011231 works=yes
11232
Guido van Rossum627b2d71993-12-24 10:39:16 +000011233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11236$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011237
Martin v. Löwisd6320502004-08-12 13:45:08 +000011238# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11240$as_echo_n "checking for socketpair... " >&6; }
11241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011242/* end confdefs.h. */
11243
11244#include <sys/types.h>
11245#include <sys/socket.h>
11246
11247int
11248main ()
11249{
11250void *x=socketpair
11251 ;
11252 return 0;
11253}
11254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011258
Matthias Kloseb159a552010-04-25 21:00:44 +000011259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011261else
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011264
11265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011267
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011268# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11270$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011272/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011273#include <sys/types.h>
11274#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011275int
11276main ()
11277{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011278struct sockaddr x;
11279x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 ;
11281 return 0;
11282}
11283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011284if ac_fn_c_try_compile "$LINENO"; then :
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11286$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011289
11290else
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11292$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011293
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011296
Guido van Rossumda88dad1995-01-26 00:46:29 +000011297va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11299$as_echo_n "checking whether va_list is an array... " >&6; }
11300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011301/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302
11303#ifdef HAVE_STDARG_PROTOTYPES
11304#include <stdarg.h>
11305#else
11306#include <varargs.h>
11307#endif
11308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309int
11310main ()
11311{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ;
11314 return 0;
11315}
11316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011317if ac_fn_c_try_compile "$LINENO"; then :
11318
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319else
Skip Montanaro6dead952003-09-25 14:50:04 +000011320
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Guido van Rossumda88dad1995-01-26 00:46:29 +000011324 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011325
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11329$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011330
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011331# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
11333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Georg Brandl941f9562011-02-25 15:21:47 +000011335if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011336
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11340$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011341 OLD_CFLAGS=$CFLAGS
11342 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011344/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011345
11346# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011347
Martin v. Löwis11437992002-04-12 09:54:03 +000011348int
11349main ()
11350{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011351
11352 char *name;
11353 struct hostent *he, *res;
11354 char buffer[2048];
11355 int buflen = 2048;
11356 int h_errnop;
11357
11358 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011359
11360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011367
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11372$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011373
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011374else
Skip Montanaro6dead952003-09-25 14:50:04 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377$as_echo "no" >&6; }
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11379$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011381/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011382
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011383# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011384
Martin v. Löwis11437992002-04-12 09:54:03 +000011385int
11386main ()
11387{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011388
11389 char *name;
11390 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011391 char buffer[2048];
11392 int buflen = 2048;
11393 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011394
Matthias Kloseb159a552010-04-25 21:00:44 +000011395 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
11397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011404
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Matthias Kloseb159a552010-04-25 21:00:44 +000011406$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11409$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011411else
Skip Montanaro6dead952003-09-25 14:50:04 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11416$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418/* end confdefs.h. */
11419
11420# include <netdb.h>
11421
11422int
11423main ()
11424{
11425
11426 char *name;
11427 struct hostent *he;
11428 struct hostent_data data;
11429
11430 (void) gethostbyname_r(name, he, &data);
11431
11432 ;
11433 return 0;
11434}
11435_ACEOF
11436if ac_fn_c_try_compile "$LINENO"; then :
11437
11438 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11439
11440
11441$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11442
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11444$as_echo "yes" >&6; }
11445
11446else
11447
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11449$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011450
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011456
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459 CFLAGS=$OLD_CFLAGS
11460
11461else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011462
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 for ac_func in gethostbyname
11464do :
11465 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Georg Brandl941f9562011-02-25 15:21:47 +000011466if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011469_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011470
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011471fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011472done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011473
Michael W. Hudson54241132001-12-07 15:38:26 +000011474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011475fi
11476
Michael W. Hudson54241132001-12-07 15:38:26 +000011477
11478
11479
11480
11481
11482
Guido van Rossum627b2d71993-12-24 10:39:16 +000011483# checks for system services
11484# (none yet)
11485
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011486# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011487ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Georg Brandl941f9562011-02-25 15:21:47 +000011488if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011489
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11492$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011493if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011494 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011495else
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011497LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501/* Override any GCC internal prototype to avoid an error.
11502 Use char because int might match the return type of a GCC
11503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011504#ifdef __cplusplus
11505extern "C"
11506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011507char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011508int
11509main ()
11510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011518else
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011521rm -f core conftest.err conftest.$ac_objext \
11522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11526$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011527if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 cat >>confdefs.h <<_ACEOF
11529#define HAVE_LIBIEEE 1
11530_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011531
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011532 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011533
Guido van Rossum627b2d71993-12-24 10:39:16 +000011534fi
11535
Michael W. Hudson54241132001-12-07 15:38:26 +000011536
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011537fi
11538
Michael W. Hudson54241132001-12-07 15:38:26 +000011539
Guido van Rossum7f253911997-05-09 02:42:48 +000011540# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11542$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011545if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011547if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011548then
11549
Matthias Kloseb9621712010-04-24 17:59:49 +000011550$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11553$as_echo "yes" >&6; }
11554else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11555$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011556fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011557else
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11559$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560fi
11561
Guido van Rossum7f253911997-05-09 02:42:48 +000011562
Guido van Rossum7f43da71994-08-01 12:15:30 +000011563# check for --with-libm=...
11564
Guido van Rossum563e7081996-09-10 18:20:48 +000011565case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011566Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011567*) LIBM=-lm
11568esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11570$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011573if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011575if test "$withval" = no
11576then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11578$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011579elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011580then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11582$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011583else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011584fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11587$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588fi
11589
Guido van Rossum7f43da71994-08-01 12:15:30 +000011590
11591# check for --with-libc=...
11592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11594$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011599if test "$withval" = no
11600then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11602$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011603elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011604then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11606$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011607else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011608fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11611$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612fi
11613
Guido van Rossum7f43da71994-08-01 12:15:30 +000011614
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011615# **************************************************
11616# * Check for various properties of floating point *
11617# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11620$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011621if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011623else
11624
Matthias Kloseb9621712010-04-24 17:59:49 +000011625if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626 ac_cv_little_endian_double=no
11627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629/* end confdefs.h. */
11630
11631#include <string.h>
11632int main() {
11633 double x = 9006104071832581.0;
11634 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11635 return 0;
11636 else
11637 return 1;
11638}
11639
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642 ac_cv_little_endian_double=yes
11643else
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011648fi
11649
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650fi
11651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11653$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654if test "$ac_cv_little_endian_double" = yes
11655then
11656
Matthias Kloseb9621712010-04-24 17:59:49 +000011657$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011658
11659fi
11660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11662$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011663if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665else
11666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668 ac_cv_big_endian_double=no
11669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671/* end confdefs.h. */
11672
11673#include <string.h>
11674int main() {
11675 double x = 9006104071832581.0;
11676 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11677 return 0;
11678 else
11679 return 1;
11680}
11681
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684 ac_cv_big_endian_double=yes
11685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011690fi
11691
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692fi
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11695$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011696if test "$ac_cv_big_endian_double" = yes
11697then
11698
Matthias Kloseb9621712010-04-24 17:59:49 +000011699$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700
11701fi
11702
11703# Some ARM platforms use a mixed-endian representation for doubles.
11704# While Python doesn't currently have full support for these platforms
11705# (see e.g., issue 1762561), we can at least make sure that float <-> string
11706# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11708$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011709if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711else
11712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011714 ac_cv_mixed_endian_double=no
11715else
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011717/* end confdefs.h. */
11718
11719#include <string.h>
11720int main() {
11721 double x = 9006104071832581.0;
11722 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11723 return 0;
11724 else
11725 return 1;
11726}
11727
11728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011729if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011730 ac_cv_mixed_endian_double=yes
11731else
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736fi
11737
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738fi
11739
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11741$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742if test "$ac_cv_mixed_endian_double" = yes
11743then
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746
11747fi
11748
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011749# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011750# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011751# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011752# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011753# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011754# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011755
11756# This inline assembler syntax may also work for suncc and icc,
11757# so we try it on all platforms.
11758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11760$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011762/* end confdefs.h. */
11763
11764int
11765main ()
11766{
11767
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011768 unsigned short cw;
11769 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11770 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771
11772 ;
11773 return 0;
11774}
11775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011776if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777 have_gcc_asm_for_x87=yes
11778else
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11783$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011784if test "$have_gcc_asm_for_x87" = yes
11785then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786
Matthias Kloseb9621712010-04-24 17:59:49 +000011787$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011789fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011791# Detect whether system arithmetic is subject to x87-style double
11792# rounding issues. The result of this test has little meaning on non
11793# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11794# mode is round-to-nearest and double rounding issues are present, and
11795# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11797$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011798# $BASECFLAGS may affect the result
11799ac_save_cc="$CC"
11800CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011801if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011802 ac_cv_x87_double_rounding=no
11803else
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011805/* end confdefs.h. */
11806
11807#include <stdlib.h>
11808#include <math.h>
11809int main() {
11810 volatile double x, y, z;
11811 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11812 x = 0.99999999999999989; /* 1-2**-53 */
11813 y = 1./x;
11814 if (y != 1.)
11815 exit(0);
11816 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11817 x = 1e16;
11818 y = 2.99999;
11819 z = x + y;
11820 if (z != 1e16+4.)
11821 exit(0);
11822 /* both tests show evidence of double rounding */
11823 exit(1);
11824}
11825
11826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011828 ac_cv_x87_double_rounding=no
11829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011834fi
11835
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011836CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11838$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011839if test "$ac_cv_x87_double_rounding" = yes
11840then
11841
Matthias Kloseb9621712010-04-24 17:59:49 +000011842$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011843
11844fi
11845
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846# ************************************
11847# * Check for mathematical functions *
11848# ************************************
11849
11850LIBS_SAVE=$LIBS
11851LIBS="$LIBS $LIBM"
11852
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011853for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11854do :
11855 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11856ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl941f9562011-02-25 15:21:47 +000011857if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011858 cat >>confdefs.h <<_ACEOF
11859#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11860_ACEOF
11861
11862fi
11863done
11864
11865for ac_func in hypot lgamma log1p round tgamma
11866do :
11867 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11868ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl941f9562011-02-25 15:21:47 +000011869if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011870 cat >>confdefs.h <<_ACEOF
11871#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11872_ACEOF
11873
11874fi
11875done
11876
11877ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11878"
Georg Brandl941f9562011-02-25 15:21:47 +000011879if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011880 ac_have_decl=1
11881else
11882 ac_have_decl=0
11883fi
11884
11885cat >>confdefs.h <<_ACEOF
11886#define HAVE_DECL_ISINF $ac_have_decl
11887_ACEOF
11888ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11889"
Georg Brandl941f9562011-02-25 15:21:47 +000011890if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011891 ac_have_decl=1
11892else
11893 ac_have_decl=0
11894fi
11895
11896cat >>confdefs.h <<_ACEOF
11897#define HAVE_DECL_ISNAN $ac_have_decl
11898_ACEOF
11899ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11900"
Georg Brandl941f9562011-02-25 15:21:47 +000011901if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011902 ac_have_decl=1
11903else
11904 ac_have_decl=0
11905fi
11906
11907cat >>confdefs.h <<_ACEOF
11908#define HAVE_DECL_ISFINITE $ac_have_decl
11909_ACEOF
11910
11911
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011912# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11913# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11915$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011916if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011918else
11919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011921 ac_cv_tanh_preserves_zero_sign=no
11922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011924/* end confdefs.h. */
11925
11926#include <math.h>
11927#include <stdlib.h>
11928int main() {
11929 /* return 0 if either negative zeros don't exist
11930 on this platform or if negative zeros exist
11931 and tanh(-0.) == -0. */
11932 if (atan2(0., -1.) == atan2(-0., -1.) ||
11933 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11934 else exit(1);
11935}
11936
11937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011938if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011939 ac_cv_tanh_preserves_zero_sign=yes
11940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011945fi
11946
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011947fi
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11950$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011951if test "$ac_cv_tanh_preserves_zero_sign" = yes
11952then
11953
Matthias Kloseb9621712010-04-24 17:59:49 +000011954$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011955
11956fi
11957
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011958if test "$ac_cv_func_log1p" = yes
11959then
11960 # On some versions of AIX, log1p(-0.) returns 0. instead of
11961 # -0. See issue #9920.
11962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11963$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000011964 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011965 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011966else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011967
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011968 if test "$cross_compiling" = yes; then :
11969 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011970else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11972/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011973
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011974 #include <math.h>
11975 #include <stdlib.h>
11976 int main() {
11977 /* Fail if the signs of log1p(-0.) and -0. can be
11978 distinguished. */
11979 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11980 return 0;
11981 else
11982 return 1;
11983 }
11984
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011985_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011986if ac_fn_c_try_run "$LINENO"; then :
11987 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011988else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011989 ac_cv_log1p_drops_zero_sign=yes
11990fi
11991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011993fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011994
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011995fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011996
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11998$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11999fi
12000if test "$ac_cv_log1p_drops_zero_sign" = yes
12001then
12002
12003$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12004
12005fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012006
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012007LIBS=$LIBS_SAVE
12008
Mark Dickinsona614f042009-11-28 12:48:43 +000012009# For multiprocessing module, check that sem_open
12010# actually works. For FreeBSD versions <= 7.2,
12011# the kernel module that provides POSIX semaphores
12012# isn't loaded by default, so an attempt to call
12013# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12015$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012016if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012018else
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012020 ac_cv_posix_semaphores_enabled=yes
12021else
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012023/* end confdefs.h. */
12024
12025#include <unistd.h>
12026#include <fcntl.h>
12027#include <stdio.h>
12028#include <semaphore.h>
12029#include <sys/stat.h>
12030
12031int main(void) {
12032 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12033 if (a == SEM_FAILED) {
12034 perror("sem_open");
12035 return 1;
12036 }
12037 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012038 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012039 return 0;
12040}
12041
12042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012044 ac_cv_posix_semaphores_enabled=yes
12045else
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012050fi
12051
12052
Mark Dickinsona614f042009-11-28 12:48:43 +000012053fi
12054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12056$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012057if test $ac_cv_posix_semaphores_enabled = no
12058then
12059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012061
12062fi
12063
Mark Dickinson10683072009-04-18 21:18:19 +000012064# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12066$as_echo_n "checking for broken sem_getvalue... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012067if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012071 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012074/* end confdefs.h. */
12075
12076#include <unistd.h>
12077#include <fcntl.h>
12078#include <stdio.h>
12079#include <semaphore.h>
12080#include <sys/stat.h>
12081
12082int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012083 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012084 int count;
12085 int res;
12086 if(a==SEM_FAILED){
12087 perror("sem_open");
12088 return 1;
12089
12090 }
12091 res = sem_getvalue(a, &count);
12092 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012093 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012094 return res==-1 ? 1 : 0;
12095}
12096
Mark Dickinson10683072009-04-18 21:18:19 +000012097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012099 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12104 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012105fi
12106
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012108fi
12109
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12111$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012112if test $ac_cv_broken_sem_getvalue = yes
12113then
12114
Matthias Kloseb9621712010-04-24 17:59:49 +000012115$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012116
12117fi
12118
Mark Dickinsonbd792642009-03-18 20:06:12 +000012119# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12121$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012122# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012124 enableval=$enable_big_digits; case $enable_big_digits in
12125yes)
12126 enable_big_digits=30 ;;
12127no)
12128 enable_big_digits=15 ;;
1212915|30)
12130 ;;
12131*)
Georg Brandl941f9562011-02-25 15:21:47 +000012132 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 +000012133esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12135$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012136
12137cat >>confdefs.h <<_ACEOF
12138#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12139_ACEOF
12140
12141
12142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12144$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012145fi
12146
12147
Guido van Rossumef2255b2000-03-10 22:30:29 +000012148# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012149ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Georg Brandl941f9562011-02-25 15:21:47 +000012150if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012151
12152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012155 wchar_h="yes"
12156
Guido van Rossumef2255b2000-03-10 22:30:29 +000012157else
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012159
12160fi
12161
Michael W. Hudson54241132001-12-07 15:38:26 +000012162
Martin v. Löwis11437992002-04-12 09:54:03 +000012163
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012164# determine wchar_t size
12165if test "$wchar_h" = yes
12166then
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12169# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12170# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12172$as_echo_n "checking size of wchar_t... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012173if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12177"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012178
Martin v. Löwis11437992002-04-12 09:54:03 +000012179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 if test "$ac_cv_type_wchar_t" = yes; then
12181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl941f9562011-02-25 15:21:47 +000012183as_fn_error 77 "cannot compute sizeof (wchar_t)
12184See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185 else
12186 ac_cv_sizeof_wchar_t=0
12187 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12192$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193
12194
12195
Martin v. Löwis11437992002-04-12 09:54:03 +000012196cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012197#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012199
Michael W. Hudson54241132001-12-07 15:38:26 +000012200
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012201fi
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12204$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012205have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012207/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012208
12209#include <tcl.h>
12210#if TCL_UTF_MAX != 6
12211# error "NOT UCS4_TCL"
12212#endif
12213int
12214main ()
12215{
12216
12217 ;
12218 return 0;
12219}
12220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012222
12223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012225
12226 have_ucs4_tcl=yes
12227
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12231$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012232
Skip Montanaro6dead952003-09-25 14:50:04 +000012233# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012234if test "$wchar_h" = yes
12235then
12236 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12238$as_echo_n "checking whether wchar_t is signed... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012239 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012241else
12242
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012244 ac_cv_wchar_t_signed=yes
12245else
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012247/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012248
12249 #include <wchar.h>
12250 int main()
12251 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012252 /* Success: exit code 0 */
12253 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012254 }
12255
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012258 ac_cv_wchar_t_signed=yes
12259else
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012264fi
12265
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012266fi
12267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12269$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270fi
12271
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12273$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012274
12275# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012276if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012277 withval=$with_wide_unicode;
12278if test "$withval" != no
12279then unicode_size="4"
12280else unicode_size="2"
12281fi
12282
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012283else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284
Georg Brandl52d168a2008-01-07 18:10:24 +000012285case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012286 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012287 *) unicode_size="2" ;;
12288esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012289
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012290fi
12291
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012292
12293
Georg Brandl52d168a2008-01-07 18:10:24 +000012294case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012295 4)
12296 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12297
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012298 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012299 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012301 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012302esac
12303
Michael W. Hudson54241132001-12-07 15:38:26 +000012304
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Georg Brandl52d168a2008-01-07 18:10:24 +000012306# wchar_t is only usable if it maps to an unsigned type
12307if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012308 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012309then
12310 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012315
Georg Brandl52d168a2008-01-07 18:10:24 +000012316elif test "$ac_cv_sizeof_short" = "$unicode_size"
12317then
12318 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012320
Georg Brandl52d168a2008-01-07 18:10:24 +000012321elif test "$ac_cv_sizeof_long" = "$unicode_size"
12322then
12323 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012325
Georg Brandl52d168a2008-01-07 18:10:24 +000012326else
12327 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12330$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012331
12332# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12334$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012335if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 ac_cv_c_bigendian=unknown
12339 # See if we're dealing with a universal compiler.
12340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12341/* end confdefs.h. */
12342#ifndef __APPLE_CC__
12343 not a universal capable compiler
12344 #endif
12345 typedef int dummy;
12346
Skip Montanaro6dead952003-09-25 14:50:04 +000012347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012348if ac_fn_c_try_compile "$LINENO"; then :
12349
12350 # Check for potential -arch flags. It is not universal unless
12351 # there are at least two -arch flags with different values.
12352 ac_arch=
12353 ac_prev=
12354 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12355 if test -n "$ac_prev"; then
12356 case $ac_word in
12357 i?86 | x86_64 | ppc | ppc64)
12358 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12359 ac_arch=$ac_word
12360 else
12361 ac_cv_c_bigendian=universal
12362 break
12363 fi
12364 ;;
12365 esac
12366 ac_prev=
12367 elif test "x$ac_word" = "x-arch"; then
12368 ac_prev=arch
12369 fi
12370 done
12371fi
12372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12373 if test $ac_cv_c_bigendian = unknown; then
12374 # See if sys/param.h defines the BYTE_ORDER macro.
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012376/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012377#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012379
Martin v. Löwis11437992002-04-12 09:54:03 +000012380int
12381main ()
12382{
Matthias Kloseb9621712010-04-24 17:59:49 +000012383#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12384 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12385 && LITTLE_ENDIAN)
12386 bogus endian macros
12387 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012388
12389 ;
12390 return 0;
12391}
12392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012394 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012397#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012399
Martin v. Löwis11437992002-04-12 09:54:03 +000012400int
12401main ()
12402{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012403#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012404 not big endian
12405 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
12407 ;
12408 return 0;
12409}
12410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012412 ac_cv_c_bigendian=yes
12413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012417fi
12418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12419 fi
12420 if test $ac_cv_c_bigendian = unknown; then
12421 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012423/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012424#include <limits.h>
12425
Martin v. Löwis11437992002-04-12 09:54:03 +000012426int
12427main ()
12428{
Matthias Kloseb9621712010-04-24 17:59:49 +000012429#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12430 bogus endian macros
12431 #endif
12432
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 ;
12434 return 0;
12435}
12436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012437if ac_fn_c_try_compile "$LINENO"; then :
12438 # It does; now see whether it defined to _BIG_ENDIAN or not.
12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440/* end confdefs.h. */
12441#include <limits.h>
12442
12443int
12444main ()
12445{
12446#ifndef _BIG_ENDIAN
12447 not big endian
12448 #endif
12449
12450 ;
12451 return 0;
12452}
12453_ACEOF
12454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012456else
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12460fi
12461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12462 fi
12463 if test $ac_cv_c_bigendian = unknown; then
12464 # Compile a test program.
12465 if test "$cross_compiling" = yes; then :
12466 # Try to guess by grepping values from an object file.
12467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12468/* end confdefs.h. */
12469short int ascii_mm[] =
12470 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12471 short int ascii_ii[] =
12472 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12473 int use_ascii (int i) {
12474 return ascii_mm[i] + ascii_ii[i];
12475 }
12476 short int ebcdic_ii[] =
12477 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12478 short int ebcdic_mm[] =
12479 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12480 int use_ebcdic (int i) {
12481 return ebcdic_mm[i] + ebcdic_ii[i];
12482 }
12483 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485int
12486main ()
12487{
12488return use_ascii (foo) == use_ebcdic (foo);
12489 ;
12490 return 0;
12491}
12492_ACEOF
12493if ac_fn_c_try_compile "$LINENO"; then :
12494 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12495 ac_cv_c_bigendian=yes
12496 fi
12497 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12498 if test "$ac_cv_c_bigendian" = unknown; then
12499 ac_cv_c_bigendian=no
12500 else
12501 # finding both strings is unlikely to happen, but who knows?
12502 ac_cv_c_bigendian=unknown
12503 fi
12504 fi
12505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012509/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012511int
12512main ()
12513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 /* Are we little or big endian? From Harbison&Steele. */
12516 union
12517 {
12518 long int l;
12519 char c[sizeof (long int)];
12520 } u;
12521 u.l = 1;
12522 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523
12524 ;
12525 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012526}
Martin v. Löwis11437992002-04-12 09:54:03 +000012527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012529 ac_cv_c_bigendian=no
12530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12540$as_echo "$ac_cv_c_bigendian" >&6; }
12541 case $ac_cv_c_bigendian in #(
12542 yes)
12543 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12544;; #(
12545 no)
12546 ;; #(
12547 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012548
Matthias Kloseb9621712010-04-24 17:59:49 +000012549$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012550
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 ;; #(
12552 *)
Georg Brandl941f9562011-02-25 15:21:47 +000012553 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012554 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012556
Michael W. Hudson54241132001-12-07 15:38:26 +000012557
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012558# ABI version string for Python extension modules. This appears between the
12559# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12560# from the following attributes which affect the ABI of this Python build (in
12561# this order):
12562#
12563# * The Python implementation (always 'cpython-' for us)
12564# * The major and minor version numbers
12565# * --with-pydebug (adds a 'd')
12566# * --with-pymalloc (adds a 'm')
12567# * --with-wide-unicode (adds a 'u')
12568#
12569# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012570# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12571# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012572
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12574$as_echo_n "checking ABIFLAGS... " >&6; }
12575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12576$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12578$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012579SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12581$as_echo "$SOABI" >&6; }
12582
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12584$as_echo_n "checking LDVERSION... " >&6; }
12585LDVERSION='$(VERSION)$(ABIFLAGS)'
12586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12587$as_echo "$LDVERSION" >&6; }
12588
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012589# SO is the extension of shared libraries `(including the dot!)
12590# -- usually .so, .sl on HP-UX, .dll on Cygwin
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12592$as_echo_n "checking SO... " >&6; }
12593if test -z "$SO"
12594then
12595 case $ac_sys_system in
12596 hp*|HP*)
12597 case `uname -m` in
12598 ia64) SO=.so;;
12599 *) SO=.sl;;
12600 esac
12601 ;;
12602 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012603 Linux*|GNU*)
12604 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012605 *) SO=.so;;
12606 esac
12607else
12608 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012609 echo
12610 echo '====================================================================='
12611 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012612 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012613 echo '+ Do you really mean to change the extension for shared libraries? +'
12614 echo '+ Continuing in 10 seconds to let you to ponder. +'
12615 echo '+ +'
12616 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012617 sleep 10
12618fi
12619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12620$as_echo "$SO" >&6; }
12621
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012622# Check whether right shifting a negative integer extends the sign bit
12623# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12625$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012626if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012628else
Martin v. Löwis11437992002-04-12 09:54:03 +000012629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012631 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012635
12636int main()
12637{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012638 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012639}
12640
Martin v. Löwis11437992002-04-12 09:54:03 +000012641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012642if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012643 ac_cv_rshift_extends_sign=yes
12644else
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012649fi
12650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012651fi
12652
Matthias Kloseb9621712010-04-24 17:59:49 +000012653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12654$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012655if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012656then
Martin v. Löwis11437992002-04-12 09:54:03 +000012657
Matthias Kloseb9621712010-04-24 17:59:49 +000012658$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012659
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012660fi
12661
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012662# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12664$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012665if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012666 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012667else
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012670/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012671#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012672int
12673main ()
12674{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012675
12676 FILE *f = fopen("/dev/null", "r");
12677 flockfile(f);
12678 getc_unlocked(f);
12679 funlockfile(f);
12680
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ;
12682 return 0;
12683}
12684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012685if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012686 ac_cv_have_getc_unlocked=yes
12687else
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 ac_cv_have_getc_unlocked=no
12689fi
12690rm -f core conftest.err conftest.$ac_objext \
12691 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12695$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012696if test "$ac_cv_have_getc_unlocked" = yes
12697then
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012700
12701fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012702
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012703# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012704# save the value of LIBS so we don't actually link Python with readline
12705LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012706
Gregory P. Smith18820942008-09-07 06:24:49 +000012707# On some systems we need to link readline to a termcap compatible
12708# library. NOTE: Keep the precedence of listed libraries synchronised
12709# with setup.py.
12710py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12712$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012713for py_libtermcap in "" ncursesw ncurses curses termcap; do
12714 if test -z "$py_libtermcap"; then
12715 READLINE_LIBS="-lreadline"
12716 else
12717 READLINE_LIBS="-lreadline -l$py_libtermcap"
12718 fi
12719 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012721/* end confdefs.h. */
12722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723/* Override any GCC internal prototype to avoid an error.
12724 Use char because int might match the return type of a GCC
12725 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012726#ifdef __cplusplus
12727extern "C"
12728#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012729char readline ();
12730int
12731main ()
12732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012734 ;
12735 return 0;
12736}
12737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012738if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012739 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012741rm -f core conftest.err conftest.$ac_objext \
12742 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012743 if test $py_cv_lib_readline = yes; then
12744 break
12745 fi
12746done
12747# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12748#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012749if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12751$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12754$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012757
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012758fi
12759
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012760# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12762$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012763if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012765else
12766 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012767LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012769/* end confdefs.h. */
12770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771/* Override any GCC internal prototype to avoid an error.
12772 Use char because int might match the return type of a GCC
12773 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012774#ifdef __cplusplus
12775extern "C"
12776#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012777char rl_callback_handler_install ();
12778int
12779main ()
12780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012782 ;
12783 return 0;
12784}
12785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012786if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012787 ac_cv_lib_readline_rl_callback_handler_install=yes
12788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012791rm -f core conftest.err conftest.$ac_objext \
12792 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012793LIBS=$ac_check_lib_save_LIBS
12794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12796$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012797if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012798
Matthias Kloseb9621712010-04-24 17:59:49 +000012799$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012800
12801fi
12802
12803
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012804# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012807#include <readline/readline.h>
12808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012809if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012810 have_readline=yes
12811else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012812 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012813
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012814fi
Georg Brandl941f9562011-02-25 15:21:47 +000012815rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012816if test $have_readline = yes
12817then
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012819/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012820#include <readline/readline.h>
12821
12822_ACEOF
12823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012825
Matthias Kloseb9621712010-04-24 17:59:49 +000012826$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012827
12828fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012829rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012832/* end confdefs.h. */
12833#include <readline/readline.h>
12834
12835_ACEOF
12836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012838
Matthias Kloseb9621712010-04-24 17:59:49 +000012839$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012840
12841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012842rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012843
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012844fi
12845
Martin v. Löwis0daad592001-09-30 21:09:59 +000012846# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12848$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012849if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012850 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012851else
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012853LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857/* Override any GCC internal prototype to avoid an error.
12858 Use char because int might match the return type of a GCC
12859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012860#ifdef __cplusplus
12861extern "C"
12862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012863char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012864int
12865main ()
12866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ;
12869 return 0;
12870}
12871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012877rm -f core conftest.err conftest.$ac_objext \
12878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012879LIBS=$ac_check_lib_save_LIBS
12880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12882$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012883if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012886
Martin v. Löwis0daad592001-09-30 21:09:59 +000012887fi
12888
Michael W. Hudson54241132001-12-07 15:38:26 +000012889
Thomas Wouters89d996e2007-09-08 17:39:28 +000012890# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12892$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012893if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012895else
12896 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012897LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012899/* end confdefs.h. */
12900
12901/* Override any GCC internal prototype to avoid an error.
12902 Use char because int might match the return type of a GCC
12903 builtin and then its argument prototype would still apply. */
12904#ifdef __cplusplus
12905extern "C"
12906#endif
12907char rl_completion_display_matches_hook ();
12908int
12909main ()
12910{
12911return rl_completion_display_matches_hook ();
12912 ;
12913 return 0;
12914}
12915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012916if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012917 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12918else
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012921rm -f core conftest.err conftest.$ac_objext \
12922 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012923LIBS=$ac_check_lib_save_LIBS
12924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12926$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012927if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012930
12931fi
12932
12933
Martin v. Löwis0daad592001-09-30 21:09:59 +000012934# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12936$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012937if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012939else
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012941LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945/* Override any GCC internal prototype to avoid an error.
12946 Use char because int might match the return type of a GCC
12947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012948#ifdef __cplusplus
12949extern "C"
12950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012951char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012952int
12953main ()
12954{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 ;
12957 return 0;
12958}
12959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012960if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012965rm -f core conftest.err conftest.$ac_objext \
12966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012967LIBS=$ac_check_lib_save_LIBS
12968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12970$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000012971if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012974
Guido van Rossum353ae582001-07-10 16:45:32 +000012975fi
12976
Jack Jansendd19cf82001-12-06 22:36:17 +000012977
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012978# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012980/* end confdefs.h. */
12981#include <readline/readline.h>
12982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012983if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012984 have_readline=yes
12985else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012986 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012987
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012988fi
Georg Brandl941f9562011-02-25 15:21:47 +000012989rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012990if test $have_readline = yes
12991then
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012993/* end confdefs.h. */
12994#include <readline/readline.h>
12995
12996_ACEOF
12997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013001
13002fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013003rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013004
13005fi
13006
Martin v. Löwis82bca632006-02-10 20:49:30 +000013007# End of readline checks: restore LIBS
13008LIBS=$LIBS_no_readline
13009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13011$as_echo_n "checking for broken nice()... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013012if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013014else
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013017 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013021
13022int main()
13023{
13024 int val1 = nice(1);
13025 if (val1 != -1 && val1 == nice(2))
13026 exit(0);
13027 exit(1);
13028}
13029
Martin v. Löwis11437992002-04-12 09:54:03 +000013030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013031if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013032 ac_cv_broken_nice=yes
13033else
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013038fi
13039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040fi
13041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13043$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013044if test "$ac_cv_broken_nice" = yes
13045then
Martin v. Löwis11437992002-04-12 09:54:03 +000013046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013048
13049fi
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13052$as_echo_n "checking for broken poll()... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013053if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013055else
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013057 ac_cv_broken_poll=no
13058else
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013060/* end confdefs.h. */
13061
13062#include <poll.h>
13063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013064int main()
13065{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013066 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013067 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013068
13069 close (42);
13070
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013071 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013072 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013073 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013074 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013075 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013076 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077 return 1;
13078}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013079
13080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013082 ac_cv_broken_poll=yes
13083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13093$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013094if test "$ac_cv_broken_poll" = yes
13095then
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013098
13099fi
13100
Brett Cannon43802422005-02-10 20:48:03 +000013101# 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 +000013102# (which is not required by ISO C or UNIX spec) and/or if we support
13103# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013104ac_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 +000013105#include <$ac_cv_struct_tm>
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107"
Georg Brandl941f9562011-02-25 15:21:47 +000013108if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013109
13110cat >>confdefs.h <<_ACEOF
13111#define HAVE_STRUCT_TM_TM_ZONE 1
13112_ACEOF
13113
13114
13115fi
13116
13117if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013120
13121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13123"
Georg Brandl941f9562011-02-25 15:21:47 +000013124if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128fi
13129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013131#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013132_ACEOF
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13135$as_echo_n "checking for tzname... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013136if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013140/* end confdefs.h. */
13141#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142#if !HAVE_DECL_TZNAME
13143extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013144#endif
13145
13146int
13147main ()
13148{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013150 ;
13151 return 0;
13152}
13153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013154if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013155 ac_cv_var_tzname=yes
13156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013159rm -f core conftest.err conftest.$ac_objext \
13160 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13163$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013164 if test $ac_cv_var_tzname = yes; then
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013167
13168 fi
13169fi
13170
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013171
Martin v. Löwis1d459062005-03-14 21:23:33 +000013172# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13174$as_echo_n "checking for working tzset()... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013175if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013177else
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013180 ac_cv_working_tzset=no
13181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013183/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013184
13185#include <stdlib.h>
13186#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013187#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013188
13189#if HAVE_TZNAME
13190extern char *tzname[];
13191#endif
13192
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013193int main()
13194{
Brett Cannon18367812003-09-19 00:59:16 +000013195 /* Note that we need to ensure that not only does tzset(3)
13196 do 'something' with localtime, but it works as documented
13197 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013198 This includes making sure that tzname is set properly if
13199 tm->tm_zone does not exist since it is the alternative way
13200 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013201
13202 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013203 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013204 */
13205
Martin v. Löwis1d459062005-03-14 21:23:33 +000013206 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013207 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13208
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013209 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013210 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013211 if (localtime(&groundhogday)->tm_hour != 0)
13212 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013213#if HAVE_TZNAME
13214 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13215 if (strcmp(tzname[0], "UTC") ||
13216 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13217 exit(1);
13218#endif
Brett Cannon18367812003-09-19 00:59:16 +000013219
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013220 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013221 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013222 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013223 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013224#if HAVE_TZNAME
13225 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13226 exit(1);
13227#endif
Brett Cannon18367812003-09-19 00:59:16 +000013228
13229 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13230 tzset();
13231 if (localtime(&groundhogday)->tm_hour != 11)
13232 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013233#if HAVE_TZNAME
13234 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13235 exit(1);
13236#endif
13237
13238#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013239 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13240 exit(1);
13241 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13242 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013243#endif
Brett Cannon18367812003-09-19 00:59:16 +000013244
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013245 exit(0);
13246}
13247
13248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013249if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013250 ac_cv_working_tzset=yes
13251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013256fi
13257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258fi
13259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13261$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013262if test "$ac_cv_working_tzset" = yes
13263then
13264
Matthias Kloseb9621712010-04-24 17:59:49 +000013265$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013266
13267fi
13268
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013269# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13271$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013272if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013276/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013277#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013278int
13279main ()
13280{
13281
13282struct stat st;
13283st.st_mtim.tv_nsec = 1;
13284
13285 ;
13286 return 0;
13287}
13288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013290 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13295fi
13296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13298$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013299if test "$ac_cv_stat_tv_nsec" = yes
13300then
13301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013303
13304fi
13305
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013306# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13308$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013309if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013313/* end confdefs.h. */
13314#include <sys/stat.h>
13315int
13316main ()
13317{
13318
13319struct stat st;
13320st.st_mtimespec.tv_nsec = 1;
13321
13322 ;
13323 return 0;
13324}
13325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013327 ac_cv_stat_tv_nsec2=yes
13328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13332fi
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13335$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013336if test "$ac_cv_stat_tv_nsec2" = yes
13337then
13338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013340
13341fi
13342
Jack Jansen666b1e72001-10-31 12:11:48 +000013343# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13345$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013346if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013351#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013352int
13353main ()
13354{
Jack Jansen666b1e72001-10-31 12:11:48 +000013355
13356 int rtn;
13357 rtn = mvwdelch(0,0,0);
13358
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 ;
13360 return 0;
13361}
13362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013363if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013364 ac_cv_mvwdelch_is_expression=yes
13365else
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13369fi
13370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13372$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013373
13374if test "$ac_cv_mvwdelch_is_expression" = yes
13375then
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013378
13379fi
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13382$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013383if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013385else
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013387/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013388#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013389int
13390main ()
13391{
Jack Jansen666b1e72001-10-31 12:11:48 +000013392
13393 WINDOW *w;
13394 w->_flags = 0;
13395
Martin v. Löwis11437992002-04-12 09:54:03 +000013396 ;
13397 return 0;
13398}
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013401 ac_cv_window_has_flags=yes
13402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13406fi
13407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13409$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013410
Jack Jansen666b1e72001-10-31 12:11:48 +000013411
13412if test "$ac_cv_window_has_flags" = yes
13413then
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013416
13417fi
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13420$as_echo_n "checking for is_term_resized... " >&6; }
13421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013422/* end confdefs.h. */
13423#include <curses.h>
13424int
13425main ()
13426{
13427void *x=is_term_resized
13428 ;
13429 return 0;
13430}
13431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013435
Matthias Kloseb159a552010-04-25 21:00:44 +000013436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013437$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013438else
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13440$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013441
13442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13446$as_echo_n "checking for resize_term... " >&6; }
13447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013448/* end confdefs.h. */
13449#include <curses.h>
13450int
13451main ()
13452{
13453void *x=resize_term
13454 ;
13455 return 0;
13456}
13457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013461
Matthias Kloseb159a552010-04-25 21:00:44 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013463$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013464else
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13466$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013467
13468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13472$as_echo_n "checking for resizeterm... " >&6; }
13473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013474/* end confdefs.h. */
13475#include <curses.h>
13476int
13477main ()
13478{
13479void *x=resizeterm
13480 ;
13481 return 0;
13482}
13483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013487
Matthias Kloseb159a552010-04-25 21:00:44 +000013488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013489$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013490else
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13492$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013493
13494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13498$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013499
13500if test -r /dev/ptmx
13501then
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13503$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013506
Thomas Wouters89f507f2006-12-13 04:49:30 +000013507else
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13509$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013510fi
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13513$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013514
13515if test -r /dev/ptc
13516then
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13518$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013521
Thomas Wouters89f507f2006-12-13 04:49:30 +000013522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13524$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013525fi
13526
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527if test "$have_long_long" = yes
13528then
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13530$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013531 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013533else
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013535 ac_cv_have_long_long_format=no
13536else
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013538/* end confdefs.h. */
13539
13540 #include <stdio.h>
13541 #include <stddef.h>
13542 #include <string.h>
13543
13544 #ifdef HAVE_SYS_TYPES_H
13545 #include <sys/types.h>
13546 #endif
13547
13548 int main()
13549 {
13550 char buffer[256];
13551
13552 if (sprintf(buffer, "%lld", (long long)123) < 0)
13553 return 1;
13554 if (strcmp(buffer, "123"))
13555 return 1;
13556
13557 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13558 return 1;
13559 if (strcmp(buffer, "-123"))
13560 return 1;
13561
13562 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13563 return 1;
13564 if (strcmp(buffer, "123"))
13565 return 1;
13566
13567 return 0;
13568 }
13569
13570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013571if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013572 ac_cv_have_long_long_format=yes
13573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013578fi
13579
13580
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013581fi
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13584$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013585fi
13586
Mark Dickinson89d7d412009-12-31 20:50:59 +000013587if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013588then
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013591
13592fi
13593
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013594if test $ac_sys_system = Darwin
13595then
13596 LIBS="$LIBS -framework CoreFoundation"
13597fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13600$as_echo_n "checking for %zd printf() format support... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013601if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013605 ac_cv_have_size_t_format="cross -- assuming yes"
13606
Thomas Wouters477c8d52006-05-27 19:21:47 +000013607else
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013609/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013610
Thomas Wouters477c8d52006-05-27 19:21:47 +000013611#include <stdio.h>
13612#include <stddef.h>
13613#include <string.h>
13614
Christian Heimes2c181612007-12-17 20:04:13 +000013615#ifdef HAVE_SYS_TYPES_H
13616#include <sys/types.h>
13617#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013618
13619#ifdef HAVE_SSIZE_T
13620typedef ssize_t Py_ssize_t;
13621#elif SIZEOF_VOID_P == SIZEOF_LONG
13622typedef long Py_ssize_t;
13623#else
13624typedef int Py_ssize_t;
13625#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013626
Christian Heimes2c181612007-12-17 20:04:13 +000013627int main()
13628{
13629 char buffer[256];
13630
Thomas Wouters477c8d52006-05-27 19:21:47 +000013631 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13632 return 1;
13633
Thomas Wouters89f507f2006-12-13 04:49:30 +000013634 if (strcmp(buffer, "123"))
13635 return 1;
13636
13637 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13638 return 1;
13639
13640 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013641 return 1;
13642
13643 return 0;
13644}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013645
Thomas Wouters477c8d52006-05-27 19:21:47 +000013646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013647if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013648 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013649else
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013654fi
13655
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13658$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013659if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013662
13663fi
13664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013666#ifdef HAVE_SYS_TYPES_H
13667#include <sys/types.h>
13668#endif
13669#ifdef HAVE_SYS_SOCKET_H
13670#include <sys/socket.h>
13671#endif
13672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673"
Georg Brandl941f9562011-02-25 15:21:47 +000013674if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013679
13680fi
13681
Michael W. Hudson54241132001-12-07 15:38:26 +000013682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13684$as_echo_n "checking for broken mbstowcs... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013685if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013689 ac_cv_broken_mbstowcs=no
13690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013692/* end confdefs.h. */
13693
13694#include<stdlib.h>
13695int main() {
13696 size_t len = -1;
13697 const char *str = "text";
13698 len = mbstowcs(NULL, str, 0);
13699 return (len != 4);
13700}
13701
13702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013703if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013704 ac_cv_broken_mbstowcs=no
13705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013710fi
13711
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013712fi
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13715$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013716if test "$ac_cv_broken_mbstowcs" = yes
13717then
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013720
13721fi
13722
Antoine Pitrou042b1282010-08-13 21:15:58 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13724$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Georg Brandl941f9562011-02-25 15:21:47 +000013725if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013726 $as_echo_n "(cached) " >&6
13727else
13728 if test "$cross_compiling" = yes; then :
13729 ac_cv_computed_gotos=no
13730else
13731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732/* end confdefs.h. */
13733
13734int main(int argc, char **argv)
13735{
13736 static void *targets[1] = { &&LABEL1 };
13737 goto LABEL2;
13738LABEL1:
13739 return 0;
13740LABEL2:
13741 goto *targets[0];
13742 return 1;
13743}
13744
13745_ACEOF
13746if ac_fn_c_try_run "$LINENO"; then :
13747 ac_cv_computed_gotos=yes
13748else
13749 ac_cv_computed_gotos=no
13750fi
13751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13752 conftest.$ac_objext conftest.beam conftest.$ac_ext
13753fi
13754
13755fi
13756
13757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13758$as_echo "$ac_cv_computed_gotos" >&6; }
13759if test "$ac_cv_computed_gotos" = yes
13760then
13761
13762$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13763
13764fi
13765
Antoine Pitroub52ec782009-01-25 16:34:23 +000013766# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13768$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013769
13770# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013771if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013772 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013773if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013774then
13775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13779$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013780fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013781if test "$withval" = no
13782then
13783
13784$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13787$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013788fi
13789
Antoine Pitrou042b1282010-08-13 21:15:58 +000013790else
13791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13792$as_echo "no value specified" >&6; }
13793fi
13794
Antoine Pitroub52ec782009-01-25 16:34:23 +000013795
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013796case $ac_sys_system in
13797AIX*)
13798
13799$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13800 ;;
13801esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013802
Michael W. Hudson54241132001-12-07 15:38:26 +000013803
Jesus Cea6a792292010-05-03 21:18:48 +000013804case $ac_sys_system in
Georg Brandl941f9562011-02-25 15:21:47 +000013805 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 +000013806esac
13807
Gregory P. Smith138fa432010-12-13 08:00:52 +000013808ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Georg Brandl941f9562011-02-25 15:21:47 +000013809if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013810
13811$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13812
13813fi
Jesus Cea6a792292010-05-03 21:18:48 +000013814
13815
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013816
13817
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013818for h in `(cd $srcdir;echo Python/thread_*.h)`
13819do
13820 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13821done
13822
Michael W. Hudson54241132001-12-07 15:38:26 +000013823
Neal Norwitzd24499d2005-12-18 21:36:39 +000013824SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13826$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013827for dir in $SRCDIRS; do
13828 if test ! -d $dir; then
13829 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013830 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013831done
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13833$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013834
Guido van Rossum627b2d71993-12-24 10:39:16 +000013835# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013836ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013837
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013838ac_config_files="$ac_config_files Modules/ld_so_aix"
13839
Martin v. Löwis11437992002-04-12 09:54:03 +000013840cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841# This file is a shell script that caches the results of configure
13842# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013843# scripts and configure runs, see configure's option --config-cache.
13844# It is not useful on other systems. If it contains results you don't
13845# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846#
Martin v. Löwis11437992002-04-12 09:54:03 +000013847# config.status only pays attention to the cache file if you give it
13848# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849#
Skip Montanaro6dead952003-09-25 14:50:04 +000013850# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013851# loading this file, other *unset* `ac_cv_foo' will be assigned the
13852# following values.
13853
13854_ACEOF
13855
Guido van Rossumf78abae1997-01-21 22:02:36 +000013856# The following way of writing the cache mishandles newlines in values,
13857# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013859# Ultrix sh set writes to stderr and can't be redirected directly,
13860# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861(
13862 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13863 eval ac_val=\$$ac_var
13864 case $ac_val in #(
13865 *${as_nl}*)
13866 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13868$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869 esac
13870 case $ac_var in #(
13871 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13873 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874 esac ;;
13875 esac
13876 done
13877
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13880 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 # `set' does not quote correctly, so add quotes: double-quote
13882 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013884 "s/'/'\\\\''/g;
13885 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 *)
13888 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891 esac |
13892 sort
13893) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13899 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13901 :end' >>confcache
13902if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13903 if test -w "$cache_file"; then
Georg Brandl941f9562011-02-25 15:21:47 +000013904 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13906$as_echo "$as_me: updating cache $cache_file" >&6;}
Georg Brandl941f9562011-02-25 15:21:47 +000013907 if test ! -f "$cache_file" || test -h "$cache_file"; then
13908 cat confcache >"$cache_file"
13909 else
13910 case $cache_file in #(
13911 */* | ?:*)
13912 mv -f confcache "$cache_file"$$ &&
13913 mv -f "$cache_file"$$ "$cache_file" ;; #(
13914 *)
13915 mv -f confcache "$cache_file" ;;
13916 esac
13917 fi
13918 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013919 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13921$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013922 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013923fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013924rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013926test "x$prefix" = xNONE && prefix=$ac_default_prefix
13927# Let make expand exec_prefix.
13928test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013929
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013930DEFS=-DHAVE_CONFIG_H
13931
Skip Montanaro6dead952003-09-25 14:50:04 +000013932ac_libobjs=
13933ac_ltlibobjs=
Georg Brandl941f9562011-02-25 15:21:47 +000013934U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013935for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13936 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13940 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13942 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013943done
13944LIBOBJS=$ac_libobjs
13945
13946LTLIBOBJS=$ac_ltlibobjs
13947
13948
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950
Georg Brandl941f9562011-02-25 15:21:47 +000013951: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013952ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013953ac_clean_files_save=$ac_clean_files
13954ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13956$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13957as_write_fail=0
13958cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013959#! $SHELL
13960# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013961# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013962# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013963# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013964
Martin v. Löwis11437992002-04-12 09:54:03 +000013965debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013966ac_cs_recheck=false
13967ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969SHELL=\${CONFIG_SHELL-$SHELL}
13970export SHELL
13971_ASEOF
13972cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13973## -------------------- ##
13974## M4sh Initialization. ##
13975## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977# Be more Bourne compatible
13978DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013979if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 emulate sh
13981 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013983 # is contrary to our usage. Disable this feature.
13984 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013986else
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 case `(set -o) 2>/dev/null` in #(
13988 *posix*) :
13989 set -o posix ;; #(
13990 *) :
13991 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013992esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013993fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013994
13995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996as_nl='
13997'
13998export as_nl
13999# Printing a long string crashes Solaris 7 /usr/bin/printf.
14000as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14001as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14002as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14003# Prefer a ksh shell builtin over an external printf program on Solaris,
14004# but without wasting forks for bash or zsh.
14005if test -z "$BASH_VERSION$ZSH_VERSION" \
14006 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14007 as_echo='print -r --'
14008 as_echo_n='print -rn --'
14009elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14010 as_echo='printf %s\n'
14011 as_echo_n='printf %s'
14012else
14013 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14014 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14015 as_echo_n='/usr/ucb/echo -n'
14016 else
14017 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14018 as_echo_n_body='eval
14019 arg=$1;
14020 case $arg in #(
14021 *"$as_nl"*)
14022 expr "X$arg" : "X\\(.*\\)$as_nl";
14023 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14024 esac;
14025 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14026 '
14027 export as_echo_n_body
14028 as_echo_n='sh -c $as_echo_n_body as_echo'
14029 fi
14030 export as_echo_body
14031 as_echo='sh -c $as_echo_body as_echo'
14032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014033
14034# The user is always right.
14035if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 PATH_SEPARATOR=:
14037 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14038 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14039 PATH_SEPARATOR=';'
14040 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043
14044# IFS
14045# We need space, tab and new line, in precisely that order. Quoting is
14046# there to prevent editors from complaining about space-tab.
14047# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14048# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049IFS=" "" $as_nl"
14050
14051# Find who we are. Look in the path if we contain no directory separator.
Georg Brandl941f9562011-02-25 15:21:47 +000014052as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014053case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054 *[\\/]* ) as_myself=$0 ;;
14055 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014056for as_dir in $PATH
14057do
14058 IFS=$as_save_IFS
14059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14061 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064 ;;
14065esac
14066# We did not find ourselves, most probably we were run as `sh COMMAND'
14067# in which case we are not to be found in the path.
14068if test "x$as_myself" = x; then
14069 as_myself=$0
14070fi
14071if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14073 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074fi
14075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076# Unset variables that we do not need and which cause bugs (e.g. in
14077# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14078# suppresses any "Segmentation fault" message there. '((' could
14079# trigger a bug in pdksh 5.2.14.
14080for as_var in BASH_ENV ENV MAIL MAILPATH
14081do eval test x\${$as_var+set} = xset \
14082 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083done
14084PS1='$ '
14085PS2='> '
14086PS4='+ '
14087
14088# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014089LC_ALL=C
14090export LC_ALL
14091LANGUAGE=C
14092export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094# CDPATH.
14095(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14096
14097
Georg Brandl941f9562011-02-25 15:21:47 +000014098# as_fn_error STATUS ERROR [LINENO LOG_FD]
14099# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014100# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14101# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl941f9562011-02-25 15:21:47 +000014102# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014103as_fn_error ()
14104{
Georg Brandl941f9562011-02-25 15:21:47 +000014105 as_status=$1; test $as_status -eq 0 && as_status=1
14106 if test "$4"; then
14107 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14108 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 fi
Georg Brandl941f9562011-02-25 15:21:47 +000014110 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 as_fn_exit $as_status
14112} # as_fn_error
14113
14114
14115# as_fn_set_status STATUS
14116# -----------------------
14117# Set $? to STATUS, without forking.
14118as_fn_set_status ()
14119{
14120 return $1
14121} # as_fn_set_status
14122
14123# as_fn_exit STATUS
14124# -----------------
14125# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14126as_fn_exit ()
14127{
14128 set +e
14129 as_fn_set_status $1
14130 exit $1
14131} # as_fn_exit
14132
14133# as_fn_unset VAR
14134# ---------------
14135# Portably unset VAR.
14136as_fn_unset ()
14137{
14138 { eval $1=; unset $1;}
14139}
14140as_unset=as_fn_unset
14141# as_fn_append VAR VALUE
14142# ----------------------
14143# Append the text in VALUE to the end of the definition contained in VAR. Take
14144# advantage of any shell optimizations that allow amortized linear growth over
14145# repeated appends, instead of the typical quadratic growth present in naive
14146# implementations.
14147if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14148 eval 'as_fn_append ()
14149 {
14150 eval $1+=\$2
14151 }'
14152else
14153 as_fn_append ()
14154 {
14155 eval $1=\$$1\$2
14156 }
14157fi # as_fn_append
14158
14159# as_fn_arith ARG...
14160# ------------------
14161# Perform arithmetic evaluation on the ARGs, and store the result in the
14162# global $as_val. Take advantage of shells that can avoid forks. The arguments
14163# must be portable across $(()) and expr.
14164if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14165 eval 'as_fn_arith ()
14166 {
14167 as_val=$(( $* ))
14168 }'
14169else
14170 as_fn_arith ()
14171 {
14172 as_val=`expr "$@" || test $? -eq 1`
14173 }
14174fi # as_fn_arith
14175
14176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177if expr a : '\(a\)' >/dev/null 2>&1 &&
14178 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14179 as_expr=expr
14180else
14181 as_expr=false
14182fi
14183
14184if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14185 as_basename=basename
14186else
14187 as_basename=false
14188fi
14189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14191 as_dirname=dirname
14192else
14193 as_dirname=false
14194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196as_me=`$as_basename -- "$0" ||
14197$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14198 X"$0" : 'X\(//\)$' \| \
14199 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014200$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201 sed '/^.*\/\([^/][^/]*\)\/*$/{
14202 s//\1/
14203 q
14204 }
14205 /^X\/\(\/\/\)$/{
14206 s//\1/
14207 q
14208 }
14209 /^X\/\(\/\).*/{
14210 s//\1/
14211 q
14212 }
14213 s/.*/./; q'`
14214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215# Avoid depending upon Character Ranges.
14216as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14217as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14218as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14219as_cr_digits='0123456789'
14220as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221
14222ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014223case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 xy) ECHO_C='\c';;
14228 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14229 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230 esac;;
14231*)
14232 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014234
Martin v. Löwis11437992002-04-12 09:54:03 +000014235rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236if test -d conf$$.dir; then
14237 rm -f conf$$.dir/conf$$.file
14238else
14239 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014242if (echo >conf$$.file) 2>/dev/null; then
14243 if ln -s conf$$.file conf$$ 2>/dev/null; then
14244 as_ln_s='ln -s'
14245 # ... but there are two gotchas:
14246 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14247 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14248 # In both cases, we have to default to `cp -p'.
14249 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14250 as_ln_s='cp -p'
14251 elif ln conf$$.file conf$$ 2>/dev/null; then
14252 as_ln_s=ln
14253 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014256else
14257 as_ln_s='cp -p'
14258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14260rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262
14263# as_fn_mkdir_p
14264# -------------
14265# Create "$as_dir" as a directory, including parents if necessary.
14266as_fn_mkdir_p ()
14267{
14268
14269 case $as_dir in #(
14270 -*) as_dir=./$as_dir;;
14271 esac
14272 test -d "$as_dir" || eval $as_mkdir_p || {
14273 as_dirs=
14274 while :; do
14275 case $as_dir in #(
14276 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14277 *) as_qdir=$as_dir;;
14278 esac
14279 as_dirs="'$as_qdir' $as_dirs"
14280 as_dir=`$as_dirname -- "$as_dir" ||
14281$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14282 X"$as_dir" : 'X\(//\)[^/]' \| \
14283 X"$as_dir" : 'X\(//\)$' \| \
14284 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14285$as_echo X"$as_dir" |
14286 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14287 s//\1/
14288 q
14289 }
14290 /^X\(\/\/\)[^/].*/{
14291 s//\1/
14292 q
14293 }
14294 /^X\(\/\/\)$/{
14295 s//\1/
14296 q
14297 }
14298 /^X\(\/\).*/{
14299 s//\1/
14300 q
14301 }
14302 s/.*/./; q'`
14303 test -d "$as_dir" && break
14304 done
14305 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl941f9562011-02-25 15:21:47 +000014306 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014307
14308
14309} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014310if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014312else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014313 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014314 as_mkdir_p=false
14315fi
14316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014317if test -x / >/dev/null 2>&1; then
14318 as_test_x='test -x'
14319else
14320 if ls -dL / >/dev/null 2>&1; then
14321 as_ls_L_option=L
14322 else
14323 as_ls_L_option=
14324 fi
14325 as_test_x='
14326 eval sh -c '\''
14327 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 case $1 in #(
14331 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 ???[sx]*):;;*)false;;esac;fi
14335 '\'' sh
14336 '
14337fi
14338as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014339
14340# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014341as_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 +000014342
14343# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014344as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014345
14346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014348## ----------------------------------- ##
14349## Main body of $CONFIG_STATUS script. ##
14350## ----------------------------------- ##
14351_ASEOF
14352test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14355# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014356# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357# values after options handling.
14358ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014359This file was extended by python $as_me 3.3, which was
Georg Brandl941f9562011-02-25 15:21:47 +000014360generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
14362 CONFIG_FILES = $CONFIG_FILES
14363 CONFIG_HEADERS = $CONFIG_HEADERS
14364 CONFIG_LINKS = $CONFIG_LINKS
14365 CONFIG_COMMANDS = $CONFIG_COMMANDS
14366 $ $0 $@
14367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368on `(hostname || uname -n) 2>/dev/null | sed 1q`
14369"
14370
Martin v. Löwis11437992002-04-12 09:54:03 +000014371_ACEOF
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373case $ac_config_files in *"
14374"*) set x $ac_config_files; shift; ac_config_files=$*;;
14375esac
14376
14377case $ac_config_headers in *"
14378"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14379esac
14380
14381
14382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014383# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014384config_files="$ac_config_files"
14385config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014390ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014391\`$as_me' instantiates files and other configuration actions
14392from templates according to the current configuration. Unless the files
14393and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Matthias Kloseb9621712010-04-24 17:59:49 +000014395Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
14397 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 --config print configuration, then exit
14400 -q, --quiet, --silent
14401 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 -d, --debug don't remove temporary files
14403 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 --file=FILE[:TEMPLATE]
14405 instantiate the configuration file FILE
14406 --header=FILE[:TEMPLATE]
14407 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
14409Configuration files:
14410$config_files
14411
14412Configuration headers:
14413$config_headers
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14419ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014420ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014421python config.status 3.3
Georg Brandl941f9562011-02-25 15:21:47 +000014422configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Georg Brandl941f9562011-02-25 15:21:47 +000014425Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014426This config.status script is free software; the Free Software Foundation
14427gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428
14429ac_pwd='$ac_pwd'
14430srcdir='$srcdir'
14431INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014432test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014433_ACEOF
14434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14436# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014437ac_need_defaults=:
14438while test $# != 0
14439do
14440 case $1 in
Georg Brandl941f9562011-02-25 15:21:47 +000014441 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14443 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014444 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 ;;
Georg Brandl941f9562011-02-25 15:21:47 +000014446 --*=)
14447 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14448 ac_optarg=
14449 ac_shift=:
14450 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014452 ac_option=$1
14453 ac_optarg=$2
14454 ac_shift=shift
14455 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 esac
14457
Skip Montanaro6dead952003-09-25 14:50:04 +000014458 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014460 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14461 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 $as_echo "$ac_cs_version"; exit ;;
14464 --config | --confi | --conf | --con | --co | --c )
14465 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 debug=: ;;
14468 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014469 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 case $ac_optarg in
14471 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl941f9562011-02-25 15:21:47 +000014472 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 esac
14474 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 ac_need_defaults=false;;
14476 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014477 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 case $ac_optarg in
14479 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14480 esac
14481 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483 --he | --h)
14484 # Conflict between --help and --header
Georg Brandl941f9562011-02-25 15:21:47 +000014485 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014486Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014489 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14490 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14491 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
14493 # This is an error.
Georg Brandl941f9562011-02-25 15:21:47 +000014494 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014495Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
14500 esac
14501 shift
14502done
14503
Skip Montanaro6dead952003-09-25 14:50:04 +000014504ac_configure_extra_args=
14505
14506if $ac_cs_silent; then
14507 exec 6>/dev/null
14508 ac_configure_extra_args="$ac_configure_extra_args --silent"
14509fi
14510
14511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014513if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14515 shift
14516 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14517 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014520fi
14521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524exec 5>>config.log
14525{
14526 echo
14527 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14528## Running $as_me. ##
14529_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538
14539# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014540for ac_config_target in $ac_config_targets
14541do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542 case $ac_config_target in
14543 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14544 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14545 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014546 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14547 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14549 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014550 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014551 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552
Georg Brandl941f9562011-02-25 15:21:47 +000014553 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 esac
14555done
14556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557
Martin v. Löwis11437992002-04-12 09:54:03 +000014558# If the user did not use the arguments to specify the items to instantiate,
14559# then the envvar interface is used. Set only those that are not.
14560# We use the long form for the default assignment because of an extremely
14561# bizarre bug on SunOS 4.1.3.
14562if $ac_need_defaults; then
14563 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14564 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14565fi
14566
Skip Montanaro6dead952003-09-25 14:50:04 +000014567# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014569# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570# Hook for its removal unless debugging.
14571# Note that there is a small window in which the directory will not be cleaned:
14572# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014573$debug ||
14574{
Georg Brandl941f9562011-02-25 15:21:47 +000014575 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576 trap 'exit_status=$?
Georg Brandl941f9562011-02-25 15:21:47 +000014577 : "${ac_tmp:=$tmp}"
14578 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014581}
Martin v. Löwis11437992002-04-12 09:54:03 +000014582# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014583
Martin v. Löwis11437992002-04-12 09:54:03 +000014584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Georg Brandl941f9562011-02-25 15:21:47 +000014586 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014587} ||
14588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 tmp=./conf$$-$RANDOM
14590 (umask 077 && mkdir "$tmp")
Georg Brandl941f9562011-02-25 15:21:47 +000014591} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14592ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594# Set up the scripts for CONFIG_FILES section.
14595# No need to generate them if there are no CONFIG_FILES.
14596# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599
14600ac_cr=`echo X | tr X '\015'`
14601# On cygwin, bash can eat \r inside `` if the user requested igncr.
14602# But we know of no other shell where ac_cr would be empty at this
14603# point, so we can use a bashism as a fallback.
14604if test "x$ac_cr" = x; then
14605 eval ac_cr=\$\'\\r\'
14606fi
14607ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14608if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl941f9562011-02-25 15:21:47 +000014609 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014610else
14611 ac_cs_awk_cr=$ac_cr
14612fi
14613
Georg Brandl941f9562011-02-25 15:21:47 +000014614echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014615_ACEOF
14616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618{
14619 echo "cat >conf$$subs.awk <<_ACEOF" &&
14620 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14621 echo "_ACEOF"
14622} >conf$$subs.sh ||
Georg Brandl941f9562011-02-25 15:21:47 +000014623 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14624ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625ac_delim='%!_!# '
14626for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 . ./conf$$subs.sh ||
Georg Brandl941f9562011-02-25 15:21:47 +000014628 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14631 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014632 break
14633 elif $ac_last_try; then
Georg Brandl941f9562011-02-25 15:21:47 +000014634 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635 else
14636 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638done
Matthias Kloseb9621712010-04-24 17:59:49 +000014639rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Georg Brandl941f9562011-02-25 15:21:47 +000014642cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014644sed -n '
14645h
14646s/^/S["/; s/!.*/"]=/
14647p
14648g
14649s/^[^!]*!//
14650:repl
14651t repl
14652s/'"$ac_delim"'$//
14653t delim
14654:nl
14655h
14656s/\(.\{148\}\)..*/\1/
14657t more1
14658s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14659p
14660n
14661b repl
14662:more1
14663s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14664p
14665g
14666s/.\{148\}//
14667t nl
14668:delim
14669h
14670s/\(.\{148\}\)..*/\1/
14671t more2
14672s/["\\]/\\&/g; s/^/"/; s/$/"/
14673p
14674b
14675:more2
14676s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14677p
14678g
14679s/.\{148\}//
14680t delim
14681' <conf$$subs.awk | sed '
14682/^[^""]/{
14683 N
14684 s/\n//
14685}
14686' >>$CONFIG_STATUS || ac_write_fail=1
14687rm -f conf$$subs.awk
14688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14689_ACAWK
Georg Brandl941f9562011-02-25 15:21:47 +000014690cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 for (key in S) S_is_set[key] = 1
14692 FS = ""
14693
14694}
14695{
14696 line = $ 0
14697 nfields = split(line, field, "@")
14698 substed = 0
14699 len = length(field[1])
14700 for (i = 2; i < nfields; i++) {
14701 key = field[i]
14702 keylen = length(key)
14703 if (S_is_set[key]) {
14704 value = S[key]
14705 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14706 len += length(value) + length(field[++i])
14707 substed = 1
14708 } else
14709 len += 1 + keylen
14710 }
14711
14712 print line
14713}
14714
14715_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14718if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14719 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14720else
14721 cat
Georg Brandl941f9562011-02-25 15:21:47 +000014722fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14723 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014724_ACEOF
14725
Georg Brandl941f9562011-02-25 15:21:47 +000014726# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14727# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728# trailing colons and then remove the whole line if VPATH becomes empty
14729# (actually we leave an empty line to preserve line numbers).
14730if test "x$srcdir" = x.; then
Georg Brandl941f9562011-02-25 15:21:47 +000014731 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14732h
14733s///
14734s/^/:/
14735s/[ ]*$/:/
14736s/:\$(srcdir):/:/g
14737s/:\${srcdir}:/:/g
14738s/:@srcdir@:/:/g
14739s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740s/:*$//
Georg Brandl941f9562011-02-25 15:21:47 +000014741x
14742s/\(=[ ]*\).*/\1/
14743G
14744s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745s/^[^=]*=[ ]*$//
14746}'
14747fi
14748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014750fi # test -n "$CONFIG_FILES"
14751
Matthias Kloseb9621712010-04-24 17:59:49 +000014752# Set up the scripts for CONFIG_HEADERS section.
14753# No need to generate them if there are no CONFIG_HEADERS.
14754# This happens for instance with `./config.status Makefile'.
14755if test -n "$CONFIG_HEADERS"; then
Georg Brandl941f9562011-02-25 15:21:47 +000014756cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014757BEGIN {
14758_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759
Matthias Kloseb9621712010-04-24 17:59:49 +000014760# Transform confdefs.h into an awk script `defines.awk', embedded as
14761# here-document in config.status, that substitutes the proper values into
14762# config.h.in to produce config.h.
14763
14764# Create a delimiter string that does not exist in confdefs.h, to ease
14765# handling of long lines.
14766ac_delim='%!_!# '
14767for ac_last_try in false false :; do
Georg Brandl941f9562011-02-25 15:21:47 +000014768 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14769 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 break
14771 elif $ac_last_try; then
Georg Brandl941f9562011-02-25 15:21:47 +000014772 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 else
14774 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14775 fi
14776done
14777
14778# For the awk script, D is an array of macro values keyed by name,
14779# likewise P contains macro parameters if any. Preserve backslash
14780# newline sequences.
14781
14782ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14783sed -n '
14784s/.\{148\}/&'"$ac_delim"'/g
14785t rset
14786:rset
14787s/^[ ]*#[ ]*define[ ][ ]*/ /
14788t def
14789d
14790:def
14791s/\\$//
14792t bsnl
14793s/["\\]/\\&/g
14794s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14795D["\1"]=" \3"/p
14796s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14797d
14798:bsnl
14799s/["\\]/\\&/g
14800s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14801D["\1"]=" \3\\\\\\n"\\/p
14802t cont
14803s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14804t cont
14805d
14806:cont
14807n
14808s/.\{148\}/&'"$ac_delim"'/g
14809t clear
14810:clear
14811s/\\$//
14812t bsnlc
14813s/["\\]/\\&/g; s/^/"/; s/$/"/p
14814d
14815:bsnlc
14816s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14817b cont
14818' <confdefs.h | sed '
14819s/'"$ac_delim"'/"\\\
14820"/g' >>$CONFIG_STATUS || ac_write_fail=1
14821
14822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14823 for (key in D) D_is_set[key] = 1
14824 FS = ""
14825}
14826/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14827 line = \$ 0
14828 split(line, arg, " ")
14829 if (arg[1] == "#") {
14830 defundef = arg[2]
14831 mac1 = arg[3]
14832 } else {
14833 defundef = substr(arg[1], 2)
14834 mac1 = arg[2]
14835 }
14836 split(mac1, mac2, "(") #)
14837 macro = mac2[1]
14838 prefix = substr(line, 1, index(line, defundef) - 1)
14839 if (D_is_set[macro]) {
14840 # Preserve the white space surrounding the "#".
14841 print prefix "define", macro P[macro] D[macro]
14842 next
14843 } else {
14844 # Replace #undef with comments. This is necessary, for example,
14845 # in the case of _POSIX_SOURCE, which is predefined and required
14846 # on some systems where configure will not decide to define it.
14847 if (defundef == "undef") {
14848 print "/*", prefix defundef, macro, "*/"
14849 next
14850 }
14851 }
14852}
14853{ print }
14854_ACAWK
14855_ACEOF
14856cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl941f9562011-02-25 15:21:47 +000014857 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014858fi # test -n "$CONFIG_HEADERS"
14859
14860
14861eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14862shift
14863for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864do
14865 case $ac_tag in
14866 :[FHLC]) ac_mode=$ac_tag; continue;;
14867 esac
14868 case $ac_mode$ac_tag in
14869 :[FHL]*:*);;
Georg Brandl941f9562011-02-25 15:21:47 +000014870 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871 :[FH]-) ac_tag=-:-;;
14872 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14873 esac
14874 ac_save_IFS=$IFS
14875 IFS=:
14876 set x $ac_tag
14877 IFS=$ac_save_IFS
14878 shift
14879 ac_file=$1
14880 shift
14881
14882 case $ac_mode in
14883 :L) ac_source=$1;;
14884 :[FH])
14885 ac_file_inputs=
14886 for ac_f
14887 do
14888 case $ac_f in
Georg Brandl941f9562011-02-25 15:21:47 +000014889 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890 *) # Look for the file first in the build tree, then in the source tree
14891 # (if the path is not absolute). The absolute path cannot be DOS-style,
14892 # because $ac_f cannot contain `:'.
14893 test -f "$ac_f" ||
14894 case $ac_f in
14895 [\\/$]*) false;;
14896 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14897 esac ||
Georg Brandl941f9562011-02-25 15:21:47 +000014898 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14901 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902 done
14903
14904 # Let's still pretend it is `configure' which instantiates (i.e., don't
14905 # use $as_me), people would be surprised to read:
14906 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 configure_input='Generated from '`
14908 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14909 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910 if test x"$ac_file" != x-; then
14911 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14913$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 # Neutralize special characters interpreted by sed in replacement strings.
14916 case $configure_input in #(
14917 *\&* | *\|* | *\\* )
14918 ac_sed_conf_input=`$as_echo "$configure_input" |
14919 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14920 *) ac_sed_conf_input=$configure_input;;
14921 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922
14923 case $ac_tag in
Georg Brandl941f9562011-02-25 15:21:47 +000014924 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14925 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926 esac
14927 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014928 esac
14929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014931$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014932 X"$ac_file" : 'X\(//\)[^/]' \| \
14933 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014935$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14937 s//\1/
14938 q
14939 }
14940 /^X\(\/\/\)[^/].*/{
14941 s//\1/
14942 q
14943 }
14944 /^X\(\/\/\)$/{
14945 s//\1/
14946 q
14947 }
14948 /^X\(\/\).*/{
14949 s//\1/
14950 q
14951 }
14952 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 ac_builddir=.
14955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956case "$ac_dir" in
14957.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14958*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962 case $ac_top_builddir_sub in
14963 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14964 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14965 esac ;;
14966esac
14967ac_abs_top_builddir=$ac_pwd
14968ac_abs_builddir=$ac_pwd$ac_dir_suffix
14969# for backward compatibility:
14970ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
14972case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975 ac_top_srcdir=$ac_top_builddir_sub
14976 ac_abs_top_srcdir=$ac_pwd ;;
14977 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979 ac_top_srcdir=$srcdir
14980 ac_abs_top_srcdir=$srcdir ;;
14981 *) # Relative name.
14982 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14983 ac_top_srcdir=$ac_top_build_prefix$srcdir
14984 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014985esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014987
Martin v. Löwis11437992002-04-12 09:54:03 +000014988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989 case $ac_mode in
14990 :F)
14991 #
14992 # CONFIG_FILE
14993 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014994
14995 case $INSTALL in
14996 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014999_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000
Matthias Kloseb9621712010-04-24 17:59:49 +000015001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002# If the template does not know about datarootdir, expand it.
15003# FIXME: This hack should be removed a few years after 2.60.
15004ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015005ac_sed_dataroot='
15006/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 p
15008 q
15009}
15010/@datadir@/p
15011/@docdir@/p
15012/@infodir@/p
15013/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015014/@mandir@/p'
15015case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016*datarootdir*) ac_datarootdir_seen=yes;;
15017*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15019$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022 ac_datarootdir_hack='
15023 s&@datadir@&$datadir&g
15024 s&@docdir@&$docdir&g
15025 s&@infodir@&$infodir&g
15026 s&@localedir@&$localedir&g
15027 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029esac
15030_ACEOF
15031
15032# Neutralize VPATH when `$srcdir' = `.'.
15033# Shell code in configure.ac might set extrasub.
15034# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15036ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015037$extrasub
15038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015040:t
15041/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015042s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015044s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045s&@srcdir@&$ac_srcdir&;t t
15046s&@abs_srcdir@&$ac_abs_srcdir&;t t
15047s&@top_srcdir@&$ac_top_srcdir&;t t
15048s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15049s&@builddir@&$ac_builddir&;t t
15050s&@abs_builddir@&$ac_abs_builddir&;t t
15051s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15052s&@INSTALL@&$ac_INSTALL&;t t
15053$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015054"
Georg Brandl941f9562011-02-25 15:21:47 +000015055eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15056 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Georg Brandl941f9562011-02-25 15:21:47 +000015059 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15060 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15061 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl941f9562011-02-25 15:21:47 +000015063which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015064$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl941f9562011-02-25 15:21:47 +000015065which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015066
Georg Brandl941f9562011-02-25 15:21:47 +000015067 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015068 case $ac_file in
Georg Brandl941f9562011-02-25 15:21:47 +000015069 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15070 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 esac \
Georg Brandl941f9562011-02-25 15:21:47 +000015072 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 ;;
15074 :H)
15075 #
15076 # CONFIG_HEADER
15077 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 {
15080 $as_echo "/* $configure_input */" \
Georg Brandl941f9562011-02-25 15:21:47 +000015081 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15082 } >"$ac_tmp/config.h" \
15083 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15084 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015085 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15086$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 rm -f "$ac_file"
Georg Brandl941f9562011-02-25 15:21:47 +000015089 mv "$ac_tmp/config.h" "$ac_file" \
15090 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 fi
15092 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 $as_echo "/* $configure_input */" \
Georg Brandl941f9562011-02-25 15:21:47 +000015094 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15095 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099
15100 esac
15101
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015102
15103 case $ac_file$ac_mode in
15104 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15105
15106 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107done # for ac_tag
15108
Guido van Rossum627b2d71993-12-24 10:39:16 +000015109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015111_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015112ac_clean_files=$ac_clean_files_save
15113
Matthias Kloseb9621712010-04-24 17:59:49 +000015114test $ac_write_fail = 0 ||
Georg Brandl941f9562011-02-25 15:21:47 +000015115 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015116
Martin v. Löwis11437992002-04-12 09:54:03 +000015117
15118# configure is writing to config.log, and then calls config.status.
15119# config.status does its own redirection, appending to config.log.
15120# Unfortunately, on DOS this fails, as config.log is still kept open
15121# by configure, so config.status won't be able to write to it; its
15122# output is simply discarded. So we exec the FD to /dev/null,
15123# effectively closing config.log, so it can be properly (re)opened and
15124# appended to by config.status. When coming back to configure, we
15125# need to make the FD available again.
15126if test "$no_create" != yes; then
15127 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015128 ac_config_status_args=
15129 test "$silent" = yes &&
15130 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015132 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 exec 5>>config.log
15134 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15135 # would make configure fail if this is the last instruction.
Georg Brandl941f9562011-02-25 15:21:47 +000015136 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015137fi
15138if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15140$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015141fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015142
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015143
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015144echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015145if test ! -f Modules/Setup
15146then
15147 cp $srcdir/Modules/Setup.dist Modules/Setup
15148fi
15149
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015150echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015151if test ! -f Modules/Setup.local
15152then
15153 echo "# Edit this file for local setup changes" >Modules/Setup.local
15154fi
15155
15156echo "creating Makefile"
15157$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15158 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015159 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015160mv config.c Modules