blob: dc20f6917b4211ccbb7342e82769f3c987eaee23 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl3a5508e2011-03-06 10:42:21 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004# Generated by GNU Autoconf 2.68 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Martin v. Löwiseba40652007-08-30 20:10:57 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Martin v. Löwiseba40652007-08-30 20:10:57 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +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+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
37
Skip Montanaro6dead952003-09-25 14:50:04 +000038
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +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 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Martin v. Löwiseba40652007-08-30 20:10:57 +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.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000095as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000096case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117fi
118
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000136
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Brandl71f4fbb2011-02-25 11:04:50 +0000221 # Preserve -v and -x to the replacement shell.
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Brandl71f4fbb2011-02-25 11:04:50 +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 Klosea0bea5d2010-05-08 10:00:28 +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 Brandl71f4fbb2011-02-25 11:04:50 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Brandl71f4fbb2011-02-25 11:04:50 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Brandl71f4fbb2011-02-25 11:04:50 +0000375# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000376as_fn_error ()
377{
Georg Brandl71f4fbb2011-02-25 11:04:50 +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 Klosea0bea5d2010-05-08 10:00:28 +0000382 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000405
Martin v. Löwiseba40652007-08-30 20:10:57 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000410$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000431
432
Matthias Klosea0bea5d2010-05-08 10:00:28 +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. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000453 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000465case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000466-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000467 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000482 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000522 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524 case $1 in #(
525 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000526 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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 Brandl71f4fbb2011-02-25 11:04:50 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000564PACKAGE_VERSION='2.7'
565PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +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>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000606ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000607SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000608THREADHEADERS
609UNICODE_OBJS
610LIBC
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
642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100646HAS_HG
647HGBRANCH
648HGTAG
649HGVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650SVNVERSION
651ARFLAGS
652AR
653RANLIB
654GNULD
655LINKCC
656RUNSHARED
657INSTSONAME
658LDLIBRARYDIR
659BLDLIBRARY
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
678EXTRAMACHDEPPATH
679EXTRAPLATDIR
680SGI_ABI
681MACHDEP
682FRAMEWORKINSTALLAPPSPREFIX
683FRAMEWORKUNIXTOOLSPREFIX
684FRAMEWORKALTINSTALLLAST
685FRAMEWORKALTINSTALLFIRST
686FRAMEWORKINSTALLLAST
687FRAMEWORKINSTALLFIRST
688PYTHONFRAMEWORKINSTALLDIR
689PYTHONFRAMEWORKPREFIX
690PYTHONFRAMEWORKDIR
691PYTHONFRAMEWORKIDENTIFIER
692PYTHONFRAMEWORK
693LIPO_32BIT_FLAGS
694ARCH_RUN_32BIT
695UNIVERSALSDK
696CONFIG_ARGS
697SOVERSION
698VERSION
699target_alias
700host_alias
701build_alias
702LIBS
703ECHO_T
704ECHO_N
705ECHO_C
706DEFS
707mandir
708localedir
709libdir
710psdir
711pdfdir
712dvidir
713htmldir
714infodir
715docdir
716oldincludedir
717includedir
718localstatedir
719sharedstatedir
720sysconfdir
721datadir
722datarootdir
723libexecdir
724sbindir
725bindir
726program_transform_name
727prefix
728exec_prefix
729PACKAGE_URL
730PACKAGE_BUGREPORT
731PACKAGE_STRING
732PACKAGE_VERSION
733PACKAGE_TARNAME
734PACKAGE_NAME
735PATH_SEPARATOR
736SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000738ac_user_opts='
739enable_option_checking
740enable_universalsdk
741with_universal_archs
742with_framework_name
743enable_framework
744with_gcc
745with_cxx_main
746with_suffix
747enable_shared
748enable_profiling
749with_pydebug
750enable_toolbox_glue
751with_libs
752with_system_expat
753with_system_ffi
754with_dbmliborder
755with_signal_module
756with_dec_threads
757with_threads
758with_thread
759with_pth
760enable_ipv6
761with_doc_strings
762with_tsc
763with_pymalloc
764with_valgrind
765with_wctype_functions
766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770enable_unicode
771'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772 ac_precious_vars='build_alias
773host_alias
774target_alias
775CC
776CFLAGS
777LDFLAGS
778LIBS
779CPPFLAGS
780CPP'
781
Guido van Rossum627b2d71993-12-24 10:39:16 +0000782
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000784ac_init_help=
785ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000786ac_unrecognized_opts=
787ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788# The variables have the same names as the options, with
789# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000790cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793no_recursion=
794prefix=NONE
795program_prefix=NONE
796program_suffix=NONE
797program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802x_includes=NONE
803x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000804
805# Installation directory options.
806# These are left unexpanded so users can "make install exec_prefix=/foo"
807# and all the variables that are supposed to be based on exec_prefix
808# by default will actually change.
809# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000810# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811bindir='${exec_prefix}/bin'
812sbindir='${exec_prefix}/sbin'
813libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814datarootdir='${prefix}/share'
815datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816sysconfdir='${prefix}/etc'
817sharedstatedir='${prefix}/com'
818localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819includedir='${prefix}/include'
820oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000821docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
822infodir='${datarootdir}/info'
823htmldir='${docdir}'
824dvidir='${docdir}'
825pdfdir='${docdir}'
826psdir='${docdir}'
827libdir='${exec_prefix}/lib'
828localedir='${datarootdir}/locale'
829mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000832ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835 # If the previous option needs an argument, assign it.
836 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838 ac_prev=
839 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000843 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
844 *=) ac_optarg= ;;
845 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 # Accept the important Cygnus configure options, so we can diagnose typos.
849
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 case $ac_dashdash$ac_option in
851 --)
852 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -bindir | --bindir | --bindi | --bind | --bin | --bi)
855 ac_prev=bindir ;;
856 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858
859 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 -cache-file | --cache-file | --cache-fil | --cache-fi \
865 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
866 ac_prev=cache_file ;;
867 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
868 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 cache_file=$ac_optarg ;;
870
871 --config-cache | -C)
872 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878
Martin v. Löwiseba40652007-08-30 20:10:57 +0000879 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
880 | --dataroo | --dataro | --datar)
881 ac_prev=datarootdir ;;
882 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
883 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
884 datarootdir=$ac_optarg ;;
885
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000887 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000889 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000890 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000891 ac_useropt_orig=$ac_useropt
892 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
893 case $ac_user_opts in
894 *"
895"enable_$ac_useropt"
896"*) ;;
897 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
898 ac_unrecognized_sep=', ';;
899 esac
900 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901
902 -docdir | --docdir | --docdi | --doc | --do)
903 ac_prev=docdir ;;
904 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
905 docdir=$ac_optarg ;;
906
907 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
908 ac_prev=dvidir ;;
909 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
910 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
912 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000913 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000916 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
929 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
930 | --exec | --exe | --ex)
931 ac_prev=exec_prefix ;;
932 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
933 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
934 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
937 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 # Obsolete; use --with-gas.
939 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 -help | --help | --hel | --he | -h)
942 ac_init_help=long ;;
943 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
944 ac_init_help=recursive ;;
945 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
946 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
948 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Martin v. Löwiseba40652007-08-30 20:10:57 +0000953 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
954 ac_prev=htmldir ;;
955 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
956 | --ht=*)
957 htmldir=$ac_optarg ;;
958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -includedir | --includedir | --includedi | --included | --include \
960 | --includ | --inclu | --incl | --inc)
961 ac_prev=includedir ;;
962 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
963 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
966 -infodir | --infodir | --infodi | --infod | --info | --inf)
967 ac_prev=infodir ;;
968 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
971 -libdir | --libdir | --libdi | --libd)
972 ac_prev=libdir ;;
973 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
976 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
977 | --libexe | --libex | --libe)
978 ac_prev=libexecdir ;;
979 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
980 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Martin v. Löwiseba40652007-08-30 20:10:57 +0000983 -localedir | --localedir | --localedi | --localed | --locale)
984 ac_prev=localedir ;;
985 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
986 localedir=$ac_optarg ;;
987
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000989 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990 ac_prev=localstatedir ;;
991 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000992 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
995 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
996 ac_prev=mandir ;;
997 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 # Obsolete; use --without-fp.
1002 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 no_create=yes ;;
1007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1013 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1014 | --oldin | --oldi | --old | --ol | --o)
1015 ac_prev=oldincludedir ;;
1016 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1017 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1018 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1022 ac_prev=prefix ;;
1023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1027 | --program-pre | --program-pr | --program-p)
1028 ac_prev=program_prefix ;;
1029 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1030 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1034 | --program-suf | --program-su | --program-s)
1035 ac_prev=program_suffix ;;
1036 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1037 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
1040 -program-transform-name | --program-transform-name \
1041 | --program-transform-nam | --program-transform-na \
1042 | --program-transform-n | --program-transform- \
1043 | --program-transform | --program-transfor \
1044 | --program-transfo | --program-transf \
1045 | --program-trans | --program-tran \
1046 | --progr-tra | --program-tr | --program-t)
1047 ac_prev=program_transform_name ;;
1048 -program-transform-name=* | --program-transform-name=* \
1049 | --program-transform-nam=* | --program-transform-na=* \
1050 | --program-transform-n=* | --program-transform-=* \
1051 | --program-transform=* | --program-transfor=* \
1052 | --program-transfo=* | --program-transf=* \
1053 | --program-trans=* | --program-tran=* \
1054 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
Martin v. Löwiseba40652007-08-30 20:10:57 +00001057 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1058 ac_prev=pdfdir ;;
1059 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1060 pdfdir=$ac_optarg ;;
1061
1062 -psdir | --psdir | --psdi | --psd | --ps)
1063 ac_prev=psdir ;;
1064 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1065 psdir=$ac_optarg ;;
1066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 silent=yes ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1072 ac_prev=sbindir ;;
1073 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1074 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1078 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1079 | --sharedst | --shareds | --shared | --share | --shar \
1080 | --sha | --sh)
1081 ac_prev=sharedstatedir ;;
1082 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1083 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1084 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1085 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -site | --site | --sit)
1089 ac_prev=site ;;
1090 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1094 ac_prev=srcdir ;;
1095 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1099 | --syscon | --sysco | --sysc | --sys | --sy)
1100 ac_prev=sysconfdir ;;
1101 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1102 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1111 verbose=yes ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 -version | --version | --versio | --versi | --vers | -V)
1114 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001120 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001133 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001136 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 --x)
1149 # Obsolete; use --with-x.
1150 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1153 | --x-incl | --x-inc | --x-in | --x-i)
1154 ac_prev=x_includes ;;
1155 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1156 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1160 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1161 ac_prev=x_libraries ;;
1162 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1163 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001166 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1167Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 *=*)
1171 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1172 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001173 case $ac_envvar in #(
1174 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001175 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001177 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 export $ac_envvar ;;
1179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001182 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001184 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001185 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ;;
1187
1188 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001189done
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001193 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194fi
1195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196if test -n "$ac_unrecognized_opts"; then
1197 case $enable_option_checking in
1198 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001199 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001200 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1201 esac
1202fi
1203
1204# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001205for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1206 datadir sysconfdir sharedstatedir localstatedir includedir \
1207 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1208 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001211 # Remove trailing slashes.
1212 case $ac_val in
1213 */ )
1214 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1215 eval $ac_var=\$ac_val;;
1216 esac
1217 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219 [\\/$]* | ?:[\\/]* ) continue;;
1220 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001222 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001223done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# There might be people who depend on the old broken behavior: `$host'
1226# used to hold the argument of --host etc.
1227# FIXME: To remove some day.
1228build=$build_alias
1229host=$host_alias
1230target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Martin v. Löwis11437992002-04-12 09:54:03 +00001232# FIXME: To remove some day.
1233if test "x$host_alias" != x; then
1234 if test "x$build_alias" = x; then
1235 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001236 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1237 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 elif test "x$build_alias" != "x$host_alias"; then
1239 cross_compiling=yes
1240 fi
1241fi
1242
1243ac_tool_prefix=
1244test -n "$host_alias" && ac_tool_prefix=$host_alias-
1245
1246test "$silent" = yes && exec 6>/dev/null
1247
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249ac_pwd=`pwd` && test -n "$ac_pwd" &&
1250ac_ls_di=`ls -di .` &&
1251ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001252 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001253test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001254 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001255
1256
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257# Find the source files, if location was not specified.
1258if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001260 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001261 ac_confdir=`$as_dirname -- "$as_myself" ||
1262$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1263 X"$as_myself" : 'X\(//\)[^/]' \| \
1264 X"$as_myself" : 'X\(//\)$' \| \
1265 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1266$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)[^/].*/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)$/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\).*/{
1280 s//\1/
1281 q
1282 }
1283 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001285 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286 srcdir=..
1287 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288else
1289 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291if test ! -r "$srcdir/$ac_unique_file"; then
1292 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001293 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001295ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1296ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001297 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001298 pwd)`
1299# When building in place, set srcdir=.
1300if test "$ac_abs_confdir" = "$ac_pwd"; then
1301 srcdir=.
1302fi
1303# Remove unnecessary trailing slashes from srcdir.
1304# Double slashes in file names in object file debugging info
1305# mess up M-x gdb in Emacs.
1306case $srcdir in
1307*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308esac
1309for ac_var in $ac_precious_vars; do
1310 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311 eval ac_env_${ac_var}_value=\$${ac_var}
1312 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316#
1317# Report the --help message.
1318#
1319if test "$ac_init_help" = "long"; then
1320 # Omit some internal or obsolete options to make the list less imposing.
1321 # This message is too long to be a string in the A/UX 3.1 sh.
1322 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001323\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001324
1325Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328VAR=VALUE. See below for descriptions of some of the useful variables.
1329
1330Defaults for the options are specified in brackets.
1331
1332Configuration:
1333 -h, --help display this help and exit
1334 --help=short display options specific to this package
1335 --help=recursive display the short help of all the included packages
1336 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001337 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --cache-file=FILE cache test results in FILE [disabled]
1339 -C, --config-cache alias for \`--cache-file=config.cache'
1340 -n, --no-create do not create output files
1341 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343Installation directories:
1344 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001345 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001346 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001347 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349By default, \`make install' will install all the files in
1350\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1351an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352for instance \`--prefix=\$HOME'.
1353
1354For better control, use the options below.
1355
1356Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001357 --bindir=DIR user executables [EPREFIX/bin]
1358 --sbindir=DIR system admin executables [EPREFIX/sbin]
1359 --libexecdir=DIR program executables [EPREFIX/libexec]
1360 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1361 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1362 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1363 --libdir=DIR object code libraries [EPREFIX/lib]
1364 --includedir=DIR C header files [PREFIX/include]
1365 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1366 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1367 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1368 --infodir=DIR info documentation [DATAROOTDIR/info]
1369 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1370 --mandir=DIR man documentation [DATAROOTDIR/man]
1371 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1372 --htmldir=DIR html documentation [DOCDIR]
1373 --dvidir=DIR dvi documentation [DOCDIR]
1374 --pdfdir=DIR pdf documentation [DOCDIR]
1375 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
1377
1378 cat <<\_ACEOF
1379_ACEOF
1380fi
1381
1382if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001383 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001384 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001385 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 cat <<\_ACEOF
1387
1388Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001389 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1391 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001392 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001393 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --enable-framework[=INSTALLDIR]
1395 Build (MacOSX|Darwin) framework
1396 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001397 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1399 --enable-ipv6 Enable ipv6 (with ipv4) support
1400 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001401 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001402 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001403 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001404 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001411 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
1430 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1431 --with(out)-threads[=DIRECTORY]
1432 disable/enable thread support
1433 --with(out)-thread[=DIRECTORY]
1434 deprecated; use --with(out)-threads
1435 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001437 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001439 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --with-fpectl enable SIGFPE catching
1442 --with-libm=STRING math library
1443 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
1445Some influential environment variables:
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1449 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001450 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 CPP C preprocessor
1454
1455Use these variables to override the choices made by `configure' or to help
1456it to find libraries and programs with nonstandard names/locations.
1457
Georg Brandl464432d2009-05-20 18:24:08 +00001458Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001460ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001461fi
1462
1463if test "$ac_init_help" = "recursive"; then
1464 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001466 test -d "$ac_dir" ||
1467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 ac_builddir=.
1470
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471case "$ac_dir" in
1472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001477 case $ac_top_builddir_sub in
1478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480 esac ;;
1481esac
1482ac_abs_top_builddir=$ac_pwd
1483ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484# for backward compatibility:
1485ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001488 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490 ac_top_srcdir=$ac_top_builddir_sub
1491 ac_abs_top_srcdir=$ac_pwd ;;
1492 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001494 ac_top_srcdir=$srcdir
1495 ac_abs_top_srcdir=$srcdir ;;
1496 *) # Relative name.
1497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498 ac_top_srcdir=$ac_top_build_prefix$srcdir
1499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001500esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001502
Martin v. Löwiseba40652007-08-30 20:10:57 +00001503 cd "$ac_dir" || { ac_status=$?; continue; }
1504 # Check for guested configure.
1505 if test -f "$ac_srcdir/configure.gnu"; then
1506 echo &&
1507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508 elif test -f "$ac_srcdir/configure"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001513 fi || ac_status=$?
1514 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 done
1516fi
1517
Martin v. Löwiseba40652007-08-30 20:10:57 +00001518test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001519if $ac_init_version; then
1520 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001521python configure 2.7
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001522generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001524Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525This configure script is free software; the Free Software Foundation
1526gives unlimited permission to copy, distribute and modify it.
1527_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001528 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001529fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001530
1531## ------------------------ ##
1532## Autoconf initialization. ##
1533## ------------------------ ##
1534
1535# ac_fn_c_try_compile LINENO
1536# --------------------------
1537# Try to compile conftest.$ac_ext, and return whether this succeeded.
1538ac_fn_c_try_compile ()
1539{
1540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541 rm -f conftest.$ac_objext
1542 if { { ac_try="$ac_compile"
1543case "(($ac_try" in
1544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545 *) ac_try_echo=$ac_try;;
1546esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548$as_echo "$ac_try_echo"; } >&5
1549 (eval "$ac_compile") 2>conftest.err
1550 ac_status=$?
1551 if test -s conftest.err; then
1552 grep -v '^ *+' conftest.err >conftest.er1
1553 cat conftest.er1 >&5
1554 mv -f conftest.er1 conftest.err
1555 fi
1556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557 test $ac_status = 0; } && {
1558 test -z "$ac_c_werror_flag" ||
1559 test ! -s conftest.err
1560 } && test -s conftest.$ac_objext; then :
1561 ac_retval=0
1562else
1563 $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5
1565
1566 ac_retval=1
1567fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001569 as_fn_set_status $ac_retval
1570
1571} # ac_fn_c_try_compile
1572
1573# ac_fn_c_try_cpp LINENO
1574# ----------------------
1575# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1576ac_fn_c_try_cpp ()
1577{
1578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1579 if { { ac_try="$ac_cpp conftest.$ac_ext"
1580case "(($ac_try" in
1581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1582 *) ac_try_echo=$ac_try;;
1583esac
1584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1585$as_echo "$ac_try_echo"; } >&5
1586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1587 ac_status=$?
1588 if test -s conftest.err; then
1589 grep -v '^ *+' conftest.err >conftest.er1
1590 cat conftest.er1 >&5
1591 mv -f conftest.er1 conftest.err
1592 fi
1593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001594 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1596 test ! -s conftest.err
1597 }; then :
1598 ac_retval=0
1599else
1600 $as_echo "$as_me: failed program was:" >&5
1601sed 's/^/| /' conftest.$ac_ext >&5
1602
1603 ac_retval=1
1604fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_cpp
1609
1610# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1611# -------------------------------------------------------
1612# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1613# the include files in INCLUDES and setting the cache variable VAR
1614# accordingly.
1615ac_fn_c_check_header_mongrel ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001618 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1620$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001621if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001622 $as_echo_n "(cached) " >&6
1623fi
1624eval ac_res=\$$3
1625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1626$as_echo "$ac_res" >&6; }
1627else
1628 # Is the header compilable?
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1630$as_echo_n "checking $2 usability... " >&6; }
1631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1632/* end confdefs.h. */
1633$4
1634#include <$2>
1635_ACEOF
1636if ac_fn_c_try_compile "$LINENO"; then :
1637 ac_header_compiler=yes
1638else
1639 ac_header_compiler=no
1640fi
1641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1643$as_echo "$ac_header_compiler" >&6; }
1644
1645# Is the header present?
1646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1647$as_echo_n "checking $2 presence... " >&6; }
1648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1649/* end confdefs.h. */
1650#include <$2>
1651_ACEOF
1652if ac_fn_c_try_cpp "$LINENO"; then :
1653 ac_header_preproc=yes
1654else
1655 ac_header_preproc=no
1656fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001657rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1659$as_echo "$ac_header_preproc" >&6; }
1660
1661# So? What about this header?
1662case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1663 yes:no: )
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1665$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1668 ;;
1669 no:yes:* )
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1671$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1673$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1675$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1677$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1679$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001680( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001681## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001682## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001683 ) | sed "s/^/$as_me: WARNING: /" >&2
1684 ;;
1685esac
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1687$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001688if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001689 $as_echo_n "(cached) " >&6
1690else
1691 eval "$3=\$ac_header_compiler"
1692fi
1693eval ac_res=\$$3
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1695$as_echo "$ac_res" >&6; }
1696fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001698
1699} # ac_fn_c_check_header_mongrel
1700
1701# ac_fn_c_try_run LINENO
1702# ----------------------
1703# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1704# that executables *can* be run.
1705ac_fn_c_try_run ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708 if { { ac_try="$ac_link"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_link") 2>&5
1716 ac_status=$?
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1719 { { case "(($ac_try" in
1720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1721 *) ac_try_echo=$ac_try;;
1722esac
1723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1724$as_echo "$ac_try_echo"; } >&5
1725 (eval "$ac_try") 2>&5
1726 ac_status=$?
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; }; }; then :
1729 ac_retval=0
1730else
1731 $as_echo "$as_me: program exited with status $ac_status" >&5
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=$ac_status
1736fi
1737 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001738 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001739 as_fn_set_status $ac_retval
1740
1741} # ac_fn_c_try_run
1742
1743# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1744# -------------------------------------------------------
1745# Tests whether HEADER exists and can be compiled using the include files in
1746# INCLUDES, setting the cache variable VAR accordingly.
1747ac_fn_c_check_header_compile ()
1748{
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001752if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001753 $as_echo_n "(cached) " >&6
1754else
1755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1756/* end confdefs.h. */
1757$4
1758#include <$2>
1759_ACEOF
1760if ac_fn_c_try_compile "$LINENO"; then :
1761 eval "$3=yes"
1762else
1763 eval "$3=no"
1764fi
1765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1766fi
1767eval ac_res=\$$3
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1769$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001770 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001771
1772} # ac_fn_c_check_header_compile
1773
1774# ac_fn_c_try_link LINENO
1775# -----------------------
1776# Try to link conftest.$ac_ext, and return whether this succeeded.
1777ac_fn_c_try_link ()
1778{
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext conftest$ac_exeext
1781 if { { ac_try="$ac_link"
1782case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1794 fi
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest$ac_exeext && {
1800 test "$cross_compiling" = yes ||
1801 $as_test_x conftest$ac_exeext
1802 }; then :
1803 ac_retval=0
1804else
1805 $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
1807
1808 ac_retval=1
1809fi
1810 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1811 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1812 # interfere with the next link command; also delete a directory that is
1813 # left behind by Apple's compiler. We do this before executing the actions.
1814 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001816 as_fn_set_status $ac_retval
1817
1818} # ac_fn_c_try_link
1819
1820# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1821# -------------------------------------------
1822# Tests whether TYPE exists after having included INCLUDES, setting cache
1823# variable VAR accordingly.
1824ac_fn_c_check_type ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1828$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001829if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001830 $as_echo_n "(cached) " >&6
1831else
1832 eval "$3=no"
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839if (sizeof ($2))
1840 return 0;
1841 ;
1842 return 0;
1843}
1844_ACEOF
1845if ac_fn_c_try_compile "$LINENO"; then :
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849int
1850main ()
1851{
1852if (sizeof (($2)))
1853 return 0;
1854 ;
1855 return 0;
1856}
1857_ACEOF
1858if ac_fn_c_try_compile "$LINENO"; then :
1859
1860else
1861 eval "$3=yes"
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001871
1872} # ac_fn_c_check_type
1873
1874# ac_fn_c_find_uintX_t LINENO BITS VAR
1875# ------------------------------------
1876# Finds an unsigned integer type with width BITS, setting cache variable VAR
1877# accordingly.
1878ac_fn_c_find_uintX_t ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1882$as_echo_n "checking for uint$2_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001883if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 # Order is important - never check a type that is potentially smaller
1888 # than half of the expected target width.
1889 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1890 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$ac_includes_default
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1898test_array [0] = 0
1899
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 case $ac_type in #(
1906 uint$2_t) :
1907 eval "$3=yes" ;; #(
1908 *) :
1909 eval "$3=\$ac_type" ;;
1910esac
1911fi
1912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001913 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001914
1915else
1916 break
1917fi
1918 done
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001924
1925} # ac_fn_c_find_uintX_t
1926
1927# ac_fn_c_find_intX_t LINENO BITS VAR
1928# -----------------------------------
1929# Finds a signed integer type with width BITS, setting cache variable VAR
1930# accordingly.
1931ac_fn_c_find_intX_t ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1935$as_echo_n "checking for int$2_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001936if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001937 $as_echo_n "(cached) " >&6
1938else
1939 eval "$3=no"
1940 # Order is important - never check a type that is potentially smaller
1941 # than half of the expected target width.
1942 for ac_type in int$2_t 'int' 'long int' \
1943 'long long int' 'short int' 'signed char'; do
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001947 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001948int
1949main ()
1950{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001951static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001962 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001963int
1964main ()
1965{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001966static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001967 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1968test_array [0] = 0
1969
1970 ;
1971 return 0;
1972}
1973_ACEOF
1974if ac_fn_c_try_compile "$LINENO"; then :
1975
1976else
1977 case $ac_type in #(
1978 int$2_t) :
1979 eval "$3=yes" ;; #(
1980 *) :
1981 eval "$3=\$ac_type" ;;
1982esac
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001998
1999} # ac_fn_c_find_intX_t
2000
2001# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2002# --------------------------------------------
2003# Tries to find the compile-time value of EXPR in a program that includes
2004# INCLUDES, setting VAR accordingly. Returns whether the value could be
2005# computed
2006ac_fn_c_compute_int ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 if test "$cross_compiling" = yes; then
2010 # Depending upon the size, compute the lo and hi bounds.
2011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) >= 0)];
2018test_array [0] = 0
2019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_lo=0 ac_mid=0
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2034test_array [0] = 0
2035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_hi=$ac_mid; break
2042else
2043 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2044 if test $ac_lo -le $ac_mid; then
2045 ac_lo= ac_hi=
2046 break
2047 fi
2048 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 done
2052else
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) < 0)];
2060test_array [0] = 0
2061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2076test_array [0] = 0
2077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2110test_array [0] = 0
2111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002187if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002243
2244} # ac_fn_c_check_func
2245
2246# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2247# ----------------------------------------------------
2248# Tries to find if the field MEMBER exists in type AGGR, after including
2249# INCLUDES, setting cache variable VAR accordingly.
2250ac_fn_c_check_member ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2254$as_echo_n "checking for $2.$3... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002255if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002256 $as_echo_n "(cached) " >&6
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260$5
2261int
2262main ()
2263{
2264static $2 ac_aggr;
2265if (ac_aggr.$3)
2266return 0;
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 eval "$4=yes"
2273else
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$5
2277int
2278main ()
2279{
2280static $2 ac_aggr;
2281if (sizeof ac_aggr.$3)
2282return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288 eval "$4=yes"
2289else
2290 eval "$4=no"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$4
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002299 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002300
2301} # ac_fn_c_check_member
2302
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002303# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2304# ---------------------------------------------
2305# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2306# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002307ac_fn_c_check_decl ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002310 as_decl_name=`echo $2|sed 's/ *(.*//'`
2311 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2313$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2314if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002315 $as_echo_n "(cached) " >&6
2316else
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h. */
2319$4
2320int
2321main ()
2322{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002323#ifndef $as_decl_name
2324#ifdef __cplusplus
2325 (void) $as_decl_use;
2326#else
2327 (void) $as_decl_name;
2328#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002329#endif
2330
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$3=yes"
2337else
2338 eval "$3=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002346
2347} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Martin v. Löwis174440b2008-10-03 08:59:41 +00002352It was created by python $as_me 2.7, which was
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002353generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002389 $as_echo "PATH: $as_dir"
2390 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002423 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# 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 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002491 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002493 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002514 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002586if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
2611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$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 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703
Martin v. Löwis11437992002-04-12 09:54:03 +00002704
Georg Brandlbcd64a32009-03-31 21:45:18 +00002705if test "$prefix" != "/"; then
2706 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2707fi
2708
2709
Martin v. Löwis11437992002-04-12 09:54:03 +00002710
2711
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002712# We don't use PACKAGE_ variables, and they cause conflicts
2713# with other autoconf-based packages that include Python.h
2714grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2715rm confdefs.h
2716mv confdefs.h.new confdefs.h
2717
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002718
Martin v. Löwis174440b2008-10-03 08:59:41 +00002719VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002720
Martin v. Löwis1142de32002-03-29 16:28:31 +00002721
2722SOVERSION=1.0
2723
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002724# The later defininition of _XOPEN_SOURCE disables certain features
2725# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002727$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002728
2729
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2732# them.
2733
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002734$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002735
2736
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2739# them.
2740
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002742
2743
Martin v. Löwisd6320502004-08-12 13:45:08 +00002744# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2745# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2746
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002748
2749
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002750# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2751# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2752# them.
2753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002754$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002755
2756
2757
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002758define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002759
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002760# Arguments passed to configure.
2761
2762CONFIG_ARGS="$ac_configure_args"
2763
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2765$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002767if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002769 case $enableval in
2770 yes)
2771 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002772 if test ! -d "${enableval}"
2773 then
2774 enableval=/
2775 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002776 ;;
2777 esac
2778 case $enableval in
2779 no)
2780 UNIVERSALSDK=
2781 enable_universalsdk=
2782 ;;
2783 *)
2784 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002785 if test ! -d "${UNIVERSALSDK}"
2786 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002787 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002788 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002789 ;;
2790 esac
2791
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002792
Ronald Oussoren988117f2006-04-29 11:31:35 +00002793else
2794
2795 UNIVERSALSDK=
2796 enable_universalsdk=
2797
Martin v. Löwiseba40652007-08-30 20:10:57 +00002798fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002799
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002800if test -n "${UNIVERSALSDK}"
2801then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2803$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2806$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002807fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002808
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002810
2811
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002812UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2815$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002816
2817# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002818if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002819 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2821$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002822 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002823 if test "${enable_universalsdk}" ; then
2824 :
2825 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002826 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002827 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002828
2829else
2830
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2832$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002833
2834fi
2835
2836
2837
2838
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002839
2840# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002841if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002842 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002843 if test "${enable_framework}"; then
2844 :
2845 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002846 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002847 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002848 PYTHONFRAMEWORK=${withval}
2849 PYTHONFRAMEWORKDIR=${withval}.framework
2850 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2851
2852else
2853
2854 PYTHONFRAMEWORK=Python
2855 PYTHONFRAMEWORKDIR=Python.framework
2856 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2857
2858fi
2859
Martin v. Löwiseba40652007-08-30 20:10:57 +00002860# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002861if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002862 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002863 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002865 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002866 esac
2867 case $enableval in
2868 no)
2869 PYTHONFRAMEWORK=
2870 PYTHONFRAMEWORKDIR=no-framework
2871 PYTHONFRAMEWORKPREFIX=
2872 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002873 FRAMEWORKINSTALLFIRST=
2874 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002875 FRAMEWORKALTINSTALLFIRST=
2876 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002877 if test "x${prefix}" = "xNONE"; then
2878 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2879 else
2880 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2881 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002882 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002883 ;;
2884 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002885 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002886 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002887 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002888 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002889 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2890 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002891 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002892
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002893 if test "x${prefix}" = "xNONE" ; then
2894 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002895
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002896 else
2897 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2898 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002899
2900 case "${enableval}" in
2901 /System*)
2902 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903 if test "${prefix}" = "NONE" ; then
2904 # See below
2905 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2906 fi
2907 ;;
2908
2909 /Library*)
2910 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2911 ;;
2912
2913 */Library/Frameworks)
2914 MDIR="`dirname "${enableval}"`"
2915 MDIR="`dirname "${MDIR}"`"
2916 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2917
2918 if test "${prefix}" = "NONE"; then
2919 # User hasn't specified the
2920 # --prefix option, but wants to install
2921 # the framework in a non-default location,
2922 # ensure that the compatibility links get
2923 # installed relative to that prefix as well
2924 # instead of in /usr/local.
2925 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2926 fi
2927 ;;
2928
2929 *)
2930 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2931 ;;
2932 esac
2933
Jack Jansen127e56e2001-09-11 14:41:54 +00002934 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002935
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002936 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002937 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002938 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002939
Martin v. Löwiseba40652007-08-30 20:10:57 +00002940 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002941
Martin v. Löwiseba40652007-08-30 20:10:57 +00002942 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002943
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002944 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2945
2946 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2947
Jack Jansene578a632001-08-15 01:27:14 +00002948 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Guido van Rossum563e7081996-09-10 18:20:48 +00002950else
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
Jack Jansene578a632001-08-15 01:27:14 +00002952 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002953 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002954 PYTHONFRAMEWORKPREFIX=
2955 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002956 FRAMEWORKINSTALLFIRST=
2957 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002958 FRAMEWORKALTINSTALLFIRST=
2959 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002960 if test "x${prefix}" = "xNONE" ; then
2961 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2962 else
2963 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2964 fi
Jack Jansene578a632001-08-15 01:27:14 +00002965 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002967
Martin v. Löwiseba40652007-08-30 20:10:57 +00002968fi
2969
Michael W. Hudson54241132001-12-07 15:38:26 +00002970
2971
2972
2973
Jack Jansene578a632001-08-15 01:27:14 +00002974
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002975
2976
Ronald Oussoren5b787322006-06-06 19:50:24 +00002977
2978
2979
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002980
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002981
Jack Jansene578a632001-08-15 01:27:14 +00002982##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002983## AS_HELP_STRING([--with-dyld],
2984## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002985##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986# Set name for machine-dependent library files
2987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2989$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990if test -z "$MACHDEP"
2991then
Guido van Rossum563e7081996-09-10 18:20:48 +00002992 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002993 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002994 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002995 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002996 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002997 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002998 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002999 ac_md_system=`echo $ac_sys_system |
3000 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3001 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003002 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003003 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003004
Guido van Rossum07397971997-04-29 21:49:50 +00003005 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003006 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003007 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003008 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003009 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003010 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003011 esac
3012fi
Guido van Rossum91922671997-10-09 20:24:13 +00003013
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003014# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3015# disable features if it is defined, without any means to access these
3016# features as extensions. For these systems, we skip the definition of
3017# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3018# some feature, make sure there is no alternative way to access this
3019# feature. Also, when using wildcards, make sure you have verified the
3020# need for not defining _XOPEN_SOURCE on all systems matching the
3021# wildcard, and that the wildcard does not include future systems
3022# (which may remove their limitations).
3023case $ac_sys_system/$ac_sys_release in
3024 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3025 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003026 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003027 # In addition, Stefan Krah confirms that issue #1244610 exists through
3028 # OpenBSD 4.6, but is fixed in 4.7.
3029 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003030 define_xopen_source=no
3031 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3032 # also defined. This can be overridden by defining _BSD_SOURCE
3033 # As this has a different meaning on Linux, only define it on OpenBSD
3034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003036
3037 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003038 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003039 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3040 # also defined. This can be overridden by defining _BSD_SOURCE
3041 # As this has a different meaning on Linux, only define it on OpenBSD
3042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003043$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003044
3045 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003046 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3047 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3048 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003049 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003050 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003051 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3052 # request to enable features supported by the standard as a request
3053 # to disable features not supported by the standard. The best way
3054 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3055 # entirely and define __EXTENSIONS__ instead.
3056 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003057 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003058 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3059 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003060 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003061 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003062 define_xopen_source=no;;
3063 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003064 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003065 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003066 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003067 # On FreeBSD 4, the math functions C89 does not cover are never defined
3068 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3069 FreeBSD/4.*)
3070 define_xopen_source=no;;
3071 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3072 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3073 # identifies itself as Darwin/7.*
3074 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3075 # disables platform specific features beyond repair.
3076 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3077 # has no effect, don't bother defining them
3078 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003079 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003080 Darwin/1[0-9].*)
3081 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003082 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3083 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3084 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003085 AIX/4)
3086 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003087 AIX/5)
3088 if test `uname -r` -eq 1; then
3089 define_xopen_source=no
3090 fi
3091 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003092 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3093 # defining NI_NUMERICHOST.
3094 QNX/6.3.2)
3095 define_xopen_source=no
3096 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003097
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003098esac
3099
3100if test $define_xopen_source = yes
3101then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003103$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003104
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003105
3106 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3107 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3108 # several APIs are not declared. Since this is also needed in some
3109 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003111$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003112
3113
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003115$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003116
3117
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003118fi
3119
Guido van Rossum91922671997-10-09 20:24:13 +00003120#
3121# SGI compilers allow the specification of the both the ABI and the
3122# ISA on the command line. Depending on the values of these switches,
3123# different and often incompatable code will be generated.
3124#
3125# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3126# thus supply support for various ABI/ISA combinations. The MACHDEP
3127# variable is also adjusted.
3128#
3129
3130if test ! -z "$SGI_ABI"
3131then
3132 CC="cc $SGI_ABI"
3133 LDFLAGS="$SGI_ABI $LDFLAGS"
3134 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3137$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003138
Jack Jansen83f898c2002-12-30 22:23:40 +00003139# And add extra plat-mac for darwin
3140
Jack Jansen7b59b422003-03-17 15:44:10 +00003141
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3143$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003144if test -z "$EXTRAPLATDIR"
3145then
3146 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003147 darwin)
3148 EXTRAPLATDIR="\$(PLATMACDIRS)"
3149 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3150 ;;
3151 *)
3152 EXTRAPLATDIR=""
3153 EXTRAMACHDEPPATH=""
3154 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003155 esac
3156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3158$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003159
Jack Jansen6b08a402004-06-03 12:41:45 +00003160# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3161# it may influence the way we can build extensions, so distutils
3162# needs to check it
3163
Ronald Oussoren988117f2006-04-29 11:31:35 +00003164
Jack Jansen6b08a402004-06-03 12:41:45 +00003165CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003166EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003167
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3169$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003170ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3172$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003173
Guido van Rossum627b2d71993-12-24 10:39:16 +00003174# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003175
3176# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3177# for debug/optimization stuff. BASECFLAGS is for flags that are required
3178# just to get things to compile and link. Users are free to override OPT
3179# when running configure or make. The build should not break if they do.
3180# BASECFLAGS should generally not be messed with, however.
3181
3182# XXX shouldn't some/most/all of this code be merged with the stuff later
3183# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3185$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003186
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003188if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003189 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003190 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003191 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003192 without_gcc=yes;;
3193 yes) CC=gcc
3194 without_gcc=no;;
3195 *) CC=$withval
3196 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003197 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003198else
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003200 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003201 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003202 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003203 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003204 case $BE_HOST_CPU in
3205 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003206 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003207 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003208 BASECFLAGS="$BASECFLAGS -export pragma"
3209 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003210 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003211 ;;
3212 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003213 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003214 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003215 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003216 ;;
3217 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003218 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003219 ;;
3220 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003221 AR="\$(srcdir)/Modules/ar_beos"
3222 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003223 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003224 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003225 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003226fi
3227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3229$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003230
Guido van Rossum8b131c51995-03-09 14:10:13 +00003231# If the user switches compilers, we can't believe the cache
3232if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3233then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003234 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003235(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003236fi
3237
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003238# If the user set CFLAGS, use this instead of the automatically
3239# determined setting
3240preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003241ac_ext=c
3242ac_cpp='$CPP $CPPFLAGS'
3243ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3244ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3245ac_compiler_gnu=$ac_cv_c_compiler_gnu
3246if test -n "$ac_tool_prefix"; then
3247 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3248set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3250$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003251if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003252 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003253else
3254 if test -n "$CC"; then
3255 ac_cv_prog_CC="$CC" # Let the user override the test.
3256else
Martin v. Löwis11437992002-04-12 09:54:03 +00003257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3258for as_dir in $PATH
3259do
3260 IFS=$as_save_IFS
3261 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003262 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003263 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 +00003264 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003265 $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 +00003266 break 2
3267 fi
3268done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003269 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003270IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003271
Jack Jansendd19cf82001-12-06 22:36:17 +00003272fi
3273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003274CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003275if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3277$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3280$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003281fi
3282
Martin v. Löwiseba40652007-08-30 20:10:57 +00003283
Martin v. Löwis11437992002-04-12 09:54:03 +00003284fi
3285if test -z "$ac_cv_prog_CC"; then
3286 ac_ct_CC=$CC
3287 # Extract the first word of "gcc", so it can be a program name with args.
3288set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3290$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003291if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003292 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003293else
3294 if test -n "$ac_ct_CC"; then
3295 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3296else
3297as_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 Klosea0bea5d2010-05-08 10:00:28 +00003302 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +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_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +00003309 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003310IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003311
3312fi
3313fi
3314ac_ct_CC=$ac_cv_prog_ac_ct_CC
3315if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3317$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +00003323 if test "x$ac_ct_CC" = x; then
3324 CC=""
3325 else
3326 case $cross_compiling:$ac_tool_warned in
3327yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003328{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3329$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003330ac_tool_warned=yes ;;
3331esac
3332 CC=$ac_ct_CC
3333 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003334else
3335 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003336fi
3337
Jack Jansendd19cf82001-12-06 22:36:17 +00003338if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 if test -n "$ac_tool_prefix"; then
3340 # 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 +00003341set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3343$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003344if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003345 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003346else
3347 if test -n "$CC"; then
3348 ac_cv_prog_CC="$CC" # Let the user override the test.
3349else
Martin v. Löwis11437992002-04-12 09:54:03 +00003350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3351for as_dir in $PATH
3352do
3353 IFS=$as_save_IFS
3354 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003355 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003356 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 +00003357 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003358 $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 +00003359 break 2
3360 fi
3361done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003362 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003363IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003364
3365fi
3366fi
3367CC=$ac_cv_prog_CC
3368if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3370$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3373$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003374fi
3375
Martin v. Löwiseba40652007-08-30 20:10:57 +00003376
Martin v. Löwis11437992002-04-12 09:54:03 +00003377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003378fi
3379if test -z "$CC"; then
3380 # Extract the first word of "cc", so it can be a program name with args.
3381set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3383$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003384if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003385 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003386else
3387 if test -n "$CC"; then
3388 ac_cv_prog_CC="$CC" # Let the user override the test.
3389else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003390 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392for as_dir in $PATH
3393do
3394 IFS=$as_save_IFS
3395 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003396 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003397 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 +00003398 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3399 ac_prog_rejected=yes
3400 continue
3401 fi
3402 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003403 $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 +00003404 break 2
3405 fi
3406done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003407 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003409
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003410if test $ac_prog_rejected = yes; then
3411 # We found a bogon in the path, so make sure we never use it.
3412 set dummy $ac_cv_prog_CC
3413 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003415 # We chose a different compiler from the bogus one.
3416 # However, it has the same basename, so the bogon will be chosen
3417 # first if we set CC to just the basename; use the full file name.
3418 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003419 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420 fi
3421fi
3422fi
3423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003424CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003425if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3427$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3430$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003431fi
3432
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433
Martin v. Löwis11437992002-04-12 09:54:03 +00003434fi
3435if test -z "$CC"; then
3436 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003437 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 do
3439 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3440set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3442$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003443if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003444 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003445else
3446 if test -n "$CC"; then
3447 ac_cv_prog_CC="$CC" # Let the user override the test.
3448else
Martin v. Löwis11437992002-04-12 09:54:03 +00003449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3450for as_dir in $PATH
3451do
3452 IFS=$as_save_IFS
3453 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003454 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003455 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 +00003456 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003457 $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 +00003458 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003460done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003461 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003462IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003463
3464fi
3465fi
3466CC=$ac_cv_prog_CC
3467if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3469$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003473fi
3474
Martin v. Löwiseba40652007-08-30 20:10:57 +00003475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 test -n "$CC" && break
3477 done
3478fi
3479if test -z "$CC"; then
3480 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003481 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003482do
3483 # Extract the first word of "$ac_prog", so it can be a program name with args.
3484set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3486$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003487if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003488 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003489else
3490 if test -n "$ac_ct_CC"; then
3491 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3492else
3493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494for as_dir in $PATH
3495do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003498 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499 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 +00003500 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003501 $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 +00003502 break 2
3503 fi
3504done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003505 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003506IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003507
Martin v. Löwis11437992002-04-12 09:54:03 +00003508fi
3509fi
3510ac_ct_CC=$ac_cv_prog_ac_ct_CC
3511if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3513$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3516$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003518
Martin v. Löwiseba40652007-08-30 20:10:57 +00003519
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 test -n "$ac_ct_CC" && break
3521done
Michael W. Hudson54241132001-12-07 15:38:26 +00003522
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523 if test "x$ac_ct_CC" = x; then
3524 CC=""
3525 else
3526 case $cross_compiling:$ac_tool_warned in
3527yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003528{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3529$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003530ac_tool_warned=yes ;;
3531esac
3532 CC=$ac_ct_CC
3533 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003534fi
3535
3536fi
3537
3538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003539test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003541as_fn_error $? "no acceptable C compiler found in \$PATH
3542See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003543
3544# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003545$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3546set X $ac_compile
3547ac_compiler=$2
3548for ac_option in --version -v -V -qversion; do
3549 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003550case "(($ac_try" in
3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3552 *) ac_try_echo=$ac_try;;
3553esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003554eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3555$as_echo "$ac_try_echo"; } >&5
3556 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003558 if test -s conftest.err; then
3559 sed '10a\
3560... rest of stderr output deleted ...
3561 10q' conftest.err >conftest.er1
3562 cat conftest.er1 >&5
3563 fi
3564 rm -f conftest.er1 conftest.err
3565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3566 test $ac_status = 0; }
3567done
Martin v. Löwis11437992002-04-12 09:54:03 +00003568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003570/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003571
Martin v. Löwis11437992002-04-12 09:54:03 +00003572int
3573main ()
3574{
3575
3576 ;
3577 return 0;
3578}
3579_ACEOF
3580ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003582# Try to create an executable without -o first, disregard a.out.
3583# It will help us diagnose broken compilers, and finding out an intuition
3584# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3586$as_echo_n "checking whether the C compiler works... " >&6; }
3587ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3588
3589# The possible output files:
3590ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3591
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592ac_rmfiles=
3593for ac_file in $ac_files
3594do
3595 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003596 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003597 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3598 esac
3599done
3600rm -f $ac_rmfiles
3601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003602if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003603case "(($ac_try" in
3604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3605 *) ac_try_echo=$ac_try;;
3606esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3608$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003609 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3612 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003613 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3614# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3615# in a Makefile. We should not override ac_cv_exeext if it was cached,
3616# so that the user can short-circuit this test for compilers unknown to
3617# Autoconf.
3618for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003619do
3620 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003622 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003623 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003624 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003625 # We found the default executable, but exeext='' is most
3626 # certainly right.
3627 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003628 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003629 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003630 then :; else
3631 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3632 fi
3633 # We set ac_cv_exeext here because the later test for it is not
3634 # safe: cross compilers may not add the suffix if given an `-o'
3635 # argument, so we may need to know it at that point already.
3636 # Even if this section looks crufty: it has the advantage of
3637 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003638 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003640 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 esac
3642done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643test "$ac_cv_exeext" = no && ac_cv_exeext=
3644
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003645else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003646 ac_file=''
3647fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648if test -z "$ac_file"; then :
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
3651$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003652sed 's/^/| /' conftest.$ac_ext >&5
3653
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003654{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003656as_fn_error 77 "C compiler cannot create executables
3657See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658else
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3660$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3663$as_echo_n "checking for C compiler default output file name... " >&6; }
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3665$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003668rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003669ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3671$as_echo_n "checking for suffix of executables... " >&6; }
3672if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003673case "(($ac_try" in
3674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3675 *) ac_try_echo=$ac_try;;
3676esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003677eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3678$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3682 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3684# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3685# work properly (i.e., refer to `conftest.exe'), while it won't with
3686# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003687for ac_file in conftest.exe conftest conftest.*; do
3688 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003690 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003692 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 * ) break;;
3694 esac
3695done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003696else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003699as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3700See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003702rm -f conftest conftest$ac_cv_exeext
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3704$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705
3706rm -f conftest.$ac_ext
3707EXEEXT=$ac_cv_exeext
3708ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3710/* end confdefs.h. */
3711#include <stdio.h>
3712int
3713main ()
3714{
3715FILE *f = fopen ("conftest.out", "w");
3716 return ferror (f) || fclose (f) != 0;
3717
3718 ;
3719 return 0;
3720}
Skip Montanaro6dead952003-09-25 14:50:04 +00003721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003722ac_clean_files="$ac_clean_files conftest.out"
3723# Check that the compiler produces executables we can run. If not, either
3724# the compiler is broken, or we cross compile.
3725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3726$as_echo_n "checking whether we are cross compiling... " >&6; }
3727if test "$cross_compiling" != yes; then
3728 { { ac_try="$ac_link"
3729case "(($ac_try" in
3730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3731 *) ac_try_echo=$ac_try;;
3732esac
3733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3734$as_echo "$ac_try_echo"; } >&5
3735 (eval "$ac_link") 2>&5
3736 ac_status=$?
3737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3738 test $ac_status = 0; }
3739 if { ac_try='./conftest$ac_cv_exeext'
3740 { { case "(($ac_try" in
3741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3742 *) ac_try_echo=$ac_try;;
3743esac
3744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3745$as_echo "$ac_try_echo"; } >&5
3746 (eval "$ac_try") 2>&5
3747 ac_status=$?
3748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3749 test $ac_status = 0; }; }; then
3750 cross_compiling=no
3751 else
3752 if test "$cross_compiling" = maybe; then
3753 cross_compiling=yes
3754 else
3755 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003757as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003758If you meant to cross compile, use \`--host'.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003759See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003760 fi
3761 fi
3762fi
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3764$as_echo "$cross_compiling" >&6; }
3765
3766rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3767ac_clean_files=$ac_clean_files_save
3768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3769$as_echo_n "checking for suffix of object files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003770if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003771 $as_echo_n "(cached) " >&6
3772else
3773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776int
3777main ()
3778{
3779
3780 ;
3781 return 0;
3782}
3783_ACEOF
3784rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003785if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786case "(($ac_try" in
3787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3788 *) ac_try_echo=$ac_try;;
3789esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3791$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3795 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003796 for ac_file in conftest.o conftest.obj conftest.*; do
3797 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3801 break;;
3802 esac
3803done
3804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003805 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003806sed 's/^/| /' conftest.$ac_ext >&5
3807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003808{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003810as_fn_error $? "cannot compute suffix of object files: cannot compile
3811See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813rm -f conftest.$ac_cv_objext conftest.$ac_ext
3814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3816$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003817OBJEXT=$ac_cv_objext
3818ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3820$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003821if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
Martin v. Löwis11437992002-04-12 09:54:03 +00003827int
3828main ()
3829{
3830#ifndef __GNUC__
3831 choke me
3832#endif
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 ac_compiler_gnu=yes
3840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003841 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003844ac_cv_c_compiler_gnu=$ac_compiler_gnu
3845
3846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3848$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3849if test $ac_compiler_gnu = yes; then
3850 GCC=yes
3851else
3852 GCC=
3853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003854ac_test_CFLAGS=${CFLAGS+set}
3855ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3857$as_echo_n "checking whether $CC accepts -g... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003858if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003860else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861 ac_save_c_werror_flag=$ac_c_werror_flag
3862 ac_c_werror_flag=yes
3863 ac_cv_prog_cc_g=no
3864 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868int
3869main ()
3870{
3871
3872 ;
3873 return 0;
3874}
3875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003876if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003877 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003879 CFLAGS=""
3880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003881/* end confdefs.h. */
3882
3883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893else
3894 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003895 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003897/* end confdefs.h. */
3898
3899int
3900main ()
3901{
3902
3903 ;
3904 return 0;
3905}
3906_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003908 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915 ac_c_werror_flag=$ac_save_c_werror_flag
3916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3918$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003919if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921elif test $ac_cv_prog_cc_g = yes; then
3922 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003923 CFLAGS="-g -O2"
3924 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003925 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003926 fi
3927else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928 if test "$GCC" = yes; then
3929 CFLAGS="-O2"
3930 else
3931 CFLAGS=
3932 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3935$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003936if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003938else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003939 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003940ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003942/* end confdefs.h. */
3943#include <stdarg.h>
3944#include <stdio.h>
3945#include <sys/types.h>
3946#include <sys/stat.h>
3947/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3948struct buf { int x; };
3949FILE * (*rcsopen) (struct buf *, struct stat *, int);
3950static char *e (p, i)
3951 char **p;
3952 int i;
3953{
3954 return p[i];
3955}
3956static char *f (char * (*g) (char **, int), char **p, ...)
3957{
3958 char *s;
3959 va_list v;
3960 va_start (v,p);
3961 s = g (p, va_arg (v,int));
3962 va_end (v);
3963 return s;
3964}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003965
3966/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3967 function prototypes and stuff, but not '\xHH' hex character constants.
3968 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003969 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003970 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3971 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003973int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3974
Martin v. Löwiseba40652007-08-30 20:10:57 +00003975/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3976 inside strings and character constants. */
3977#define FOO(x) 'x'
3978int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3979
Skip Montanaro6dead952003-09-25 14:50:04 +00003980int test (int i, double x);
3981struct s1 {int (*f) (int a);};
3982struct s2 {int (*f) (double a);};
3983int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3984int argc;
3985char **argv;
3986int
3987main ()
3988{
3989return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3990 ;
3991 return 0;
3992}
3993_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003994for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3995 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003996do
3997 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003998 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003999 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001rm -f core conftest.err conftest.$ac_objext
4002 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004003done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004005CC=$ac_save_CC
4006
4007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004008# AC_CACHE_VAL
4009case "x$ac_cv_prog_cc_c89" in
4010 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4012$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4015$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004016 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004017 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4019$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004020esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004021if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004022
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004023fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004024
Martin v. Löwis11437992002-04-12 09:54:03 +00004025ac_ext=c
4026ac_cpp='$CPP $CPPFLAGS'
4027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4029ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004031if test ! -z "$preset_cflags"
4032then
4033 CFLAGS=$preset_cflags
4034fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004035
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004036
4037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4039$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004040
Martin v. Löwiseba40652007-08-30 20:10:57 +00004041# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004042if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004043 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004044
4045 case $withval in
4046 no) with_cxx_main=no
4047 MAINCC='$(CC)';;
4048 yes) with_cxx_main=yes
4049 MAINCC='$(CXX)';;
4050 *) with_cxx_main=yes
4051 MAINCC=$withval
4052 if test -z "$CXX"
4053 then
4054 CXX=$withval
4055 fi;;
4056 esac
4057else
4058
4059 with_cxx_main=no
4060 MAINCC='$(CC)'
4061
Martin v. Löwiseba40652007-08-30 20:10:57 +00004062fi
4063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4065$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004066
4067preset_cxx="$CXX"
4068if test -z "$CXX"
4069then
4070 case "$CC" in
4071 gcc) # Extract the first word of "g++", so it can be a program name with args.
4072set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4074$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004075if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004076 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004077else
4078 case $CXX in
4079 [\\/]* | ?:[\\/]*)
4080 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4081 ;;
4082 *)
4083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4084for as_dir in notfound
4085do
4086 IFS=$as_save_IFS
4087 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004088 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004089 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004090 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004092 break 2
4093 fi
4094done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004095 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004096IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004097
4098 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4099 ;;
4100esac
4101fi
4102CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004103if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4105$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4108$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004111 ;;
4112 cc) # Extract the first word of "c++", so it can be a program name with args.
4113set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4115$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004116if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004117 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004118else
4119 case $CXX in
4120 [\\/]* | ?:[\\/]*)
4121 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4122 ;;
4123 *)
4124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125for as_dir in notfound
4126do
4127 IFS=$as_save_IFS
4128 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004131 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004133 break 2
4134 fi
4135done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004138
4139 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4140 ;;
4141esac
4142fi
4143CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004144if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4146$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004147else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4149$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004151
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004152 ;;
4153 esac
4154 if test "$CXX" = "notfound"
4155 then
4156 CXX=""
4157 fi
4158fi
4159if test -z "$CXX"
4160then
4161 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4162do
4163 # Extract the first word of "$ac_prog", so it can be a program name with args.
4164set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4166$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004167if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004169else
4170 if test -n "$CXX"; then
4171 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4172else
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004180 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004182 break 2
4183 fi
4184done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004185 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004186IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004187
4188fi
4189fi
4190CXX=$ac_cv_prog_CXX
4191if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4193$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4196$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004197fi
4198
Martin v. Löwiseba40652007-08-30 20:10:57 +00004199
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004200 test -n "$CXX" && break
4201done
4202test -n "$CXX" || CXX="notfound"
4203
4204 if test "$CXX" = "notfound"
4205 then
4206 CXX=""
4207 fi
4208fi
4209if test "$preset_cxx" != "$CXX"
4210then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004212
4213 By default, distutils will build C++ extension modules with \"$CXX\".
4214 If this is not intended, then set CXX on the configure command line.
4215 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004216$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004217
4218 By default, distutils will build C++ extension modules with \"$CXX\".
4219 If this is not intended, then set CXX on the configure command line.
4220 " >&2;}
4221fi
4222
4223
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004224# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004225
4226ac_ext=c
4227ac_cpp='$CPP $CPPFLAGS'
4228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4230ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4232$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004233# On Suns, sometimes $CPP names a directory.
4234if test -n "$CPP" && test -d "$CPP"; then
4235 CPP=
4236fi
4237if test -z "$CPP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004238 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004239 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004240else
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 # Double quotes because CPP needs to be expanded
4242 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4243 do
4244 ac_preproc_ok=false
4245for ac_c_preproc_warn_flag in '' yes
4246do
4247 # Use a header file that comes with gcc, so configuring glibc
4248 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004249 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4250 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004251 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004254/* end confdefs.h. */
4255#ifdef __STDC__
4256# include <limits.h>
4257#else
4258# include <assert.h>
4259#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004261_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004264else
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 # Broken: fails on valid input.
4266continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004267fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004268rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004269
Martin v. Löwiseba40652007-08-30 20:10:57 +00004270 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004274#include <ac_nonexistent.h>
4275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # Broken: success on invalid input.
4278continue
4279else
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 # Passes both tests.
4281ac_preproc_ok=:
4282break
4283fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004284rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004285
4286done
4287# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004288rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004289if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004290 break
4291fi
4292
4293 done
4294 ac_cv_prog_CPP=$CPP
4295
4296fi
4297 CPP=$ac_cv_prog_CPP
4298else
4299 ac_cv_prog_CPP=$CPP
4300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4302$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004303ac_preproc_ok=false
4304for ac_c_preproc_warn_flag in '' yes
4305do
4306 # Use a header file that comes with gcc, so configuring glibc
4307 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004308 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4309 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004310 # On the NeXT, cc -E runs the code through the compiler's parser,
4311 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004313/* end confdefs.h. */
4314#ifdef __STDC__
4315# include <limits.h>
4316#else
4317# include <assert.h>
4318#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004319 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004320_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004321if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004322
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004323else
Martin v. Löwis11437992002-04-12 09:54:03 +00004324 # Broken: fails on valid input.
4325continue
4326fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004327rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004328
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004330 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004333#include <ac_nonexistent.h>
4334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004335if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004336 # Broken: success on invalid input.
4337continue
4338else
Martin v. Löwis11437992002-04-12 09:54:03 +00004339 # Passes both tests.
4340ac_preproc_ok=:
4341break
4342fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004343rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004344
4345done
4346# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004347rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004348if $ac_preproc_ok; then :
4349
Martin v. Löwis11437992002-04-12 09:54:03 +00004350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004351 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4352$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004353as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4354See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004355fi
4356
4357ac_ext=c
4358ac_cpp='$CPP $CPPFLAGS'
4359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4361ac_compiler_gnu=$ac_cv_c_compiler_gnu
4362
4363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4365$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004366if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004367 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004368else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004370 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004371 # Loop through the user's path and test for each of PROGNAME-LIST
4372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004373for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4374do
4375 IFS=$as_save_IFS
4376 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004377 for ac_prog in grep ggrep; do
4378 for ac_exec_ext in '' $ac_executable_extensions; do
4379 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4380 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4381# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382 # Check for GNU $ac_path_GREP
4383case `"$ac_path_GREP" --version 2>&1` in
4384*GNU*)
4385 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4386*)
4387 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004388 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389 while :
4390 do
4391 cat "conftest.in" "conftest.in" >"conftest.tmp"
4392 mv "conftest.tmp" "conftest.in"
4393 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004394 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4396 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004397 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004398 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4399 # Best one so far, save it but keep looking for a better one
4400 ac_cv_path_GREP="$ac_path_GREP"
4401 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004402 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004403 # 10*(2^10) chars as input seems more than enough
4404 test $ac_count -gt 10 && break
4405 done
4406 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4407esac
4408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004409 $ac_path_GREP_found && break 3
4410 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004411 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004412 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004414 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004415 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417else
4418 ac_cv_path_GREP=$GREP
4419fi
4420
Martin v. Löwiseba40652007-08-30 20:10:57 +00004421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4423$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004424 GREP="$ac_cv_path_GREP"
4425
4426
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4428$as_echo_n "checking for egrep... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004429if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004431else
4432 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4433 then ac_cv_path_EGREP="$GREP -E"
4434 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004435 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004436 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004437 # Loop through the user's path and test for each of PROGNAME-LIST
4438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004443 for ac_prog in egrep; do
4444 for ac_exec_ext in '' $ac_executable_extensions; do
4445 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4446 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4447# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004448 # Check for GNU $ac_path_EGREP
4449case `"$ac_path_EGREP" --version 2>&1` in
4450*GNU*)
4451 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4452*)
4453 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004454 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004455 while :
4456 do
4457 cat "conftest.in" "conftest.in" >"conftest.tmp"
4458 mv "conftest.tmp" "conftest.in"
4459 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004461 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4462 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004463 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004464 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4465 # Best one so far, save it but keep looking for a better one
4466 ac_cv_path_EGREP="$ac_path_EGREP"
4467 ac_path_EGREP_max=$ac_count
4468 fi
4469 # 10*(2^10) chars as input seems more than enough
4470 test $ac_count -gt 10 && break
4471 done
4472 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4473esac
4474
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 $ac_path_EGREP_found && break 3
4476 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004477 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004478 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004480 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004481 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004482 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483else
4484 ac_cv_path_EGREP=$EGREP
4485fi
4486
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487 fi
4488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4490$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004491 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004492
4493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4495$as_echo_n "checking for ANSI C header files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004496if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004497 $as_echo_n "(cached) " >&6
4498else
4499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004500/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004501#include <stdlib.h>
4502#include <stdarg.h>
4503#include <string.h>
4504#include <float.h>
4505
4506int
4507main ()
4508{
4509
4510 ;
4511 return 0;
4512}
4513_ACEOF
4514if ac_fn_c_try_compile "$LINENO"; then :
4515 ac_cv_header_stdc=yes
4516else
4517 ac_cv_header_stdc=no
4518fi
4519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4520
4521if test $ac_cv_header_stdc = yes; then
4522 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4524/* end confdefs.h. */
4525#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004526
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004527_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004528if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004529 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004530
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004533fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004534rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004535
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004536fi
4537
4538if test $ac_cv_header_stdc = yes; then
4539 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4541/* end confdefs.h. */
4542#include <stdlib.h>
4543
4544_ACEOF
4545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4546 $EGREP "free" >/dev/null 2>&1; then :
4547
4548else
4549 ac_cv_header_stdc=no
4550fi
4551rm -f conftest*
4552
4553fi
4554
4555if test $ac_cv_header_stdc = yes; then
4556 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4557 if test "$cross_compiling" = yes; then :
4558 :
4559else
4560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4561/* end confdefs.h. */
4562#include <ctype.h>
4563#include <stdlib.h>
4564#if ((' ' & 0x0FF) == 0x020)
4565# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4566# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4567#else
4568# define ISLOWER(c) \
4569 (('a' <= (c) && (c) <= 'i') \
4570 || ('j' <= (c) && (c) <= 'r') \
4571 || ('s' <= (c) && (c) <= 'z'))
4572# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4573#endif
4574
4575#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4576int
4577main ()
4578{
4579 int i;
4580 for (i = 0; i < 256; i++)
4581 if (XOR (islower (i), ISLOWER (i))
4582 || toupper (i) != TOUPPER (i))
4583 return 2;
4584 return 0;
4585}
4586_ACEOF
4587if ac_fn_c_try_run "$LINENO"; then :
4588
4589else
4590 ac_cv_header_stdc=no
4591fi
4592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4593 conftest.$ac_objext conftest.beam conftest.$ac_ext
4594fi
4595
4596fi
4597fi
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4599$as_echo "$ac_cv_header_stdc" >&6; }
4600if test $ac_cv_header_stdc = yes; then
4601
4602$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4603
4604fi
4605
4606# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4607for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4608 inttypes.h stdint.h unistd.h
4609do :
4610 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4611ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4612"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004613if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004614 cat >>confdefs.h <<_ACEOF
4615#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4616_ACEOF
4617
4618fi
4619
4620done
4621
4622
4623
4624 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004625if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004626 MINIX=yes
4627else
4628 MINIX=
4629fi
4630
4631
4632 if test "$MINIX" = yes; then
4633
4634$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4635
4636
4637$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4638
4639
4640$as_echo "#define _MINIX 1" >>confdefs.h
4641
4642 fi
4643
4644
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4646$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004647if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004648 $as_echo_n "(cached) " >&6
4649else
4650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4651/* end confdefs.h. */
4652
4653# define __EXTENSIONS__ 1
4654 $ac_includes_default
4655int
4656main ()
4657{
4658
4659 ;
4660 return 0;
4661}
4662_ACEOF
4663if ac_fn_c_try_compile "$LINENO"; then :
4664 ac_cv_safe_to_define___extensions__=yes
4665else
4666 ac_cv_safe_to_define___extensions__=no
4667fi
4668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4669fi
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4671$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4672 test $ac_cv_safe_to_define___extensions__ = yes &&
4673 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4674
4675 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4676
4677 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4678
4679 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4680
4681 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4682
4683
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004684
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004685# Check for unsupported systems
4686case $ac_sys_system/$ac_sys_release in
4687atheos*|Linux*/1*)
4688 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4689 echo See README for details.
4690 exit 1;;
4691esac
4692
4693
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4695$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004696
4697# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004698if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004699 withval=$with_suffix;
4700 case $withval in
4701 no) EXEEXT=;;
4702 yes) EXEEXT=.exe;;
4703 *) EXEEXT=$withval;;
4704 esac
4705fi
4706
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4708$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004709
4710# Test whether we're running on a non-case-sensitive system, in which
4711# case we give a warning if no ext is given
4712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4714$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004715if test ! -d CaseSensitiveTestDir; then
4716mkdir CaseSensitiveTestDir
4717fi
4718
4719if test -d casesensitivetestdir
4720then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4722$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004723 BUILDEXEEXT=.exe
4724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004727 BUILDEXEEXT=$EXEEXT
4728fi
4729rmdir CaseSensitiveTestDir
4730
4731case $MACHDEP in
4732bsdos*)
4733 case $CC in
4734 gcc) CC="$CC -D_HAVE_BSDI";;
4735 esac;;
4736esac
4737
4738case $ac_sys_system in
4739hp*|HP*)
4740 case $CC in
4741 cc|*/cc) CC="$CC -Ae";;
4742 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004743SunOS*)
4744 # Some functions have a prototype only with that define, e.g. confstr
4745
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004746$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004747
4748 ;;
4749esac
4750
4751
4752
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4754$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004755if test -z "$LIBRARY"
4756then
4757 LIBRARY='libpython$(VERSION).a'
4758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4760$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004761
4762# LDLIBRARY is the name of the library to link against (as opposed to the
4763# name of the library into which to insert object files). BLDLIBRARY is also
4764# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4765# is blank as the main program is not linked directly against LDLIBRARY.
4766# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4767# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4768# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4769# DLLLIBRARY is the shared (i.e., DLL) library.
4770#
4771# RUNSHARED is used to run shared python without installed libraries
4772#
4773# INSTSONAME is the name of the shared library that will be use to install
4774# on the system - some systems like version suffix, others don't
4775
4776
4777
4778
4779
4780
4781LDLIBRARY="$LIBRARY"
4782BLDLIBRARY='$(LDLIBRARY)'
4783INSTSONAME='$(LDLIBRARY)'
4784DLLLIBRARY=''
4785LDLIBRARYDIR=''
4786RUNSHARED=''
4787
4788# LINKCC is the command that links the python executable -- default is $(CC).
4789# If CXX is set, and if it is needed to link a main function that was
4790# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4791# python might then depend on the C++ runtime
4792# This is altered for AIX in order to build the export list before
4793# linking.
4794
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4796$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004797if test -z "$LINKCC"
4798then
4799 LINKCC='$(PURIFY) $(MAINCC)'
4800 case $ac_sys_system in
4801 AIX*)
4802 exp_extra="\"\""
4803 if test $ac_sys_release -ge 5 -o \
4804 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4805 exp_extra="."
4806 fi
4807 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004808 QNX*)
4809 # qcc must be used because the other compilers do not
4810 # support -N.
4811 LINKCC=qcc;;
4812 esac
4813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4815$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004816
4817# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4818# make sure we default having it set to "no": this is used by
4819# distutils.unixccompiler to know if it should add --enable-new-dtags
4820# to linker command lines, and failing to detect GNU ld simply results
4821# in the same bahaviour as before.
4822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4824$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004825ac_prog=ld
4826if test "$GCC" = yes; then
4827 ac_prog=`$CC -print-prog-name=ld`
4828fi
4829case `"$ac_prog" -V 2>&1 < /dev/null` in
4830 *GNU*)
4831 GNULD=yes;;
4832 *)
4833 GNULD=no;;
4834esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4836$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004837
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4839$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004840# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004841if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842 enableval=$enable_shared;
4843fi
4844
4845
4846if test -z "$enable_shared"
4847then
4848 case $ac_sys_system in
4849 CYGWIN* | atheos*)
4850 enable_shared="yes";;
4851 *)
4852 enable_shared="no";;
4853 esac
4854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4856$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004857
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4859$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004860# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004862 enableval=$enable_profiling; ac_save_cc="$CC"
4863 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865 ac_enable_profiling="no"
4866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004868/* end confdefs.h. */
4869int main() { return 0; }
4870_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004872 ac_enable_profiling="yes"
4873else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004874 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878fi
4879
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004880 CC="$ac_save_cc"
4881fi
4882
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4884$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004885
4886case "$ac_enable_profiling" in
4887 "yes")
4888 BASECFLAGS="-pg $BASECFLAGS"
4889 LDFLAGS="-pg $LDFLAGS"
4890 ;;
4891esac
4892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4894$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004895
4896# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4897# library that we build, but we do not want to link against it (we
4898# will find it with a -framework option). For this reason there is an
4899# extra variable BLDLIBRARY against which Python and the extension
4900# modules are linked, BLDLIBRARY. This is normally the same as
4901# LDLIBRARY, but empty for MacOSX framework builds.
4902if test "$enable_framework"
4903then
4904 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4905 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4906 BLDLIBRARY=''
4907else
4908 BLDLIBRARY='$(LDLIBRARY)'
4909fi
4910
4911# Other platforms follow
4912if test $enable_shared = "yes"; then
4913
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004914$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915
4916 case $ac_sys_system in
4917 BeOS*)
4918 LDLIBRARY='libpython$(VERSION).so'
4919 ;;
4920 CYGWIN*)
4921 LDLIBRARY='libpython$(VERSION).dll.a'
4922 DLLLIBRARY='libpython$(VERSION).dll'
4923 ;;
4924 SunOS*)
4925 LDLIBRARY='libpython$(VERSION).so'
4926 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4927 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4928 INSTSONAME="$LDLIBRARY".$SOVERSION
4929 ;;
4930 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4931 LDLIBRARY='libpython$(VERSION).so'
4932 BLDLIBRARY='-L. -lpython$(VERSION)'
4933 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4934 case $ac_sys_system in
4935 FreeBSD*)
4936 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4937 ;;
4938 esac
4939 INSTSONAME="$LDLIBRARY".$SOVERSION
4940 ;;
4941 hp*|HP*)
4942 case `uname -m` in
4943 ia64)
4944 LDLIBRARY='libpython$(VERSION).so'
4945 ;;
4946 *)
4947 LDLIBRARY='libpython$(VERSION).sl'
4948 ;;
4949 esac
4950 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4951 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4952 ;;
4953 OSF*)
4954 LDLIBRARY='libpython$(VERSION).so'
4955 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4956 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4957 ;;
4958 atheos*)
4959 LDLIBRARY='libpython$(VERSION).so'
4960 BLDLIBRARY='-L. -lpython$(VERSION)'
4961 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4962 ;;
4963 Darwin*)
4964 LDLIBRARY='libpython$(VERSION).dylib'
4965 BLDLIBRARY='-L. -lpython$(VERSION)'
4966 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4967 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004968 AIX*)
4969 LDLIBRARY='libpython$(VERSION).so'
4970 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4971 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972
4973 esac
4974else # shared is disabled
4975 case $ac_sys_system in
4976 CYGWIN*)
4977 BLDLIBRARY='$(LIBRARY)'
4978 LDLIBRARY='libpython$(VERSION).dll.a'
4979 ;;
4980 esac
4981fi
4982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4984$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004985
4986if test -n "$ac_tool_prefix"; then
4987 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4988set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4990$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004991if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004992 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004993else
4994 if test -n "$RANLIB"; then
4995 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4996else
4997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in $PATH
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5004 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005006 break 2
5007 fi
5008done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005009 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005010IFS=$as_save_IFS
5011
5012fi
5013fi
5014RANLIB=$ac_cv_prog_RANLIB
5015if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5017$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005021fi
5022
5023
5024fi
5025if test -z "$ac_cv_prog_RANLIB"; then
5026 ac_ct_RANLIB=$RANLIB
5027 # Extract the first word of "ranlib", so it can be a program name with args.
5028set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005031if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005032 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005033else
5034 if test -n "$ac_ct_RANLIB"; then
5035 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5036else
5037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5038for as_dir in $PATH
5039do
5040 IFS=$as_save_IFS
5041 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005042 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005043 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5044 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046 break 2
5047 fi
5048done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005049 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005050IFS=$as_save_IFS
5051
5052fi
5053fi
5054ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5055if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5057$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005061fi
5062
5063 if test "x$ac_ct_RANLIB" = x; then
5064 RANLIB=":"
5065 else
5066 case $cross_compiling:$ac_tool_warned in
5067yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005070ac_tool_warned=yes ;;
5071esac
5072 RANLIB=$ac_ct_RANLIB
5073 fi
5074else
5075 RANLIB="$ac_cv_prog_RANLIB"
5076fi
5077
5078
5079for ac_prog in ar aal
5080do
5081 # Extract the first word of "$ac_prog", so it can be a program name with args.
5082set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005085if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005086 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005087else
5088 if test -n "$AR"; then
5089 ac_cv_prog_AR="$AR" # Let the user override the test.
5090else
5091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005096 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005097 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5098 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005100 break 2
5101 fi
5102done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005103 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005104IFS=$as_save_IFS
5105
5106fi
5107fi
5108AR=$ac_cv_prog_AR
5109if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5111$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005115fi
5116
5117
5118 test -n "$AR" && break
5119done
5120test -n "$AR" || AR="ar"
5121
5122
5123# tweak ARFLAGS only if the user didn't set it on the command line
5124
5125if test -z "$ARFLAGS"
5126then
5127 ARFLAGS="rc"
5128fi
5129
5130
5131# Extract the first word of "svnversion", so it can be a program name with args.
5132set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5134$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005135if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005136 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005137else
5138 if test -n "$SVNVERSION"; then
5139 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5140else
5141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144 IFS=$as_save_IFS
5145 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005146 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005147 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5148 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005150 break 2
5151 fi
5152done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005153 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005154IFS=$as_save_IFS
5155
5156 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5157fi
5158fi
5159SVNVERSION=$ac_cv_prog_SVNVERSION
5160if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5162$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5165$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005166fi
5167
5168
5169if test $SVNVERSION = found
5170then
5171 SVNVERSION="svnversion \$(srcdir)"
5172else
5173 SVNVERSION="echo Unversioned directory"
5174fi
5175
Georg Brandl3a5508e2011-03-06 10:42:21 +01005176
5177
5178
5179# Extract the first word of "hg", so it can be a program name with args.
5180set dummy hg; ac_word=$2
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182$as_echo_n "checking for $ac_word... " >&6; }
5183if ${ac_cv_prog_HAS_HG+:} false; then :
5184 $as_echo_n "(cached) " >&6
5185else
5186 if test -n "$HAS_HG"; then
5187 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5188else
5189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192 IFS=$as_save_IFS
5193 test -z "$as_dir" && as_dir=.
5194 for ac_exec_ext in '' $ac_executable_extensions; do
5195 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5196 ac_cv_prog_HAS_HG="found"
5197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5198 break 2
5199 fi
5200done
5201 done
5202IFS=$as_save_IFS
5203
5204 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5205fi
5206fi
5207HAS_HG=$ac_cv_prog_HAS_HG
5208if test -n "$HAS_HG"; then
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5210$as_echo "$HAS_HG" >&6; }
5211else
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217if test $HAS_HG = found
5218then
5219 HGVERSION="hg id -i \$(srcdir)"
5220 HGTAG="hg id -t \$(srcdir)"
5221 HGBRANCH="hg id -b \$(srcdir)"
5222else
5223 HGVERSION=""
5224 HGTAG=""
5225 HGBRANCH=""
5226fi
5227
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005228case $MACHDEP in
5229bsdos*|hp*|HP*)
5230 # install -d does not work on BSDI or HP-UX
5231 if test -z "$INSTALL"
5232 then
5233 INSTALL="${srcdir}/install-sh -c"
5234 fi
5235esac
5236ac_aux_dir=
5237for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005238 if test -f "$ac_dir/install-sh"; then
5239 ac_aux_dir=$ac_dir
5240 ac_install_sh="$ac_aux_dir/install-sh -c"
5241 break
5242 elif test -f "$ac_dir/install.sh"; then
5243 ac_aux_dir=$ac_dir
5244 ac_install_sh="$ac_aux_dir/install.sh -c"
5245 break
5246 elif test -f "$ac_dir/shtool"; then
5247 ac_aux_dir=$ac_dir
5248 ac_install_sh="$ac_aux_dir/shtool install -c"
5249 break
5250 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251done
5252if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005253 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005254fi
5255
5256# These three variables are undocumented and unsupported,
5257# and are intended to be withdrawn in a future Autoconf release.
5258# They can cause serious problems if a builder's source tree is in a directory
5259# whose full name contains unusual characters.
5260ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5261ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5262ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5263
5264
5265# Find a good install program. We prefer a C program (faster),
5266# so one script is as good as another. But avoid the broken or
5267# incompatible versions:
5268# SysV /etc/install, /usr/sbin/install
5269# SunOS /usr/etc/install
5270# IRIX /sbin/install
5271# AIX /bin/install
5272# AmigaOS /C/install, which installs bootblocks on floppy discs
5273# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5274# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5275# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5276# OS/2's system install, which has a completely different semantic
5277# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005278# Reject install programs that cannot install multiple files.
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5280$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281if test -z "$INSTALL"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005282if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005283 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284else
5285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5286for as_dir in $PATH
5287do
5288 IFS=$as_save_IFS
5289 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005290 # Account for people who put trailing slashes in PATH elements.
5291case $as_dir/ in #((
5292 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005294 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295 /usr/ucb/* ) ;;
5296 *)
5297 # OSF1 and SCO ODT 3.0 have their own names for install.
5298 # Don't use installbsd from OSF since it installs stuff as root
5299 # by default.
5300 for ac_prog in ginstall scoinst install; do
5301 for ac_exec_ext in '' $ac_executable_extensions; do
5302 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5303 if test $ac_prog = install &&
5304 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5305 # AIX install. It has an incompatible calling convention.
5306 :
5307 elif test $ac_prog = install &&
5308 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5309 # program-specific install script used by HP pwplus--don't use.
5310 :
5311 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005312 rm -rf conftest.one conftest.two conftest.dir
5313 echo one > conftest.one
5314 echo two > conftest.two
5315 mkdir conftest.dir
5316 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5317 test -s conftest.one && test -s conftest.two &&
5318 test -s conftest.dir/conftest.one &&
5319 test -s conftest.dir/conftest.two
5320 then
5321 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5322 break 3
5323 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005324 fi
5325 fi
5326 done
5327 done
5328 ;;
5329esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005330
5331 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005332IFS=$as_save_IFS
5333
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005334rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005335
5336fi
5337 if test "${ac_cv_path_install+set}" = set; then
5338 INSTALL=$ac_cv_path_install
5339 else
5340 # As a last resort, use the slow shell script. Don't cache a
5341 # value for INSTALL within a source directory, because that will
5342 # break other packages using the cache if that directory is
5343 # removed, or if the value is a relative name.
5344 INSTALL=$ac_install_sh
5345 fi
5346fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5348$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005349
5350# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5351# It thinks the first close brace ends the variable substitution.
5352test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5353
5354test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5355
5356test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5357
5358
5359# Not every filesystem supports hard links
5360
5361if test -z "$LN" ; then
5362 case $ac_sys_system in
5363 BeOS*) LN="ln -s";;
5364 CYGWIN*) LN="ln -s";;
5365 atheos*) LN="ln -s";;
5366 *) LN=ln;;
5367 esac
5368fi
5369
5370# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5372$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373
5374# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005375if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 withval=$with_pydebug;
5377if test "$withval" != no
5378then
5379
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005380$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5383$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005385else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387fi
5388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391fi
5392
5393
5394# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5395# merged with this chunk of code?
5396
5397# Optimizer/debugger flags
5398# ------------------------
5399# (The following bit of code is complicated enough - please keep things
5400# indented properly. Just pretend you're editing Python code. ;-)
5401
5402# There are two parallel sets of case statements below, one that checks to
5403# see if OPT was set and one that does BASECFLAGS setting based upon
5404# compiler and platform. BASECFLAGS tweaks need to be made even if the
5405# user set OPT.
5406
5407# tweak OPT based on compiler and platform, only if the user didn't set
5408# it on the command line
5409
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005410if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005411then
5412 case $GCC in
5413 yes)
5414 if test "$CC" != 'g++' ; then
5415 STRICT_PROTO="-Wstrict-prototypes"
5416 fi
5417 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5418 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5419 WRAP="-fwrapv"
5420 fi
5421 case $ac_cv_prog_cc_g in
5422 yes)
5423 if test "$Py_DEBUG" = 'true' ; then
5424 # Optimization messes up debuggers, so turn it off for
5425 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005426 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427 else
5428 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5429 fi
5430 ;;
5431 *)
5432 OPT="-O3 -Wall $STRICT_PROTO"
5433 ;;
5434 esac
5435 case $ac_sys_system in
5436 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5437 ;;
5438 esac
5439 ;;
5440
5441 *)
5442 OPT="-O"
5443 ;;
5444 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005445fi
5446
5447
5448
5449# The -arch flags for universal builds on OSX
5450UNIVERSAL_ARCH_FLAGS=
5451
5452
5453# tweak BASECFLAGS based on compiler and platform
5454case $GCC in
5455yes)
5456 # Python violates C99 rules, by casting between incompatible
5457 # pointer types. GCC may generate bad code as a result of that,
5458 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5460$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005461 ac_save_cc="$CC"
5462 CC="$CC -fno-strict-aliasing"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005463 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005464 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005467/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005468
5469int
5470main ()
5471{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005472
Gregory P. Smith373469a2009-11-01 21:03:38 +00005473 ;
5474 return 0;
5475}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005477if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478 ac_cv_no_strict_aliasing_ok=yes
5479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005480 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005483fi
5484
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005485 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5487$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488 if test $ac_cv_no_strict_aliasing_ok = yes
5489 then
5490 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5491 fi
5492
5493 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5494 # support. Without this, treatment of subnormals doesn't follow
5495 # the standard.
5496 case $ac_sys_machine in
5497 alpha*)
5498 BASECFLAGS="$BASECFLAGS -mieee"
5499 ;;
5500 esac
5501
5502 case $ac_sys_system in
5503 SCO_SV*)
5504 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5505 ;;
5506 # is there any other compiler on Darwin besides gcc?
5507 Darwin*)
5508 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5509 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005510 if test "${CC}" = gcc
5511 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5513$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005514 case "${UNIVERSALSDK}" in
5515 */MacOSX10.4u.sdk)
5516 # Build using 10.4 SDK, force usage of gcc when the
5517 # compiler is gcc, otherwise the user will get very
5518 # confusing error messages when building on OSX 10.6
5519 CC=gcc-4.0
5520 CPP=cpp-4.0
5521 ;;
5522 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5524$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005525 fi
5526
5527 # Calculate the right deployment target for this build.
5528 #
5529 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5530 if test ${cur_target} '>' 10.2; then
5531 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005532 if test ${enable_universalsdk}; then
5533 if test "${UNIVERSAL_ARCHS}" = "all"; then
5534 # Ensure that the default platform for a
5535 # 4-way universal build is OSX 10.5,
5536 # that's the first OS release where
5537 # 4-way builds make sense.
5538 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005539
5540 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5541 cur_target='10.5'
5542
5543 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5544 cur_target='10.5'
5545
5546 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5547 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005548 fi
5549 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005550 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005551 # On Intel macs default to a deployment
5552 # target of 10.4, that's the first OSX
5553 # release with Intel support.
5554 cur_target="10.4"
5555 fi
5556 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005557 fi
5558 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5559
5560 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5561 # environment with a value that is the same as what we'll use
5562 # in the Makefile to ensure that we'll get the same compiler
5563 # environment during configure and build time.
5564 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5565 export MACOSX_DEPLOYMENT_TARGET
5566 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5567
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005568 if test "${enable_universalsdk}"; then
5569 UNIVERSAL_ARCH_FLAGS=""
5570 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5571 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5572 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005573 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005574
5575 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5576 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5577 LIPO_32BIT_FLAGS=""
5578 ARCH_RUN_32BIT="true"
5579
5580 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5581 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5582 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005583 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005584
5585 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5586 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5587 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005588 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005589
5590 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5591 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5592 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005593 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005594
5595 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005596 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005597
5598 fi
5599
5600
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005601 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5602 if test "${UNIVERSALSDK}" != "/"
5603 then
5604 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5605 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5606 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005607 fi
5608
5609 fi
5610
5611
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005612 ;;
5613 OSF*)
5614 BASECFLAGS="$BASECFLAGS -mieee"
5615 ;;
5616 esac
5617 ;;
5618
5619*)
5620 case $ac_sys_system in
5621 OpenUNIX*|UnixWare*)
5622 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5623 ;;
5624 OSF*)
5625 BASECFLAGS="$BASECFLAGS -ieee -std"
5626 ;;
5627 SCO_SV*)
5628 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5629 ;;
5630 esac
5631 ;;
5632esac
5633
5634if test "$Py_DEBUG" = 'true'; then
5635 :
5636else
5637 OPT="-DNDEBUG $OPT"
5638fi
5639
5640if test "$ac_arch_flags"
5641then
5642 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5643fi
5644
5645# disable check for icc since it seems to pass, but generates a warning
5646if test "$CC" = icc
5647then
5648 ac_cv_opt_olimit_ok=no
5649fi
5650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5652$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005653if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005654 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005655else
5656 ac_save_cc="$CC"
5657CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005659/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005660
5661int
5662main ()
5663{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005664
Gregory P. Smith373469a2009-11-01 21:03:38 +00005665 ;
5666 return 0;
5667}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005668_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005669if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005670 ac_cv_opt_olimit_ok=yes
5671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005672 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005673
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005674fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005676CC="$ac_save_cc"
5677fi
5678
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5680$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005681if test $ac_cv_opt_olimit_ok = yes; then
5682 case $ac_sys_system in
5683 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5684 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5685 # environment?
5686 Darwin*)
5687 ;;
5688 *)
5689 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5690 ;;
5691 esac
5692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5694$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005695 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005696 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005697else
5698 ac_save_cc="$CC"
5699 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005701/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005702
5703int
5704main ()
5705{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005706
Gregory P. Smith373469a2009-11-01 21:03:38 +00005707 ;
5708 return 0;
5709}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005711if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005712 ac_cv_olimit_ok=yes
5713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005714 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005715
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005716fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005718 CC="$ac_save_cc"
5719fi
5720
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5722$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005723 if test $ac_cv_olimit_ok = yes; then
5724 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5725 fi
5726fi
5727
5728# Check whether GCC supports PyArg_ParseTuple format
5729if test "$GCC" = "yes"
5730then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5732$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005733 save_CFLAGS=$CFLAGS
5734 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736/* end confdefs.h. */
5737
5738 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005739int
5740main ()
5741{
5742
5743 ;
5744 return 0;
5745}
Matthias Klosec511b472010-05-08 11:01:39 +00005746
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005747_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005748if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005749
Matthias Klosec511b472010-05-08 11:01:39 +00005750
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005751$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005752
Matthias Klosec511b472010-05-08 11:01:39 +00005753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005754$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005755
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005756else
Matthias Klosec511b472010-05-08 11:01:39 +00005757
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005759$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005760
5761fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5763 CFLAGS=$save_CFLAGS
5764fi
5765
5766# On some compilers, pthreads are available without further options
5767# (e.g. MacOS X). On some of these systems, the compiler will not
5768# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5769# So we have to see first whether pthreads are available without
5770# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5772$as_echo_n "checking whether pthreads are available without options... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005773if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005774 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005775else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005776 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005777 ac_cv_pthread_is_default=no
5778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005780/* end confdefs.h. */
5781
5782#include <pthread.h>
5783
5784void* routine(void* p){return NULL;}
5785
5786int main(){
5787 pthread_t p;
5788 if(pthread_create(&p,NULL,routine,NULL)!=0)
5789 return 1;
5790 (void)pthread_detach(p);
5791 return 0;
5792}
5793
5794_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005796
5797 ac_cv_pthread_is_default=yes
5798 ac_cv_kthread=no
5799 ac_cv_pthread=no
5800
5801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005802 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005806fi
5807
5808
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005809fi
5810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5812$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813
5814
5815if test $ac_cv_pthread_is_default = yes
5816then
5817 ac_cv_kpthread=no
5818else
5819# -Kpthread, if available, provides the right #defines
5820# and linker options to make pthread_create available
5821# Some compilers won't report that they do not support -Kpthread,
5822# so we need to run a program to see whether it really made the
5823# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5825$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005826if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828else
5829 ac_save_cc="$CC"
5830CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005831if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005832 ac_cv_kpthread=no
5833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005835/* end confdefs.h. */
5836
5837#include <pthread.h>
5838
5839void* routine(void* p){return NULL;}
5840
5841int main(){
5842 pthread_t p;
5843 if(pthread_create(&p,NULL,routine,NULL)!=0)
5844 return 1;
5845 (void)pthread_detach(p);
5846 return 0;
5847}
5848
5849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005850if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851 ac_cv_kpthread=yes
5852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005853 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005857fi
5858
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005859CC="$ac_save_cc"
5860fi
5861
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5863$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005864fi
5865
5866if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5867then
5868# -Kthread, if available, provides the right #defines
5869# and linker options to make pthread_create available
5870# Some compilers won't report that they do not support -Kthread,
5871# so we need to run a program to see whether it really made the
5872# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5874$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005875if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005876 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877else
5878 ac_save_cc="$CC"
5879CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005880if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005881 ac_cv_kthread=no
5882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005884/* end confdefs.h. */
5885
5886#include <pthread.h>
5887
5888void* routine(void* p){return NULL;}
5889
5890int main(){
5891 pthread_t p;
5892 if(pthread_create(&p,NULL,routine,NULL)!=0)
5893 return 1;
5894 (void)pthread_detach(p);
5895 return 0;
5896}
5897
5898_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005899if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005900 ac_cv_kthread=yes
5901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005902 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906fi
5907
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005908CC="$ac_save_cc"
5909fi
5910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5912$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005913fi
5914
5915if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5916then
5917# -pthread, if available, provides the right #defines
5918# and linker options to make pthread_create available
5919# Some compilers won't report that they do not support -pthread,
5920# so we need to run a program to see whether it really made the
5921# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5923$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005924if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005925 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005926else
5927 ac_save_cc="$CC"
5928CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005929if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005930 ac_cv_pthread=no
5931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005933/* end confdefs.h. */
5934
5935#include <pthread.h>
5936
5937void* routine(void* p){return NULL;}
5938
5939int main(){
5940 pthread_t p;
5941 if(pthread_create(&p,NULL,routine,NULL)!=0)
5942 return 1;
5943 (void)pthread_detach(p);
5944 return 0;
5945}
5946
5947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005948if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005949 ac_cv_pthread=yes
5950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005951 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955fi
5956
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957CC="$ac_save_cc"
5958fi
5959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5961$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005962fi
5963
5964# If we have set a CC compiler flag for thread support then
5965# check if it works for CXX, too.
5966ac_cv_cxx_thread=no
5967if test ! -z "$CXX"
5968then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5970$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005971ac_save_cxx="$CXX"
5972
5973if test "$ac_cv_kpthread" = "yes"
5974then
5975 CXX="$CXX -Kpthread"
5976 ac_cv_cxx_thread=yes
5977elif test "$ac_cv_kthread" = "yes"
5978then
5979 CXX="$CXX -Kthread"
5980 ac_cv_cxx_thread=yes
5981elif test "$ac_cv_pthread" = "yes"
5982then
5983 CXX="$CXX -pthread"
5984 ac_cv_cxx_thread=yes
5985fi
5986
5987if test $ac_cv_cxx_thread = yes
5988then
5989 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5990 $CXX -c conftest.$ac_ext 2>&5
5991 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5992 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5993 then
5994 ac_cv_cxx_thread=yes
5995 else
5996 ac_cv_cxx_thread=no
5997 fi
5998 rm -fr conftest*
5999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6001$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002fi
6003CXX="$ac_save_cxx"
6004
6005
6006# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6008$as_echo_n "checking for ANSI C header files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006009if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006010 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006013/* end confdefs.h. */
6014#include <stdlib.h>
6015#include <stdarg.h>
6016#include <string.h>
6017#include <float.h>
6018
6019int
6020main ()
6021{
6022
6023 ;
6024 return 0;
6025}
6026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006027if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006028 ac_cv_header_stdc=yes
6029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006030 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006031fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6033
6034if test $ac_cv_header_stdc = yes; then
6035 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006037/* end confdefs.h. */
6038#include <string.h>
6039
6040_ACEOF
6041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042 $EGREP "memchr" >/dev/null 2>&1; then :
6043
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006044else
6045 ac_cv_header_stdc=no
6046fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006047rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048
6049fi
6050
6051if test $ac_cv_header_stdc = yes; then
6052 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006054/* end confdefs.h. */
6055#include <stdlib.h>
6056
6057_ACEOF
6058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006059 $EGREP "free" >/dev/null 2>&1; then :
6060
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006061else
6062 ac_cv_header_stdc=no
6063fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006064rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006065
6066fi
6067
6068if test $ac_cv_header_stdc = yes; then
6069 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006070 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006071 :
6072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074/* end confdefs.h. */
6075#include <ctype.h>
6076#include <stdlib.h>
6077#if ((' ' & 0x0FF) == 0x020)
6078# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6079# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6080#else
6081# define ISLOWER(c) \
6082 (('a' <= (c) && (c) <= 'i') \
6083 || ('j' <= (c) && (c) <= 'r') \
6084 || ('s' <= (c) && (c) <= 'z'))
6085# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6086#endif
6087
6088#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6089int
6090main ()
6091{
6092 int i;
6093 for (i = 0; i < 256; i++)
6094 if (XOR (islower (i), ISLOWER (i))
6095 || toupper (i) != TOUPPER (i))
6096 return 2;
6097 return 0;
6098}
6099_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006100if ac_fn_c_try_run "$LINENO"; then :
6101
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006103 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6106 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006107fi
6108
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006109fi
6110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6112$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006113if test $ac_cv_header_stdc = yes; then
6114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006115$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006116
6117fi
6118
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006119for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6120fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006121ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006122shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006123unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006124sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6125sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006126sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006127sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006128sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006129sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006130bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006131do :
6132 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6133ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006134if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006135 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006136#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006137_ACEOF
6138
6139fi
6140
Guido van Rossum627b2d71993-12-24 10:39:16 +00006141done
6142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006143ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006144for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006145 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6147$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006148if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006149 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006150else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006152/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006153#include <sys/types.h>
6154#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006155
Martin v. Löwis11437992002-04-12 09:54:03 +00006156int
6157main ()
6158{
6159if ((DIR *) 0)
6160return 0;
6161 ;
6162 return 0;
6163}
6164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006166 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006168 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006172eval ac_res=\$$as_ac_Header
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6174$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006175if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006176 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006177#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006178_ACEOF
6179
6180ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183done
6184# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6185if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6187$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006188if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006189 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006190else
Martin v. Löwis11437992002-04-12 09:54:03 +00006191 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006194
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195/* Override any GCC internal prototype to avoid an error.
6196 Use char because int might match the return type of a GCC
6197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006198#ifdef __cplusplus
6199extern "C"
6200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006201char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006202int
6203main ()
6204{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006206 ;
6207 return 0;
6208}
6209_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210for ac_lib in '' dir; do
6211 if test -z "$ac_lib"; then
6212 ac_res="none required"
6213 else
6214 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006217 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220rm -f core conftest.err conftest.$ac_objext \
6221 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006222 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006225done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006226if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006227
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228else
6229 ac_cv_search_opendir=no
6230fi
6231rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006232LIBS=$ac_func_search_save_LIBS
6233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6235$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006236ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006237if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006238 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006239
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006241
Michael W. Hudson54241132001-12-07 15:38:26 +00006242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6244$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006245if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006247else
6248 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006251
Martin v. Löwiseba40652007-08-30 20:10:57 +00006252/* Override any GCC internal prototype to avoid an error.
6253 Use char because int might match the return type of a GCC
6254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006255#ifdef __cplusplus
6256extern "C"
6257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006258char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006259int
6260main ()
6261{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006263 ;
6264 return 0;
6265}
6266_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267for ac_lib in '' x; do
6268 if test -z "$ac_lib"; then
6269 ac_res="none required"
6270 else
6271 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006272 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006274 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006275 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006276fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277rm -f core conftest.err conftest.$ac_objext \
6278 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006279 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006280 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006282done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006283if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006284
Martin v. Löwiseba40652007-08-30 20:10:57 +00006285else
6286 ac_cv_search_opendir=no
6287fi
6288rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006289LIBS=$ac_func_search_save_LIBS
6290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6292$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006293ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006295 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006296
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297fi
6298
6299fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6302$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006303if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006307/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309int
6310main ()
6311{
6312return makedev(0, 0);
6313 ;
6314 return 0;
6315}
6316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318 ac_cv_header_sys_types_h_makedev=yes
6319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006320 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322rm -f core conftest.err conftest.$ac_objext \
6323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324
6325fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6327$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006328
6329if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006330ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006331if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334
6335fi
6336
6337
6338
6339 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006340 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006341if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006343$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006344
6345fi
6346
6347
6348 fi
6349fi
6350
Michael W. Hudson54241132001-12-07 15:38:26 +00006351
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006352# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006353for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354do :
6355 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006356#ifdef HAVE_CURSES_H
6357#include <curses.h>
6358#endif
6359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006361if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006362 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006363#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006364_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006366fi
6367
6368done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369
6370
Martin v. Löwis11017b12006-01-14 18:12:57 +00006371# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006372for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373do :
6374 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 +00006375#ifdef HAVE_ASM_TYPES_H
6376#include <asm/types.h>
6377#endif
6378#ifdef HAVE_SYS_SOCKET_H
6379#include <sys/socket.h>
6380#endif
6381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006382"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006383if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006384 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006385#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386_ACEOF
6387
6388fi
6389
6390done
6391
6392
Guido van Rossum627b2d71993-12-24 10:39:16 +00006393# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006394was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6396$as_echo_n "checking for clock_t in time.h... " >&6; }
6397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006399#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006400
6401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006403 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006404 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006405else
Martin v. Löwis11437992002-04-12 09:54:03 +00006406
6407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006408$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006409
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006410
Guido van Rossum627b2d71993-12-24 10:39:16 +00006411fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006412rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6415$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006416
Neal Norwitz11690112002-07-30 01:08:28 +00006417# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6419$as_echo_n "checking for makedev... " >&6; }
6420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006421/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006422
6423#if defined(MAJOR_IN_MKDEV)
6424#include <sys/mkdev.h>
6425#elif defined(MAJOR_IN_SYSMACROS)
6426#include <sys/sysmacros.h>
6427#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006428#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006429#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006430int
6431main ()
6432{
6433 makedev(0, 0)
6434 ;
6435 return 0;
6436}
6437_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006438if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006439 ac_cv_has_makedev=yes
6440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006441 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006443rm -f core conftest.err conftest.$ac_objext \
6444 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006445if test "$ac_cv_has_makedev" = "no"; then
6446 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006448/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006449
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006450#define _OSF_SOURCE 1
6451#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006452
Neal Norwitz11690112002-07-30 01:08:28 +00006453int
6454main ()
6455{
6456 makedev(0, 0)
6457 ;
6458 return 0;
6459}
6460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006461if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006462 ac_cv_has_makedev=yes
6463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006464 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466rm -f core conftest.err conftest.$ac_objext \
6467 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006468 if test "$ac_cv_has_makedev" = "yes"; then
6469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006471
6472 fi
6473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6475$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006476if test "$ac_cv_has_makedev" = "yes"; then
6477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006478$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006479
6480fi
6481
Martin v. Löwis399a6892002-10-04 10:22:02 +00006482# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6483# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6484# defined, but the compiler does not support pragma redefine_extname,
6485# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6486# structures (such as rlimit64) without declaring them. As a
6487# work-around, disable LFS on such configurations
6488
6489use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6491$as_echo_n "checking Solaris LFS bug... " >&6; }
6492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006493/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006494
6495#define _LARGEFILE_SOURCE 1
6496#define _FILE_OFFSET_BITS 64
6497#include <sys/resource.h>
6498
Martin v. Löwis399a6892002-10-04 10:22:02 +00006499int
6500main ()
6501{
6502struct rlimit foo;
6503 ;
6504 return 0;
6505}
6506_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006508 sol_lfs_bug=no
6509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006510 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6514$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006515if test "$sol_lfs_bug" = "yes"; then
6516 use_lfs=no
6517fi
6518
6519if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006520# Two defines needed to enable largefile support on various platforms
6521# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006522case $ac_sys_system/$ac_sys_release in
6523AIX*)
6524
6525$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6526
6527 ;;
6528esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006529
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006530$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006531
6532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006533$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006534
Martin v. Löwis399a6892002-10-04 10:22:02 +00006535fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006536
Guido van Rossum84e7b241996-08-19 21:59:00 +00006537# Add some code to confdefs.h so that the test for off_t works on SCO
6538cat >> confdefs.h <<\EOF
6539#if defined(SCO_DS)
6540#undef _OFF_T
6541#endif
6542EOF
6543
Guido van Rossumef2255b2000-03-10 22:30:29 +00006544# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006545ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006546if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006548else
Martin v. Löwis11437992002-04-12 09:54:03 +00006549
6550cat >>confdefs.h <<_ACEOF
6551#define mode_t int
6552_ACEOF
6553
6554fi
6555
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006556ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006557if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006558
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006559else
Martin v. Löwis11437992002-04-12 09:54:03 +00006560
6561cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006562#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006563_ACEOF
6564
6565fi
6566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006567ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006568if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570else
Martin v. Löwis11437992002-04-12 09:54:03 +00006571
6572cat >>confdefs.h <<_ACEOF
6573#define pid_t int
6574_ACEOF
6575
6576fi
6577
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006578
Martin v. Löwis11437992002-04-12 09:54:03 +00006579cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006580#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006581_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006583ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006584if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006586else
Martin v. Löwis11437992002-04-12 09:54:03 +00006587
6588cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006589#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006590_ACEOF
6591
6592fi
6593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6595$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006596if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006601#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006602
6603_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006606 ac_cv_type_uid_t=yes
6607else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006608 ac_cv_type_uid_t=no
6609fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006610rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006611
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006612fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6614$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006615if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006617$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006618
6619
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006620$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621
6622fi
6623
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006624ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6625case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006626 no|yes) ;; #(
6627 *)
6628
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006629$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006630
6631
6632cat >>confdefs.h <<_ACEOF
6633#define uint32_t $ac_cv_c_uint32_t
6634_ACEOF
6635;;
6636 esac
6637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6639case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006640 no|yes) ;; #(
6641 *)
6642
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006643$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006644
6645
6646cat >>confdefs.h <<_ACEOF
6647#define uint64_t $ac_cv_c_uint64_t
6648_ACEOF
6649;;
6650 esac
6651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6653case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006654 no|yes) ;; #(
6655 *)
6656
6657cat >>confdefs.h <<_ACEOF
6658#define int32_t $ac_cv_c_int32_t
6659_ACEOF
6660;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006661esac
6662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6664case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006665 no|yes) ;; #(
6666 *)
6667
6668cat >>confdefs.h <<_ACEOF
6669#define int64_t $ac_cv_c_int64_t
6670_ACEOF
6671;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006672esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006675if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006678
6679fi
6680
Jack Jansendd19cf82001-12-06 22:36:17 +00006681
Michael W. Hudson54241132001-12-07 15:38:26 +00006682# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006683# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684# The cast to long int works around a bug in the HP C Compiler
6685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6687# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6689$as_echo_n "checking size of int... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006690if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006693 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 +00006694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006696 if test "$ac_cv_type_int" = yes; then
6697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006699as_fn_error 77 "cannot compute sizeof (int)
6700See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701 else
6702 ac_cv_sizeof_int=0
6703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006704fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6708$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006709
6710
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006713#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006714_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006715
6716
Martin v. Löwiseba40652007-08-30 20:10:57 +00006717# The cast to long int works around a bug in the HP C Compiler
6718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6720# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6722$as_echo_n "checking size of long... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006723if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006726 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 +00006727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006729 if test "$ac_cv_type_long" = yes; then
6730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006732as_fn_error 77 "cannot compute sizeof (long)
6733See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734 else
6735 ac_cv_sizeof_long=0
6736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6741$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742
6743
6744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006746#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006747_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006748
6749
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750# The cast to long int works around a bug in the HP C Compiler
6751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6753# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6755$as_echo_n "checking size of void *... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006756if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006759 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 +00006760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762 if test "$ac_cv_type_void_p" = yes; then
6763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006765as_fn_error 77 "cannot compute sizeof (void *)
6766See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767 else
6768 ac_cv_sizeof_void_p=0
6769 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006770fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6774$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775
6776
6777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006779#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006780_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006781
6782
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783# The cast to long int works around a bug in the HP C Compiler
6784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6786# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6788$as_echo_n "checking size of short... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006789if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006792 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 +00006793
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006795 if test "$ac_cv_type_short" = yes; then
6796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006798as_fn_error 77 "cannot compute sizeof (short)
6799See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800 else
6801 ac_cv_sizeof_short=0
6802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6807$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808
6809
6810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006813_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814
6815
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816# The cast to long int works around a bug in the HP C Compiler
6817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6819# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6821$as_echo_n "checking size of float... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006822if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006825 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 +00006826
Martin v. Löwis11437992002-04-12 09:54:03 +00006827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828 if test "$ac_cv_type_float" = yes; then
6829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006831as_fn_error 77 "cannot compute sizeof (float)
6832See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006833 else
6834 ac_cv_sizeof_float=0
6835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6840$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841
6842
6843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006845#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006846_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006847
6848
Martin v. Löwiseba40652007-08-30 20:10:57 +00006849# The cast to long int works around a bug in the HP C Compiler
6850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6852# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6854$as_echo_n "checking size of double... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006855if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858 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 +00006859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 if test "$ac_cv_type_double" = yes; then
6862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006864as_fn_error 77 "cannot compute sizeof (double)
6865See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006866 else
6867 ac_cv_sizeof_double=0
6868 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6873$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874
6875
6876
Martin v. Löwis11437992002-04-12 09:54:03 +00006877cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006878#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006879_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006880
6881
Martin v. Löwiseba40652007-08-30 20:10:57 +00006882# The cast to long int works around a bug in the HP C Compiler
6883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6885# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6887$as_echo_n "checking size of fpos_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006888if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006890else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006891 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 +00006892
Martin v. Löwis11437992002-04-12 09:54:03 +00006893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006894 if test "$ac_cv_type_fpos_t" = yes; then
6895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006897as_fn_error 77 "cannot compute sizeof (fpos_t)
6898See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899 else
6900 ac_cv_sizeof_fpos_t=0
6901 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903
Martin v. Löwis11437992002-04-12 09:54:03 +00006904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6906$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907
6908
6909
Martin v. Löwis11437992002-04-12 09:54:03 +00006910cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006911#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006912_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006913
Michael W. Hudson54241132001-12-07 15:38:26 +00006914
Martin v. Löwiseba40652007-08-30 20:10:57 +00006915# The cast to long int works around a bug in the HP C Compiler
6916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6918# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6920$as_echo_n "checking size of size_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006921if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006924 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 +00006925
Martin v. Löwis18e16552006-02-15 17:27:45 +00006926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006927 if test "$ac_cv_type_size_t" = yes; then
6928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006930as_fn_error 77 "cannot compute sizeof (size_t)
6931See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932 else
6933 ac_cv_sizeof_size_t=0
6934 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006936
Martin v. Löwis18e16552006-02-15 17:27:45 +00006937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6939$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940
6941
6942
Martin v. Löwis18e16552006-02-15 17:27:45 +00006943cat >>confdefs.h <<_ACEOF
6944#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6945_ACEOF
6946
6947
Christian Heimes951cc0f2008-01-31 23:08:23 +00006948# The cast to long int works around a bug in the HP C Compiler
6949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6951# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6953$as_echo_n "checking size of pid_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006954if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00006958
Christian Heimes951cc0f2008-01-31 23:08:23 +00006959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006960 if test "$ac_cv_type_pid_t" = yes; then
6961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006963as_fn_error 77 "cannot compute sizeof (pid_t)
6964See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006965 else
6966 ac_cv_sizeof_pid_t=0
6967 fi
6968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969
Christian Heimes951cc0f2008-01-31 23:08:23 +00006970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6972$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006973
6974
6975
6976cat >>confdefs.h <<_ACEOF
6977#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6978_ACEOF
6979
6980
Michael W. Hudson54241132001-12-07 15:38:26 +00006981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6983$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006986/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006987
Martin v. Löwis11437992002-04-12 09:54:03 +00006988int
6989main ()
6990{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006991long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006992 ;
6993 return 0;
6994}
6995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006997
6998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006999$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007000
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007001 have_long_long=yes
7002
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7006$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007007if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008# The cast to long int works around a bug in the HP C Compiler
7009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7011# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7013$as_echo_n "checking size of long long... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007014if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007015 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017 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 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020 if test "$ac_cv_type_long_long" = yes; then
7021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007023as_fn_error 77 "cannot compute sizeof (long long)
7024See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025 else
7026 ac_cv_sizeof_long_long=0
7027 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029
Martin v. Löwis11437992002-04-12 09:54:03 +00007030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7032$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033
7034
7035
Martin v. Löwis11437992002-04-12 09:54:03 +00007036cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007037#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007038_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007039
Michael W. Hudson54241132001-12-07 15:38:26 +00007040
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007041fi
7042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7044$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007045have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007047/* end confdefs.h. */
7048
7049int
7050main ()
7051{
Matthias Klosec511b472010-05-08 11:01:39 +00007052long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007053 ;
7054 return 0;
7055}
7056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007057if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007058
7059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007061
7062 have_long_double=yes
7063
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007064fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7067$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007068if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007069# The cast to long int works around a bug in the HP C Compiler
7070# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7071# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7072# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7074$as_echo_n "checking size of long double... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007075if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007076 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007079
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081 if test "$ac_cv_type_long_double" = yes; then
7082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007084as_fn_error 77 "cannot compute sizeof (long double)
7085See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007086 else
7087 ac_cv_sizeof_long_double=0
7088 fi
7089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007090
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7093$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007094
7095
7096
7097cat >>confdefs.h <<_ACEOF
7098#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7099_ACEOF
7100
7101
7102fi
7103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7105$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007106have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007108/* end confdefs.h. */
7109
7110int
7111main ()
7112{
7113_Bool x; x = (_Bool)0;
7114 ;
7115 return 0;
7116}
7117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007119
7120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007122
7123 have_c99_bool=yes
7124
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7128$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007129if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130# The cast to long int works around a bug in the HP C Compiler
7131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7133# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7135$as_echo_n "checking size of _Bool... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007136if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007140
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142 if test "$ac_cv_type__Bool" = yes; then
7143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007145as_fn_error 77 "cannot compute sizeof (_Bool)
7146See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147 else
7148 ac_cv_sizeof__Bool=0
7149 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007151
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7154$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155
7156
7157
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007158cat >>confdefs.h <<_ACEOF
7159#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7160_ACEOF
7161
7162
7163fi
7164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007166 #include <stdint.h>
7167 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007168 #ifdef HAVE_INTTYPES_H
7169 #include <inttypes.h>
7170 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007171"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007172if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007173
7174cat >>confdefs.h <<_ACEOF
7175#define HAVE_UINTPTR_T 1
7176_ACEOF
7177
Martin v. Löwiseba40652007-08-30 20:10:57 +00007178# The cast to long int works around a bug in the HP C Compiler
7179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7181# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7183$as_echo_n "checking size of uintptr_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007184if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187 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 +00007188
Martin v. Löwis11437992002-04-12 09:54:03 +00007189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007190 if test "$ac_cv_type_uintptr_t" = yes; then
7191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007193as_fn_error 77 "cannot compute sizeof (uintptr_t)
7194See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195 else
7196 ac_cv_sizeof_uintptr_t=0
7197 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199
Martin v. Löwis11437992002-04-12 09:54:03 +00007200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7202$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007203
7204
7205
Martin v. Löwis11437992002-04-12 09:54:03 +00007206cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007207#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007208_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007209
Michael W. Hudson54241132001-12-07 15:38:26 +00007210
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007211fi
7212
Martin v. Löwisebe26702006-10-02 14:55:51 +00007213
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007214# The cast to long int works around a bug in the HP C Compiler
7215# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7216# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7217# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7219$as_echo_n "checking size of off_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007220if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007221 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007224#ifdef HAVE_SYS_TYPES_H
7225#include <sys/types.h>
7226#endif
7227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007228"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007229
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231 if test "$ac_cv_type_off_t" = yes; then
7232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007234as_fn_error 77 "cannot compute sizeof (off_t)
7235See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007236 else
7237 ac_cv_sizeof_off_t=0
7238 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7243$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007244
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007245
7246
Martin v. Löwis11437992002-04-12 09:54:03 +00007247cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007248#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007249_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007250
Michael W. Hudson54241132001-12-07 15:38:26 +00007251
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7254$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007255if test "$have_long_long" = yes
7256then
7257if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007258 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007260$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7263$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7266$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007267fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007271fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007272
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007273# The cast to long int works around a bug in the HP C Compiler
7274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7276# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7278$as_echo_n "checking size of time_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007279if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007283#ifdef HAVE_SYS_TYPES_H
7284#include <sys/types.h>
7285#endif
7286#ifdef HAVE_TIME_H
7287#include <time.h>
7288#endif
7289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007291
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293 if test "$ac_cv_type_time_t" = yes; then
7294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007296as_fn_error 77 "cannot compute sizeof (time_t)
7297See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007298 else
7299 ac_cv_sizeof_time_t=0
7300 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7305$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007307
7308
Martin v. Löwis11437992002-04-12 09:54:03 +00007309cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007310#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007311_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007312
Michael W. Hudson54241132001-12-07 15:38:26 +00007313
7314
Trent Mick635f6fb2000-08-23 21:33:05 +00007315# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007316ac_save_cc="$CC"
7317if test "$ac_cv_kpthread" = "yes"
7318then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007319elif test "$ac_cv_kthread" = "yes"
7320then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007321elif test "$ac_cv_pthread" = "yes"
7322then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007323fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7325$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007326have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007328/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007329
7330 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007331int
7332main ()
7333{
Guido van Rossum12580492000-09-24 16:47:19 +00007334pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007335 ;
7336 return 0;
7337}
Matthias Klosec511b472010-05-08 11:01:39 +00007338
Martin v. Löwis11437992002-04-12 09:54:03 +00007339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007341 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7345$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007346if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7350# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7352$as_echo_n "checking size of pthread_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007353if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007357#ifdef HAVE_PTHREAD_H
7358#include <pthread.h>
7359#endif
7360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007362
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007364 if test "$ac_cv_type_pthread_t" = yes; then
7365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007367as_fn_error 77 "cannot compute sizeof (pthread_t)
7368See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007369 else
7370 ac_cv_sizeof_pthread_t=0
7371 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373
Trent Mick635f6fb2000-08-23 21:33:05 +00007374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7376$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007377
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007378
7379
Martin v. Löwis11437992002-04-12 09:54:03 +00007380cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007381#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007382_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007383
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007384
Trent Mick635f6fb2000-08-23 21:33:05 +00007385fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007386CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7389$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007390# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007392 enableval=$enable_toolbox_glue;
7393fi
Jack Jansene578a632001-08-15 01:27:14 +00007394
7395
7396if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007397then
Jack Jansene578a632001-08-15 01:27:14 +00007398 case $ac_sys_system/$ac_sys_release in
7399 Darwin/*)
7400 enable_toolbox_glue="yes";;
7401 *)
7402 enable_toolbox_glue="no";;
7403 esac
7404fi
7405case "$enable_toolbox_glue" in
7406yes)
Jack Jansene578a632001-08-15 01:27:14 +00007407 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007408 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007411
7412 ;;
7413*)
Jack Jansene578a632001-08-15 01:27:14 +00007414 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007415 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007416 ;;
7417esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7419$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007420
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007421
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007422
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007423case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007424 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007425 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7426 ;;
7427 Darwin/*)
7428 OTHER_LIBTOOL_OPT=""
7429 ;;
7430esac
7431
7432
Ronald Oussoren25967582009-09-06 10:00:26 +00007433ARCH_RUN_32BIT=""
7434
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007435case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007436 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007437 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7438 if test "${enable_universalsdk}"; then
7439 :
7440 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007441 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007442 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007444 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007445 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007446 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007447 if test ${gcc_version} '<' 4.0
7448 then
7449 LIBTOOL_CRUFT="-lcc_dynamic"
7450 else
7451 LIBTOOL_CRUFT=""
7452 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007454 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007457/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007458
Ronald Oussoren25967582009-09-06 10:00:26 +00007459 #include <unistd.h>
7460 int main(int argc, char*argv[])
7461 {
7462 if (sizeof(long) == 4) {
7463 return 0;
7464 } else {
7465 return 1;
7466 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007467 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007468
Ronald Oussoren25967582009-09-06 10:00:26 +00007469_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007471 ac_osx_32bit=yes
7472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007474fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007477fi
7478
7479
Ronald Oussoren25967582009-09-06 10:00:26 +00007480 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007481 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007482 i386)
7483 MACOSX_DEFAULT_ARCH="i386"
7484 ;;
7485 ppc)
7486 MACOSX_DEFAULT_ARCH="ppc"
7487 ;;
7488 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007489 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007490 ;;
7491 esac
7492 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007493 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007494 i386)
7495 MACOSX_DEFAULT_ARCH="x86_64"
7496 ;;
7497 ppc)
7498 MACOSX_DEFAULT_ARCH="ppc64"
7499 ;;
7500 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007501 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007502 ;;
7503 esac
7504
7505 #ARCH_RUN_32BIT="true"
7506 fi
7507
7508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007509 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007510 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007511esac
7512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7514$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007515if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007516then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007517 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007519 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007522
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7524$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007525 if test $enable_shared = "yes"
7526 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007527 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00007528 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007532fi
7533
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7535$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007536case $ac_sys_system/$ac_sys_release in
7537 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7542$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007543 ;;
7544 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7546$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007547 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007548esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007549
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007551
Michael W. Hudson54241132001-12-07 15:38:26 +00007552
7553
7554
7555
Ronald Oussoren75912852010-04-08 08:13:31 +00007556
Guido van Rossum0a516c91994-09-12 10:58:40 +00007557# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007558# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7560$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007561if test -z "$SO"
7562then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007563 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007564 hp*|HP*)
7565 case `uname -m` in
7566 ia64) SO=.so;;
7567 *) SO=.sl;;
7568 esac
7569 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007570 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007571 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007572 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007573else
7574 # this might also be a termcap variable, see #610332
7575 echo
7576 echo '====================================================================='
7577 echo '+ +'
7578 echo '+ WARNING: You have set SO in your environment. +'
7579 echo '+ Do you really mean to change the extension for shared libraries? +'
7580 echo '+ Continuing in 10 seconds to let you to ponder. +'
7581 echo '+ +'
7582 echo '====================================================================='
7583 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7586$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007587
Ronald Oussoren79f90492009-01-02 10:44:46 +00007588
Neal Norwitz58e28882006-05-19 07:00:58 +00007589cat >>confdefs.h <<_ACEOF
7590#define SHLIB_EXT "$SO"
7591_ACEOF
7592
Guido van Rossum0a516c91994-09-12 10:58:40 +00007593# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007594# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007595# (Shared libraries in this instance are shared modules to be loaded into
7596# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7598$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007599if test -z "$LDSHARED"
7600then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007601 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007602 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007603 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007604 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007605 ;;
7606 BeOS*)
7607 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007608 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007609 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007610 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007611 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007612 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007613 if test "$GCC" = "yes" ; then
7614 LDSHARED='$(CC) -shared'
7615 LDCXXSHARED='$(CXX) -shared'
7616 else
7617 LDSHARED='$(CC) -G'
7618 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007619 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007620 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007621 if test "$GCC" = "yes" ; then
7622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared'
7624 else
7625 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007626 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007627 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007628 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007629 LDSHARED='$(CC) -bundle'
7630 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007631 if test "$enable_framework" ; then
7632 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007633 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7634 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007635 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007636 else
7637 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007638 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007639 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007640 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007641 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007642 LDSHARED='$(CC) -bundle'
7643 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007644 if test "$enable_framework" ; then
7645 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007646 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7647 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007648 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007649 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007650 # No framework, use the Python app as bundle-loader
7651 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007652 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007653 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007654 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007655 Darwin/*)
7656 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7657 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007658
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007659 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007660 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007661 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007662 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007663 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007664 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7665 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007666 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007667 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007668 LDSHARED='$(CC) -bundle'
7669 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007670 if test "$enable_framework" ; then
7671 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007672 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7673 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007674 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007675 else
7676 # No framework, use the Python app as bundle-loader
7677 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7678 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007679 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007680 fi
7681 fi
7682 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007683 Linux*|GNU*|QNX*)
7684 LDSHARED='$(CC) -shared'
7685 LDCXXSHARED='$(CXX) -shared';;
7686 BSD/OS*/4*)
7687 LDSHARED="gcc -shared"
7688 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007689 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007690 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007691 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007692 LDSHARED='$(CC) -shared'
7693 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007694 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007695 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007696 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007697 OpenBSD*)
7698 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7699 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007700 LDSHARED='$(CC) -shared $(CCSHARED)'
7701 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007702 else
7703 case `uname -r` in
7704 [01].* | 2.[0-7] | 2.[0-7].*)
7705 LDSHARED="ld -Bshareable ${LDFLAGS}"
7706 ;;
7707 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007708 LDSHARED='$(CC) -shared $(CCSHARED)'
7709 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007710 ;;
7711 esac
7712 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007713 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007714 LDSHARED='$(CC) -shared'
7715 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007716 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007717 if test "$GCC" = "yes" ; then
7718 LDSHARED='$(CC) -shared'
7719 LDCXXSHARED='$(CXX) -shared'
7720 else
7721 LDSHARED='$(CC) -G'
7722 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007723 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007724 SCO_SV*)
7725 LDSHARED='$(CC) -Wl,-G,-Bexport'
7726 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7727 CYGWIN*)
7728 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7729 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7730 atheos*)
7731 LDSHARED="gcc -shared"
7732 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007733 *) LDSHARED="ld";;
7734 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7737$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007738LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007739BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007740# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007741# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7743$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007744if test -z "$CCSHARED"
7745then
Guido van Rossum07397971997-04-29 21:49:50 +00007746 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007747 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007748 then CCSHARED="-fPIC";
7749 elif test `uname -p` = sparc;
7750 then CCSHARED="-xcode=pic32";
7751 else CCSHARED="-Kpic";
7752 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007753 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007754 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007755 else CCSHARED="+z";
7756 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007757 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007758 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007759 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007760 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007761 if test "$GCC" = "yes"
7762 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007763 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007764 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007765 SCO_SV*)
7766 if test "$GCC" = "yes"
7767 then CCSHARED="-fPIC"
7768 else CCSHARED="-Kpic -belf"
7769 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007770 IRIX*/6*) case $CC in
7771 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007772 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007773 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007774 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007775 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7778$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007779# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007780# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7782$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007783if test -z "$LINKFORSHARED"
7784then
Guido van Rossum07397971997-04-29 21:49:50 +00007785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007786 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007787 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007788 LINKFORSHARED="-Wl,-E -Wl,+s";;
7789# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007790 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007791 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007792 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007794 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7795 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007796 # not used by the core itself but which needs to be in the core so
7797 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007798 # -prebind is no longer used, because it actually seems to give a
7799 # slowdown in stead of a speedup, maybe due to the large number of
7800 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007801
7802 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007803 if test "$enable_framework"
7804 then
Jack Jansenda49e192005-01-07 13:08:22 +00007805 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007806 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007807 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007808 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007809 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007810 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007811 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007812 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7813 then
7814 LINKFORSHARED="-Wl,--export-dynamic"
7815 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007816 SunOS/5*) case $CC in
7817 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007818 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007819 then
7820 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007821 fi;;
7822 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007823 CYGWIN*)
7824 if test $enable_shared = "no"
7825 then
7826 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7827 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007828 QNX*)
7829 # -Wl,-E causes the symbols to be added to the dynamic
7830 # symbol table so that they can be found when a module
7831 # is loaded. -N 2048K causes the stack size to be set
7832 # to 2048 kilobytes so that the stack doesn't overflow
7833 # when running test_compile.py.
7834 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007835 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7838$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007839
Michael W. Hudson54241132001-12-07 15:38:26 +00007840
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7843$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007844if test ! "$LIBRARY" = "$LDLIBRARY"
7845then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007846 case $ac_sys_system in
7847 CYGWIN*)
7848 # Cygwin needs CCSHARED when building extension DLLs
7849 # but not when building the interpreter DLL.
7850 CFLAGSFORSHARED='';;
7851 *)
7852 CFLAGSFORSHARED='$(CCSHARED)'
7853 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7856$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007857
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007858# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7859# library (with --enable-shared).
7860# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007861# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7862# if it is not required, since it creates a dependency of the shared library
7863# to LIBS. This, in turn, means that applications linking the shared libpython
7864# don't need to link LIBS explicitly. The default should be only changed
7865# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7868$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007869case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007870 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007871 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007872esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7874$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007875
7876
Guido van Rossum627b2d71993-12-24 10:39:16 +00007877# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7879$as_echo_n "checking for dlopen in -ldl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007880if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882else
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007884LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888/* Override any GCC internal prototype to avoid an error.
7889 Use char because int might match the return type of a GCC
7890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891#ifdef __cplusplus
7892extern "C"
7893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007894char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007895int
7896main ()
7897{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007898return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ;
7900 return 0;
7901}
7902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007903if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007908rm -f core conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7913$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007914if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 cat >>confdefs.h <<_ACEOF
7916#define HAVE_LIBDL 1
7917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007919 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007921fi
7922 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7924$as_echo_n "checking for shl_load in -ldld... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007925if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007927else
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007929LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007932
Martin v. Löwiseba40652007-08-30 20:10:57 +00007933/* Override any GCC internal prototype to avoid an error.
7934 Use char because int might match the return type of a GCC
7935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936#ifdef __cplusplus
7937extern "C"
7938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007939char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007940int
7941main ()
7942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007943return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007951 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7958$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007959if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 cat >>confdefs.h <<_ACEOF
7961#define HAVE_LIBDLD 1
7962_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007964 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966fi
7967 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007968
Ronald Oussoren79f90492009-01-02 10:44:46 +00007969# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007970if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7972$as_echo_n "checking for library containing sem_init... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007973if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007975else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007976 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980/* Override any GCC internal prototype to avoid an error.
7981 Use char because int might match the return type of a GCC
7982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983#ifdef __cplusplus
7984extern "C"
7985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007986char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007987int
7988main ()
7989{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007990return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ;
7992 return 0;
7993}
7994_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995for ac_lib in '' pthread rt posix4; do
7996 if test -z "$ac_lib"; then
7997 ac_res="none required"
7998 else
7999 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008000 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008005rm -f core conftest.err conftest.$ac_objext \
8006 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008007 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008008 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008011if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008012
Martin v. Löwiseba40652007-08-30 20:10:57 +00008013else
8014 ac_cv_search_sem_init=no
8015fi
8016rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008017LIBS=$ac_func_search_save_LIBS
8018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8020$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008024
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008025fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008026 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008027 # posix4 on Solaris 2.6
8028 # pthread (first!) on Linux
8029fi
8030
Martin v. Löwis19d17342003-06-14 21:03:05 +00008031# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8033$as_echo_n "checking for textdomain in -lintl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008034if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008036else
8037 ac_check_lib_save_LIBS=$LIBS
8038LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008041
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042/* Override any GCC internal prototype to avoid an error.
8043 Use char because int might match the return type of a GCC
8044 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008045#ifdef __cplusplus
8046extern "C"
8047#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008048char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008049int
8050main ()
8051{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008053 ;
8054 return 0;
8055}
8056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008058 ac_cv_lib_intl_textdomain=yes
8059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008062rm -f core conftest.err conftest.$ac_objext \
8063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008064LIBS=$ac_check_lib_save_LIBS
8065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8067$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008068if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008069
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008071
8072fi
8073
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008074
8075# checks for system dependent C++ extensions support
8076case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8078$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008081
Georg Brandl94800df2011-02-25 11:09:02 +00008082 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008083int
8084main ()
8085{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008086loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 ;
8088 return 0;
8089}
Matthias Klosec511b472010-05-08 11:01:39 +00008090
Martin v. Löwis11437992002-04-12 09:54:03 +00008091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008093
Matthias Klosec511b472010-05-08 11:01:39 +00008094
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008095$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008096
Matthias Klosec511b472010-05-08 11:01:39 +00008097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008098$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008099
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008100else
Matthias Klosec511b472010-05-08 11:01:39 +00008101
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008104
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008105fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106rm -f core conftest.err conftest.$ac_objext \
8107 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008108 *) ;;
8109esac
8110
Guido van Rossum70c7f481998-03-26 18:44:10 +00008111# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008112# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8114$as_echo_n "checking for t_open in -lnsl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008115if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008116 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008117else
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008119LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008122
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123/* Override any GCC internal prototype to avoid an error.
8124 Use char because int might match the return type of a GCC
8125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008126#ifdef __cplusplus
8127extern "C"
8128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008129char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008130int
8131main ()
8132{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008133return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008134 ;
8135 return 0;
8136}
8137_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143rm -f core conftest.err conftest.$ac_objext \
8144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8148$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008149if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008150 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008151fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008152 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8154$as_echo_n "checking for socket in -lsocket... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008155if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008156 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008157else
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008159LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163/* Override any GCC internal prototype to avoid an error.
8164 Use char because int might match the return type of a GCC
8165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008166#ifdef __cplusplus
8167extern "C"
8168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008169char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008170int
8171main ()
8172{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ;
8175 return 0;
8176}
8177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008178if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008181 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008182fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008183rm -f core conftest.err conftest.$ac_objext \
8184 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008185LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8188$as_echo "$ac_cv_lib_socket_socket" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008189if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008190 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008191fi
8192 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008193
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008194case "$ac_sys_system" in
8195BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8197$as_echo_n "checking for socket in -lnet... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008198if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008200else
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008202LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206/* Override any GCC internal prototype to avoid an error.
8207 Use char because int might match the return type of a GCC
8208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008209#ifdef __cplusplus
8210extern "C"
8211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008212char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008213int
8214main ()
8215{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008216return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 ;
8218 return 0;
8219}
8220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008224 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008225fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008226rm -f core conftest.err conftest.$ac_objext \
8227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008228LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008229fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8231$as_echo "$ac_cv_lib_net_socket" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008232if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008233 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008234fi
8235 # BeOS
8236;;
8237esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008238
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8240$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8246$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008247LIBS="$withval $LIBS"
8248
8249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008252fi
8253
Guido van Rossum7f43da71994-08-01 12:15:30 +00008254
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008255if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008256 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8257set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8259$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008260if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008261 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008262else
8263 case $PKG_CONFIG in
8264 [\\/]* | ?:[\\/]*)
8265 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8266 ;;
8267 *)
8268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8269for as_dir in $PATH
8270do
8271 IFS=$as_save_IFS
8272 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008273 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008274 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8275 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008277 break 2
8278 fi
8279done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008281IFS=$as_save_IFS
8282
8283 ;;
8284esac
8285fi
8286PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8287if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8289$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8292$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008293fi
8294
8295
8296fi
8297if test -z "$ac_cv_path_PKG_CONFIG"; then
8298 ac_pt_PKG_CONFIG=$PKG_CONFIG
8299 # Extract the first word of "pkg-config", so it can be a program name with args.
8300set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8302$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008303if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008305else
8306 case $ac_pt_PKG_CONFIG in
8307 [\\/]* | ?:[\\/]*)
8308 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8309 ;;
8310 *)
8311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8312for as_dir in $PATH
8313do
8314 IFS=$as_save_IFS
8315 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008316 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008317 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8318 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008319 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008320 break 2
8321 fi
8322done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008323 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008324IFS=$as_save_IFS
8325
8326 ;;
8327esac
8328fi
8329ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8330if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8332$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8335$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008336fi
8337
8338 if test "x$ac_pt_PKG_CONFIG" = x; then
8339 PKG_CONFIG=""
8340 else
8341 case $cross_compiling:$ac_tool_warned in
8342yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008345ac_tool_warned=yes ;;
8346esac
8347 PKG_CONFIG=$ac_pt_PKG_CONFIG
8348 fi
8349else
8350 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8351fi
8352
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008353
8354# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8356$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008357
8358# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008359if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008360 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008361else
8362 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008363fi
8364
8365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8367$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008368
8369# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8371$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008372
8373# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008374if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008375 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008376else
8377 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008378fi
8379
8380
8381if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008382 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8383else
8384 LIBFFI_INCLUDEDIR=""
8385fi
8386
8387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8389$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008390
Benjamin Peterson867475c2009-04-29 20:36:25 +00008391# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8393$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008394
8395# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008396if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008397 withval=$with_dbmliborder;
8398if test x$with_dbmliborder = xyes
8399then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008400as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008401else
8402 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8403 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8404 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008405 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008406 fi
8407 done
8408fi
8409fi
8410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8412$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008413
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008414# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008415
8416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8418$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Martin v. Löwiseba40652007-08-30 20:10:57 +00008420# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422 withval=$with_signal_module;
8423fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008424
8425
8426if test -z "$with_signal_module"
8427then with_signal_module="yes"
8428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8430$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008431
8432if test "${with_signal_module}" = "yes"; then
8433 USE_SIGNAL_MODULE=""
8434 SIGNAL_OBJS=""
8435else
8436 USE_SIGNAL_MODULE="#"
8437 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8438fi
8439
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008440# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008441
Barry Warsawc0d24d82000-06-29 16:12:00 +00008442USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008443
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8445$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
Guido van Rossumec2f0731997-01-22 20:54:01 +00008447
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008449if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8452$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008453LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008454if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008455 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008456fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008460fi
8461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463# Templates for things AC_DEFINEd more than once.
8464# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008465
8466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
8468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8470$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008473if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 withval=$with_threads;
8475fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008476
8477
Barry Warsawc0d24d82000-06-29 16:12:00 +00008478# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008482 withval=$with_thread; with_threads=$with_thread
8483fi
8484
Barry Warsawc0d24d82000-06-29 16:12:00 +00008485
8486if test -z "$with_threads"
8487then with_threads="yes"
8488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8490$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008491
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008492
Barry Warsawc0d24d82000-06-29 16:12:00 +00008493if test "$with_threads" = "no"
8494then
8495 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008496elif test "$ac_cv_pthread_is_default" = yes
8497then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008499
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008500 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008501 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008502
8503 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008505elif test "$ac_cv_kpthread" = "yes"
8506then
8507 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008508 if test "$ac_cv_cxx_thread" = "yes"; then
8509 CXX="$CXX -Kpthread"
8510 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008511 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008513 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008514 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008515elif test "$ac_cv_kthread" = "yes"
8516then
8517 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008518 if test "$ac_cv_cxx_thread" = "yes"; then
8519 CXX="$CXX -Kthread"
8520 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008522
8523 posix_threads=yes
8524 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008525elif test "$ac_cv_pthread" = "yes"
8526then
8527 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008528 if test "$ac_cv_cxx_thread" = "yes"; then
8529 CXX="$CXX -pthread"
8530 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008531 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008532
8533 posix_threads=yes
8534 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008535else
8536 if test ! -z "$with_threads" -a -d "$with_threads"
8537 then LDFLAGS="$LDFLAGS -L$with_threads"
8538 fi
8539 if test ! -z "$withval" -a -d "$withval"
8540 then LDFLAGS="$LDFLAGS -L$withval"
8541 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008542
8543 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008544 # define _POSIX_THREADS in unistd.h. Some apparently don't
8545 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8547$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008550
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008551#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008552#ifdef _POSIX_THREADS
8553yes
8554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
8556_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008558 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559 unistd_defines_pthreads=yes
8560else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008561 unistd_defines_pthreads=no
8562fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008563rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8566$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008567
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008568 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008570 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008571if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008574 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008577$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008578
8579 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008580 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008581else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008583 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008584if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008587 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008590$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008591
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008592 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008593else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8596$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
Martin v. Löwiseba40652007-08-30 20:10:57 +00008598# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008599if test "${with_pth+set}" = set; then :
8600 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8601$as_echo "$withval" >&6; }
8602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
8604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008606
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008607 LIBS="-lpth $LIBS"
8608 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8611$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008612
8613 # Just looking for pthread_create in libpthread is not enough:
8614 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8615 # So we really have to include pthread.h, and then link.
8616 _libs=$LIBS
8617 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8619$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008622#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008623
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008624void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008625int
8626main ()
8627{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008628
8629pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ;
8631 return 0;
8632}
8633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8637$as_echo "yes" >&6; }
8638 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008639
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008640 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008641 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008644 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008645 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008646if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008648
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008649 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008650 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008651else
Guido van Rossumad678af1998-10-02 14:42:15 +00008652
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008654if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008655 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008656
8657
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008659
8660 THREADOBJ="Python/thread.o"
8661else
8662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008664if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008665 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
8667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008669
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008670 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008671else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8674$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008675if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008676 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008677else
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008679LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008682
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683/* Override any GCC internal prototype to avoid an error.
8684 Use char because int might match the return type of a GCC
8685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008686#ifdef __cplusplus
8687extern "C"
8688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008689char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008690int
8691main ()
8692{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ;
8695 return 0;
8696}
8697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008701 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008703rm -f core conftest.err conftest.$ac_objext \
8704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008705LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8708$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008709if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008710 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008711
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008712 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008713 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008714 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008715else
Greg Steinadf63d62000-07-05 10:38:09 +00008716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8718$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008719if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008720 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008721else
Martin v. Löwis11437992002-04-12 09:54:03 +00008722 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008723LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008726
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727/* Override any GCC internal prototype to avoid an error.
8728 Use char because int might match the return type of a GCC
8729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730#ifdef __cplusplus
8731extern "C"
8732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008733char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008734int
8735main ()
8736{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008737return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 ;
8739 return 0;
8740}
8741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008745 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008747rm -f core conftest.err conftest.$ac_objext \
8748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008749LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8752$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008753if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008755
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008756 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008757 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008758 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008759else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008760
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8762$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008763if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008764 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008765else
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008767LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008770
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771/* Override any GCC internal prototype to avoid an error.
8772 Use char because int might match the return type of a GCC
8773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774#ifdef __cplusplus
8775extern "C"
8776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008777char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008781return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ;
8783 return 0;
8784}
8785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008791rm -f core conftest.err conftest.$ac_objext \
8792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8796$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008797if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008799
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008800 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008801 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008802 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008803else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8806$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008807if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008808 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008809else
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008811LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815/* Override any GCC internal prototype to avoid an error.
8816 Use char because int might match the return type of a GCC
8817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008818#ifdef __cplusplus
8819extern "C"
8820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008821char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008822int
8823main ()
8824{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008825return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ;
8827 return 0;
8828}
8829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008833 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835rm -f core conftest.err conftest.$ac_objext \
8836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008837LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8840$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008841if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008844 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008845 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008846 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008847else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008848
Martin v. Löwis130fb172001-07-19 11:00:41 +00008849 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008850fi
8851
Guido van Rossum627b2d71993-12-24 10:39:16 +00008852
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008853fi
8854
Guido van Rossum0be3e491997-05-22 20:33:33 +00008855fi
8856
Guido van Rossum49545951997-12-02 19:28:29 +00008857fi
8858
Guido van Rossumb93a8621998-05-07 13:27:32 +00008859fi
8860
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008861
Michael W. Hudson54241132001-12-07 15:38:26 +00008862fi
8863
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008864
8865fi
8866
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008868rm -f core conftest.err conftest.$ac_objext \
8869 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870fi
8871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872fi
8873
8874
8875fi
8876
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008877
Michael W. Hudson54241132001-12-07 15:38:26 +00008878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8880$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008881if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008883else
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008885LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889/* Override any GCC internal prototype to avoid an error.
8890 Use char because int might match the return type of a GCC
8891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008892#ifdef __cplusplus
8893extern "C"
8894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008895char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ;
8901 return 0;
8902}
8903_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008904if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008906else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008907 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909rm -f core conftest.err conftest.$ac_objext \
8910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008911LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8914$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008915if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008917
Martin v. Löwis130fb172001-07-19 11:00:41 +00008918 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008919 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008920 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008921fi
8922
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008923
Neal Norwitza978ab02002-11-02 16:58:05 +00008924 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8926$as_echo_n "checking for thr_create in -lthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008927if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008929else
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008931LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008934
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935/* Override any GCC internal prototype to avoid an error.
8936 Use char because int might match the return type of a GCC
8937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938#ifdef __cplusplus
8939extern "C"
8940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008941char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008945return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 ;
8947 return 0;
8948}
8949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008953 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008955rm -f core conftest.err conftest.$ac_objext \
8956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008957LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8960$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008961if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008963
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008964 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008965 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008966 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008967fi
8968
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008969 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008970
Martin v. Löwis130fb172001-07-19 11:00:41 +00008971 if test "$USE_THREAD_MODULE" != "#"
8972 then
8973 # If the above checks didn't disable threads, (at least) OSF1
8974 # needs this '-threads' argument during linking.
8975 case $ac_sys_system in
8976 OSF1) LDLAST=-threads;;
8977 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008978 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008979fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008981if test "$posix_threads" = "yes"; then
8982 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008985
8986 fi
8987
8988 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8989 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02008990 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008992
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008993 ;;
8994 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008995$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008996
8997 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02008998 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008999$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009000
9001 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009002 esac
9003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9005$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009006 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009007 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009010 ac_cv_pthread_system_supported=no
9011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009014#include <pthread.h>
9015 void *foo(void *parm) {
9016 return NULL;
9017 }
9018 main() {
9019 pthread_attr_t attr;
9020 pthread_t id;
9021 if (pthread_attr_init(&attr)) exit(-1);
9022 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9023 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9024 exit(0);
9025 }
9026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009027if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009028 ac_cv_pthread_system_supported=yes
9029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009030 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9033 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009034fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009035
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036
Guido van Rossum627b2d71993-12-24 10:39:16 +00009037fi
9038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9040$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009041 if test "$ac_cv_pthread_system_supported" = "yes"; then
9042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009044
9045 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046 for ac_func in pthread_sigmask
9047do :
9048 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009049if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009050 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009052_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009053 case $ac_sys_system in
9054 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009055
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009056$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009057
9058 ;;
9059 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009060fi
9061done
9062
9063fi
9064
9065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9069$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009071if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076 ipv6=no
9077 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009078 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9079$as_echo "yes" >&6; }
9080 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081
9082 ipv6=yes
9083 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085else
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091 ipv6=no
9092
9093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009095/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096 /* AF_INET6 available check */
9097#include <sys/types.h>
9098#include <sys/socket.h>
9099main()
9100{
9101 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9102 exit(1);
9103 else
9104 exit(0);
9105}
9106
Martin v. Löwis11437992002-04-12 09:54:03 +00009107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9111$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114else
Matthias Klosec511b472010-05-08 11:01:39 +00009115
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123fi
9124
Martin v. Löwiseba40652007-08-30 20:10:57 +00009125
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009126if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9128$as_echo_n "checking if RFC2553 API is available... " >&6; }
9129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009130/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009131
9132 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009133#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009134int
9135main ()
9136{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009137struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009138 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ;
9140 return 0;
9141}
Matthias Klosec511b472010-05-08 11:01:39 +00009142
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009144if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009145
9146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009147$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009148 ipv6=yes
9149
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009150else
Matthias Klosec511b472010-05-08 11:01:39 +00009151
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009153$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009154 ipv6=no
9155
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009158fi
9159
9160if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009162
9163fi
9164
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165fi
9166
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009167
9168ipv6type=unknown
9169ipv6lib=none
9170ipv6trylibc=no
9171
9172if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9174$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009175 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9176 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009177 case $i in
9178 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009180/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009181
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182#include <netinet/in.h>
9183#ifdef IPV6_INRIA_VERSION
9184yes
9185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009189 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009191rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192
9193 ;;
9194 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009197
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198#include <netinet/in.h>
9199#ifdef __KAME__
9200yes
9201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009202_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205 ipv6type=$i;
9206 ipv6lib=inet6
9207 ipv6libdir=/usr/local/v6/lib
9208 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009210rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211
9212 ;;
9213 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009215/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009216
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217#include <features.h>
9218#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9219yes
9220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009221_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009223 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009224 ipv6type=$i;
9225 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009226fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009227rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228
9229 ;;
9230 linux-inet6)
9231 if test -d /usr/inet6; then
9232 ipv6type=$i
9233 ipv6lib=inet6
9234 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009235 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236 fi
9237 ;;
9238 solaris)
9239 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009240 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241 ipv6type=$i
9242 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009243 fi
9244 fi
9245 ;;
9246 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009248/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009250#include <sys/param.h>
9251#ifdef _TOSHIBA_INET6
9252yes
9253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009254_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009256 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009257 ipv6type=$i;
9258 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009259 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009261rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262
9263 ;;
9264 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009267
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009268#include </usr/local/v6/include/sys/v6config.h>
9269#ifdef __V6D__
9270yes
9271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009274 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009275 ipv6type=$i;
9276 ipv6lib=v6;
9277 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009278 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009279fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009280rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009281
9282 ;;
9283 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009285/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009286
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287#include <sys/param.h>
9288#ifdef _ZETA_MINAMI_INET6
9289yes
9290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009291_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009294 ipv6type=$i;
9295 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009296 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009297fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009298rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009299
9300 ;;
9301 esac
9302 if test "$ipv6type" != "unknown"; then
9303 break
9304 fi
9305 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9307$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009308fi
9309
9310if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9311 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9312 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9313 echo "using lib$ipv6lib"
9314 else
9315 if test $ipv6trylibc = "yes"; then
9316 echo "using libc"
9317 else
9318 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9319 echo "You need to fetch lib$ipv6lib.a from appropriate"
9320 echo 'ipv6 kit and compile beforehand.'
9321 exit 1
9322 fi
9323 fi
9324fi
9325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9327$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009329/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009330
9331 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009332int
9333main ()
9334{
9335FSIORefNum fRef = 0
9336 ;
9337 return 0;
9338}
Mark Dickinson0712b562010-05-08 19:13:21 +00009339
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009340_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009341if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009342
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009343
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009344$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009345
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9347$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009348
Mark Dickinson0712b562010-05-08 19:13:21 +00009349else
9350
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
9353
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009354fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9356
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009357# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9359$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009360
Martin v. Löwiseba40652007-08-30 20:10:57 +00009361# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009362if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363 withval=$with_doc_strings;
9364fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009365
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009366
9367if test -z "$with_doc_strings"
9368then with_doc_strings="yes"
9369fi
9370if test "$with_doc_strings" != "no"
9371then
9372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009374
9375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9377$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009378
Neil Schemenauera35c6882001-02-27 04:45:05 +00009379# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9381$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009382
Martin v. Löwiseba40652007-08-30 20:10:57 +00009383# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009386if test "$withval" != no
9387then
9388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009389$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9392$as_echo "yes" >&6; }
9393else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009395fi
9396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399fi
9400
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009401
9402# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9404$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009405
Martin v. Löwiseba40652007-08-30 20:10:57 +00009406# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009408 withval=$with_pymalloc;
9409fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009410
Neil Schemenauera35c6882001-02-27 04:45:05 +00009411
Neil Schemenauer16c22972002-03-22 15:34:49 +00009412if test -z "$with_pymalloc"
9413then with_pymalloc="yes"
9414fi
9415if test "$with_pymalloc" != "no"
9416then
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009419
9420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9422$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009423
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009424# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9426$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009427
9428# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009430 withval=$with_valgrind;
9431else
9432 with_valgrind=no
9433fi
9434
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9436$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009437if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009439if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009441$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009442
9443else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009444 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009445
9446fi
9447
9448
9449fi
9450
Barry Warsawef82cd72000-06-30 16:21:01 +00009451# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9453$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009458if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009459then
9460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009461$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009462
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9464$as_echo "yes" >&6; }
9465else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9466$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009467fi
9468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471fi
9472
Barry Warsawef82cd72000-06-30 16:21:01 +00009473
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009474# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009475
Guido van Rossum98935bf2001-09-05 19:13:16 +00009476DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009477
Guido van Rossume97ee181999-12-20 21:27:22 +00009478# the dlopen() function means we might want to use dynload_shlib.o. some
9479# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009480for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481do :
9482 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009483if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009486_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009487
Guido van Rossume97ee181999-12-20 21:27:22 +00009488fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009489done
Guido van Rossume97ee181999-12-20 21:27:22 +00009490
Michael W. Hudson54241132001-12-07 15:38:26 +00009491
Guido van Rossume97ee181999-12-20 21:27:22 +00009492# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9493# loading of modules.
9494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9496$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009497if test -z "$DYNLOADFILE"
9498then
9499 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009500 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9501 if test "$ac_cv_func_dlopen" = yes
9502 then DYNLOADFILE="dynload_shlib.o"
9503 else DYNLOADFILE="dynload_aix.o"
9504 fi
9505 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009506 BeOS*) DYNLOADFILE="dynload_beos.o";;
9507 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009508 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9509 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009510 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009511 *)
9512 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9513 # out any dynamic loading
9514 if test "$ac_cv_func_dlopen" = yes
9515 then DYNLOADFILE="dynload_shlib.o"
9516 else DYNLOADFILE="dynload_stub.o"
9517 fi
9518 ;;
9519 esac
9520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9522$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009523if test "$DYNLOADFILE" != "dynload_stub.o"
9524then
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009526$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009527
9528fi
9529
Neil Schemenauer4e425612001-06-19 15:44:15 +00009530# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9531
Michael W. Hudson54241132001-12-07 15:38:26 +00009532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9534$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009535if test -z "$MACHDEP_OBJS"
9536then
Jack Jansene578a632001-08-15 01:27:14 +00009537 MACHDEP_OBJS=$extra_machdep_objs
9538else
9539 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009540fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9542$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009543
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009545for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9546 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009547 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009548 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009549 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009550 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009551 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009552 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9553 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009554 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009555 setlocale setregid setreuid setresuid setresgid \
9556 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009557 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009558 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009559 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009560do :
9561 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9562ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009563if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009566_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009567
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009568fi
9569done
9570
Michael W. Hudson54241132001-12-07 15:38:26 +00009571
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009572# For some functions, having a definition is not sufficient, since
9573# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9575$as_echo_n "checking for chroot... " >&6; }
9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009578#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009579int
9580main ()
9581{
9582void *x=chroot
9583 ;
9584 return 0;
9585}
9586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009589$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009590
Matthias Klosec511b472010-05-08 11:01:39 +00009591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9595$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596
9597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9600$as_echo_n "checking for link... " >&6; }
9601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009603#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009604int
9605main ()
9606{
9607void *x=link
9608 ;
9609 return 0;
9610}
9611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009615
Matthias Klosec511b472010-05-08 11:01:39 +00009616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9620$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009621
9622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9625$as_echo_n "checking for symlink... " >&6; }
9626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009628#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009629int
9630main ()
9631{
9632void *x=symlink
9633 ;
9634 return 0;
9635}
9636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009638
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009640
Matthias Klosec511b472010-05-08 11:01:39 +00009641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009646
9647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9650$as_echo_n "checking for fchdir... " >&6; }
9651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009652/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009653#include <unistd.h>
9654int
9655main ()
9656{
9657void *x=fchdir
9658 ;
9659 return 0;
9660}
9661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009664$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009665
Matthias Klosec511b472010-05-08 11:01:39 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009671
9672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9675$as_echo_n "checking for fsync... " >&6; }
9676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009678#include <unistd.h>
9679int
9680main ()
9681{
9682void *x=fsync
9683 ;
9684 return 0;
9685}
9686_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009688
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009690
Matthias Klosec511b472010-05-08 11:01:39 +00009691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009696
9697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9700$as_echo_n "checking for fdatasync... " >&6; }
9701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009703#include <unistd.h>
9704int
9705main ()
9706{
9707void *x=fdatasync
9708 ;
9709 return 0;
9710}
9711_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009715
Matthias Klosec511b472010-05-08 11:01:39 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9720$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009721
9722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9725$as_echo_n "checking for epoll... " >&6; }
9726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009727/* end confdefs.h. */
9728#include <sys/epoll.h>
9729int
9730main ()
9731{
9732void *x=epoll_create
9733 ;
9734 return 0;
9735}
9736_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009740
Matthias Klosec511b472010-05-08 11:01:39 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009746
9747fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9750$as_echo_n "checking for kqueue... " >&6; }
9751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009752/* end confdefs.h. */
9753
9754#include <sys/types.h>
9755#include <sys/event.h>
9756
9757int
9758main ()
9759{
9760int x=kqueue()
9761 ;
9762 return 0;
9763}
9764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009766
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009767$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009768
Matthias Klosec511b472010-05-08 11:01:39 +00009769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009770$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009771else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009774
9775fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009777# On some systems (eg. FreeBSD 5), we would find a definition of the
9778# functions ctermid_r, setgroups in the library, but no prototype
9779# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9780# address to avoid compiler warnings and potential miscompilations
9781# because of the missing prototypes.
9782
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9784$as_echo_n "checking for ctermid_r... " >&6; }
9785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009786/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009787
Martin v. Löwisd5843682002-11-21 20:41:28 +00009788#include <stdio.h>
9789
Martin v. Löwisd5843682002-11-21 20:41:28 +00009790int
9791main ()
9792{
9793void* p = ctermid_r
9794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009799
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009801
Matthias Klosec511b472010-05-08 11:01:39 +00009802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009807
9808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9810
Antoine Pitroub170f172010-09-10 18:47:36 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9812$as_echo_n "checking for flock declaration... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009813if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009814 $as_echo_n "(cached) " >&6
9815else
9816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009817/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009818#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009819int
9820main ()
9821{
9822void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009823
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009824 ;
9825 return 0;
9826}
9827_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009828if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009829 ac_cv_flock_decl=yes
9830else
9831 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009832
9833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009835
Antoine Pitroub170f172010-09-10 18:47:36 +00009836fi
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9838$as_echo "$ac_cv_flock_decl" >&6; }
9839if test "x${ac_cv_flock_decl}" = xyes; then
9840 for ac_func in flock
9841do :
9842 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009843if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009844 cat >>confdefs.h <<_ACEOF
9845#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009846_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009847
Antoine Pitrou85729812010-09-07 14:55:24 +00009848else
Antoine Pitroub170f172010-09-10 18:47:36 +00009849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009850$as_echo_n "checking for flock in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009851if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009852 $as_echo_n "(cached) " >&6
9853else
9854 ac_check_lib_save_LIBS=$LIBS
9855LIBS="-lbsd $LIBS"
9856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857/* end confdefs.h. */
9858
9859/* Override any GCC internal prototype to avoid an error.
9860 Use char because int might match the return type of a GCC
9861 builtin and then its argument prototype would still apply. */
9862#ifdef __cplusplus
9863extern "C"
9864#endif
9865char flock ();
9866int
9867main ()
9868{
9869return flock ();
9870 ;
9871 return 0;
9872}
9873_ACEOF
9874if ac_fn_c_try_link "$LINENO"; then :
9875 ac_cv_lib_bsd_flock=yes
9876else
9877 ac_cv_lib_bsd_flock=no
9878fi
9879rm -f core conftest.err conftest.$ac_objext \
9880 conftest$ac_exeext conftest.$ac_ext
9881LIBS=$ac_check_lib_save_LIBS
9882fi
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9884$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009885if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009886 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009887
9888
9889$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9890
9891
9892fi
9893
9894
9895fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009896done
9897
Antoine Pitrou85729812010-09-07 14:55:24 +00009898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9901$as_echo_n "checking for getpagesize... " >&6; }
9902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009904
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009905#include <unistd.h>
9906
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009907int
9908main ()
9909{
9910void* p = getpagesize
9911 ;
9912 return 0;
9913}
9914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009918
Matthias Klosec511b472010-05-08 11:01:39 +00009919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009920$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009924
9925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009927
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009928for ac_prog in true
9929do
9930 # Extract the first word of "$ac_prog", so it can be a program name with args.
9931set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009934if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009936else
9937 if test -n "$TRUE"; then
9938 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9939else
9940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9941for as_dir in $PATH
9942do
9943 IFS=$as_save_IFS
9944 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009946 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 +00009947 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948 $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 +00009949 break 2
9950 fi
9951done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009952 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009954
9955fi
9956fi
9957TRUE=$ac_cv_prog_TRUE
9958if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9960$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009964fi
9965
Martin v. Löwiseba40652007-08-30 20:10:57 +00009966
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009967 test -n "$TRUE" && break
9968done
9969test -n "$TRUE" || TRUE="/bin/true"
9970
9971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9973$as_echo_n "checking for inet_aton in -lc... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009974if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009975 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009976else
9977 ac_check_lib_save_LIBS=$LIBS
9978LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009981
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982/* Override any GCC internal prototype to avoid an error.
9983 Use char because int might match the return type of a GCC
9984 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009985#ifdef __cplusplus
9986extern "C"
9987#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009988char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009989int
9990main ()
9991{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009992return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009993 ;
9994 return 0;
9995}
9996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009998 ac_cv_lib_c_inet_aton=yes
9999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010002rm -f core conftest.err conftest.$ac_objext \
10003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010004LIBS=$ac_check_lib_save_LIBS
10005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10007$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010008if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010009 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10012$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010013if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010014 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010015else
10016 ac_check_lib_save_LIBS=$LIBS
10017LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010019/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010020
Martin v. Löwiseba40652007-08-30 20:10:57 +000010021/* Override any GCC internal prototype to avoid an error.
10022 Use char because int might match the return type of a GCC
10023 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010024#ifdef __cplusplus
10025extern "C"
10026#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010027char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010028int
10029main ()
10030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010031return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010037 ac_cv_lib_resolv_inet_aton=yes
10038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010040fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041rm -f core conftest.err conftest.$ac_objext \
10042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010043LIBS=$ac_check_lib_save_LIBS
10044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10046$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010047if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010048 cat >>confdefs.h <<_ACEOF
10049#define HAVE_LIBRESOLV 1
10050_ACEOF
10051
10052 LIBS="-lresolv $LIBS"
10053
10054fi
10055
10056
10057fi
10058
10059
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010060# On Tru64, chflags seems to be present, but calling it will
10061# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10063$as_echo_n "checking for chflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010064if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010065 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010068 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010071/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010072
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010073#include <sys/stat.h>
10074#include <unistd.h>
10075int main(int argc, char*argv[])
10076{
10077 if(chflags(argv[0], 0) != 0)
10078 return 1;
10079 return 0;
10080}
Ned Deily43e10542011-06-27 23:41:53 -070010081
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010083if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010084 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010086 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010090fi
10091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010092
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10095$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010096if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010098if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010099 ac_cv_have_chflags="yes"
10100else
10101 ac_cv_have_chflags="no"
10102fi
10103
10104fi
10105if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010107$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010108
10109fi
10110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10112$as_echo_n "checking for lchflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010113if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010114 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010116 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010117 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010120/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010121
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010122#include <sys/stat.h>
10123#include <unistd.h>
10124int main(int argc, char*argv[])
10125{
10126 if(lchflags(argv[0], 0) != 0)
10127 return 1;
10128 return 0;
10129}
Ned Deily43e10542011-06-27 23:41:53 -070010130
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010132if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010133 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010139fi
10140
10141
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10144$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010145if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010147if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010148 ac_cv_have_lchflags="yes"
10149else
10150 ac_cv_have_lchflags="no"
10151fi
10152
10153fi
10154if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010156$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010157
10158fi
10159
Ronald Oussorenf8752642006-07-06 10:13:35 +000010160case $ac_sys_system/$ac_sys_release in
10161Darwin/*)
10162 _CUR_CFLAGS="${CFLAGS}"
10163 _CUR_LDFLAGS="${LDFLAGS}"
10164 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10165 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10166 ;;
10167esac
10168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10170$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010171if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010172 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010173else
10174 ac_check_lib_save_LIBS=$LIBS
10175LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010177/* end confdefs.h. */
10178
Martin v. Löwiseba40652007-08-30 20:10:57 +000010179/* Override any GCC internal prototype to avoid an error.
10180 Use char because int might match the return type of a GCC
10181 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010182#ifdef __cplusplus
10183extern "C"
10184#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010185char inflateCopy ();
10186int
10187main ()
10188{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010190 ;
10191 return 0;
10192}
10193_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010194if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010195 ac_cv_lib_z_inflateCopy=yes
10196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010197 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010199rm -f core conftest.err conftest.$ac_objext \
10200 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010201LIBS=$ac_check_lib_save_LIBS
10202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10204$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010205if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010208
10209fi
10210
10211
Ronald Oussorenf8752642006-07-06 10:13:35 +000010212case $ac_sys_system/$ac_sys_release in
10213Darwin/*)
10214 CFLAGS="${_CUR_CFLAGS}"
10215 LDFLAGS="${_CUR_LDFLAGS}"
10216 ;;
10217esac
10218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10220$as_echo_n "checking for hstrerror... " >&6; }
10221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010222/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010223
Martin v. Löwise9416172003-05-03 10:12:45 +000010224#include <netdb.h>
10225
Martin v. Löwise9416172003-05-03 10:12:45 +000010226int
10227main ()
10228{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010229void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010236$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010237
Matthias Klosec511b472010-05-08 11:01:39 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10242$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010243
10244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010245rm -f core conftest.err conftest.$ac_objext \
10246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10249$as_echo_n "checking for inet_aton... " >&6; }
10250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010252
Martin v. Löwis86d66262006-02-17 08:40:11 +000010253#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010254#include <sys/socket.h>
10255#include <netinet/in.h>
10256#include <arpa/inet.h>
10257
Martin v. Löwise9416172003-05-03 10:12:45 +000010258int
10259main ()
10260{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010261void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010262 ;
10263 return 0;
10264}
10265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010269
Matthias Klosec511b472010-05-08 11:01:39 +000010270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010271$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010275
10276fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277rm -f core conftest.err conftest.$ac_objext \
10278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10281$as_echo_n "checking for inet_pton... " >&6; }
10282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010283/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010284
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010285#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010286#include <sys/socket.h>
10287#include <netinet/in.h>
10288#include <arpa/inet.h>
10289
Martin v. Löwise9416172003-05-03 10:12:45 +000010290int
10291main ()
10292{
10293void* p = inet_pton
10294 ;
10295 return 0;
10296}
10297_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010300$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010301
Matthias Klosec511b472010-05-08 11:01:39 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010303$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010307
10308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010310
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010311# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10313$as_echo_n "checking for setgroups... " >&6; }
10314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010315/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010316
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010317#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010318#ifdef HAVE_GRP_H
10319#include <grp.h>
10320#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010321
Martin v. Löwisd5843682002-11-21 20:41:28 +000010322int
10323main ()
10324{
10325void* p = setgroups
10326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010333
Matthias Klosec511b472010-05-08 11:01:39 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010335$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10338$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010339
10340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010343# check for openpty and forkpty
10344
10345for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010346do :
10347 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010348if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010350#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010351_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10355$as_echo_n "checking for openpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010356if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010358else
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010360LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010363
Martin v. Löwiseba40652007-08-30 20:10:57 +000010364/* Override any GCC internal prototype to avoid an error.
10365 Use char because int might match the return type of a GCC
10366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010367#ifdef __cplusplus
10368extern "C"
10369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010370char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010371int
10372main ()
10373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010374return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ;
10376 return 0;
10377}
10378_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010379if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010383fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384rm -f core conftest.err conftest.$ac_objext \
10385 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010386LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10389$as_echo "$ac_cv_lib_util_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010390if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010392 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10395$as_echo_n "checking for openpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010396if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010398else
10399 ac_check_lib_save_LIBS=$LIBS
10400LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010402/* end confdefs.h. */
10403
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404/* Override any GCC internal prototype to avoid an error.
10405 Use char because int might match the return type of a GCC
10406 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010407#ifdef __cplusplus
10408extern "C"
10409#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010410char openpty ();
10411int
10412main ()
10413{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010414return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010420 ac_cv_lib_bsd_openpty=yes
10421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424rm -f core conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010426LIBS=$ac_check_lib_save_LIBS
10427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10429$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010430if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010431 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010432 LIBS="$LIBS -lbsd"
10433fi
10434
10435
10436fi
10437
Fred Drake8cef4cf2000-06-28 16:40:38 +000010438
10439fi
10440done
10441
10442for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443do :
10444 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010445if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010449
Fred Drake8cef4cf2000-06-28 16:40:38 +000010450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10452$as_echo_n "checking for forkpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010453if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010454 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010455else
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010457LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010460
Martin v. Löwiseba40652007-08-30 20:10:57 +000010461/* Override any GCC internal prototype to avoid an error.
10462 Use char because int might match the return type of a GCC
10463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010464#ifdef __cplusplus
10465extern "C"
10466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010467char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010468int
10469main ()
10470{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010471return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010483LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10486$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010487if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010488 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010489 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10492$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010493if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010495else
10496 ac_check_lib_save_LIBS=$LIBS
10497LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010499/* end confdefs.h. */
10500
Martin v. Löwiseba40652007-08-30 20:10:57 +000010501/* Override any GCC internal prototype to avoid an error.
10502 Use char because int might match the return type of a GCC
10503 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010504#ifdef __cplusplus
10505extern "C"
10506#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010507char forkpty ();
10508int
10509main ()
10510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010512 ;
10513 return 0;
10514}
10515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010517 ac_cv_lib_bsd_forkpty=yes
10518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521rm -f core conftest.err conftest.$ac_objext \
10522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010523LIBS=$ac_check_lib_save_LIBS
10524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10526$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010527if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010528 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010529 LIBS="$LIBS -lbsd"
10530fi
10531
10532
10533fi
10534
Fred Drake8cef4cf2000-06-28 16:40:38 +000010535
10536fi
10537done
10538
Jack Jansendd19cf82001-12-06 22:36:17 +000010539
Brett Cannonaa5778d2008-03-18 04:09:00 +000010540# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010541for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010542do :
10543 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010544if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010545 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010547_ACEOF
10548
10549fi
10550done
10551
10552
Michael W. Hudson54241132001-12-07 15:38:26 +000010553# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010554for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555do :
10556 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10557ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010558if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010560#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010562
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010563fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010564done
10565
Michael W. Hudson54241132001-12-07 15:38:26 +000010566
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010567ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10568if test "x$ac_cv_func_dup2" = xyes; then :
10569 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010570
Martin v. Löwis1142de32002-03-29 16:28:31 +000010571else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010573 *" dup2.$ac_objext "* ) ;;
10574 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010576esac
10577
Martin v. Löwis1142de32002-03-29 16:28:31 +000010578fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010579
10580ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10581if test "x$ac_cv_func_getcwd" = xyes; then :
10582 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10583
10584else
10585 case " $LIBOBJS " in
10586 *" getcwd.$ac_objext "* ) ;;
10587 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10588 ;;
10589esac
10590
10591fi
10592
10593ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10594if test "x$ac_cv_func_strdup" = xyes; then :
10595 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10596
10597else
10598 case " $LIBOBJS " in
10599 *" strdup.$ac_objext "* ) ;;
10600 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10601 ;;
10602esac
10603
10604fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010605
10606
10607for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010608do :
10609 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010610if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010616#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010617int
10618main ()
10619{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010620getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010621 ;
10622 return 0;
10623}
10624_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010627$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010628
Guido van Rossum627b2d71993-12-24 10:39:16 +000010629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010631
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010633done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634
Jack Jansen150753c2003-03-29 22:07:47 +000010635for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636do :
10637 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010638if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010639 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010644#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010645int
10646main ()
10647{
10648setpgrp(0,0);
10649 ;
10650 return 0;
10651}
10652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010656
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010659
10660fi
10661done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010662
Thomas Wouters3a584202000-08-05 23:28:51 +000010663for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664do :
10665 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010666if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010668#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010672#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010673int
10674main ()
10675{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010676gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681if ac_fn_c_try_compile "$LINENO"; then :
10682
Guido van Rossum627b2d71993-12-24 10:39:16 +000010683else
Skip Montanaro6dead952003-09-25 14:50:04 +000010684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010686
Martin v. Löwis11437992002-04-12 09:54:03 +000010687
Guido van Rossum627b2d71993-12-24 10:39:16 +000010688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010690
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010691fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010692done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010693
Michael W. Hudson54241132001-12-07 15:38:26 +000010694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10696$as_echo_n "checking for major... " >&6; }
10697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010698/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010699
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010700#if defined(MAJOR_IN_MKDEV)
10701#include <sys/mkdev.h>
10702#elif defined(MAJOR_IN_SYSMACROS)
10703#include <sys/sysmacros.h>
10704#else
10705#include <sys/types.h>
10706#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010707
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010708int
10709main ()
10710{
10711
10712 makedev(major(0),minor(0));
10713
10714 ;
10715 return 0;
10716}
10717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010719
10720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10724$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010725
10726else
Skip Montanaro6dead952003-09-25 14:50:04 +000010727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010730
10731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732rm -f core conftest.err conftest.$ac_objext \
10733 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010734
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010735# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010736# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10738$as_echo_n "checking for getaddrinfo... " >&6; }
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010741
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010742#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010743#include <sys/socket.h>
10744#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010745#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010746
Martin v. Löwis11437992002-04-12 09:54:03 +000010747int
10748main ()
10749{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010750getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ;
10752 return 0;
10753}
10754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010756 have_getaddrinfo=yes
10757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010758 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010760rm -f core conftest.err conftest.$ac_objext \
10761 conftest$ac_exeext conftest.$ac_ext
10762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10763$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010764if test $have_getaddrinfo = yes
10765then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10767$as_echo_n "checking getaddrinfo bug... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010768 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010769 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010771 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010772 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010776
10777#include <sys/types.h>
10778#include <netdb.h>
10779#include <string.h>
10780#include <sys/socket.h>
10781#include <netinet/in.h>
10782
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010783int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010784{
10785 int passive, gaierr, inet4 = 0, inet6 = 0;
10786 struct addrinfo hints, *ai, *aitop;
10787 char straddr[INET6_ADDRSTRLEN], strport[16];
10788
10789 for (passive = 0; passive <= 1; passive++) {
10790 memset(&hints, 0, sizeof(hints));
10791 hints.ai_family = AF_UNSPEC;
10792 hints.ai_flags = passive ? AI_PASSIVE : 0;
10793 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010794 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010795 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10796 (void)gai_strerror(gaierr);
10797 goto bad;
10798 }
10799 for (ai = aitop; ai; ai = ai->ai_next) {
10800 if (ai->ai_addr == NULL ||
10801 ai->ai_addrlen == 0 ||
10802 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10803 straddr, sizeof(straddr), strport, sizeof(strport),
10804 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10805 goto bad;
10806 }
10807 switch (ai->ai_family) {
10808 case AF_INET:
10809 if (strcmp(strport, "54321") != 0) {
10810 goto bad;
10811 }
10812 if (passive) {
10813 if (strcmp(straddr, "0.0.0.0") != 0) {
10814 goto bad;
10815 }
10816 } else {
10817 if (strcmp(straddr, "127.0.0.1") != 0) {
10818 goto bad;
10819 }
10820 }
10821 inet4++;
10822 break;
10823 case AF_INET6:
10824 if (strcmp(strport, "54321") != 0) {
10825 goto bad;
10826 }
10827 if (passive) {
10828 if (strcmp(straddr, "::") != 0) {
10829 goto bad;
10830 }
10831 } else {
10832 if (strcmp(straddr, "::1") != 0) {
10833 goto bad;
10834 }
10835 }
10836 inet6++;
10837 break;
10838 case AF_UNSPEC:
10839 goto bad;
10840 break;
10841 default:
10842 /* another family support? */
10843 break;
10844 }
10845 }
10846 }
10847
10848 if (!(inet4 == 0 || inet4 == 2))
10849 goto bad;
10850 if (!(inet6 == 0 || inet6 == 2))
10851 goto bad;
10852
10853 if (aitop)
10854 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010855 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010856
10857 bad:
10858 if (aitop)
10859 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010860 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010861}
10862
Martin v. Löwis11437992002-04-12 09:54:03 +000010863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010865 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010867 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010872
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010873fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010874
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010876
Benjamin Peterson75fed812010-11-01 01:47:19 +000010877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10878$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10879
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010880if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010881then
10882 if test $ipv6 = yes
10883 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010884 echo 'Fatal: You must get working getaddrinfo() function.'
10885 echo ' or you can specify "--disable-ipv6"'.
10886 exit 1
10887 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010888else
Martin v. Löwis11437992002-04-12 09:54:03 +000010889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010890$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010891
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010893
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010894for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010895do :
10896 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010897if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010900_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010902fi
10903done
10904
Michael W. Hudson54241132001-12-07 15:38:26 +000010905
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010906# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10908$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010909if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010910 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010913/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010914#include <sys/types.h>
10915#include <sys/time.h>
10916#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010917
Martin v. Löwis11437992002-04-12 09:54:03 +000010918int
10919main ()
10920{
10921if ((struct tm *) 0)
10922return 0;
10923 ;
10924 return 0;
10925}
10926_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010928 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10935$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010936if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010939
10940fi
10941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10943$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010944if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010948/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010949#include <sys/types.h>
10950#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Martin v. Löwis11437992002-04-12 09:54:03 +000010952int
10953main ()
10954{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010955struct tm tm;
10956 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010957 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 ;
10959 return 0;
10960}
10961_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010963 ac_cv_struct_tm=time.h
10964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10970$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010971if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010974
10975fi
10976
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010977ac_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 +000010978#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010980"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010981if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
10983cat >>confdefs.h <<_ACEOF
10984#define HAVE_STRUCT_TM_TM_ZONE 1
10985_ACEOF
10986
10987
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010988fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010989
Martin v. Löwis11437992002-04-12 09:54:03 +000010990if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993
10994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10996"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010997if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010998 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011001fi
11002
Martin v. Löwiseba40652007-08-30 20:10:57 +000011003cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011005_ACEOF
11006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11008$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011009if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011010 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011013/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011014#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011015#if !HAVE_DECL_TZNAME
11016extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011018
Martin v. Löwis11437992002-04-12 09:54:03 +000011019int
11020main ()
11021{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 ;
11024 return 0;
11025}
11026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011028 ac_cv_var_tzname=yes
11029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032rm -f core conftest.err conftest.$ac_objext \
11033 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011034fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11036$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011037 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011040
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011041 fi
11042fi
11043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011044ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011045if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011046
11047cat >>confdefs.h <<_ACEOF
11048#define HAVE_STRUCT_STAT_ST_RDEV 1
11049_ACEOF
11050
11051
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011052fi
11053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011055if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011056
Martin v. Löwis11437992002-04-12 09:54:03 +000011057cat >>confdefs.h <<_ACEOF
11058#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11059_ACEOF
11060
11061
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011062fi
11063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011064ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011065if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011066
11067cat >>confdefs.h <<_ACEOF
11068#define HAVE_STRUCT_STAT_ST_FLAGS 1
11069_ACEOF
11070
11071
11072fi
11073
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011075if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011076
11077cat >>confdefs.h <<_ACEOF
11078#define HAVE_STRUCT_STAT_ST_GEN 1
11079_ACEOF
11080
11081
11082fi
11083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011084ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011085if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011086
11087cat >>confdefs.h <<_ACEOF
11088#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11089_ACEOF
11090
11091
11092fi
11093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011095if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097cat >>confdefs.h <<_ACEOF
11098#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11099_ACEOF
11100
11101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011103
11104else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011105 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011106 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011107 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11108 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011109esac
11110
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011111fi
11112
Michael W. Hudson54241132001-12-07 15:38:26 +000011113
Martin v. Löwis11437992002-04-12 09:54:03 +000011114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11116$as_echo_n "checking for time.h that defines altzone... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011117if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119else
Matthias Klosec511b472010-05-08 11:01:39 +000011120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011123#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011124int
11125main ()
11126{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011127return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 ;
11129 return 0;
11130}
11131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011133 ac_cv_header_time_altzone=yes
11134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011138
Martin v. Löwiseba40652007-08-30 20:10:57 +000011139fi
11140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11142$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011143if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011145$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146
11147fi
11148
Guido van Rossumda88dad1995-01-26 00:46:29 +000011149was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11151$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011154
11155#include <sys/types.h>
11156#include <sys/select.h>
11157#include <sys/time.h>
11158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159int
11160main ()
11161{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011162;
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 ;
11164 return 0;
11165}
11166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011168
11169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011172 was_it_defined=yes
11173
Martin v. Löwiseba40652007-08-30 20:10:57 +000011174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11177$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11180$as_echo_n "checking for addrinfo... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011181if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011185/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011186#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011187int
11188main ()
11189{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011190struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 ;
11192 return 0;
11193}
11194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011196 ac_cv_struct_addrinfo=yes
11197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011198 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11201fi
11202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11204$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011205if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011208
11209fi
11210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11212$as_echo_n "checking for sockaddr_storage... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011213if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011218
11219# include <sys/types.h>
11220# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011224struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ;
11226 return 0;
11227}
11228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011230 ac_cv_struct_sockaddr_storage=yes
11231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011232 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11235fi
11236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11238$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011239if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011242
11243fi
11244
Guido van Rossum627b2d71993-12-24 10:39:16 +000011245# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11248$as_echo_n "checking whether char is unsigned... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011249if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011250 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011254$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011255int
11256main ()
11257{
11258static int test_array [1 - 2 * !(((char) -1) < 0)];
11259test_array [0] = 0
11260
11261 ;
11262 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011263}
Martin v. Löwis11437992002-04-12 09:54:03 +000011264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011266 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11273$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011276
11277fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11280$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011281if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287int
11288main ()
11289{
11290/* FIXME: Include the comments suggested by Paul. */
11291#ifndef __cplusplus
11292 /* Ultrix mips cc rejects this. */
11293 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011294 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011296 char const *const *pcpcc;
11297 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 /* NEC SVR4.0.2 mips cc rejects this. */
11299 struct point {int x, y;};
11300 static struct point const zero = {0,0};
11301 /* AIX XL C 1.02.0.0 rejects this.
11302 It does not let you subtract one const X* pointer from another in
11303 an arm of an if-expression whose if-part is not a constant
11304 expression */
11305 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011306 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011308 ++pcpcc;
11309 ppc = (char**) pcpcc;
11310 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 { /* SCO 3.2v4 cc rejects this. */
11312 char *t;
11313 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 }
11318 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11319 int x[] = {25, 17};
11320 const int *foo = &x[0];
11321 ++foo;
11322 }
11323 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11324 typedef const int *iptr;
11325 iptr p = 0;
11326 ++p;
11327 }
11328 { /* AIX XL C 1.02.0.0 rejects this saying
11329 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11330 struct s { int j; const int *ap[3]; };
11331 struct s *b; b->j = 5;
11332 }
11333 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11334 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011335 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011339
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 ;
11341 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011342}
Martin v. Löwis11437992002-04-12 09:54:03 +000011343_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011345 ac_cv_c_const=yes
11346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11352$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011353if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356
11357fi
11358
Michael W. Hudson54241132001-12-07 15:38:26 +000011359
Guido van Rossumda88dad1995-01-26 00:46:29 +000011360works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11362$as_echo_n "checking for working volatile... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011365
Martin v. Löwis11437992002-04-12 09:54:03 +000011366int
11367main ()
11368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011369volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011375 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011376else
Skip Montanaro6dead952003-09-25 14:50:04 +000011377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011379
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011380
Guido van Rossum627b2d71993-12-24 10:39:16 +000011381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11384$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011385
Guido van Rossumda88dad1995-01-26 00:46:29 +000011386works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11388$as_echo_n "checking for working signed char... " >&6; }
11389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011391
Martin v. Löwis11437992002-04-12 09:54:03 +000011392int
11393main ()
11394{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011395signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 ;
11397 return 0;
11398}
11399_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011400if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011401 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011402else
Skip Montanaro6dead952003-09-25 14:50:04 +000011403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011405
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011406
Guido van Rossum7f43da71994-08-01 12:15:30 +000011407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11410$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011411
Guido van Rossumda88dad1995-01-26 00:46:29 +000011412have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11414$as_echo_n "checking for prototypes... " >&6; }
11415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011417int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011418int
11419main ()
11420{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011421return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 ;
11423 return 0;
11424}
11425_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011428$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011429
Matthias Klosec511b472010-05-08 11:01:39 +000011430 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11434$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435
Guido van Rossumda88dad1995-01-26 00:46:29 +000011436works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11438$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011441
11442#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011443int foo(int x, ...) {
11444 va_list va;
11445 va_start(va, x);
11446 va_arg(va, int);
11447 va_arg(va, char *);
11448 va_arg(va, double);
11449 return 0;
11450}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011451
Martin v. Löwis11437992002-04-12 09:54:03 +000011452int
11453main ()
11454{
Guido van Rossum90eea071996-08-30 20:58:57 +000011455return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
11462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011463$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011465 works=yes
11466
Guido van Rossum627b2d71993-12-24 10:39:16 +000011467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11470$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471
Martin v. Löwisd6320502004-08-12 13:45:08 +000011472# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11474$as_echo_n "checking for socketpair... " >&6; }
11475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011476/* end confdefs.h. */
11477
11478#include <sys/types.h>
11479#include <sys/socket.h>
11480
11481int
11482main ()
11483{
11484void *x=socketpair
11485 ;
11486 return 0;
11487}
11488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011492
Matthias Klosec511b472010-05-08 11:01:39 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011498
11499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011501
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011502# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11504$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011507#include <sys/types.h>
11508#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011509int
11510main ()
11511{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011512struct sockaddr x;
11513x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518if ac_fn_c_try_compile "$LINENO"; then :
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11520$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011523
11524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011527
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011530
Guido van Rossumda88dad1995-01-26 00:46:29 +000011531va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11533$as_echo_n "checking whether va_list is an array... " >&6; }
11534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011536
11537#ifdef HAVE_STDARG_PROTOTYPES
11538#include <stdarg.h>
11539#else
11540#include <varargs.h>
11541#endif
11542
Martin v. Löwis11437992002-04-12 09:54:03 +000011543int
11544main ()
11545{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011546va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 ;
11548 return 0;
11549}
11550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551if ac_fn_c_try_compile "$LINENO"; then :
11552
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011553else
Skip Montanaro6dead952003-09-25 14:50:04 +000011554
Martin v. Löwis11437992002-04-12 09:54:03 +000011555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Guido van Rossumda88dad1995-01-26 00:46:29 +000011558 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011559
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11563$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011565# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
11567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011568ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011569if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011571 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11574$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011575 OLD_CFLAGS=$CFLAGS
11576 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011578/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011579
11580# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011581
Martin v. Löwis11437992002-04-12 09:54:03 +000011582int
11583main ()
11584{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011585
11586 char *name;
11587 struct hostent *he, *res;
11588 char buffer[2048];
11589 int buflen = 2048;
11590 int h_errnop;
11591
11592 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
11594 ;
11595 return 0;
11596}
11597_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011601
Martin v. Löwis11437992002-04-12 09:54:03 +000011602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011603$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11606$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011608else
Skip Montanaro6dead952003-09-25 14:50:04 +000011609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11613$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011615/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011616
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011617# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
Martin v. Löwis11437992002-04-12 09:54:03 +000011619int
11620main ()
11621{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011622
11623 char *name;
11624 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011625 char buffer[2048];
11626 int buflen = 2048;
11627 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011628
Matthias Klosec511b472010-05-08 11:01:39 +000011629 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011630
11631 ;
11632 return 0;
11633}
11634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011638
Martin v. Löwis11437992002-04-12 09:54:03 +000011639
Matthias Klosec511b472010-05-08 11:01:39 +000011640$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11643$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011645else
Skip Montanaro6dead952003-09-25 14:50:04 +000011646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11650$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11652/* end confdefs.h. */
11653
11654# include <netdb.h>
11655
11656int
11657main ()
11658{
11659
11660 char *name;
11661 struct hostent *he;
11662 struct hostent_data data;
11663
11664 (void) gethostbyname_r(name, he, &data);
11665
11666 ;
11667 return 0;
11668}
11669_ACEOF
11670if ac_fn_c_try_compile "$LINENO"; then :
11671
11672 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11673
11674
11675$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11676
11677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11678$as_echo "yes" >&6; }
11679
11680else
11681
11682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11683$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011693 CFLAGS=$OLD_CFLAGS
11694
11695else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011696
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011697 for ac_func in gethostbyname
11698do :
11699 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011700if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011701 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011703_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011704
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011705fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011706done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011707
Michael W. Hudson54241132001-12-07 15:38:26 +000011708
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011709fi
11710
Michael W. Hudson54241132001-12-07 15:38:26 +000011711
11712
11713
11714
11715
11716
Guido van Rossum627b2d71993-12-24 10:39:16 +000011717# checks for system services
11718# (none yet)
11719
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011720# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011722if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11726$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011727if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729else
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011731LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011734
Martin v. Löwiseba40652007-08-30 20:10:57 +000011735/* Override any GCC internal prototype to avoid an error.
11736 Use char because int might match the return type of a GCC
11737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011738#ifdef __cplusplus
11739extern "C"
11740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011741char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011742int
11743main ()
11744{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011745return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 ;
11747 return 0;
11748}
11749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011751 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011755rm -f core conftest.err conftest.$ac_objext \
11756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011757LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11760$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011761if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011762 cat >>confdefs.h <<_ACEOF
11763#define HAVE_LIBIEEE 1
11764_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011766 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011767
Guido van Rossum627b2d71993-12-24 10:39:16 +000011768fi
11769
Michael W. Hudson54241132001-12-07 15:38:26 +000011770
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011771fi
11772
Michael W. Hudson54241132001-12-07 15:38:26 +000011773
Guido van Rossum7f253911997-05-09 02:42:48 +000011774# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11776$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011777
Martin v. Löwiseba40652007-08-30 20:10:57 +000011778# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011779if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011780 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011781if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011782then
11783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011784$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11787$as_echo "yes" >&6; }
11788else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11789$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011790fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11793$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011794fi
11795
Guido van Rossum7f253911997-05-09 02:42:48 +000011796
Guido van Rossum7f43da71994-08-01 12:15:30 +000011797# check for --with-libm=...
11798
Guido van Rossum563e7081996-09-10 18:20:48 +000011799case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011800Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011801BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011802*) LIBM=-lm
11803esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11805$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Martin v. Löwiseba40652007-08-30 20:10:57 +000011807# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011809 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011810if test "$withval" = no
11811then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11813$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011814elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011815then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11817$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011818else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011819fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11822$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011823fi
11824
Guido van Rossum7f43da71994-08-01 12:15:30 +000011825
11826# check for --with-libc=...
11827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11829$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011830
Martin v. Löwiseba40652007-08-30 20:10:57 +000011831# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011833 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011834if test "$withval" = no
11835then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11837$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011838elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011839then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11841$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011842else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011843fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11846$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011847fi
11848
Guido van Rossum7f43da71994-08-01 12:15:30 +000011849
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011850# **************************************************
11851# * Check for various properties of floating point *
11852# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11855$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011856if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011857 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011858else
11859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011860if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011861 ac_cv_little_endian_double=no
11862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011864/* end confdefs.h. */
11865
11866#include <string.h>
11867int main() {
11868 double x = 9006104071832581.0;
11869 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11870 return 0;
11871 else
11872 return 1;
11873}
11874
11875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011876if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011877 ac_cv_little_endian_double=yes
11878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011879 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011883fi
11884
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011885fi
11886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11888$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011889if test "$ac_cv_little_endian_double" = yes
11890then
11891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011892$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011893
11894fi
11895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11897$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011898if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011900else
11901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011902if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011903 ac_cv_big_endian_double=no
11904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011906/* end confdefs.h. */
11907
11908#include <string.h>
11909int main() {
11910 double x = 9006104071832581.0;
11911 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11912 return 0;
11913 else
11914 return 1;
11915}
11916
11917_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011919 ac_cv_big_endian_double=yes
11920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011925fi
11926
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011927fi
11928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11930$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011931if test "$ac_cv_big_endian_double" = yes
11932then
11933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011934$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011935
11936fi
11937
11938# Some ARM platforms use a mixed-endian representation for doubles.
11939# While Python doesn't currently have full support for these platforms
11940# (see e.g., issue 1762561), we can at least make sure that float <-> string
11941# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11943$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011944if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011945 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011946else
11947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011948if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011949 ac_cv_mixed_endian_double=no
11950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011952/* end confdefs.h. */
11953
11954#include <string.h>
11955int main() {
11956 double x = 9006104071832581.0;
11957 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11958 return 0;
11959 else
11960 return 1;
11961}
11962
11963_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011964if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011965 ac_cv_mixed_endian_double=yes
11966else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011967 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11970 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011971fi
11972
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011973fi
11974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11976$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011977if test "$ac_cv_mixed_endian_double" = yes
11978then
11979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011980$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011981
11982fi
11983
11984# The short float repr introduced in Python 3.1 requires the
11985# correctly-rounded string <-> double conversion functions from
11986# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11987# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011988# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011989# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011990
11991# This inline assembler syntax may also work for suncc and icc,
11992# so we try it on all platforms.
11993
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11995$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011997/* end confdefs.h. */
11998
11999int
12000main ()
12001{
12002
Mark Dickinsona548dee2009-11-15 13:12:43 +000012003 unsigned short cw;
12004 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12005 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012006
12007 ;
12008 return 0;
12009}
12010_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012012 have_gcc_asm_for_x87=yes
12013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012014 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012015fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12018$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012019if test "$have_gcc_asm_for_x87" = yes
12020then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012023
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012024fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012025
Mark Dickinson04b27232009-01-04 12:29:36 +000012026# Detect whether system arithmetic is subject to x87-style double
12027# rounding issues. The result of this test has little meaning on non
12028# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12029# mode is round-to-nearest and double rounding issues are present, and
12030# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12032$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012033# $BASECFLAGS may affect the result
12034ac_save_cc="$CC"
12035CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012037 ac_cv_x87_double_rounding=no
12038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012040/* end confdefs.h. */
12041
12042#include <stdlib.h>
12043#include <math.h>
12044int main() {
12045 volatile double x, y, z;
12046 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12047 x = 0.99999999999999989; /* 1-2**-53 */
12048 y = 1./x;
12049 if (y != 1.)
12050 exit(0);
12051 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12052 x = 1e16;
12053 y = 2.99999;
12054 z = x + y;
12055 if (z != 1e16+4.)
12056 exit(0);
12057 /* both tests show evidence of double rounding */
12058 exit(1);
12059}
12060
12061_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012062if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012063 ac_cv_x87_double_rounding=no
12064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012066fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012069fi
12070
Mark Dickinson99abd142009-10-24 13:44:16 +000012071CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12073$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012074if test "$ac_cv_x87_double_rounding" = yes
12075then
12076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012077$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012078
12079fi
12080
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012081# ************************************
12082# * Check for mathematical functions *
12083# ************************************
12084
12085LIBS_SAVE=$LIBS
12086LIBS="$LIBS $LIBM"
12087
Mark Dickinson265d7382008-04-21 22:32:24 +000012088# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12089# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12091$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012092if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012094else
12095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012096if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012097 ac_cv_tanh_preserves_zero_sign=no
12098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012100/* end confdefs.h. */
12101
12102#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012103#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012104int main() {
12105 /* return 0 if either negative zeros don't exist
12106 on this platform or if negative zeros exist
12107 and tanh(-0.) == -0. */
12108 if (atan2(0., -1.) == atan2(-0., -1.) ||
12109 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12110 else exit(1);
12111}
12112
12113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012115 ac_cv_tanh_preserves_zero_sign=yes
12116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012121fi
12122
Mark Dickinson265d7382008-04-21 22:32:24 +000012123fi
12124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12126$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012127if test "$ac_cv_tanh_preserves_zero_sign" = yes
12128then
12129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012131
12132fi
12133
Mark Dickinson65898e02009-09-05 10:27:00 +000012134for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012135do :
12136 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12137ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012138if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012139 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012140#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012141_ACEOF
12142
12143fi
12144done
12145
Mark Dickinson65898e02009-09-05 10:27:00 +000012146for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012147do :
12148 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12149ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012150if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012151 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012153_ACEOF
12154
12155fi
12156done
12157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012158ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12159"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012160if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012161 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012163 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012164fi
12165
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012166cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012169ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12170"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012171if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012175fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012176
12177cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012178#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12181"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012182if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012185 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012186fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012187
12188cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012189#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012190_ACEOF
12191
12192
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012193LIBS=$LIBS_SAVE
12194
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012195# For multiprocessing module, check that sem_open
12196# actually works. For FreeBSD versions <= 7.2,
12197# the kernel module that provides POSIX semaphores
12198# isn't loaded by default, so an attempt to call
12199# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12201$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012202if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012203 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012206 ac_cv_posix_semaphores_enabled=yes
12207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012209/* end confdefs.h. */
12210
12211#include <unistd.h>
12212#include <fcntl.h>
12213#include <stdio.h>
12214#include <semaphore.h>
12215#include <sys/stat.h>
12216
12217int main(void) {
12218 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12219 if (a == SEM_FAILED) {
12220 perror("sem_open");
12221 return 1;
12222 }
12223 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012224 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012225 return 0;
12226}
12227
12228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012229if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012230 ac_cv_posix_semaphores_enabled=yes
12231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012232 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012236fi
12237
12238
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012239fi
12240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12242$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012243if test $ac_cv_posix_semaphores_enabled = no
12244then
12245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012247
12248fi
12249
12250# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12252$as_echo_n "checking for broken sem_getvalue... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012253if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012257 ac_cv_broken_sem_getvalue=yes
12258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012260/* end confdefs.h. */
12261
12262#include <unistd.h>
12263#include <fcntl.h>
12264#include <stdio.h>
12265#include <semaphore.h>
12266#include <sys/stat.h>
12267
12268int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012269 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012270 int count;
12271 int res;
12272 if(a==SEM_FAILED){
12273 perror("sem_open");
12274 return 1;
12275
12276 }
12277 res = sem_getvalue(a, &count);
12278 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012279 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012280 return res==-1 ? 1 : 0;
12281}
12282
12283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012284if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012285 ac_cv_broken_sem_getvalue=no
12286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012291fi
12292
12293
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012294fi
12295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12297$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012298if test $ac_cv_broken_sem_getvalue = yes
12299then
12300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012302
12303fi
12304
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012305# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12307$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012308# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012309if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012310 enableval=$enable_big_digits; case $enable_big_digits in
12311yes)
12312 enable_big_digits=30 ;;
12313no)
12314 enable_big_digits=15 ;;
1231515|30)
12316 ;;
12317*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012318 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012319esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12321$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012322
12323cat >>confdefs.h <<_ACEOF
12324#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12325_ACEOF
12326
12327
12328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12330$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012331fi
12332
12333
Guido van Rossumef2255b2000-03-10 22:30:29 +000012334# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012336if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012337
12338
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012341 wchar_h="yes"
12342
Guido van Rossumef2255b2000-03-10 22:30:29 +000012343else
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012345
12346fi
12347
Michael W. Hudson54241132001-12-07 15:38:26 +000012348
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012350# determine wchar_t size
12351if test "$wchar_h" = yes
12352then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12356# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12358$as_echo_n "checking size of wchar_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012359if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012360 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012362 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12363"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012366 if test "$ac_cv_type_wchar_t" = yes; then
12367 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012369as_fn_error 77 "cannot compute sizeof (wchar_t)
12370See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012371 else
12372 ac_cv_sizeof_wchar_t=0
12373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012375
Martin v. Löwis11437992002-04-12 09:54:03 +000012376fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12378$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012379
12380
12381
Martin v. Löwis11437992002-04-12 09:54:03 +000012382cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012383#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012385
Michael W. Hudson54241132001-12-07 15:38:26 +000012386
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012387fi
12388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12390$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012391have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012393/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012394
12395#include <tcl.h>
12396#if TCL_UTF_MAX != 6
12397# error "NOT UCS4_TCL"
12398#endif
12399int
12400main ()
12401{
12402
12403 ;
12404 return 0;
12405}
12406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012408
12409
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012410$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012411
12412 have_ucs4_tcl=yes
12413
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12417$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012418
Skip Montanaro6dead952003-09-25 14:50:04 +000012419# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012420if test "$wchar_h" = yes
12421then
12422 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12424$as_echo_n "checking whether wchar_t is signed... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012425 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012427else
12428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012429 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012430 ac_cv_wchar_t_signed=yes
12431else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012434
12435 #include <wchar.h>
12436 int main()
12437 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012438 /* Success: exit code 0 */
12439 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012440 }
12441
12442_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012444 ac_cv_wchar_t_signed=yes
12445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012447fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012450fi
12451
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012452fi
12453
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12455$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456fi
12457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12459$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012461if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012462 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012463else
12464 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012465fi
12466
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012467
12468if test $enable_unicode = yes
12469then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012470 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012471 case "$have_ucs4_tcl" in
12472 yes) enable_unicode="ucs4"
12473 ;;
12474 *) enable_unicode="ucs2"
12475 ;;
12476 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012477fi
12478
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012479
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012480case "$enable_unicode" in
12481ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012483
12484 ;;
12485ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012487
12488 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012489*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012490esac
12491
Michael W. Hudson54241132001-12-07 15:38:26 +000012492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
12494
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012495if test "$enable_unicode" = "no"
12496then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012497 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12499$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012500else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012501 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012503$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012504
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012505
12506 # wchar_t is only usable if it maps to an unsigned type
12507 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012508 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012509 then
12510 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012512$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012515
12516 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12517 then
12518 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012519 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012520
12521 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12522 then
12523 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012524 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012525
12526 else
12527 PY_UNICODE_TYPE="no type found"
12528 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12530$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012531fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012532
12533# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12535$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012536if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012539 ac_cv_c_bigendian=unknown
12540 # See if we're dealing with a universal compiler.
12541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12542/* end confdefs.h. */
12543#ifndef __APPLE_CC__
12544 not a universal capable compiler
12545 #endif
12546 typedef int dummy;
12547
Skip Montanaro6dead952003-09-25 14:50:04 +000012548_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012549if ac_fn_c_try_compile "$LINENO"; then :
12550
12551 # Check for potential -arch flags. It is not universal unless
12552 # there are at least two -arch flags with different values.
12553 ac_arch=
12554 ac_prev=
12555 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12556 if test -n "$ac_prev"; then
12557 case $ac_word in
12558 i?86 | x86_64 | ppc | ppc64)
12559 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12560 ac_arch=$ac_word
12561 else
12562 ac_cv_c_bigendian=universal
12563 break
12564 fi
12565 ;;
12566 esac
12567 ac_prev=
12568 elif test "x$ac_word" = "x-arch"; then
12569 ac_prev=arch
12570 fi
12571 done
12572fi
12573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12574 if test $ac_cv_c_bigendian = unknown; then
12575 # See if sys/param.h defines the BYTE_ORDER macro.
12576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012578#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012580
Martin v. Löwis11437992002-04-12 09:54:03 +000012581int
12582main ()
12583{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012584#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12585 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12586 && LITTLE_ENDIAN)
12587 bogus endian macros
12588 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
12590 ;
12591 return 0;
12592}
12593_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012594if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012595 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012597/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012598#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601int
12602main ()
12603{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012604#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012605 not big endian
12606 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
12608 ;
12609 return 0;
12610}
12611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012613 ac_cv_c_bigendian=yes
12614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618fi
12619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12620 fi
12621 if test $ac_cv_c_bigendian = unknown; then
12622 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012625#include <limits.h>
12626
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12631 bogus endian macros
12632 #endif
12633
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ;
12635 return 0;
12636}
12637_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012638if ac_fn_c_try_compile "$LINENO"; then :
12639 # It does; now see whether it defined to _BIG_ENDIAN or not.
12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641/* end confdefs.h. */
12642#include <limits.h>
12643
12644int
12645main ()
12646{
12647#ifndef _BIG_ENDIAN
12648 not big endian
12649 #endif
12650
12651 ;
12652 return 0;
12653}
12654_ACEOF
12655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012659fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12661fi
12662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663 fi
12664 if test $ac_cv_c_bigendian = unknown; then
12665 # Compile a test program.
12666 if test "$cross_compiling" = yes; then :
12667 # Try to guess by grepping values from an object file.
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669/* end confdefs.h. */
12670short int ascii_mm[] =
12671 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12672 short int ascii_ii[] =
12673 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12674 int use_ascii (int i) {
12675 return ascii_mm[i] + ascii_ii[i];
12676 }
12677 short int ebcdic_ii[] =
12678 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12679 short int ebcdic_mm[] =
12680 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12681 int use_ebcdic (int i) {
12682 return ebcdic_mm[i] + ebcdic_ii[i];
12683 }
12684 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686int
12687main ()
12688{
12689return use_ascii (foo) == use_ebcdic (foo);
12690 ;
12691 return 0;
12692}
12693_ACEOF
12694if ac_fn_c_try_compile "$LINENO"; then :
12695 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12696 ac_cv_c_bigendian=yes
12697 fi
12698 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12699 if test "$ac_cv_c_bigendian" = unknown; then
12700 ac_cv_c_bigendian=no
12701 else
12702 # finding both strings is unlikely to happen, but who knows?
12703 ac_cv_c_bigendian=unknown
12704 fi
12705 fi
12706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012712int
12713main ()
12714{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012716 /* Are we little or big endian? From Harbison&Steele. */
12717 union
12718 {
12719 long int l;
12720 char c[sizeof (long int)];
12721 } u;
12722 u.l = 1;
12723 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012724
12725 ;
12726 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012727}
Martin v. Löwis11437992002-04-12 09:54:03 +000012728_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012729if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012730 ac_cv_c_bigendian=no
12731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012732 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12741$as_echo "$ac_cv_c_bigendian" >&6; }
12742 case $ac_cv_c_bigendian in #(
12743 yes)
12744 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12745;; #(
12746 no)
12747 ;; #(
12748 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752 ;; #(
12753 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012754 as_fn_error $? "unknown endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12756 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012757
Michael W. Hudson54241132001-12-07 15:38:26 +000012758
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012759# Check whether right shifting a negative integer extends the sign bit
12760# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12762$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012763if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012764 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012765else
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012767if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012768 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012772
12773int main()
12774{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012775 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012776}
12777
Martin v. Löwis11437992002-04-12 09:54:03 +000012778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012780 ac_cv_rshift_extends_sign=yes
12781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012782 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012786fi
12787
Martin v. Löwiseba40652007-08-30 20:10:57 +000012788fi
12789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12791$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012792if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012793then
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012796
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012797fi
12798
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012799# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12801$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012802if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012804else
Martin v. Löwis11437992002-04-12 09:54:03 +000012805
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012808#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012809int
12810main ()
12811{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012812
12813 FILE *f = fopen("/dev/null", "r");
12814 flockfile(f);
12815 getc_unlocked(f);
12816 funlockfile(f);
12817
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012822if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012823 ac_cv_have_getc_unlocked=yes
12824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825 ac_cv_have_getc_unlocked=no
12826fi
12827rm -f core conftest.err conftest.$ac_objext \
12828 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12832$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012833if test "$ac_cv_have_getc_unlocked" = yes
12834then
Martin v. Löwis11437992002-04-12 09:54:03 +000012835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012837
12838fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012839
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012840# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012841# save the value of LIBS so we don't actually link Python with readline
12842LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012843
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012844# On some systems we need to link readline to a termcap compatible
12845# library. NOTE: Keep the precedence of listed libraries synchronised
12846# with setup.py.
12847py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12849$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012850for py_libtermcap in "" ncursesw ncurses curses termcap; do
12851 if test -z "$py_libtermcap"; then
12852 READLINE_LIBS="-lreadline"
12853 else
12854 READLINE_LIBS="-lreadline -l$py_libtermcap"
12855 fi
12856 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012858/* end confdefs.h. */
12859
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860/* Override any GCC internal prototype to avoid an error.
12861 Use char because int might match the return type of a GCC
12862 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012863#ifdef __cplusplus
12864extern "C"
12865#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012866char readline ();
12867int
12868main ()
12869{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012870return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012871 ;
12872 return 0;
12873}
12874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012875if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012876 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012878rm -f core conftest.err conftest.$ac_objext \
12879 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012880 if test $py_cv_lib_readline = yes; then
12881 break
12882 fi
12883done
12884# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12885#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012886if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12888$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12891$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012894
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012895fi
12896
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012897# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12899$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012900if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012902else
12903 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012904LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012906/* end confdefs.h. */
12907
Martin v. Löwiseba40652007-08-30 20:10:57 +000012908/* Override any GCC internal prototype to avoid an error.
12909 Use char because int might match the return type of a GCC
12910 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012911#ifdef __cplusplus
12912extern "C"
12913#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012914char rl_callback_handler_install ();
12915int
12916main ()
12917{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919 ;
12920 return 0;
12921}
12922_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012924 ac_cv_lib_readline_rl_callback_handler_install=yes
12925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928rm -f core conftest.err conftest.$ac_objext \
12929 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012930LIBS=$ac_check_lib_save_LIBS
12931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12933$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012934if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012936$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012937
12938fi
12939
12940
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012941# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012944#include <readline/readline.h>
12945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012947 have_readline=yes
12948else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012949 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012950
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012951fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012952rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012953if test $have_readline = yes
12954then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012957#include <readline/readline.h>
12958
12959_ACEOF
12960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012964
12965fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012966rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012969/* end confdefs.h. */
12970#include <readline/readline.h>
12971
12972_ACEOF
12973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012977
12978fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012979rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012980
12981fi
12982
Martin v. Löwis0daad592001-09-30 21:09:59 +000012983# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12985$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012986if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012988else
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012990LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
Martin v. Löwiseba40652007-08-30 20:10:57 +000012994/* Override any GCC internal prototype to avoid an error.
12995 Use char because int might match the return type of a GCC
12996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012997#ifdef __cplusplus
12998extern "C"
12999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013000char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013001int
13002main ()
13003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 ;
13006 return 0;
13007}
13008_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013012 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013013fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013016LIBS=$ac_check_lib_save_LIBS
13017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13019$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013020if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013023
Martin v. Löwis0daad592001-09-30 21:09:59 +000013024fi
13025
Michael W. Hudson54241132001-12-07 15:38:26 +000013026
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013027# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13029$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013030if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013032else
13033 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013034LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013036/* end confdefs.h. */
13037
13038/* Override any GCC internal prototype to avoid an error.
13039 Use char because int might match the return type of a GCC
13040 builtin and then its argument prototype would still apply. */
13041#ifdef __cplusplus
13042extern "C"
13043#endif
13044char rl_completion_display_matches_hook ();
13045int
13046main ()
13047{
13048return rl_completion_display_matches_hook ();
13049 ;
13050 return 0;
13051}
13052_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013054 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013056 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058rm -f core conftest.err conftest.$ac_objext \
13059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013060LIBS=$ac_check_lib_save_LIBS
13061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13063$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013064if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013067
13068fi
13069
13070
Martin v. Löwis0daad592001-09-30 21:09:59 +000013071# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13073$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013074if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013075 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013076else
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013078LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013081
Martin v. Löwiseba40652007-08-30 20:10:57 +000013082/* Override any GCC internal prototype to avoid an error.
13083 Use char because int might match the return type of a GCC
13084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013085#ifdef __cplusplus
13086extern "C"
13087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013088char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013089int
13090main ()
13091{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013092return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 ;
13094 return 0;
13095}
13096_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013101fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102rm -f core conftest.err conftest.$ac_objext \
13103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013104LIBS=$ac_check_lib_save_LIBS
13105fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13107$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013108if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013111
Guido van Rossum353ae582001-07-10 16:45:32 +000013112fi
13113
Jack Jansendd19cf82001-12-06 22:36:17 +000013114
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013115# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013117/* end confdefs.h. */
13118#include <readline/readline.h>
13119_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013121 have_readline=yes
13122else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013123 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013124
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013125fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013126rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013127if test $have_readline = yes
13128then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013130/* end confdefs.h. */
13131#include <readline/readline.h>
13132
13133_ACEOF
13134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013138
13139fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013140rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013141
13142fi
13143
Martin v. Löwis82bca632006-02-10 20:49:30 +000013144# End of readline checks: restore LIBS
13145LIBS=$LIBS_no_readline
13146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13148$as_echo_n "checking for broken nice()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013149if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013151else
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013154 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013157/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013158
13159int main()
13160{
13161 int val1 = nice(1);
13162 if (val1 != -1 && val1 == nice(2))
13163 exit(0);
13164 exit(1);
13165}
13166
Martin v. Löwis11437992002-04-12 09:54:03 +000013167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013169 ac_cv_broken_nice=yes
13170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013175fi
13176
Martin v. Löwiseba40652007-08-30 20:10:57 +000013177fi
13178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13180$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013181if test "$ac_cv_broken_nice" = yes
13182then
Martin v. Löwis11437992002-04-12 09:54:03 +000013183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013185
13186fi
13187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13189$as_echo_n "checking for broken poll()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013190if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013194 ac_cv_broken_poll=no
13195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013197/* end confdefs.h. */
13198
13199#include <poll.h>
13200
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013201int main()
13202{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013203 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013204 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013205
13206 close (42);
13207
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013208 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013209 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013210 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013211 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013212 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013213 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013214 return 1;
13215}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013216
13217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013219 ac_cv_broken_poll=yes
13220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013226
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013227fi
13228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13230$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013231if test "$ac_cv_broken_poll" = yes
13232then
13233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013235
13236fi
13237
Brett Cannon43802422005-02-10 20:48:03 +000013238# 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 +000013239# (which is not required by ISO C or UNIX spec) and/or if we support
13240# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241ac_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 +000013242#include <$ac_cv_struct_tm>
13243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013245if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013246
13247cat >>confdefs.h <<_ACEOF
13248#define HAVE_STRUCT_TM_TM_ZONE 1
13249_ACEOF
13250
13251
13252fi
13253
13254if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013257
13258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013259 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13260"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013261if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013262 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013265fi
13266
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013269_ACEOF
13270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13272$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013273if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013274 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013277/* end confdefs.h. */
13278#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013279#if !HAVE_DECL_TZNAME
13280extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013281#endif
13282
13283int
13284main ()
13285{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013286return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013287 ;
13288 return 0;
13289}
13290_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013291if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013292 ac_cv_var_tzname=yes
13293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013294 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013295fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296rm -f core conftest.err conftest.$ac_objext \
13297 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13300$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013301 if test $ac_cv_var_tzname = yes; then
13302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013304
13305 fi
13306fi
13307
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013308
Martin v. Löwis1d459062005-03-14 21:23:33 +000013309# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13311$as_echo_n "checking for working tzset()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013312if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013313 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013314else
13315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013316if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013317 ac_cv_working_tzset=no
13318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013321
13322#include <stdlib.h>
13323#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013324#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013325
13326#if HAVE_TZNAME
13327extern char *tzname[];
13328#endif
13329
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013330int main()
13331{
Brett Cannon18367812003-09-19 00:59:16 +000013332 /* Note that we need to ensure that not only does tzset(3)
13333 do 'something' with localtime, but it works as documented
13334 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013335 This includes making sure that tzname is set properly if
13336 tm->tm_zone does not exist since it is the alternative way
13337 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013338
13339 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013340 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013341 */
13342
Martin v. Löwis1d459062005-03-14 21:23:33 +000013343 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013344 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13345
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013346 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013347 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013348 if (localtime(&groundhogday)->tm_hour != 0)
13349 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013350#if HAVE_TZNAME
13351 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13352 if (strcmp(tzname[0], "UTC") ||
13353 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13354 exit(1);
13355#endif
Brett Cannon18367812003-09-19 00:59:16 +000013356
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013357 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013358 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013359 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013360 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013361#if HAVE_TZNAME
13362 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13363 exit(1);
13364#endif
Brett Cannon18367812003-09-19 00:59:16 +000013365
13366 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13367 tzset();
13368 if (localtime(&groundhogday)->tm_hour != 11)
13369 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013370#if HAVE_TZNAME
13371 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13372 exit(1);
13373#endif
13374
13375#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013376 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13377 exit(1);
13378 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13379 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013380#endif
Brett Cannon18367812003-09-19 00:59:16 +000013381
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013382 exit(0);
13383}
13384
13385_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013387 ac_cv_working_tzset=yes
13388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013393fi
13394
Martin v. Löwiseba40652007-08-30 20:10:57 +000013395fi
13396
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13398$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013399if test "$ac_cv_working_tzset" = yes
13400then
13401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013403
13404fi
13405
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013406# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13408$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013409if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013410 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013413/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013414#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013415int
13416main ()
13417{
13418
13419struct stat st;
13420st.st_mtim.tv_nsec = 1;
13421
13422 ;
13423 return 0;
13424}
13425_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013427 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013428else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13432fi
13433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13435$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013436if test "$ac_cv_stat_tv_nsec" = yes
13437then
13438
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013440
13441fi
13442
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013443# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13445$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013446if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013450/* end confdefs.h. */
13451#include <sys/stat.h>
13452int
13453main ()
13454{
13455
13456struct stat st;
13457st.st_mtimespec.tv_nsec = 1;
13458
13459 ;
13460 return 0;
13461}
13462_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013464 ac_cv_stat_tv_nsec2=yes
13465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13469fi
13470
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13472$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013473if test "$ac_cv_stat_tv_nsec2" = yes
13474then
13475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013477
13478fi
13479
Jack Jansen666b1e72001-10-31 12:11:48 +000013480# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13482$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013483if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013485else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013487/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013488#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013489int
13490main ()
13491{
Jack Jansen666b1e72001-10-31 12:11:48 +000013492
13493 int rtn;
13494 rtn = mvwdelch(0,0,0);
13495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 ;
13497 return 0;
13498}
13499_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013501 ac_cv_mvwdelch_is_expression=yes
13502else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13506fi
13507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13509$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013510
13511if test "$ac_cv_mvwdelch_is_expression" = yes
13512then
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013515
13516fi
13517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13519$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013520if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013521 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013524/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013525#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013526int
13527main ()
13528{
Jack Jansen666b1e72001-10-31 12:11:48 +000013529
13530 WINDOW *w;
13531 w->_flags = 0;
13532
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 ;
13534 return 0;
13535}
13536_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013537if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013538 ac_cv_window_has_flags=yes
13539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013540 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13543fi
13544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13546$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013547
Jack Jansen666b1e72001-10-31 12:11:48 +000013548
13549if test "$ac_cv_window_has_flags" = yes
13550then
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013552$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013553
13554fi
13555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13557$as_echo_n "checking for is_term_resized... " >&6; }
13558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013559/* end confdefs.h. */
13560#include <curses.h>
13561int
13562main ()
13563{
13564void *x=is_term_resized
13565 ;
13566 return 0;
13567}
13568_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013571$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013572
Matthias Klosec511b472010-05-08 11:01:39 +000013573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013574$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13577$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013578
13579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13581
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13583$as_echo_n "checking for resize_term... " >&6; }
13584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013585/* end confdefs.h. */
13586#include <curses.h>
13587int
13588main ()
13589{
13590void *x=resize_term
13591 ;
13592 return 0;
13593}
13594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013597$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013598
Matthias Klosec511b472010-05-08 11:01:39 +000013599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013600$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13603$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013604
13605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13609$as_echo_n "checking for resizeterm... " >&6; }
13610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013611/* end confdefs.h. */
13612#include <curses.h>
13613int
13614main ()
13615{
13616void *x=resizeterm
13617 ;
13618 return 0;
13619}
13620_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013624
Matthias Klosec511b472010-05-08 11:01:39 +000013625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13629$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013630
13631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13635$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013636
13637if test -r /dev/ptmx
13638then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13640$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013643
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13646$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013647fi
13648
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13650$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013651
13652if test -r /dev/ptc
13653then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13655$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013657$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013658
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13661$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013662fi
13663
Mark Dickinson82864d12009-11-15 16:18:58 +000013664if test "$have_long_long" = yes
13665then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13667$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013668 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013672 ac_cv_have_long_long_format=no
13673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013675/* end confdefs.h. */
13676
13677 #include <stdio.h>
13678 #include <stddef.h>
13679 #include <string.h>
13680
13681 #ifdef HAVE_SYS_TYPES_H
13682 #include <sys/types.h>
13683 #endif
13684
13685 int main()
13686 {
13687 char buffer[256];
13688
13689 if (sprintf(buffer, "%lld", (long long)123) < 0)
13690 return 1;
13691 if (strcmp(buffer, "123"))
13692 return 1;
13693
13694 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13695 return 1;
13696 if (strcmp(buffer, "-123"))
13697 return 1;
13698
13699 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13700 return 1;
13701 if (strcmp(buffer, "123"))
13702 return 1;
13703
13704 return 0;
13705 }
13706
13707_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013709 ac_cv_have_long_long_format=yes
13710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13714 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013715fi
13716
13717
Mark Dickinson82864d12009-11-15 16:18:58 +000013718fi
13719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13721$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013722fi
13723
Mark Dickinson5ce84742009-12-31 20:48:04 +000013724if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013725then
13726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013728
13729fi
13730
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013731if test $ac_sys_system = Darwin
13732then
13733 LIBS="$LIBS -framework CoreFoundation"
13734fi
13735
Mark Dickinson82864d12009-11-15 16:18:58 +000013736
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13738$as_echo_n "checking for %zd printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013739if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013740 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013743 ac_cv_have_size_t_format="cross -- assuming yes"
13744
Brett Cannon09d12362006-05-11 05:11:33 +000013745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013747/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013748
Brett Cannon09d12362006-05-11 05:11:33 +000013749#include <stdio.h>
13750#include <stddef.h>
13751#include <string.h>
13752
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013753#ifdef HAVE_SYS_TYPES_H
13754#include <sys/types.h>
13755#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013756
13757#ifdef HAVE_SSIZE_T
13758typedef ssize_t Py_ssize_t;
13759#elif SIZEOF_VOID_P == SIZEOF_LONG
13760typedef long Py_ssize_t;
13761#else
13762typedef int Py_ssize_t;
13763#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013764
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013765int main()
13766{
13767 char buffer[256];
13768
Brett Cannon09d12362006-05-11 05:11:33 +000013769 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13770 return 1;
13771
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013772 if (strcmp(buffer, "123"))
13773 return 1;
13774
13775 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13776 return 1;
13777
13778 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013779 return 1;
13780
13781 return 0;
13782}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013783
Brett Cannon09d12362006-05-11 05:11:33 +000013784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013785if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013786 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013788 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013792fi
13793
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13796$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013797if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013800
13801fi
13802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013804#ifdef HAVE_SYS_TYPES_H
13805#include <sys/types.h>
13806#endif
13807#ifdef HAVE_SYS_SOCKET_H
13808#include <sys/socket.h>
13809#endif
13810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013812if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013815
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013816$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013817
13818fi
13819
Michael W. Hudson54241132001-12-07 15:38:26 +000013820
Benjamin Peterson7497e912010-10-16 00:53:39 +000013821case $ac_sys_system in
13822AIX*)
13823
13824$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13825 ;;
13826esac
13827
13828
Michael W. Hudson54241132001-12-07 15:38:26 +000013829
13830
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013831for h in `(cd $srcdir;echo Python/thread_*.h)`
13832do
13833 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13834done
13835
Michael W. Hudson54241132001-12-07 15:38:26 +000013836
Neal Norwitzd24499d2005-12-18 21:36:39 +000013837SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13839$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013840for dir in $SRCDIRS; do
13841 if test ! -d $dir; then
13842 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013843 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013844done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13846$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013847
Guido van Rossum627b2d71993-12-24 10:39:16 +000013848# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013849ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013850
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013851ac_config_files="$ac_config_files Modules/ld_so_aix"
13852
Martin v. Löwis11437992002-04-12 09:54:03 +000013853cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013854# This file is a shell script that caches the results of configure
13855# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013856# scripts and configure runs, see configure's option --config-cache.
13857# It is not useful on other systems. If it contains results you don't
13858# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859#
Martin v. Löwis11437992002-04-12 09:54:03 +000013860# config.status only pays attention to the cache file if you give it
13861# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013862#
Skip Montanaro6dead952003-09-25 14:50:04 +000013863# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013864# loading this file, other *unset* `ac_cv_foo' will be assigned the
13865# following values.
13866
13867_ACEOF
13868
Guido van Rossumf78abae1997-01-21 22:02:36 +000013869# The following way of writing the cache mishandles newlines in values,
13870# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013871# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013872# Ultrix sh set writes to stderr and can't be redirected directly,
13873# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874(
13875 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13876 eval ac_val=\$$ac_var
13877 case $ac_val in #(
13878 *${as_nl}*)
13879 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13881$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882 esac
13883 case $ac_var in #(
13884 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013885 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13886 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887 esac ;;
13888 esac
13889 done
13890
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13893 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013894 # `set' does not quote correctly, so add quotes: double-quote
13895 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013897 "s/'/'\\\\''/g;
13898 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 *)
13901 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013904 esac |
13905 sort
13906) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13912 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13914 :end' >>confcache
13915if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13916 if test -w "$cache_file"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013917 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13919$as_echo "$as_me: updating cache $cache_file" >&6;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013920 if test ! -f "$cache_file" || test -h "$cache_file"; then
13921 cat confcache >"$cache_file"
13922 else
13923 case $cache_file in #(
13924 */* | ?:*)
13925 mv -f confcache "$cache_file"$$ &&
13926 mv -f "$cache_file"$$ "$cache_file" ;; #(
13927 *)
13928 mv -f confcache "$cache_file" ;;
13929 esac
13930 fi
13931 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013932 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13934$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013935 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013936fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013937rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013938
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013939test "x$prefix" = xNONE && prefix=$ac_default_prefix
13940# Let make expand exec_prefix.
13941test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013942
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013943DEFS=-DHAVE_CONFIG_H
13944
Skip Montanaro6dead952003-09-25 14:50:04 +000013945ac_libobjs=
13946ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013947U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013948for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13949 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013950 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013952 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13953 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013954 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13955 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013956done
13957LIBOBJS=$ac_libobjs
13958
13959LTLIBOBJS=$ac_ltlibobjs
13960
13961
Martin v. Löwis11437992002-04-12 09:54:03 +000013962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013964: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013966ac_clean_files_save=$ac_clean_files
13967ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13969$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13970as_write_fail=0
13971cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013972#! $SHELL
13973# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013974# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013975# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013976# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013979ac_cs_recheck=false
13980ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013981
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013982SHELL=\${CONFIG_SHELL-$SHELL}
13983export SHELL
13984_ASEOF
13985cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13986## -------------------- ##
13987## M4sh Initialization. ##
13988## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013989
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990# Be more Bourne compatible
13991DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013992if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 emulate sh
13994 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013995 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013996 # is contrary to our usage. Disable this feature.
13997 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000 case `(set -o) 2>/dev/null` in #(
14001 *posix*) :
14002 set -o posix ;; #(
14003 *) :
14004 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014005esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014006fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014007
Skip Montanaro6dead952003-09-25 14:50:04 +000014008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014009as_nl='
14010'
14011export as_nl
14012# Printing a long string crashes Solaris 7 /usr/bin/printf.
14013as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14014as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14015as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14016# Prefer a ksh shell builtin over an external printf program on Solaris,
14017# but without wasting forks for bash or zsh.
14018if test -z "$BASH_VERSION$ZSH_VERSION" \
14019 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14020 as_echo='print -r --'
14021 as_echo_n='print -rn --'
14022elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14023 as_echo='printf %s\n'
14024 as_echo_n='printf %s'
14025else
14026 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14027 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14028 as_echo_n='/usr/ucb/echo -n'
14029 else
14030 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14031 as_echo_n_body='eval
14032 arg=$1;
14033 case $arg in #(
14034 *"$as_nl"*)
14035 expr "X$arg" : "X\\(.*\\)$as_nl";
14036 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14037 esac;
14038 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14039 '
14040 export as_echo_n_body
14041 as_echo_n='sh -c $as_echo_n_body as_echo'
14042 fi
14043 export as_echo_body
14044 as_echo='sh -c $as_echo_body as_echo'
14045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
14047# The user is always right.
14048if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049 PATH_SEPARATOR=:
14050 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14051 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14052 PATH_SEPARATOR=';'
14053 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Martin v. Löwiseba40652007-08-30 20:10:57 +000014056
14057# IFS
14058# We need space, tab and new line, in precisely that order. Quoting is
14059# there to prevent editors from complaining about space-tab.
14060# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14061# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014062IFS=" "" $as_nl"
14063
14064# Find who we are. Look in the path if we contain no directory separator.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014065as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014066case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067 *[\\/]* ) as_myself=$0 ;;
14068 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014069for as_dir in $PATH
14070do
14071 IFS=$as_save_IFS
14072 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014073 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14074 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014076
Martin v. Löwiseba40652007-08-30 20:10:57 +000014077 ;;
14078esac
14079# We did not find ourselves, most probably we were run as `sh COMMAND'
14080# in which case we are not to be found in the path.
14081if test "x$as_myself" = x; then
14082 as_myself=$0
14083fi
14084if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14086 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014087fi
14088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089# Unset variables that we do not need and which cause bugs (e.g. in
14090# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14091# suppresses any "Segmentation fault" message there. '((' could
14092# trigger a bug in pdksh 5.2.14.
14093for as_var in BASH_ENV ENV MAIL MAILPATH
14094do eval test x\${$as_var+set} = xset \
14095 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014096done
14097PS1='$ '
14098PS2='> '
14099PS4='+ '
14100
14101# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102LC_ALL=C
14103export LC_ALL
14104LANGUAGE=C
14105export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014107# CDPATH.
14108(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14109
14110
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014111# as_fn_error STATUS ERROR [LINENO LOG_FD]
14112# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014113# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14114# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014115# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014116as_fn_error ()
14117{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014118 as_status=$1; test $as_status -eq 0 && as_status=1
14119 if test "$4"; then
14120 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14121 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014122 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014123 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014124 as_fn_exit $as_status
14125} # as_fn_error
14126
14127
14128# as_fn_set_status STATUS
14129# -----------------------
14130# Set $? to STATUS, without forking.
14131as_fn_set_status ()
14132{
14133 return $1
14134} # as_fn_set_status
14135
14136# as_fn_exit STATUS
14137# -----------------
14138# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14139as_fn_exit ()
14140{
14141 set +e
14142 as_fn_set_status $1
14143 exit $1
14144} # as_fn_exit
14145
14146# as_fn_unset VAR
14147# ---------------
14148# Portably unset VAR.
14149as_fn_unset ()
14150{
14151 { eval $1=; unset $1;}
14152}
14153as_unset=as_fn_unset
14154# as_fn_append VAR VALUE
14155# ----------------------
14156# Append the text in VALUE to the end of the definition contained in VAR. Take
14157# advantage of any shell optimizations that allow amortized linear growth over
14158# repeated appends, instead of the typical quadratic growth present in naive
14159# implementations.
14160if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14161 eval 'as_fn_append ()
14162 {
14163 eval $1+=\$2
14164 }'
14165else
14166 as_fn_append ()
14167 {
14168 eval $1=\$$1\$2
14169 }
14170fi # as_fn_append
14171
14172# as_fn_arith ARG...
14173# ------------------
14174# Perform arithmetic evaluation on the ARGs, and store the result in the
14175# global $as_val. Take advantage of shells that can avoid forks. The arguments
14176# must be portable across $(()) and expr.
14177if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14178 eval 'as_fn_arith ()
14179 {
14180 as_val=$(( $* ))
14181 }'
14182else
14183 as_fn_arith ()
14184 {
14185 as_val=`expr "$@" || test $? -eq 1`
14186 }
14187fi # as_fn_arith
14188
14189
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190if expr a : '\(a\)' >/dev/null 2>&1 &&
14191 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14192 as_expr=expr
14193else
14194 as_expr=false
14195fi
14196
14197if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14198 as_basename=basename
14199else
14200 as_basename=false
14201fi
14202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014203if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14204 as_dirname=dirname
14205else
14206 as_dirname=false
14207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014208
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209as_me=`$as_basename -- "$0" ||
14210$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14211 X"$0" : 'X\(//\)$' \| \
14212 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014213$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214 sed '/^.*\/\([^/][^/]*\)\/*$/{
14215 s//\1/
14216 q
14217 }
14218 /^X\/\(\/\/\)$/{
14219 s//\1/
14220 q
14221 }
14222 /^X\/\(\/\).*/{
14223 s//\1/
14224 q
14225 }
14226 s/.*/./; q'`
14227
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014228# Avoid depending upon Character Ranges.
14229as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14230as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14231as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14232as_cr_digits='0123456789'
14233as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014234
14235ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014236case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014237-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014238 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240 xy) ECHO_C='\c';;
14241 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14242 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243 esac;;
14244*)
14245 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014247
Martin v. Löwis11437992002-04-12 09:54:03 +000014248rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014249if test -d conf$$.dir; then
14250 rm -f conf$$.dir/conf$$.file
14251else
14252 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014253 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255if (echo >conf$$.file) 2>/dev/null; then
14256 if ln -s conf$$.file conf$$ 2>/dev/null; then
14257 as_ln_s='ln -s'
14258 # ... but there are two gotchas:
14259 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14260 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14261 # In both cases, we have to default to `cp -p'.
14262 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14263 as_ln_s='cp -p'
14264 elif ln conf$$.file conf$$ 2>/dev/null; then
14265 as_ln_s=ln
14266 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014267 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014269else
14270 as_ln_s='cp -p'
14271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014272rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14273rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014275
14276# as_fn_mkdir_p
14277# -------------
14278# Create "$as_dir" as a directory, including parents if necessary.
14279as_fn_mkdir_p ()
14280{
14281
14282 case $as_dir in #(
14283 -*) as_dir=./$as_dir;;
14284 esac
14285 test -d "$as_dir" || eval $as_mkdir_p || {
14286 as_dirs=
14287 while :; do
14288 case $as_dir in #(
14289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14290 *) as_qdir=$as_dir;;
14291 esac
14292 as_dirs="'$as_qdir' $as_dirs"
14293 as_dir=`$as_dirname -- "$as_dir" ||
14294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14295 X"$as_dir" : 'X\(//\)[^/]' \| \
14296 X"$as_dir" : 'X\(//\)$' \| \
14297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14298$as_echo X"$as_dir" |
14299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14300 s//\1/
14301 q
14302 }
14303 /^X\(\/\/\)[^/].*/{
14304 s//\1/
14305 q
14306 }
14307 /^X\(\/\/\)$/{
14308 s//\1/
14309 q
14310 }
14311 /^X\(\/\).*/{
14312 s//\1/
14313 q
14314 }
14315 s/.*/./; q'`
14316 test -d "$as_dir" && break
14317 done
14318 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014319 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014320
14321
14322} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014323if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014324 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014325else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014326 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014327 as_mkdir_p=false
14328fi
14329
Martin v. Löwiseba40652007-08-30 20:10:57 +000014330if test -x / >/dev/null 2>&1; then
14331 as_test_x='test -x'
14332else
14333 if ls -dL / >/dev/null 2>&1; then
14334 as_ls_L_option=L
14335 else
14336 as_ls_L_option=
14337 fi
14338 as_test_x='
14339 eval sh -c '\''
14340 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014341 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014342 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343 case $1 in #(
14344 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014345 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014347 ???[sx]*):;;*)false;;esac;fi
14348 '\'' sh
14349 '
14350fi
14351as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014352
14353# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014354as_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 +000014355
14356# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014357as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
14359
Martin v. Löwis11437992002-04-12 09:54:03 +000014360exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014361## ----------------------------------- ##
14362## Main body of $CONFIG_STATUS script. ##
14363## ----------------------------------- ##
14364_ASEOF
14365test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14368# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014369# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370# values after options handling.
14371ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014372This file was extended by python $as_me 2.7, which was
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014373generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
14375 CONFIG_FILES = $CONFIG_FILES
14376 CONFIG_HEADERS = $CONFIG_HEADERS
14377 CONFIG_LINKS = $CONFIG_LINKS
14378 CONFIG_COMMANDS = $CONFIG_COMMANDS
14379 $ $0 $@
14380
Martin v. Löwiseba40652007-08-30 20:10:57 +000014381on `(hostname || uname -n) 2>/dev/null | sed 1q`
14382"
14383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384_ACEOF
14385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386case $ac_config_files in *"
14387"*) set x $ac_config_files; shift; ac_config_files=$*;;
14388esac
14389
14390case $ac_config_headers in *"
14391"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14392esac
14393
14394
14395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014396# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014397config_files="$ac_config_files"
14398config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Martin v. Löwiseba40652007-08-30 20:10:57 +000014400_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014402cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014403ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404\`$as_me' instantiates files and other configuration actions
14405from templates according to the current configuration. Unless the files
14406and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014408Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
14410 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014411 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412 --config print configuration, then exit
14413 -q, --quiet, --silent
14414 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 -d, --debug don't remove temporary files
14416 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417 --file=FILE[:TEMPLATE]
14418 instantiate the configuration file FILE
14419 --header=FILE[:TEMPLATE]
14420 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
14422Configuration files:
14423$config_files
14424
14425Configuration headers:
14426$config_headers
14427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014428Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014429
Martin v. Löwiseba40652007-08-30 20:10:57 +000014430_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14432ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014433ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014434python config.status 2.7
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014435configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014436 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014438Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014439This config.status script is free software; the Free Software Foundation
14440gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014441
14442ac_pwd='$ac_pwd'
14443srcdir='$srcdir'
14444INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014445test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014446_ACEOF
14447
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014448cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14449# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014450ac_need_defaults=:
14451while test $# != 0
14452do
14453 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014454 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014455 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14456 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014457 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014458 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014459 --*=)
14460 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14461 ac_optarg=
14462 ac_shift=:
14463 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014464 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014465 ac_option=$1
14466 ac_optarg=$2
14467 ac_shift=shift
14468 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 esac
14470
Skip Montanaro6dead952003-09-25 14:50:04 +000014471 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014473 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14474 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014475 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476 $as_echo "$ac_cs_version"; exit ;;
14477 --config | --confi | --conf | --con | --co | --c )
14478 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014479 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 debug=: ;;
14481 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014482 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014483 case $ac_optarg in
14484 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014485 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486 esac
14487 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 ac_need_defaults=false;;
14489 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014490 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491 case $ac_optarg in
14492 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14493 esac
14494 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496 --he | --h)
14497 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014498 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014502 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14503 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14504 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014505
14506 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014507 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014510 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
14513 esac
14514 shift
14515done
14516
Skip Montanaro6dead952003-09-25 14:50:04 +000014517ac_configure_extra_args=
14518
14519if $ac_cs_silent; then
14520 exec 6>/dev/null
14521 ac_configure_extra_args="$ac_configure_extra_args --silent"
14522fi
14523
14524_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014525cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014526if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014527 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14528 shift
14529 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14530 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014532 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014533fi
14534
Martin v. Löwis11437992002-04-12 09:54:03 +000014535_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014536cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537exec 5>>config.log
14538{
14539 echo
14540 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14541## Running $as_me. ##
14542_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014543 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014544} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014548_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551
14552# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014553for ac_config_target in $ac_config_targets
14554do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555 case $ac_config_target in
14556 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14557 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14558 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14559 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014560 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14561 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014562 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14563 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014564 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014565 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014566
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014567 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 esac
14569done
14570
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571
Martin v. Löwis11437992002-04-12 09:54:03 +000014572# If the user did not use the arguments to specify the items to instantiate,
14573# then the envvar interface is used. Set only those that are not.
14574# We use the long form for the default assignment because of an extremely
14575# bizarre bug on SunOS 4.1.3.
14576if $ac_need_defaults; then
14577 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14578 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14579fi
14580
Skip Montanaro6dead952003-09-25 14:50:04 +000014581# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014582# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014583# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014584# Hook for its removal unless debugging.
14585# Note that there is a small window in which the directory will not be cleaned:
14586# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014587$debug ||
14588{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014589 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014590 trap 'exit_status=$?
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014591 : "${ac_tmp:=$tmp}"
14592 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014593' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014594 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014595}
Martin v. Löwis11437992002-04-12 09:54:03 +000014596# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014599 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014600 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014601} ||
14602{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014603 tmp=./conf$$-$RANDOM
14604 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014605} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14606ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014607
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608# Set up the scripts for CONFIG_FILES section.
14609# No need to generate them if there are no CONFIG_FILES.
14610# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014611if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014613
14614ac_cr=`echo X | tr X '\015'`
14615# On cygwin, bash can eat \r inside `` if the user requested igncr.
14616# But we know of no other shell where ac_cr would be empty at this
14617# point, so we can use a bashism as a fallback.
14618if test "x$ac_cr" = x; then
14619 eval ac_cr=\$\'\\r\'
14620fi
14621ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14622if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014623 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014624else
14625 ac_cs_awk_cr=$ac_cr
14626fi
14627
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014628echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
14630
Martin v. Löwiseba40652007-08-30 20:10:57 +000014631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014632{
14633 echo "cat >conf$$subs.awk <<_ACEOF" &&
14634 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14635 echo "_ACEOF"
14636} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014637 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14638ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014639ac_delim='%!_!# '
14640for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014641 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014642 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014644 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14645 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014646 break
14647 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014648 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014649 else
14650 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014652done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014653rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014655cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014656cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014657_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014658sed -n '
14659h
14660s/^/S["/; s/!.*/"]=/
14661p
14662g
14663s/^[^!]*!//
14664:repl
14665t repl
14666s/'"$ac_delim"'$//
14667t delim
14668:nl
14669h
14670s/\(.\{148\}\)..*/\1/
14671t more1
14672s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14673p
14674n
14675b repl
14676:more1
14677s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14678p
14679g
14680s/.\{148\}//
14681t nl
14682:delim
14683h
14684s/\(.\{148\}\)..*/\1/
14685t more2
14686s/["\\]/\\&/g; s/^/"/; s/$/"/
14687p
14688b
14689:more2
14690s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14691p
14692g
14693s/.\{148\}//
14694t delim
14695' <conf$$subs.awk | sed '
14696/^[^""]/{
14697 N
14698 s/\n//
14699}
14700' >>$CONFIG_STATUS || ac_write_fail=1
14701rm -f conf$$subs.awk
14702cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14703_ACAWK
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014704cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014705 for (key in S) S_is_set[key] = 1
14706 FS = ""
14707
14708}
14709{
14710 line = $ 0
14711 nfields = split(line, field, "@")
14712 substed = 0
14713 len = length(field[1])
14714 for (i = 2; i < nfields; i++) {
14715 key = field[i]
14716 keylen = length(key)
14717 if (S_is_set[key]) {
14718 value = S[key]
14719 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14720 len += length(value) + length(field[++i])
14721 substed = 1
14722 } else
14723 len += 1 + keylen
14724 }
14725
14726 print line
14727}
14728
14729_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14732if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14733 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14734else
14735 cat
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014736fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14737 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014738_ACEOF
14739
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014740# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14741# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742# trailing colons and then remove the whole line if VPATH becomes empty
14743# (actually we leave an empty line to preserve line numbers).
14744if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014745 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14746h
14747s///
14748s/^/:/
14749s/[ ]*$/:/
14750s/:\$(srcdir):/:/g
14751s/:\${srcdir}:/:/g
14752s/:@srcdir@:/:/g
14753s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014754s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014755x
14756s/\(=[ ]*\).*/\1/
14757G
14758s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014759s/^[^=]*=[ ]*$//
14760}'
14761fi
14762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014764fi # test -n "$CONFIG_FILES"
14765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014766# Set up the scripts for CONFIG_HEADERS section.
14767# No need to generate them if there are no CONFIG_HEADERS.
14768# This happens for instance with `./config.status Makefile'.
14769if test -n "$CONFIG_HEADERS"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014770cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014771BEGIN {
14772_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014774# Transform confdefs.h into an awk script `defines.awk', embedded as
14775# here-document in config.status, that substitutes the proper values into
14776# config.h.in to produce config.h.
14777
14778# Create a delimiter string that does not exist in confdefs.h, to ease
14779# handling of long lines.
14780ac_delim='%!_!# '
14781for ac_last_try in false false :; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014782 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14783 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014784 break
14785 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014786 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014787 else
14788 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14789 fi
14790done
14791
14792# For the awk script, D is an array of macro values keyed by name,
14793# likewise P contains macro parameters if any. Preserve backslash
14794# newline sequences.
14795
14796ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14797sed -n '
14798s/.\{148\}/&'"$ac_delim"'/g
14799t rset
14800:rset
14801s/^[ ]*#[ ]*define[ ][ ]*/ /
14802t def
14803d
14804:def
14805s/\\$//
14806t bsnl
14807s/["\\]/\\&/g
14808s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14809D["\1"]=" \3"/p
14810s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14811d
14812:bsnl
14813s/["\\]/\\&/g
14814s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14815D["\1"]=" \3\\\\\\n"\\/p
14816t cont
14817s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14818t cont
14819d
14820:cont
14821n
14822s/.\{148\}/&'"$ac_delim"'/g
14823t clear
14824:clear
14825s/\\$//
14826t bsnlc
14827s/["\\]/\\&/g; s/^/"/; s/$/"/p
14828d
14829:bsnlc
14830s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14831b cont
14832' <confdefs.h | sed '
14833s/'"$ac_delim"'/"\\\
14834"/g' >>$CONFIG_STATUS || ac_write_fail=1
14835
14836cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14837 for (key in D) D_is_set[key] = 1
14838 FS = ""
14839}
14840/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14841 line = \$ 0
14842 split(line, arg, " ")
14843 if (arg[1] == "#") {
14844 defundef = arg[2]
14845 mac1 = arg[3]
14846 } else {
14847 defundef = substr(arg[1], 2)
14848 mac1 = arg[2]
14849 }
14850 split(mac1, mac2, "(") #)
14851 macro = mac2[1]
14852 prefix = substr(line, 1, index(line, defundef) - 1)
14853 if (D_is_set[macro]) {
14854 # Preserve the white space surrounding the "#".
14855 print prefix "define", macro P[macro] D[macro]
14856 next
14857 } else {
14858 # Replace #undef with comments. This is necessary, for example,
14859 # in the case of _POSIX_SOURCE, which is predefined and required
14860 # on some systems where configure will not decide to define it.
14861 if (defundef == "undef") {
14862 print "/*", prefix defundef, macro, "*/"
14863 next
14864 }
14865 }
14866}
14867{ print }
14868_ACAWK
14869_ACEOF
14870cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014871 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014872fi # test -n "$CONFIG_HEADERS"
14873
14874
14875eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14876shift
14877for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014878do
14879 case $ac_tag in
14880 :[FHLC]) ac_mode=$ac_tag; continue;;
14881 esac
14882 case $ac_mode$ac_tag in
14883 :[FHL]*:*);;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014884 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885 :[FH]-) ac_tag=-:-;;
14886 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14887 esac
14888 ac_save_IFS=$IFS
14889 IFS=:
14890 set x $ac_tag
14891 IFS=$ac_save_IFS
14892 shift
14893 ac_file=$1
14894 shift
14895
14896 case $ac_mode in
14897 :L) ac_source=$1;;
14898 :[FH])
14899 ac_file_inputs=
14900 for ac_f
14901 do
14902 case $ac_f in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014903 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014904 *) # Look for the file first in the build tree, then in the source tree
14905 # (if the path is not absolute). The absolute path cannot be DOS-style,
14906 # because $ac_f cannot contain `:'.
14907 test -f "$ac_f" ||
14908 case $ac_f in
14909 [\\/$]*) false;;
14910 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14911 esac ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014912 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14915 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014916 done
14917
14918 # Let's still pretend it is `configure' which instantiates (i.e., don't
14919 # use $as_me), people would be surprised to read:
14920 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014921 configure_input='Generated from '`
14922 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14923 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014924 if test x"$ac_file" != x-; then
14925 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014926 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14927$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014929 # Neutralize special characters interpreted by sed in replacement strings.
14930 case $configure_input in #(
14931 *\&* | *\|* | *\\* )
14932 ac_sed_conf_input=`$as_echo "$configure_input" |
14933 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14934 *) ac_sed_conf_input=$configure_input;;
14935 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936
14937 case $ac_tag in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014938 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14939 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014940 esac
14941 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 esac
14943
Martin v. Löwiseba40652007-08-30 20:10:57 +000014944 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014945$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014946 X"$ac_file" : 'X\(//\)[^/]' \| \
14947 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014948 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014949$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014950 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14951 s//\1/
14952 q
14953 }
14954 /^X\(\/\/\)[^/].*/{
14955 s//\1/
14956 q
14957 }
14958 /^X\(\/\/\)$/{
14959 s//\1/
14960 q
14961 }
14962 /^X\(\/\).*/{
14963 s//\1/
14964 q
14965 }
14966 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014967 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 ac_builddir=.
14969
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970case "$ac_dir" in
14971.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14972*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014973 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014975 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014976 case $ac_top_builddir_sub in
14977 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14978 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14979 esac ;;
14980esac
14981ac_abs_top_builddir=$ac_pwd
14982ac_abs_builddir=$ac_pwd$ac_dir_suffix
14983# for backward compatibility:
14984ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014985
14986case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014987 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989 ac_top_srcdir=$ac_top_builddir_sub
14990 ac_abs_top_srcdir=$ac_pwd ;;
14991 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993 ac_top_srcdir=$srcdir
14994 ac_abs_top_srcdir=$srcdir ;;
14995 *) # Relative name.
14996 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14997 ac_top_srcdir=$ac_top_build_prefix$srcdir
14998 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014999esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015001
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003 case $ac_mode in
15004 :F)
15005 #
15006 # CONFIG_FILE
15007 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015008
15009 case $INSTALL in
15010 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015011 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015013_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015015cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015016# If the template does not know about datarootdir, expand it.
15017# FIXME: This hack should be removed a few years after 2.60.
15018ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015019ac_sed_dataroot='
15020/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015021 p
15022 q
15023}
15024/@datadir@/p
15025/@docdir@/p
15026/@infodir@/p
15027/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015028/@mandir@/p'
15029case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030*datarootdir*) ac_datarootdir_seen=yes;;
15031*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15033$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036 ac_datarootdir_hack='
15037 s&@datadir@&$datadir&g
15038 s&@docdir@&$docdir&g
15039 s&@infodir@&$infodir&g
15040 s&@localedir@&$localedir&g
15041 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015042 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043esac
15044_ACEOF
15045
15046# Neutralize VPATH when `$srcdir' = `.'.
15047# Shell code in configure.ac might set extrasub.
15048# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15050ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015051$extrasub
15052_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015054:t
15055/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015056s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015058s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059s&@srcdir@&$ac_srcdir&;t t
15060s&@abs_srcdir@&$ac_abs_srcdir&;t t
15061s&@top_srcdir@&$ac_top_srcdir&;t t
15062s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15063s&@builddir@&$ac_builddir&;t t
15064s&@abs_builddir@&$ac_abs_builddir&;t t
15065s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15066s&@INSTALL@&$ac_INSTALL&;t t
15067$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015068"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015069eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15070 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015071
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015073 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15074 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15075 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015077which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015079which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015081 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 case $ac_file in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015083 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15084 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015085 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015086 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087 ;;
15088 :H)
15089 #
15090 # CONFIG_HEADER
15091 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015093 {
15094 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015095 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15096 } >"$ac_tmp/config.h" \
15097 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15098 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015099 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15100$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015102 rm -f "$ac_file"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015103 mv "$ac_tmp/config.h" "$ac_file" \
15104 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 fi
15106 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015107 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015108 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15109 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015112
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113
15114 esac
15115
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015116
15117 case $ac_file$ac_mode in
15118 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15119
15120 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015121done # for ac_tag
15122
Guido van Rossum627b2d71993-12-24 10:39:16 +000015123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015124as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015125_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015126ac_clean_files=$ac_clean_files_save
15127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015129 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015130
Martin v. Löwis11437992002-04-12 09:54:03 +000015131
15132# configure is writing to config.log, and then calls config.status.
15133# config.status does its own redirection, appending to config.log.
15134# Unfortunately, on DOS this fails, as config.log is still kept open
15135# by configure, so config.status won't be able to write to it; its
15136# output is simply discarded. So we exec the FD to /dev/null,
15137# effectively closing config.log, so it can be properly (re)opened and
15138# appended to by config.status. When coming back to configure, we
15139# need to make the FD available again.
15140if test "$no_create" != yes; then
15141 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015142 ac_config_status_args=
15143 test "$silent" = yes &&
15144 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015146 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 exec 5>>config.log
15148 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15149 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015150 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015151fi
15152if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15154$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015155fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015156
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015157
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015158echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015159if test ! -f Modules/Setup
15160then
15161 cp $srcdir/Modules/Setup.dist Modules/Setup
15162fi
15163
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015164echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015165if test ! -f Modules/Setup.local
15166then
15167 echo "# Edit this file for local setup changes" >Modules/Setup.local
15168fi
15169
15170echo "creating Makefile"
15171$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15172 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015173 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015174
15175case $ac_sys_system in
15176BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015178
15179 Support for BeOS is deprecated as of Python 2.6.
15180 See PEP 11 for the gory details.
15181 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015182$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015183
15184 Support for BeOS is deprecated as of Python 2.6.
15185 See PEP 11 for the gory details.
15186 " >&2;}
15187 ;;
15188*) ;;
15189esac
15190
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015191mv config.c Modules